PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.10
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.10
2.1.10 2.1.9 2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 All 110 releases
← All changes | build/index.js +318 -309 2.1.9 → 2.1.10 View file →
@@ -273,317 +273,326 @@
273 273 d:"M137.499,304.69c15.674,0,29.948-6.083,40.611-16l78.128,36.678c-0.583,3.341-0.904,6.771-0.904,10.276 c0,32.913,26.782,59.695,59.695,59.695c32.913,0,59.695-26.782,59.695-59.695c0-32.913-26.782-59.695-59.695-59.695 c-18.454,0-34.978,8.422-45.937,21.621l-74.543-34.995c1.717-5.561,2.646-11.464,2.646-17.581c0-4.942-0.615-9.741-1.753-14.337 l75.93-35.646c10.906,11.704,26.437,19.043,43.657,19.043c32.913,0,59.695-26.782,59.695-59.695 c0-32.913-26.782-59.695-59.695-59.695c-32.913,0-59.695,26.782-59.695,59.695c0,4.681,0.559,9.232,1.583,13.606l-76.295,35.817 c-10.876-11.376-26.181-18.484-43.123-18.484c-32.913,0-59.695,26.782-59.695,59.695S104.586,304.69,137.499,304.69z M315.028,306.574c16.03,0,29.07,13.04,29.07,29.07c0,16.03-13.04,29.07-29.07,29.07c-16.03,0-29.07-13.04-29.07-29.07 C285.958,319.614,298.998,306.574,315.028,306.574z M315.028,125.291c16.03,0,29.07,13.039,29.07,29.07 c0,16.03-13.04,29.07-29.07,29.07c-16.03,0-29.07-13.04-29.07-29.07C285.958,138.331,298.998,125.291,315.028,125.291z M137.499,215.925c16.03,0,29.07,13.04,29.07,29.07s-13.039,29.07-29.07,29.07s-29.07-13.04-29.07-29.07 S121.468,215.925,137.499,215.925z"})]}),Wr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 473.931 473.931",children:[(0,l.jsx)("circle",{cx:"236.966",cy:"236.966",r:"236.966"}),(0,l.jsx)("path",{fill:"#FFC50B",d:"M100.174,228.419c-0.228-0.67-0.797-1.156-1.489-1.257l-23.768-3.454l-10.634-21.538\r c-0.614-1.253-2.69-1.253-3.304,0l-10.634,21.538l-23.76,3.454c-0.696,0.101-1.272,0.587-1.489,1.257\r c-0.213,0.67-0.037,1.399,0.468,1.886l17.197,16.763l-4.056,23.67c-0.123,0.692,0.161,1.388,0.73,1.8s1.325,0.468,1.946,0.142\r l21.253-11.177l21.261,11.177c0.269,0.142,0.561,0.21,0.861,0.21c0.382,0,0.76-0.116,1.081-0.352\r c0.561-0.412,0.849-1.111,0.722-1.8l-4.052-23.67l17.197-16.763C100.212,229.819,100.388,229.086,100.174,228.419z"}),(0,l.jsx)("path",{fill:"#FFC50B",d:"M187.339,228.419c-0.221-0.67-0.797-1.156-1.489-1.257l-23.76-3.454l-10.634-21.538\r c-0.614-1.253-2.69-1.253-3.304,0l-10.634,21.538l-23.76,3.454c-0.696,0.101-1.272,0.587-1.489,1.257\r c-0.217,0.67-0.037,1.399,0.468,1.886l17.197,16.763l-4.064,23.67c-0.109,0.692,0.168,1.388,0.73,1.8\r c0.576,0.412,1.328,0.468,1.946,0.142l21.261-11.177l21.253,11.177c0.269,0.142,0.569,0.21,0.861,0.21\r c0.389,0,0.767-0.116,1.089-0.352c0.561-0.412,0.849-1.111,0.722-1.8l-4.056-23.67l17.197-16.763\r C187.376,229.819,187.559,229.086,187.339,228.419z"}),(0,l.jsx)("path",{fill:"#FFC50B",d:"M275.409,228.419c-0.221-0.67-0.797-1.156-1.489-1.257l-23.76-3.454l-10.634-21.538\r c-0.614-1.253-2.69-1.253-3.304,0l-10.634,21.538l-23.756,3.454c-0.696,0.101-1.272,0.587-1.489,1.257\r c-0.217,0.67-0.045,1.399,0.468,1.886l17.197,16.763l-4.064,23.67c-0.116,0.692,0.168,1.388,0.73,1.8\r c0.569,0.412,1.328,0.468,1.946,0.142l21.261-11.177l21.261,11.177c0.262,0.142,0.561,0.21,0.857,0.21\r c0.382,0,0.767-0.116,1.081-0.352c0.561-0.412,0.857-1.111,0.73-1.8l-4.056-23.67l17.197-16.763\r C275.446,229.819,275.629,229.086,275.409,228.419z"}),(0,l.jsx)("path",{fill:"#FFC50B",d:"M360.822,228.419c-0.213-0.67-0.789-1.156-1.482-1.257l-23.76-3.454l-10.634-21.538\r c-0.621-1.253-2.69-1.253-3.304,0l-10.634,21.538l-23.76,3.454c-0.703,0.101-1.272,0.587-1.489,1.257\r c-0.217,0.67-0.045,1.399,0.46,1.886l17.205,16.763l-4.064,23.67c-0.116,0.692,0.161,1.388,0.73,1.8s1.325,0.468,1.946,0.142\r l21.261-11.177l21.253,11.177c0.269,0.142,0.561,0.21,0.861,0.21c0.382,0,0.76-0.116,1.081-0.352c0.561-0.412,0.849-1.111,0.73-1.8\r l-4.056-23.67l17.197-16.763C360.855,229.819,361.039,229.086,360.822,228.419z"}),(0,l.jsx)("path",{fill:"#fff",d:"M447.997,228.419c-0.221-0.67-0.804-1.156-1.489-1.257l-23.768-3.454l-10.634-21.538\r c-0.614-1.253-2.683-1.253-3.304,0l-10.627,21.538l-23.768,3.454c-0.696,0.101-1.272,0.587-1.489,1.257\r c-0.217,0.67-0.037,1.399,0.468,1.886l17.197,16.763l-4.056,23.67c-0.116,0.692,0.161,1.388,0.73,1.8s1.325,0.468,1.938,0.142\r l21.261-11.177l21.261,11.177c0.269,0.142,0.561,0.21,0.861,0.21c0.382,0,0.76-0.116,1.081-0.352\r c0.561-0.412,0.849-1.111,0.722-1.8l-4.049-23.67l17.19-16.763C448.035,229.819,448.21,229.086,447.997,228.419z"})]}),Ur=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"m18.85 10.39 1.06-1.06c.78-.78.78-2.05 0-2.83L18.5 5.09c-.78-.78-2.05-.78-2.83 0l-1.06 1.06 4.24 4.24zm-4.24 1.42L7.41 19H6v-1.41l7.19-7.19 1.42 1.41zm-1.42-4.25L4 16.76V21h4.24l9.19-9.19-4.24-4.25zM19 17.5c0 2.19-2.54 3.5-5 3.5-.55 0-1-.45-1-1s.45-1 1-1c1.54 0 3-.73 3-1.5 0-.47-.48-.87-1.23-1.2l1.48-1.48c1.07.63 1.75 1.47 1.75 2.68zM4.58 13.35C3.61 12.79 3 12.06 3 11c0-1.8 1.89-2.63 3.56-3.36C7.59 7.18 9 6.56 9 6c0-.41-.78-1-2-1-1.26 0-1.8.61-1.83.64-.35.41-.98.46-1.4.12a.992.992 0 0 1-.15-1.38C3.73 4.24 4.76 3 7 3s4 1.32 4 3c0 1.87-1.93 2.72-3.64 3.47C6.42 9.88 5 10.5 5 11c0 .31.43.6 1.07.86l-1.49 1.49z"})}),Gr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 237.1 300",children:[(0,l.jsx)("path",{d:"M117.9,0c14.1-0.7,27.3,7.4,32.3,20.7c8.7,1.2,21.6-2.4,28.5,3.4c2.1,4.7,0.4,10.3,0.8,15.4c16.5,0.7,35.7-4.4,48.7,8.6 c11.9,12,8.1,29.6,8.7,44.9c0,41.7,0,83.4,0,125.1c0,15.4,0,30.8,0,46.1c2.1,27.1-15.3,38-40.6,35.8c-45.5,0-90.9,0-136.4,0.1 c-17.5-1.1-37.9,4.5-52-8.8c-9.1-9.7-7.4-23-7.6-35.3c0-13.2,0-26.3,0-39.5c0-41.5,0-83.1,0-124.6c-1.1-22.5-0.1-50.5,28.7-52.4 c9.6,0,19.3,0,28.9,0.1c0.2-4.7-1.3-12.6,1-15.9c7.8-4.8,18.8-1.4,27.7-2.3C90.3,7.8,104.2-0.8,117.9,0z M102.3,21.9 c-2.2,3.3-3.3,7-4.6,10.7c-4.7,5.9-18,2.1-25.2,3.4c0,9.3,0,18.5,0,28.1c30.5,0,61,0,92.4,0c0-9.3,0-18.5,0-28.1 c-8-0.9-18,1.8-24.8-2c-1.7-1.8-2.2-3.1-2.9-5.5C133,12.5,112.1,8.8,102.3,21.9z M18.6,59.9c-5,7.2-2.9,16-3.3,24.2 c0,12.2,0,24.5,0,36.7c0,38.6,0,77.1,0,115.7c1.3,11.6-3.3,35.6,3.3,43.9c5,5,11.7,5,18.3,4.8c12.2,0,24.4,0,36.6,0 c34,0,68,0,102,0.1c14.3-1.5,31.3,4.3,43.4-5.1c5.8-8.6,1.7-20.4,2.9-30.2c0-44.1,0-88.2,0-132.3c0-11.5,0-23.1,0-34.6 c-0.4-8.8,1.8-18.2-4.9-25c-8.7-7.5-26.2-2.7-37.4-4c-0.8,9.3,3.4,26.6-11.4,24.6c-19.8,0.1-39.5,0.1-59.3,0.1 c-11.9,0-23.7,0-35.6,0.1c-9.9,0.1-9.9,0.1-13.6-2.6c-2.9-6.9-1-14.9-1.8-22.2C44.9,55.3,28.6,49.4,18.6,59.9z"}),(0,l.jsx)("path",{d:"M193.2,135h-81.4c-4.4,0-7.9-3.5-7.9-7.9v0c0-4.4,3.5-7.9,7.9-7.9h81.4c4.4,0,7.9,3.5,7.9,7.9v0 C201.1,131.5,197.5,135,193.2,135z"}),(0,l.jsx)("path",{d:"M193.2,190.8h-81.4c-4.4,0-7.9-3.5-7.9-7.9v0c0-4.4,3.5-7.9,7.9-7.9h81.4c4.4,0,7.9,3.5,7.9,7.9v0 C201.1,187.3,197.5,190.8,193.2,190.8z"}),(0,l.jsx)("path",{d:"M193.2,246.6h-81.4c-4.4,0-7.9-3.5-7.9-7.9v0c0-4.4,3.5-7.9,7.9-7.9h81.4c4.4,0,7.9,3.5,7.9,7.9v0 C201.1,243.1,197.5,246.6,193.2,246.6z"}),(0,l.jsx)("path",{d:"M40.2,131.9c-2.5-2.5-2.5-6.6,0-9.1l0,0c2.5-2.5,6.6-2.5,9.1,0l7.7,7.7c0.4,0.4,1.1,0.4,1.5,0l22.2-22.2 c2.5-2.5,6.6-2.5,9.1,0l0,0c2.5,2.5,2.5,6.6,0,9.1l-29.3,29.3c-1.5,1.5-3.9,1.5-5.5,0L40.2,131.9z"}),(0,l.jsx)("path",{d:"M40.2,187.7c-2.5-2.5-2.5-6.6,0-9.1l0,0c2.5-2.5,6.6-2.5,9.1,0l7.7,7.7c0.4,0.4,1.1,0.4,1.5,0l22.2-22.2 c2.5-2.5,6.6-2.5,9.1,0l0,0c2.5,2.5,2.5,6.6,0,9.1l-29.3,29.3c-1.5,1.5-3.9,1.5-5.5,0L40.2,187.7z"}),(0,l.jsx)("path",{d:"M40.2,243.5c-2.5-2.5-2.5-6.6,0-9.1l0,0c2.5-2.5,6.6-2.5,9.1,0l7.7,7.7c0.4,0.4,1.1,0.4,1.5,0l22.2-22.2 c2.5-2.5,6.6-2.5,9.1,0l0,0c2.5,2.5,2.5,6.6,0,9.1l-29.3,29.3c-1.5,1.5-3.9,1.5-5.5,0L40.2,243.5z"})]}),Vr=(0,l.jsx)("svg",{...er,viewBox:"0 0 505.4 505.4",children:(0,l.jsx)("path",{
274 274 d:"M437.1,233.45c14.8-10.4,24.6-27.7,24.6-47.2c0-31.9-25.8-57.7-57.7-57.7c-31.9,0-57.7,25.8-57.7,57.7 c0,19.5,9.7,36.8,24.6,47.2c-12.7,4.4-24.3,11.2-34.1,20c-13.5-11.5-29.4-20.3-46.8-25.5c21.1-12.8,35.3-36.1,35.3-62.6 c0-40.4-32.7-73.1-73.1-73.1c-40.4,0-73.1,32.8-73.1,73.1c0,26.5,14.1,49.8,35.3,62.6c-17.2,5.2-32.9,13.9-46.3,25.2 c-9.8-8.6-21.2-15.3-33.7-19.6c14.8-10.4,24.6-27.7,24.6-47.2c0-31.9-25.8-57.7-57.7-57.7s-57.7,25.8-57.7,57.7 c0,19.5,9.7,36.8,24.6,47.2C28.5,247.25,0,284.95,0,329.25v6.6c0,0.2,0.2,0.4,0.4,0.4h122.3c-0.7,5.5-1.1,11.2-1.1,16.9v6.8 c0,29.4,23.8,53.2,53.2,53.2h155c29.4,0,53.2-23.8,53.2-53.2v-6.8c0-5.7-0.4-11.4-1.1-16.9H505c0.2,0,0.4-0.2,0.4-0.4v-6.6 C505.2,284.85,476.8,247.15,437.1,233.45z M362.3,186.15c0-23,18.7-41.7,41.7-41.7s41.7,18.7,41.7,41.7 c0,22.7-18.3,41.2-40.9,41.7c-0.3,0-0.5,0-0.8,0s-0.5,0-0.8,0C380.5,227.45,362.3,208.95,362.3,186.15z M194.9,165.35 c0-31.5,25.6-57.1,57.1-57.1s57.1,25.6,57.1,57.1c0,30.4-23.9,55.3-53.8,57c-1.1,0-2.2,0-3.3,0c-1.1,0-2.2,0-3.3,0 C218.8,220.65,194.9,195.75,194.9,165.35z M59.3,186.15c0-23,18.7-41.7,41.7-41.7s41.7,18.7,41.7,41.7c0,22.7-18.3,41.2-40.9,41.7 c-0.3,0-0.5,0-0.8,0s-0.5,0-0.8,0C77.6,227.45,59.3,208.95,59.3,186.15z M125.5,320.15H16.2c4.5-42.6,40.5-76,84.2-76.3 c0.2,0,0.4,0,0.6,0s0.4,0,0.6,0c20.8,0.1,39.8,7.8,54.5,20.3C141.7,279.75,131,298.95,125.5,320.15z M366.8,359.95 c0,20.5-16.7,37.2-37.2,37.2h-155c-20.5,0-37.2-16.7-37.2-37.2v-6.8c0-62.1,49.6-112.9,111.3-114.7c1.1,0.1,2.3,0.1,3.4,0.1 s2.3,0,3.4-0.1c61.7,1.8,111.3,52.6,111.3,114.7V359.95z M378.7,320.15c-5.5-21.1-16-40-30.3-55.6c14.8-12.8,34-20.5,55-20.7 c0.2,0,0.4,0,0.6,0s0.4,0,0.6,0c43.7,0.3,79.7,33.7,84.2,76.3H378.7z"})}),qr=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M5.25 6C4.00736 6 3 7.00736 3 8.25V15.75C3 16.9926 4.00736 18 5.25 18H14.25C15.4926 18 16.5 16.9926 16.5 15.75V13.6013L19.7699 16.3262C19.9934 16.5125 20.3046 16.5526 20.5681 16.4292C20.8317 16.3058 21 16.041 21 15.75V8.25C21 7.95899 20.8317 7.69424 20.5681 7.57081C20.3046 7.44737 19.9934 7.48753 19.7699 7.67383L16.5 10.3987V8.25C16.5 7.00736 15.4926 6 14.25 6H5.25Z"})}),Yr=(0,l.jsx)("svg",{...er,version:"1.1",x:"0px",y:"0px",width:"46.47px",height:"46.47px",viewBox:"0 0 46.47 46.47",children:(0,l.jsx)("path",{d:"M3.445,6.322c0-3.423,2.777-6.201,6.201-6.201c3.423,0,6.2,2.777,6.2,6.201c0,3.426-2.777,6.203-6.2,6.203 C6.222,12.524,3.445,9.748,3.445,6.322z M31.562,6.322c0-3.423,2.78-6.201,6.203-6.201s6.201,2.777,6.201,6.201 c0,3.426-2.777,6.203-6.201,6.203C34.343,12.524,31.562,9.748,31.562,6.322z M46.223,31.72 C42.38,40.607,33.38,46.349,23.294,46.349c-10.301,0-19.354-5.771-23.064-14.703c-0.636-1.53,0.089-3.286,1.62-3.922 c0.376-0.155,0.766-0.229,1.15-0.229c1.176,0,2.292,0.696,2.771,1.851c2.777,6.685,9.655,11.004,17.523,11.004 c7.69,0,14.528-4.322,17.421-11.012c0.658-1.521,2.424-2.222,3.943-1.562C46.181,28.433,46.881,30.199,46.223,31.72z"})}),Kr=(0,l.jsx)("svg",{...er,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"m17.75 6v12c0 1.517-1.233 2.75-2.75 2.75h-6c-1.517 0-2.75-1.233-2.75-2.75v-12c0-1.517 1.233-2.75 2.75-2.75h6c1.517 0 2.75 1.233 2.75 2.75zm1.43-.74c.05.24.07.49.07.74v12c0 .25-.02.5-.07.74 1.44-.09 2.57-1.28 2.57-2.74v-8c0-1.46-1.13-2.65-2.57-2.74zm-14.36 0c-1.44.09-2.57 1.28-2.57 2.74v8c0 1.46 1.13 2.65 2.57 2.74-.05-.24-.07-.49-.07-.74v-12c0-.25.02-.5.07-.74z"})}),Qr=(0,l.jsx)("svg",{...er,viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M64 136C64 122.8 74.7 112 88 112L136 112C149.3 112 160 122.7 160 136L160 240L184 240C197.3 240 208 250.7 208 264C208 277.3 197.3 288 184 288L88 288C74.7 288 64 277.3 64 264C64 250.7 74.7 240 88 240L112 240L112 160L88 160C74.7 160 64 149.3 64 136zM94.4 365.2C105.8 356.6 119.7 352 134 352L138.9 352C172.6 352 200 379.4 200 413.1C200 432.7 190.6 451 174.8 462.5L150.8 480L184 480C197.3 480 208 490.7 208 504C208 517.3 197.3 528 184 528L93.3 528C77.1 528 64 514.9 64 498.7C64 489.3 68.5 480.5 76.1 475L146.6 423.7C150 421.2 152 417.3 152 413.1C152 405.9 146.1 400 138.9 400L134 400C130.1 400 126.3 401.3 123.2 403.6L102.4 419.2C91.8 427.2 76.8 425 68.8 414.4C60.8 403.8 63 388.8 73.6 380.8L94.4 365.2zM288 128L544 128C561.7 128 576 142.3 576 160C576 177.7 561.7 192 544 192L288 192C270.3 192 256 177.7 256 160C256 142.3 270.3 128 288 128zM288 288L544 288C561.7 288 576 302.3 576 320C576 337.7 561.7 352 544 352L288 352C270.3 352 256 337.7 256 320C256 302.3 270.3 288 288 288zM288 448L544 448C561.7 448 576 462.3 576 480C576 497.7 561.7 512 544 512L288 512C270.3 512 256 497.7 256 480C256 462.3 270.3 448 288 448z"})}),Zr=(0,l.jsx)("svg",{...er,height:"30",viewBox:"0 0 24 24",width:"30",children:(0,l.jsxs)("g",{id:"Layer_2","data-name":"Layer 2",children:[(0,l.jsx)("rect",{height:"11.5",rx:"1.25",width:"5.5",x:"1.25",y:"10.25"}),(0,l.jsx)("rect",{height:"15.5",rx:"1.25",width:"5.5",x:"9.25",y:"6.25"}),(0,l.jsx)("rect",{height:"19.5",rx:"1.25",width:"5.5",x:"17.25",y:"2.25"})]})}),Xr=(0,l.jsxs)("svg",{...er,width:"30",height:"30",viewBox:"0 0 20 20",children:[(0,l.jsx)("rect",{x:"0",fill:"none",width:"20",height:"20"}),(0,l.jsx)("g",{children:(0,l.jsx)("path",{d:"M4 3h12c.55 0 1.02.2 1.41.59S18 4.45 18 5v7c0 .55-.2 1.02-.59 1.41S16.55 14 16 14h-1l-5 5v-5H4c-.55 0-1.02-.2-1.41-.59S2 12.55 2 12V5c0-.55.2-1.02.59-1.41S3.45 3 4 3zm11 2H4v1h11V5zm1 3H4v1h12V8zm-3 3H4v1h9v-1z"})})]}),Jr=(0,l.jsxs)("svg",{...er,viewBox:"0 0 102.05 102.05",children:[(0,l.jsx)("path",{d:"m76.97 21.58-19.76 19.76-2.67 7.74 7.75-2.66 19.76-19.76z"}),(0,l.jsx)("rect",{height:"5.28",rx:"2.12",width:"20.83",x:"22.51",y:"72.13"}),(0,l.jsx)("path",{d:"m81.58 15.87h5.17v7.19h-5.17z",transform:"matrix(.707 -.707 .707 .707 10.89 65.21)"}),(0,l.jsxs)("g",{children:[(0,l.jsx)("path",{d:"m76.18 43.76a2 2 0 0 0 -2 2v42h-61.49v-66h51.11a2 2 0 0 0 0-4h-53.11a2 2 0 0 0 -2 2v70a2 2 0 0 0 2 2h65.49a2 2 0 0 0 2-2v-44a2 2 0 0 0 -2-2z"}),(0,l.jsx)("path",{d:"m24.63 68.13a6.13 6.13 0 0 0 -6.12 6.12v1a6.13 6.13 0 0 0 6.12 6.12h16.59a6.13 6.13 0 0 0 6.12-6.12v-1a6.13 6.13 0 0 0 -6.12-6.12zm18.71 6.12v1a2.12 2.12 0 0 1 -2.12 2.12h-16.59a2.12 2.12 0 0 1 -2.12-2.12v-1a2.12 2.12 0 0 1 2.12-2.12h16.59a2.12 2.12 0 0 1 2.12 2.12z"}),(0,l.jsx)("path",{d:"m53 33.73a2 2 0 1 0 0-4h-32.49a2 2 0 0 0 -2 2v10.1a2 2 0 0 0 2 2h25.22a2 2 0 1 0 0-4h-23.22v-6.1z"}),(0,l.jsx)("path",{d:"m68.35 60.82v-5.33a2 2 0 0 0 -4 0v3.33h-41.84v-6.1h20.65a2 2 0 0 0 0-4h-22.65a2 2 0 0 0 -2 2v10.1a2 2 0 0 0 2 2h45.84a2 2 0 0 0 2-2z"}),(0,l.jsx)("path",{d:"m92.78 18.76-7.92-7.91a2 2 0 0 0 -2.82 0l-28 28a2.11 2.11 0 0 0 -.47.77l-4.14 12.04a2 2 0 0 0 .48 2.06 2 2 0 0 0 1.41.59 2.06 2.06 0 0 0 .68-.11l12-4.15a1.9 1.9 0 0 0 .76-.48l28-28a2 2 0 0 0 .02-2.81zm-30.49 27.66-7.75 2.66 2.67-7.74 19.79-19.76 5.08 5.08zm22.59-22.59-5.08-5.08 3.65-3.66 5.08 5.09z"})]})]}),el=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,l.jsx)("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"})]}),tl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2.5",fill:o,opacity:"0.12"}),(0,l.jsx)("rect",{x:"3",y:"3",width:"18",height:"5",rx:"2.5",fill:o}),(0,l.jsx)("circle",{cx:"6.5",cy:"12.5",r:"1.8",fill:o}),(0,l.jsx)("path",{d:"M5.7 12.6l0.6 0.7 1.4-1.5-0.6-0.5-0.8 0.9-0.2-0.2-0.4 0.6z",fill:"#ffffff"}),(0,l.jsx)("rect",{x:"9.6",y:"11.6",width:"8.8",height:"1.8",rx:"0.6",fill:o,opacity:"0.7"}),(0,l.jsx)("circle",{cx:"6.5",cy:"17",r:"1.8",fill:o}),(0,l.jsx)("path",{d:"M5.7 17.1l0.6 0.7 1.4-1.5-0.6-0.5-0.8 0.9-0.2-0.2-0.4 0.6z",fill:"#ffffff"}),(0,l.jsx)("rect",{x:"9.6",y:"16.1",width:"6.5",height:"1.8",rx:"0.6",fill:o,opacity:"0.7"})]}),nl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2.5",fill:o,opacity:"0.12"
275 275 }),(0,l.jsx)("rect",{x:"4.5",y:"6",width:"4",height:"4",rx:"1",fill:o}),(0,l.jsx)("path",{d:"M5.2 8l0.7 0.8 1.6-1.7-0.7-0.6-0.9 1-0.3-0.3z",fill:"#ffffff"}),(0,l.jsx)("rect",{x:"10.5",y:"7",width:"8",height:"2",rx:"1",fill:o,opacity:"0.7"}),(0,l.jsx)("rect",{x:"4.5",y:"14",width:"4",height:"4",rx:"1",fill:o}),(0,l.jsx)("path",{d:"M5.2 16l0.7 0.8 1.6-1.7-0.7-0.6-0.9 1-0.3-0.3z",fill:"#ffffff"}),(0,l.jsx)("rect",{x:"10.5",y:"15",width:"8",height:"2",rx:"1",fill:o,opacity:"0.7"})]}),ol=(0,l.jsx)("svg",{...er,viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M342.6 105.4C330.1 92.9 309.8 92.9 297.3 105.4L137.3 265.4C124.8 277.9 124.8 298.2 137.3 310.7C149.8 323.2 170.1 323.2 182.6 310.7L320 173.3L457.4 310.6C469.9 323.1 490.2 323.1 502.7 310.6C515.2 298.1 515.2 277.8 502.7 265.3L342.7 105.3zM502.6 457.4L342.6 297.4C330.1 284.9 309.8 284.9 297.3 297.4L137.3 457.4C124.8 469.9 124.8 490.2 137.3 502.7C149.8 515.2 170.1 515.2 182.6 502.7L320 365.3L457.4 502.6C469.9 515.1 490.2 515.1 502.7 502.6C515.2 490.1 515.2 469.8 502.7 457.3z"})}),il=(0,l.jsx)("svg",{...er,viewBox:"0 0 512.006 512.006",children:(0,l.jsxs)("g",{children:[(0,l.jsx)("path",{d:"m324.174 93.201 3.882 14.489c2.144 8.002 10.366 12.75 18.371 10.607 8.002-2.144 12.75-10.369 10.606-18.371l-7.765-28.978c-2.145-8.002-10.368-12.751-18.371-10.607l-289.777 77.646c-3.843 1.03-7.119 3.544-9.108 6.989s-2.528 7.54-1.499 11.382l7.765 28.978c2.134 7.963 10.33 12.761 18.371 10.606 8.002-2.144 12.75-10.369 10.606-18.371l-3.882-14.489 86.934-23.294 54.352 202.844-14.489 3.883c-8.002 2.144-12.75 10.369-10.606 18.371s10.368 12.751 18.371 10.606l115.911-31.058c8.002-2.144 12.751-10.369 10.606-18.371-2.151-8.029-10.393-12.744-18.371-10.607l-14.489 3.882-54.352-202.843z"}),(0,l.jsx)("path",{d:"m461.803 367.785c-24.295-13.74-52.521-17.328-79.448-10.113l-228.143 60.595c-48.557 13.01-100.51-8.021-126.341-51.145-4.258-7.107-13.47-9.417-20.576-5.16-7.107 4.257-9.417 13.469-5.16 20.576 16.119 26.909 40.008 47.354 69.084 59.125 17.287 6.998 35.384 10.518 53.583 10.517 12.411 0 24.872-1.638 37.144-4.927l228.143-60.595c39.675-10.628 81.164 12.838 92.497 52.311 2.286 7.963 10.594 12.565 18.557 10.278 7.962-2.286 12.564-10.594 10.278-18.557-7.703-26.826-25.324-49.166-49.618-62.905z"})]})}),al=(0,l.jsx)("svg",{...er,viewBox:"0 0 512 512",children:(0,l.jsx)("g",{id:"Layer_2_00000082364357583340289580000016949097236183363201_",children:(0,l.jsx)("g",{id:"Layer_copy_7",children:(0,l.jsxs)("g",{id:"_115",children:[(0,l.jsx)("path",{d:"m378.2 389.8h-244.4c-73.8 0-133.8-60-133.8-133.8s60-133.8 133.8-133.8h244.5c73.8 0 133.8 60 133.8 133.8s-60.1 133.8-133.9 133.8zm-244.4-248.5c-63.3.6-114.2 52.4-113.6 115.8.6 62.5 51.1 113 113.6 113.6h244.5c63.3-.6 114.2-52.4 113.6-115.8-.6-62.5-51.1-113-113.6-113.6z"}),(0,l.jsx)("path",{d:"m376.5 355.1c-54.7 0-99.1-44.3-99.1-99.1s44.3-99.1 99.1-99.1 99.1 44.3 99.1 99.1c-.1 54.7-44.4 99-99.1 99.1zm0-179.1c-44.2 0-80 35.8-80 80s35.8 80 80 80 80-35.8 80-80-35.8-80-80-80z"})]})})})}),sl=(0,l.jsx)("svg",{...er,fill:"currentColor",viewBox:"0 0 16 16",id:"tabs",children:(0,l.jsx)("path",{d:"M14 4V2H0v12h16V4h-2zm-4-1h3v1h-3V3zM6 3h3v1H6V3zm9 10H1V3h4v2h10v8z"})}),rl=(0,l.jsx)("svg",{...er,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"m202.9 251.7-97.1-154.1c-1.5-2.3-4-3.7-6.8-3.7h-91c-6.3 0-10.1 7-6.8 12.3l94.4 149.8-94.4 149.8c-3.4 5.3.5 12.3 6.8 12.3h91c2.8 0 5.3-1.4 6.8-3.7l97.1-154.1c1.6-2.6 1.6-6 0-8.6zm-108.3 150.4h-72.1l89.3-141.8c1.6-2.6 1.6-5.9 0-8.5l-89.3-141.9h72.1l92 146.1zm262.2-150.4-97-154.1c-1.5-2.3-4-3.7-6.8-3.7h-91c-6.3 0-10.1 7-6.8 12.3l94.4 149.8-94.4 149.8c-3.4 5.3.5 12.3 6.8 12.3h91c2.8 0 5.3-1.4 6.8-3.7l97.1-154.1c1.6-2.6 1.6-6-.1-8.6zm-108.2 150.4h-72.1l89.3-141.8c1.6-2.6 1.6-5.9 0-8.5l-89.3-141.8h72.1l92 146.1zm262.2-150.4-97.1-154.1c-1.5-2.3-4-3.7-6.8-3.7h-91c-6.3 0-10.1 7-6.8 12.3l94.4 149.8-94.4 149.8c-3.4 5.3.5 12.3 6.8 12.3h91c2.8 0 5.3-1.4 6.8-3.7l97.1-154.1c1.6-2.6 1.6-6 0-8.6zm-108.3 150.4h-72.1l89.3-141.8c1.6-2.6 1.6-5.9 0-8.5l-89.3-141.8h72.1l92 146.1z"})}),ll=(0,l.jsx)("svg",{...er,viewBox:"42.5 101.81 427 308.39",children:(0,l.jsx)("g",{children:(0,l.jsx)("path",{d:"M42.5,149.249h23.722v142.335H42.5V149.249z M89.943,315.305h23.723V125.527H89.943V315.305z M137.389,339.027h237.223 V101.805H137.389V339.027z M398.334,315.305h23.723V125.527h-23.723V315.305z M445.778,149.249v142.335H469.5V149.249H445.778z M256,386.473c-6.557,0-11.861,5.281-11.861,11.861c0,6.531,5.305,11.861,11.861,11.861s11.861-5.33,11.861-11.861 C267.861,391.754,262.557,386.473,256,386.473z M184.834,386.473c-6.557,0-11.863,5.281-11.863,11.861 c0,6.531,5.307,11.861,11.863,11.861c6.555,0,11.86-5.33,11.86-11.861C196.694,391.754,191.389,386.473,184.834,386.473z M327.166,386.473c-6.555,0-11.86,5.281-11.86,11.861c0,6.531,5.306,11.861,11.86,11.861c6.557,0,11.863-5.33,11.863-11.861 C339.029,391.754,333.723,386.473,327.166,386.473z"})})}),cl=(0,l.jsxs)("svg",{...er,width:"1em",height:"1em",viewBox:"0 0 32 32",size:"24",children:[(0,l.jsx)("path",{fillRule:"evenodd",d:"M1.6 10.1a.033.033 0 0 0-.033.033v16.534c0 .018.015.033.033.033h24a.033.033 0 0 0 .033-.033V10.133a.033.033 0 0 0-.033-.033zm-1.033.033c0-.57.462-1.033 1.033-1.033h24c.57 0 1.033.463 1.033 1.033v16.534c0 .57-.462 1.033-1.033 1.033h-24c-.57 0-1.033-.463-1.033-1.033z",clipRule:"evenodd"}),(0,l.jsx)("path",{fillRule:"evenodd",d:"M2.167 7.467a.5.5 0 0 1 .5-.5h24c1.16 0 2.1.94 2.1 2.1v17.066a.5.5 0 1 1-1 0V9.067a1.1 1.1 0 0 0-1.1-1.1h-24a.5.5 0 0 1-.5-.5",clipRule:"evenodd"}),(0,l.jsx)("path",{fillRule:"evenodd",d:"M3.767 5.333a.5.5 0 0 1 .5-.5H27.2a3.7 3.7 0 0 1 3.7 3.7v16a.5.5 0 1 1-1 0v-16a2.7 2.7 0 0 0-2.7-2.7H4.267a.5.5 0 0 1-.5-.5",clipRule:"evenodd"})]}),dl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M3 4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H3zm0 2h18v12H3V6z"}),(0,l.jsx)("path",{d:"M3 4h9v16H3V4z",opacity:"0.85"}),(0,l.jsx)("path",{d:"M5.5 8h4v1.5h-4V8zm0 3h4v1.5h-4V11zm0 3h4v1.5h-4V14z",fill:"#ffffff"})]}),ul=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{cx:"4.5",cy:"12",r:"2.5"}),(0,l.jsx)("circle",{cx:"12",cy:"12",r:"2.5"}),(0,l.jsx)("circle",{cx:"19.5",cy:"12",r:"2.5",opacity:"0.55"}),(0,l.jsx)("path",{d:"M7.2 12h1.6v.6H7.2V12zm0-.6h1.6V12H7.2v-.6z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeDasharray:"1.6 1.4"}),(0,l.jsx)("path",{d:"M7 12h2.5",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"M14.5 12H17",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeDasharray:"1.6 1.4",opacity:"0.7"}),(0,l.jsx)("text",{x:"4.5",y:"13.2",textAnchor:"middle",fontSize:"3.2",fontWeight:"700",fill:"#ffffff",children:"1"}),(0,l.jsx)("text",{x:"12",y:"13.2",textAnchor:"middle",fontSize:"3.2",fontWeight:"700",fill:"#ffffff",children:"2"}),(0,l.jsx)("text",{x:"19.5",y:"13.2",textAnchor:"middle",fontSize:"3.2",fontWeight:"700",fill:"#ffffff",opacity:"0.85",children:"3"})]}),pl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2",y:"7",width:"20",height:"10",rx:"3",fill:o,opacity:"0.9"}),(0,l.jsx)("circle",{cx:"7.5",cy:"12",r:"2.6",fill:"#fff"}),(0,l.jsx)("path",{d:"M6.6 10.7v2.6l2.3-1.3z",fill:o}),(0,l.jsx)("rect",{x:"12",y:"9.3",width:"1.4",height:"5.4",rx:"0.7",fill:"#fff",opacity:"0.95"}),(0,l.jsx)("rect",{x:"14.4",y:"10.6",width:"1.4",height:"2.8",rx:"0.7",fill:"#fff",opacity:"0.85"}),(0,l.jsx)("rect",{x:"16.8",y:"8.6",width:"1.4",height:"6.8",rx:"0.7",fill:"#fff",opacity:"0.95"}),(0,l.jsx)("rect",{x:"19.2",y:"10.2",width:"1.4",height:"3.6",rx:"0.7",fill:"#fff",opacity:"0.8"})]}),hl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M4 4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H4zm0 2h16v12H4V6z"}),(0,l.jsx)("path",{d:"M6 8h12v1.4H6V8zm0 3h12v1.4H6V11zm0 3h7v1.4H6V14z",opacity:"0.7"}),(0,l.jsx)("path",{d:"M13 14h5v1.4h-5V14z",opacity:"0.25"
276 276 }),(0,l.jsx)("path",{d:"M12 21l-3.5-3.5h7L12 21z"})]}),gl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M3 4a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4zm2 0v3h14V4H5zm0 5v11h14V9H5z"}),(0,l.jsx)("circle",{cx:"6.5",cy:"5.5",r:"0.7",opacity:"0.6"}),(0,l.jsx)("circle",{cx:"8.7",cy:"5.5",r:"0.7",opacity:"0.6"}),(0,l.jsx)("circle",{cx:"10.9",cy:"5.5",r:"0.7",opacity:"0.6"}),(0,l.jsx)("path",{d:"M9.4 12.4l-2.6 2.6 2.6 2.6 1-1-1.6-1.6 1.6-1.6-1-1zm5.2 0l-1 1 1.6 1.6-1.6 1.6 1 1 2.6-2.6-2.6-2.6zm-2.1-0.4l-1.5 6.1 1.1 0.3 1.5-6.1-1.1-0.3z"})]}),ml=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M7.5 2h9A5.5 5.5 0 0 1 22 7.5v9A5.5 5.5 0 0 1 16.5 22h-9A5.5 5.5 0 0 1 2 16.5v-9A5.5 5.5 0 0 1 7.5 2zm0 2A3.5 3.5 0 0 0 4 7.5v9A3.5 3.5 0 0 0 7.5 20h9a3.5 3.5 0 0 0 3.5-3.5v-9A3.5 3.5 0 0 0 16.5 4h-9z"}),(0,l.jsx)("path",{d:"M12 7a5 5 0 1 1 0 10 5 5 0 0 1 0-10zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6z"}),(0,l.jsx)("circle",{cx:"17.3",cy:"6.7",r:"1.2"})]}),bl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M12 2C7.86 2 4.5 5.36 4.5 9.5c0 5.55 7 12 7.3 12.27a.3.3 0 0 0 .4 0C12.5 21.5 19.5 15.05 19.5 9.5 19.5 5.36 16.14 2 12 2zm0 18.06c-1.62-1.6-6-6.27-6-10.56A6 6 0 0 1 12 3.5a6 6 0 0 1 6 6c0 4.29-4.38 8.95-6 10.56z"}),(0,l.jsx)("circle",{cx:"12",cy:"9.5",r:"2.5"}),(0,l.jsx)("path",{d:"M5.6 14.4l-2.4 5.6h17.6l-2.4-5.6-1.4.6 1.8 4H4.6l1.8-4-1.4-.6z",opacity:"0.35"})]}),fl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M3 5a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H5v12h1a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V5z",opacity:"0.85"}),(0,l.jsx)("path",{d:"M8 8h12v1.6H8V8zm0 3.4h12V13H8v-1.6zm0 3.4h8v1.6H8V14.8z",opacity:"0.55"}),(0,l.jsx)("path",{d:"M9.5 7.2C8.67 7.2 8 7.87 8 8.7v1.5c0 .83.67 1.5 1.5 1.5h.8c0 .83-.6 1.5-1.43 1.5V14.4c1.66 0 3-1.34 3-3V8.7c0-.83-.67-1.5-1.37-1.5H9.5zm5 0c-.83 0-1.5.67-1.5 1.5v1.5c0 .83.67 1.5 1.5 1.5h.8c0 .83-.6 1.5-1.43 1.5V14.4c1.66 0 3-1.34 3-3V8.7c0-.83-.67-1.5-1.37-1.5H14.5z"})]}),xl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 6.82666 6.82666",children:[(0,l.jsxs)("g",{fillRule:"nonzero",children:[(0,l.jsx)("path",{d:"m3.533.962028v4.906662h-.21333v-4.906662z"}),(0,l.jsx)("path",{d:"m4.03509 3.393.395.395 1.19472-1.19472.15083.15083-1.27014 1.27014-.07541.07542-.07542-.07542-.47042-.47042z"}),(0,l.jsx)("path",{d:"m4.03509 5.10953.395.395 1.19472-1.19472.15083.15083-1.27014 1.27014-.07541.07542-.07542-.07542-.47042-.47042z"}),(0,l.jsx)("path",{d:"m1.37758 5.57994 1.27014-1.27013.15084.15083-1.27014 1.27014z"}),(0,l.jsx)("path",{d:"m2.64772 5.73078-1.27014-1.27014.15084-.15083 1.27014 1.27013z"}),(0,l.jsx)("path",{d:"m4.03509 1.68227.395.395 1.19472-1.194719.15083.150839-1.27014 1.27013-.07541.07542-.07542-.07542-.47042-.47041z"}),(0,l.jsx)("path",{d:"m1.20185 1.68227.395.395 1.19472-1.194719.15084.150839-1.27014 1.27013-.07542.07542-.07542-.07542-.47041-.47041z"}),(0,l.jsx)("path",{d:"m1.20185 3.393.395.395 1.19472-1.19472.15084.15083-1.27014 1.27014-.07542.07542-.07542-.07542-.47041-.47042z"})]}),(0,l.jsx)("path",{d:"m0 0h6.827v6.827h-6.827z",fill:"none"})]}),yl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"3",y:"4",width:"18",height:"2",rx:"1",opacity:"0.35",fill:o}),(0,l.jsx)("rect",{x:"3",y:"11",width:"7",height:"2",rx:"1",fill:o}),(0,l.jsx)("rect",{x:"14",y:"11",width:"7",height:"2",rx:"1",fill:o}),(0,l.jsx)("circle",{cx:"12",cy:"12",r:"2.2",fill:o}),(0,l.jsx)("rect",{x:"3",y:"18",width:"18",height:"2",rx:"1",opacity:"0.35",fill:o})]}),vl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2",y:"3",width:"20",height:"18",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,l.jsx)("rect",{x:"2.8",y:"3.8",width:"18.4",height:"16.4",rx:"1.4",fill:o,opacity:"0.12"}),(0,l.jsx)("rect",{x:"8",y:"8",width:"8",height:"1.6",rx:"0.4",fill:o,opacity:"0.55"}),(0,l.jsx)("rect",{x:"5",y:"10.6",width:"14",height:"2.6",rx:"0.5",fill:o}),(0,l.jsx)("rect",{x:"6.5",y:"14.2",width:"11",height:"1.4",rx:"0.4",fill:o,opacity:"0.5"}),(0,l.jsx)("rect",{x:"8",y:"17",width:"3.8",height:"2.2",rx:"0.8",fill:o}),(0,l.jsx)("rect",{x:"12.3",y:"17",width:"3.8",height:"2.2",rx:"0.8",fill:"none",stroke:o,strokeWidth:"1.2"})]}),kl=(0,l.jsx)("svg",{...er,width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),wl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6",opacity:"0.5"}),(0,l.jsx)("rect",{x:"3.5",y:"5.5",width:"8",height:"13",rx:"1",fill:o,opacity:"0.85"}),(0,l.jsx)("path",{d:"M5 13l1.8-2.2 1.4 1.7 1.6-2.4L11 13z",fill:"#fff",opacity:"0.9"}),(0,l.jsx)("circle",{cx:"6.4",cy:"8.6",r:"1",fill:"#fff",opacity:"0.9"}),(0,l.jsx)("rect",{x:"13.5",y:"7",width:"7",height:"1.6",rx:"0.8",fill:o,opacity:"0.5"}),(0,l.jsx)("rect",{x:"13.5",y:"10.4",width:"7",height:"1.4",rx:"0.7",fill:o,opacity:"0.35"}),(0,l.jsx)("rect",{x:"13.5",y:"13.4",width:"5",height:"1.4",rx:"0.7",fill:o,opacity:"0.35"})]}),_l=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2.5",y:"4",width:"8.5",height:"16",rx:"1.4",fill:o,opacity:"0.85"}),(0,l.jsx)("rect",{x:"13",y:"4",width:"8.5",height:"16",rx:"1.4",fill:o,opacity:"0.55"}),(0,l.jsx)("rect",{x:"4.3",y:"7",width:"4.2",height:"2.6",rx:"0.6",fill:"#fff",opacity:"0.95"}),(0,l.jsx)("rect",{x:"4.3",y:"11.2",width:"5",height:"1.1",rx:"0.55",fill:"#fff",opacity:"0.8"}),(0,l.jsx)("rect",{x:"14.8",y:"7",width:"4.2",height:"2.6",rx:"0.6",fill:"#fff",opacity:"0.95"}),(0,l.jsx)("rect",{x:"14.8",y:"11.2",width:"5",height:"1.1",rx:"0.55",fill:"#fff",opacity:"0.8"})]}),Cl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2.5",y:"5",width:"19",height:"14",rx:"2",fill:o,opacity:"0.12"}),(0,l.jsx)("rect",{x:"2.5",y:"5",width:"8.5",height:"14",rx:"2",fill:o,opacity:"0.85"}),(0,l.jsx)("rect",{x:"13",y:"7.4",width:"6.6",height:"1.7",rx:"0.85",fill:o,opacity:"0.75"}),(0,l.jsx)("rect",{x:"13",y:"10.6",width:"6.6",height:"1.4",rx:"0.7",fill:o,opacity:"0.45"}),(0,l.jsx)("rect",{x:"13",y:"13.2",width:"5",height:"1.4",rx:"0.7",fill:o,opacity:"0.45"}),(0,l.jsx)("rect",{x:"13",y:"16",width:"3.6",height:"1.8",rx:"0.9",fill:o,opacity:"0.85"})]}),jl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M6 2.5h7l5 5v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2z",fill:o,opacity:"0.85"}),(0,l.jsx)("path",{d:"M13 2.5l5 5h-4a1 1 0 0 1-1-1z",fill:"#fff",opacity:"0.55"}),(0,l.jsx)("path",{d:"M11 9.5v4m0 0l-2-2m2 2l2-2",fill:"none",stroke:"#fff",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("rect",{x:"7.5",y:"16",width:"7",height:"1.6",rx:"0.8",fill:"#fff",opacity:"0.9"})]}),$l=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2.5",
277 -fill:"none",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.4"}),(0,l.jsx)("path",{d:"M3 9h18",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.4"}),(0,l.jsx)("path",{d:"M8 3v3M16 3v3",stroke:o,strokeWidth:"1.6",strokeLinecap:"round"}),(0,l.jsx)("rect",{x:"6",y:"12",width:"5",height:"5",rx:"1",fill:o}),(0,l.jsx)("path",{d:"M13 13h5M13 16h3",stroke:i,strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.6"})]}),Sl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"3",y:"3",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.45"}),(0,l.jsx)("rect",{x:"13",y:"3",width:"8",height:"8",rx:"1.5",fill:o,opacity:"0.85"}),(0,l.jsx)("rect",{x:"3",y:"13",width:"8",height:"8",rx:"1.5",fill:o,opacity:"0.85"}),(0,l.jsx)("rect",{x:"13",y:"13",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.45"}),(0,l.jsx)("path",{d:"M15.4 5.6h3.2M15.4 7.6h2.2",stroke:i,strokeWidth:"1.2",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"M5.4 15.6h3.2M5.4 17.6h2.2",stroke:"#ffffff",strokeWidth:"1.2",strokeLinecap:"round",opacity:"0.9"})]}),Tl=(0,l.jsx)("svg",{...er,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M13.5 2h-12l-.5.5v11l.5.5h12l.5-.5v-11l-.5-.5zM2 3h11v1H2V3zm7 4H6V5h3v2zm0 1v2H6V8h3zM2 5h3v2H2V5zm0 3h3v2H2V8zm0 5v-2h3v2H2zm4 0v-2h3v2H6zm7 0h-3v-2h3v2zm0-3h-3V8h3v2zm-3-3V5h3v2h-3z"})}),Nl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M12 3v18",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.45"}),(0,l.jsx)("circle",{cx:"12",cy:"6.5",r:"2.6",fill:o}),(0,l.jsx)("circle",{cx:"12",cy:"12",r:"2.6",fill:o,opacity:"0.75"}),(0,l.jsx)("circle",{cx:"12",cy:"17.5",r:"2.6",fill:o,opacity:"0.55"}),(0,l.jsx)("rect",{x:"1.5",y:"4.5",width:"7",height:"4",rx:"1",fill:"currentColor",opacity:"0.35"}),(0,l.jsx)("rect",{x:"15.5",y:"10",width:"7",height:"4",rx:"1",fill:"currentColor",opacity:"0.35"}),(0,l.jsx)("rect",{x:"1.5",y:"15.5",width:"7",height:"4",rx:"1",fill:"currentColor",opacity:"0.35"})]}),Ml=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M19 3v18",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.45"}),(0,l.jsx)("circle",{cx:"19",cy:"12",r:"2.8",fill:o}),(0,l.jsx)("rect",{x:"2",y:"8",width:"12",height:"8",rx:"1.5",fill:"currentColor",opacity:"0.35"}),(0,l.jsx)("path",{d:"M14 12l2.2 0",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.45"})]}),Ll=e=>{const t="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,n="undefined"!=typeof bBlocksDisabledBlocks&&bBlocksDisabledBlocks||[],o=wn.includes(e);return!(!t&&o||n.includes(e))};Ll(g.name)&&(0,p.registerBlockType)(g,{icon:tr,edit:Js,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{}),variations:[{isDefault:!0}]});const Pl=JSON.parse('{"apiVersion":3,"name":"b-blocks/row","title":"Row","description":"Implement row and column layout.","category":"bBlocks","keywords":["row","columns","multi columns"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"layout":{"type":"object","default":{"type":"flex","desktop":{"direction":"row","justify":"","alignItems":"","columnGap":"","wrap":"wrap","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"tablet":{"direction":"","justify":"","alignItems":"","columnGap":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"mobile":{"direction":"","justify":"","alignItems":"","columnGap":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""}}},"columns":{"type":"number"},"columnGap":{"type":"string","default":"0px"},"heightType":{"type":"string","default":"auto"},"height":{"type":"string","default":"0px"},"columnPositionY":{"type":"string","default":"center"},"columnPositionX":{"type":"string","default":"center"},"overflow":{"type":"string","default":"hidden"},"background":{"type":"object","default":{"color":""}},"padding":{"type":"object","default":{"vertical":"0px","horizontal":"0px"}},"border":{"type":"object","default":{}},"shadow":{"type":"object","default":{}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"providesContext":{"b-blocks/rowColumns":"columns","b-blocks/rowColumnGap":"columnGap"},"supports":{"align":["wide","full"],"html":false,"interactivity":{"clientNavigation":true}},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),El="bBlocksColumn",{getBlocks:Al,getBlockAttributes:Bl}=(0,f.select)("core/block-editor"),{updateBlockAttributes:Il}=(0,f.dispatch)("core/block-editor"),Ol=e=>parseInt(e.match(/\d+/g)[0]),Rl=e=>parseFloat(e.toFixed(2)),zl=[50,50],Dl=[100,100],Fl=[100,100,100],Hl=[{label:"100",columns:1,layout:{desktop:[100],tablet:[100],mobile:[100]}},{label:"50/50",columns:2,layout:{desktop:[50,50],tablet:Dl,mobile:Dl}},{label:"34/66",columns:2,layout:{desktop:[34,66],tablet:Dl,mobile:Dl}},{label:"66/34",columns:2,layout:{desktop:[66,34],tablet:Dl,mobile:Dl}},{label:"33.33/33.33/33.34",columns:3,layout:{desktop:[33.33,33.33,33.34],tablet:[50,50,50],mobile:Fl}},{label:"25/25/50",columns:3,layout:{desktop:[25,25,50],tablet:[...zl,100],mobile:Fl}},{label:"50/25/25",columns:3,layout:{desktop:[50,25,25],tablet:[100,...zl],mobile:Fl}},{label:"25/50/25",columns:3,layout:{desktop:[25,50,25],tablet:Fl,mobile:Fl}},{label:"16.66/66.68/16.66",columns:3,layout:{desktop:[16.66,66.68,16.66],tablet:Fl,mobile:Fl}},{label:"25/25/25/25",columns:4,layout:{desktop:[25,25,25,25],tablet:[50,50,50,50],mobile:[100,100,100,100]}},{label:"20/20/20/20/20",columns:5,layout:{desktop:[20,20,20,20,20],tablet:[33.33,33.33,33.34,50,50],mobile:[50,50,50,50,100]}},{label:"16.66/16.67/16.67/16.67/16.67/16.66",columns:6,layout:{desktop:[16.66,16.67,16.67,16.67,16.67,16.66],tablet:[33.33,33.33,33.34,33.33,33.33,33.34],mobile:[50,50,50,50,50,50]}}],Wl=((0,
278 -x.__)("Auto","b-blocks"),(0,x.__)("Hidden","b-blocks"),(0,x.__)("Visible","b-blocks"),(0,x.__)("Default","b-blocks"),(0,x.__)("Top","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Bottom","b-blocks"),(0,x.__)("Baseline","b-blocks"),(0,x.__)("Stretch","b-blocks"),(0,x.__)("Default","b-blocks"),(0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),(0,x.__)("Space Between","b-blocks"),(0,x.__)("Space Around","b-blocks"),(0,x.__)("Space Evenly","b-blocks"),(0,x.__)("Stretch","b-blocks"),{dimension:["padding","margin","maxWidth","maxHeight"],transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0}),Ul=(e,o,i=!1)=>{const{layout:a={},columns:s,columnGap:r,height:l,columnPositionY:c,columnPositionX:d,overflow:u,background:p,padding:h,border:g,shadow:m,advanced:b}=e,f=i?`#${o} > div > div`:`#${o} > div`,x=i?`${f} >.block-editor-inner-blocks >.block-editor-block-list__layout`:f,y=e=>`\n\t\t${ns("justify-content",a?.[e]?.justify)}\n\t\t${ns("align-items",a?.[e]?.alignItems)}\n\t\t${ns("flex-direction",a?.[e]?.direction)}\n\t\t${(e=>{const t=["column-reverse","column"].includes(a?.[e]?.direction),n=a?.[e]?.wrap;return t?ns("flex-wrap","nowrap"):`${ns("flex-wrap",n)} ${ns("align-content","nowrap"!==a?.[e]?.wrap||""!==a?.[e]?.wrap?a?.[e]?.alignContent:"")}`})(e)}\n\t`;return`\n\t\t${f}{\n\t\t\t${ns("overflow",u)}\n\t\t\t${ns("padding",us(h))}\n\t\t\t${ns("box-shadow",ds(m))}\n\t\t\t${os(p)}\n\t\t\t${is(g)}\n\t\t}\n\t\t${x}{\n\t\t\t${ns("gap",r)}\n\t\t\t${ns("min-height",l)}\n\t\t\t${ns("align-items",c)}\n\t\t\t${ns("align-content",d)}\n\t\t\t${"flex"===a.type?y("desktop"):""}\n\t\t}\n\t\t${t}{\n\t\t\t${x}{\n\t\t\t\t${ns("gap",a?.tablet?.columnGap)}\n\t\t\t\t${"flex"===a.type?y("tablet"):""}\n\t\t\t}\n\t\t}\n\n\t\t${n}{\n\t\t\t${x}{\n\t\t\t\t${ns("gap",a?.mobile?.columnGap)}\n\t\t\t\t${"flex"===a.type?y("mobile"):""}\n\t\t\t}\n\t\t}\n\n\t\t${s>0?Cs(o,b,i):""}\n\t`.replace(/\s+/g," ")},Gl=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z"})}),Vl=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z"})}),ql=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M297.4 566.6C309.9 579.1 330.2 579.1 342.7 566.6L502.7 406.6C515.2 394.1 515.2 373.8 502.7 361.3C490.2 348.8 469.9 348.8 457.4 361.3L352 466.7L352 96C352 78.3 337.7 64 320 64C302.3 64 288 78.3 288 96L288 466.7L182.6 361.3C170.1 348.8 149.8 348.8 137.3 361.3C124.8 373.8 124.8 394.1 137.3 406.6L297.3 566.6z"})}),Yl=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M342.6 81.4C330.1 68.9 309.8 68.9 297.3 81.4L137.3 241.4C124.8 253.9 124.8 274.2 137.3 286.7C149.8 299.2 170.1 299.2 182.6 286.7L288 181.3L288 552C288 569.7 302.3 584 320 584C337.7 584 352 569.7 352 552L352 181.3L457.4 286.7C469.9 299.2 490.2 299.2 502.7 286.7C515.2 274.2 515.2 253.9 502.7 241.4L342.7 81.4z"})}),Kl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Flex-Start-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M2 22V2h1.5v20H2Zm11.25 -5.25v-9.5h2.5v9.5h-2.5Zm-6 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),Ql=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Center--Streamline-Sharp-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{fill:"currentColor",d:"M11.25 22V2h1.5v20h-1.5Zm3 -5.25v-9.5h2.5v9.5h-2.5Zm-7 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),Zl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Flex-End--Streamline-Sharp-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{fill:"currentColor",d:"M20.5 22V2h1.5v20h-1.5ZM14.25 16.75v-9.5h2.5v9.5h-2.5Zm-6 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),Xl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Space-Between-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M20.5 22V16.75h-2.5v-9.5h2.5V2h1.5v20h-1.5ZM2 22V2h1.5v5.25h2.5v9.5H3.5V22H2Z",strokeWidth:"0.5"})}),Jl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Space-Around-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M20.5 22V2h1.5v20h-1.5ZM2 22V2h1.5v20H2Zm13.25 -5.25v-9.5h2.5v9.5h-2.5Zm-9 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),ec=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Space-Even-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M20.5 22V2h1.5v20h-1.5ZM2 22V2h1.5v20H2Zm12.25 -5.25v-9.5h2.5v9.5h-2.5Zm-7 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),tc=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),nc=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),oc=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),ic=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Items-Stretch--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{
279 -d:"M8 17.75c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C7.3219 17.3906 7.25 17.2125 7.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1Zm7 0c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C14.3219 17.3906 14.25 17.2125 14.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1ZM2.75 22c-0.2125 0 -0.390585 -0.07235 -0.53425 -0.217C2.071915 21.6385 2 21.45935 2 21.2455c0 -0.21365 0.071915 -0.39135 0.21575 -0.533C2.359415 20.57085 2.5375 20.5 2.75 20.5h18.5c0.2125 0 0.39065 0.07235 0.5345 0.217 0.14365 0.1445 0.2155 0.32365 0.2155 0.5375 0 0.21365 -0.07185 0.39135 -0.2155 0.533 -0.14385 0.14165 -0.322 0.2125 -0.5345 0.2125h-18.5Zm0 -18.5c-0.2125 0 -0.390585 -0.072335 -0.53425 -0.217C2.071915 3.1385 2 2.959335 2 2.7455c0 -0.213665 0.071915 -0.391335 0.21575 -0.533C2.359415 2.070835 2.5375 2 2.75 2h18.5c0.2125 0 0.39065 0.072335 0.5345 0.217 0.14365 0.1445 0.2155 0.323665 0.2155 0.5375 0 0.213665 -0.07185 0.391335 -0.2155 0.533 -0.14385 0.141665 -0.322 0.2125 -0.5345 0.2125h-18.5Z",strokeWidth:"0.5"})}),ac=e=>(0,l.jsxs)("svg",{height:"16",viewBox:"0 0 512 512",width:"16",xmlns:"http://www.w3.org/2000/svg",...e,style:{height:"16px",width:"16px"},children:[(0,l.jsx)("path",{d:"m349.4 289.3h-13c-68.4 0-92.1.1-160.5-.1-26.4-.1-42.3-23.1-32.3-46.8 6.1-14.5 18-19.9 33.3-19.8 68 .1 91.3 0 159.4 0h14.7c-3.8-4.3-5.9-7.1-8.3-9.5-11.2-11-22.6-21.8-33.6-33-13.9-14.2-14.6-35.1-1.9-48.5 12.8-13.5 34.9-13.7 49.4.5 33.3 32.8 66.3 65.8 99.1 99.1 14.3 14.6 14.4 34.7.1 49.2-32.8 33.4-65.8 66.4-99.2 99.2-14.5 14.3-36.5 14.2-49.4.7s-11.9-34.4 2.4-49.3c13-13.4 25.7-26.9 39.8-41.7z"}),(0,l.jsx)("path",{d:"m112.3 256.1v226.7c0 21.3-21.9 34.3-45.4 27.3-13.6-4-21.3-13.7-21.3-27.2-.1-41.1 0-82.2 0-123.3 0-109.7 0-219.4 0-329.1 0-18.8 13.4-30.7 33.9-30.5 19.6.2 32.8 11.9 32.8 29.4.1 75.6.1 151.2 0 226.7z"})]}),sc=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),rc=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",style:{rotate:"180deg"},...e,children:(0,l.jsx)("path",{d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),lc=e=>{const{attributes:t,setAttributes:n,updateObj:o,device:i}=e,{layout:a,heightType:s,columnGap:r,height:c}=t,d="column"===a[i]?.direction||"column-reverse"===a[i]?.direction?{style:{rotate:"90deg"}}:{},u=[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Window Height (100%)","b-blocks"),value:"window"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Height:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:s,onChange:e=>{n({heightType:e,height:"window"===e?"100vh":"auto"===e?"auto":"initial"})},options:u})]}),"custom"===s&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Min Height:","b-blocks"),labelPosition:"left",value:c,onChange:e=>n({height:e}),units:[Pe(),Ae(),Oe()]}),"flex"===a.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"flex1 mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Direction","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.direction,onChange:e=>o("layout",e,i,"direction"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row",value:"row",icon:Vl}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Column",value:"column",icon:ql}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row Reverse",value:"row-reverse",icon:Gl}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Column Reverse",value:"column-reverse",icon:Yl})]}),(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Justify Content","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},
280 -__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.justify,onChange:e=>o("layout",e,i,"justify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Kl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Ql,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Zl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:(0,l.jsx)(Xl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Around",value:"space-around",icon:(0,l.jsx)(Jl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Evenly",value:"space-evenly",icon:(0,l.jsx)(ec,{...d})})]}),(0,l.jsx)(v,{className:"flex1 mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Align Items","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.alignItems,onChange:e=>o("layout",e,i,"alignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(tc,{style:{rotate:"column"===a[i]?.direction||"column-reverse"===a[i]?.direction?"-90deg":"0deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(nc,{style:{rotate:"column"===a[i]?.direction||"column-reverse"===a[i]?.direction?"-90deg":"0deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(oc,{style:{rotate:"column"===a[i]?.direction||"column-reverse"===a[i]?.direction?"-90deg":"0deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(ic,{style:{rotate:"column"===a[i]?.direction||"column-reverse"===a[i]?.direction?"-90deg":"0deg"}})})]}),!["column","column-reverse"].includes(a[i]?.direction)&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{gap:0,children:[(0,x.__)("Wrap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.wrap,onChange:e=>o("layout",e,i,"wrap"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"No Wrap",value:"nowrap",icon:(0,l.jsx)(ac,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap",value:"wrap",icon:(0,l.jsx)(sc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap Reverse",value:"wrap-reverse",icon:(0,l.jsx)(rc,{})})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,l.jsxs)(y.Flex,{gap:5,justify:"flex-start",children:[(0,x.__)("Gap:","b-blocks"),(0,l.jsx)(_,{})]})}),"desktop"===i&&(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"left",value:r,onChange:e=>n({columnGap:e}),units:[Pe()]}),"desktop"!==i&&(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"left",value:a[i]?.columnGap,onChange:e=>o("layout",e,i,"columnGap"),units:[Pe()]})]}),"nowrap"!==a[i]?.wrap&&""!==a[i]?.wrap&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Align Content","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.alignContent,onChange:e=>o("layout",e,i,"alignContent"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Kl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Ql,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Zl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:(0,l.jsx)(Xl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Around",value:"space-around",icon:(0,l.jsx)(Jl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Evenly",value:"space-evenly",icon:(0,l.jsx)(ec,{...d})})]})]})]}),"grid"===a.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Justify Content","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.gridJustify,onChange:e=>o("layout",e,i,"gridJustify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Kl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Ql,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Zl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:(0,l.jsx)(Xl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Around",value:"space-around",icon:(0,l.jsx)(Jl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Evenly",value:"space-evenly",icon:(0,l.jsx)(ec,{})})]}),(0,l.jsx)(v,{className:"flex1 mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Align Items","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.gridAlignItems,onChange:e=>o("layout",e,i,"gridAlignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(tc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(nc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(oc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(ic,{})})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Columns","b-blocks"),min:0,max:12,value:a[i]?.gridColumns,onChange:e=>o("layout",e,i,"gridColumns")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Rows","b-blocks"),min:0,max:12,value:a[i]?.gridRows,onChange:e=>o("layout",e,i,"gridRows")})]})]})},cc=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(lc,{...e})}),dc=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:mn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(cc,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),enabled:Wl,isPremium:o})})]})})]})};let uc={desktop:[33.33,33.33,33.34],tablet:[50,50,50],mobile:[100,100,100]};const pc=(0,w.compose)((0,f.withSelect)(((e,t)=>{const{clientId:n}=t,{getBlocks:o}=e("core/block-editor"),{getDeviceType:i}=e("core/editor");return{innerBlocks:o(n),device:i()?.toLowerCase()}})),(0,f.withDispatch)((e=>({updateAttributes:(t,n)=>e("core/block-editor").updateBlockAttributes(t,n)}))))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,innerBlocks:a,device:s}=e,{columns:r}=t,c=bBlocksPremiumChecker;(0,
281 -m.useEffect)((()=>me()),[i]);const d=e=>{const t="add"===e?r+1:r-1,i=6===t?16.66:Rl(100/t);var a;n({columns:t}),a=i,Al(o).forEach((e=>{const t=e.clientId,n=Bl(t)?.width;Il(t,{width:{...n,desktop:a}})}))};(0,m.useEffect)((()=>{r<a.length?d("add"):r>a.length&&d("delete")}),[a.length]);const u=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(dc,{attributes:t,setAttributes:n,isPremium:c,updateObj:u,device:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:Ul(t,`block-${o}`,!0)}}),r?(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:`bBlocksRow has-${r}-columns ${i?"":"notSelected"}`,children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:["b-blocks/column"],template:(e=>[...Array(e)]?.map(((e,t)=>["b-blocks/column",{width:{desktop:uc.desktop[t],tablet:uc.tablet[t],mobile:uc.mobile[t]}}])))(r),renderAppender:()=>r<12&&i?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):null})})}):(0,l.jsxs)("div",{className:"columnLayoutContainer",children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(y.Dashicon,{icon:"layout"})," ",(0,x.__)("Select a column layout","b-blocks")]}),(0,l.jsx)("div",{className:"columnLayouts",children:Hl.map(((e,t)=>(0,l.jsx)(y.Button,{showTooltip:!0,label:e.label,tooltipPosition:"top",onClick:()=>{n({columns:e.columns}),uc=e.layout},children:e.layout?.[s]?.map(((e,t)=>(0,l.jsx)("i",{style:{width:e+"%"}},t)))},t)))})]})]})]})}));Ll(Pl.name)&&(0,p.registerBlockType)(Pl,{icon:nr,edit:pc,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const hc=JSON.parse('{"apiVersion":3,"name":"b-blocks/column","title":"Column","description":"Column of the row.","category":"bBlocks","parent":["b-blocks/row"],"keywords":["column","columns","multi columns"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"width":{"type":"object","default":{"mobile":100,"tablet":50,"desktop":33.33}},"overflow":{"type":"string","default":"hidden"},"background":{"type":"object","default":{"color":""}},"padding":{"type":"object","default":{"vertical":"","horizontal":""}},"border":{"type":"object","default":{}},"shadow":{"type":"object","default":{}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"usesContext":["b-blocks/rowColumns","b-blocks/rowColumnGap"],"supports":{"align":["wide","full"],"html":false,"interactivity":{"clientNavigation":true}},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),gc=(e,o,i,a,s=!1)=>{const{width:r,overflow:l,background:c,padding:d,border:u,shadow:p,advanced:h}=e,g=`#${o}`,m=s?`${g} > div > div:first-child`:`${g} > div`;return`\n\t\t${g}{\n\t\t\tflex-basis: calc(${r.desktop}% - (${a} * (${i} - 1) / ${i}));\n\t\t}\n\n\t\t${t} {\n\t\t\t${g}{\n\t\t\t\tflex-basis: calc(${r.tablet}% - (${a} * (${i} - 1) / ${i}));\n\t\t\t}\n\t\t}\n\n\t\t${n} {\n\t\t\t${g}{\n\t\t\t\tflex-basis: calc(${r.mobile}% - (${a} * (${i} - 1) / ${i}));\n\t\t\t}\n\t\t}\n\n\t\t${m}{\n\t\t\toverflow: ${l};\n\t\t\t${os(c)}\n\t\t\tpadding: ${us(d)};\n\t\t\t${is(u)}\n\t\t\tbox-shadow: ${ds(p)};\n\t\t}\n\t\t${Cs(o,h,s)}\n\t\t`.replace(/\s+/g," ")},mc=({attributes:e,updateColumnWidth:t,device:n,MINWIDTH:o,columns:i})=>{const{width:a}=e,s=100-(i-1)*o;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Width (%):","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:a[n],onChange:e=>t(n,e),min:o,max:"desktop"===n?s:100,step:.01})]})})},bc={dimension:["padding","margin","height","minHeight","maxHeight"],floating:!0,motion:!0,position:!0,transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0},fc=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,columns:o,updateColumns:i}=e,{advanced:a}=t,s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel bPlRemPrev",activeClass:"activeTab",tabs:Zt,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(mc,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:a,onChange:e=>n({advanced:e}),enabled:bc,isPremium:s})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsxs)(y.ToolbarGroup,{label:(0,x.__)("Column Options","b-blocks"),children:[o<6&&(0,l.jsx)(y.ToolbarButton,{icon:"plus",label:(0,x.__)("Add Column","b-blocks"),onClick:()=>i("add")}),o>1&&(0,l.jsx)(y.ToolbarButton,{icon:"trash",label:(0,x.__)("Delete Column","b-blocks"),onClick:()=>i("delete")})]})})]})})),{replaceInnerBlocks:xc}=(0,f.dispatch)("core/block-editor"),yc=(0,w.compose)((0,f.withSelect)(((e,t)=>{const{clientId:n}=t,{getBlocks:o,getBlockParents:i,getBlockIndex:a,getBlockAttributes:s,getPreviousBlockClientId:r,getNextBlockClientId:l}=e("core/block-editor"),c=document.querySelector('iframe[name="editor-canvas"]'),d=c?c?.contentDocument:document,u=i(n)[0],p=d?.querySelector(`#block-${u}`),h=p?"100%":"0px",g=l(n),m=r(n);return{parentBlockId:u,rowWidth:Ol(h),parentInnerBlocks:o(u),currentIndex:a(n,u),innerBlocks:o(n),nextClientId:g,nextWidth:s(g)?.width,prevClientId:m,prevWidth:s(m)?.width}})),(0,f.withDispatch)((e=>({updateAttributes:(t,n)=>e("core/block-editor").updateBlockAttributes(t,n)}))))((e=>{const{attributes:t,context:n,setAttributes:o,clientId:i,isSelected:a,toggleSelection:s,parentBlockId:r,rowWidth:c,parentInnerBlocks:d,currentIndex:u,innerBlocks:g,prevWidth:b,nextClientId:f,nextWidth:x,updateAttributes:v}=e,{width:k}=t,w=n["b-blocks/rowColumns"],_=n["b-blocks/rowColumnGap"],C=(0,m.useRef)(null),j=C?.current,$=j?.ownerDocument||document;(0,m.useEffect)((()=>me()),[a]);const[S,T]=(0,m.useState)(!1),N=(0,m.useRef)(k),M=(0,m.useRef)(x),L=(0,
282 -m.useRef)(b),P=`block-${i}`,E=$?.querySelector(`#block-${i}`),A=$?.querySelector(`#block-${f}`);(0,m.useEffect)((()=>{N.current={...k},M.current={...x},L.current={...b}}),[a,E,c]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(fc,{...e,attributes:t,setAttributes:o,nextClientId:f,columns:w,updateColumns:e=>{const t=100/("add"===e?w+1:w-1),n={...k,desktop:t};let o=[...d];"delete"===e?o.splice(u,1):o.splice(u+1,0,(0,p.createBlock)("b-blocks/column",{width:n})),xc(r,o)},updateColumnWidth:(e,t)=>{if("desktop"!==e)return void o({width:{...k,[e]:t}});if(t<5)return;const n=t-k.desktop;let i={};if(A&&null!==f&&(i={...x},i.desktop=parseFloat(i.desktop)-n,i.desktop>=5&&t>=5&&(v(f,{width:{...i}}),M.current={...i})),i.desktop>=5&&t>=5){const e=Math.abs(t);o({width:{...k,desktop:e}}),N.current={...N.current,desktop:e}}},MINWIDTH:5}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:C}),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:gc(t,P,w,_,!0)}}),(0,l.jsx)(y.ResizableBox,{className:S?`${El}Resizing`:"",enable:{top:!1,right:!!f,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResize:(e,t,n,i)=>((e,t,n,i)=>{const a=(s=i.width,100*parseFloat(s/c));var s;const r=N.current.desktop+a;let l=0;A&&null!==f&&(l=parseFloat(M.current.desktop)-a,l>=5&&r>=5&&(l=Math.abs(l),v(f,{width:{...x,desktop:l}}))),l>=5&&r>=5&&o({width:{...k,desktop:r}})})(0,0,0,i),onResizeStop:(e,t,n,o)=>(s(!0),T(!1),N.current={...k},void(M.current={...x})),onResizeStart:(e,t,n)=>(s(!1),void T(!0)),size:{width:"auto",height:"100%"},minWidth:c/5-Ol(_||"0px"),children:(0,l.jsx)("div",{className:El,style:0===g?.length?{padding:"10px",background:"#fff"}:{},children:(0,l.jsx)(h.InnerBlocks,{renderAppender:()=>g?.length?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{className:"columnEmpty"})})})}),(0,l.jsx)("span",{className:"widthPlaceholder",children:a&&Rl(k?.desktop)})]})]})}));Ll("b-blocks/row")&&(0,p.registerBlockType)(hc,{icon:or,edit:yc,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const vc=JSON.parse('{"apiVersion":3,"name":"b-blocks/td-viewer","title":"3D Viewer","description":"Display interactive 3D models on the web","category":"bBlocks","keywords":["3d","3d model","3d viewer"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"alignment":{"type":"string","default":"center"},"sourceType":{"type":"string","default":"upload"},"model":{"type":"object","default":{"id":null,"url":"https://modelviewer.dev/assets/ShopifyModels/ToyTrain.glb","title":""}},"modelLink":{"type":"string","default":"https://modelviewer.dev/assets/ShopifyModels/ToyTrain.glb"},"width":{"type":"string","default":"100%"},"height":{"type":"string","default":"350px"},"isTouchMove":{"type":"boolean","default":true},"isZoom":{"type":"boolean","default":true},"loadingType":{"type":"string","default":"auto"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"sourceType":"link"}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","modelViewer"]}'),kc=((0,x.__)("Upload","b-blocks"),(0,x.__)("Link","b-blocks"),[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Lazy","b-blocks"),value:"lazy"},{label:(0,x.__)("Eager","b-blocks"),value:"eager"}]),wc=({attributes:e,setAttributes:t})=>{const{alignment:n,model:o,width:i,height:a,isTouchMove:s,isZoom:r,loadingType:c}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:an}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("3D Model Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Model:","b-blocks")}),(0,l.jsx)(ke,{types:["model/gltf-binary"],value:o,onChange:e=>t({model:e}),placeholder:(0,x.__)("Enter Model URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:i,onChange:e=>t({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({height:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep height 0, to 350px height.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Controls via mouse/touch","b-blocks"),checked:s,onChange:e=>t({isTouchMove:e})}),s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Zoom","b-blocks"),checked:r,onChange:e=>t({isZoom:e})}),(0,l.jsx)("small",{children:(0,x.__)("Enable 'Controls via mouse/touch' to work Zoom!","b-blocks")})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Loading Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>t({loadingType:e}),options:kc})]})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(Ce,{label:(0,x.__)("Edit 3D Model:","b-blocks"),icon:"edit",types:["model/gltf-binary"],value:o,onChange:({id:e,url:n,title:i})=>t({model:{...o,id:e,url:n,title:i}})}),(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("3D Model Alignment"),alignmentControls:[{title:(0,x.__)("3D Model in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("3D Model in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("3D Model in right","b-blocks"),align:"right",icon:"align-right"}]})]})]})},_c="bBlocks3DViewer",Cc=({attributes:e,id:t})=>{const{alignment:n,width:o,height:i}=e,a=`#${t} .${_c}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${a}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${a} model-viewer{\n\t\t\twidth: ${["0px","0%","0em"].includes(o)?"auto":o};\n\t\t\theight: ${["0px","0%","0em"].includes(i)?"350px":i};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},jc=(0,m.forwardRef)((({attributes:e},t)=>{const{sourceType:n,model:o,modelLink:i,isTouchMove:a,isZoom:s,loadingType:r}=e,c=a?{"camera-controls":""}:{},d=s?{}:{"disable-zoom":""};return(0,l.jsx)("div",{className:_c,ref:t,children:(0,l.jsx)("model-viewer",{src:"upload"===n?o?.url:i,alt:"upload"===n?o?.title:"",loading:r,"auto-rotate":!0,...c,...d})})})),$c=(e,t,n,o)=>{t&&e?.setAttribute(n,o),!t&&e?.removeAttribute(n,o)};Ll(vc.name)&&(0,p.registerBlockType)(vc,{icon:ir,transforms:{from:[{type:"block",blocks:["tdvb/td-viewer"],transform:e=>(0,p.createBlock)("b-blocks/td-viewer",e)},{type:"prefix",prefix:"3d",transform:()=>(0,p.createBlock)("b-blocks/td-viewer")}],to:[{type:"block",blocks:["tdvb/td-viewer"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("tdvb/td-viewer",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e,{sourceType:a,model:s,modelLink:r,isTouchMove:c,isZoom:d,loadingType:u}=t;(0,m.useEffect)((()=>me()),[i]);const p=(0,m.useRef)(null);return(0,m.useEffect)((()=>{p.current.innerHTML="";const e=document.createElement("model-viewer");$c(e,!0,"src","upload"===a?s?.url:r),$c(e,!0,"alt","upload"===a?s?.title:""),$c(e,c,"camera-controls",""),$c(e,!d,"disable-zoom",""),$c(e,!0,"loading",u),$c(e,!0,"auto-rotate",""),p.current.appendChild(e)}),[a,s,r,c,d,u]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wc,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Cc,{attributes:t,id:`block-${o}`}),"upload"!==a||s.url?"":(0,l.jsx)("p",{className:"noModel",children:(0,x.__)("Please, upload Model or enter Model Link first!","3d-viewer-block")}),(0,l.jsx)(jc,{attributes:t,ref:p})]})]})},save:()=>null})
283 -;const Sc=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/advanced-image","title":"Advanced Image","category":"bBlocks","description":"A block that allows for advanced image handling with custom features.","keywords":["b blocks","advanced","image","advanced image"],"textdomain":"b-blocks","attributes":{"image":{"type":"object","default":{"sourceType":"","source":{"id":"","url":"","alt":"","title":""},"link":{"url":"","tab":"_self"}}},"layout":{"type":"object","default":{"size":"default","width":{"desktop":"100%","tablet":"100%","mobile":"100%"},"isAutoHeight":true,"height":{"desktop":"230px","tablet":"200px","mobile":"150px"},"isAutoFit":false,"fitOptionType":"cover"}},"style":{"type":"object","default":{"hoverEffect":"none","normalEffect":"none","effectOptions":{"normal":{"duration":1000,"delay":0,"iteration":"initial","iterationCount":1},"hover":{"duration":1000,"delay":0,"iteration":"initial","iterationCount":1}},"optionType":"rounded","alignment":{"desktop":"start","tablet":"start","mobile":"start"}}},"caption":{"type":"object","default":{"enabled":false,"text":""}},"captionStyle":{"type":"object","default":{"typo":{},"desktop":{"textAlign":"center","hAlign":"left","vAlign":"bottom","width":"","margin":{},"padding":{}},"tablet":{"textAlign":"center","hAlign":"left","vAlign":"top","width":"","margin":{},"padding":{}},"mobile":{"textAlign":"center","hAlign":"left","vAlign":"middle","width":"","margin":{},"padding":{}},"colors":{"color":"black","bg":"#eee"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),Tc="bBlocksAdvancedImage",Nc=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:a,style:s,captionStyle:r,image:c,advanced:d}=e,{width:u,height:p,isAutoHeight:h,isAutoFit:g,fitOptionType:m}=a,{hoverEffect:b,optionType:f,alignment:x,normalEffect:y="",effectOptions:v={}}=s,{normal:k={},hover:w={}}=v,{typo:_,desktop:C,tablet:j,mobile:$,colors:S}=r,T=`#${o} .${Tc}`,N=`${T} .image`,M=`${N} .caption`,L=(e,t,n,o,i)=>`${t} ${n}ms ${t==e+"Spin"?"linear":t===e+"Ping"?"cubic-bezier(0, 0, 0.2, 1)":"ease-in-out"} ${o}ms ${i};`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",_)?.googleFontLink}\n\t\t${ps(M,_)?.styles}\n\n\t\t${T}{\n\t\t\talign-items:${x.desktop};\n\t\t}\n\n\t\t${N}{\n\t\t\twidth : ${c.source?.url?u.desktop:"100%"};\n\t\t\theight: ${h?"auto":p.desktop};\n\t\t\tborder-radius: ${"rounded"===f?"15px":"square"===f?"0px":"Circle"===f?"100%":"0"};\n\t\t\t${ns("clip-path","Triangle"===f?"polygon(50% 0%, 0% 100%, 100% 100%)":"Rhombus"===f?"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)":"Octagon"===f?"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)":"square"===f?"inset(0%)":"")}\n\t\t}\n\n\t\t${T} img{\n\t\t\t${g?`object-fit: ${m};`:ns("object-fit","Triangle"===f||"Octagon"===f||"Rhombus"===f?"cover":"")}\n\t\t\t${ns("transform","zoomOut"===b?"scale(1.5)":"")}\n\t\t\tfilter: ${"blur"===b?"blur(3px)":"blur(0px)"};\n\t\t}\n\t\t${T}:hover img{\n\t\t\t${ns("transform","zoomIn"===b?"scale(1.5)":"zoomOut"===b?"scale(1)":"")}\n\t\t\t${ns("filter","blur"===b?"blur(0px)":"")}\n\t\t}\n\n\t\t${N}{\n\t\t\tanimation:${L("n",y,k?.duration,k?.delay,"number"===k?.iteration?k?.iterationCount:k?.iteration)}\n\t\t}\n\n\t\t${N}:hover{\n\t\t\tanimation:${L("h",b,w?.duration,w?.delay,"number"===w?.iteration?w?.iterationCount:w?.iteration)}\n\t\t}\n\n\t\t${M}{\n\t\t\twidth: ${C.width?C.width:"100%"};\n\t\t\ttext-align:${C.textAlign};\n\t\t\t${ss(S)}\n\t\t\t${ns("padding",hs(C.padding))}\n\t\t\t${ns("margin",hs(C.margin))}\n\t\t\t${Mc(C.vAlign,C.hAlign)}\n\t\t}\n\n\t\t${t}{\n\t\t\t${T}{\n\t\t\t\talign-items:${x.tablet};\n\t\t\t}\n\n\t\t\t${N}{\n\t\t\t\twidth : ${c.source?.url?u.tablet:"100%"};\n\t\t\t\theight: ${h?"auto":p.tablet};\n\t\t\t}\n\n\t\t\t${M}{\n\t\t\t\twidth: ${j.width?j.width:"100%"};\n\t\t\t\ttext-align:${j.textAlign};\n\t\t\t\t${ns("padding",hs(j.padding))}\n\t\t\t\t${ns("margin",hs(j.margin))}\n\t\t\t\t${Mc(j.vAlign,j.hAlign)}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t${n}{\n\t\t\t${T}{\n\t\t\t\talign-items:${x.mobile};\n\t\t\t}\n\n\t\t\t${N}{\n\t\t\t\twidth : ${c.source?.url?u.mobile:"100%"};\n\t\t\t\theight: ${h?"auto":p.mobile};\n\t\t\t}\n\n\t\t\t${M}{\n\t\t\t\twidth: ${$.width?$.width:"100%"};\n\t\t\t\ttext-align:${$.textAlign};\n\t\t\t\t${ns("padding",hs($.padding))}\n\t\t\t\t${ns("margin",hs($.margin))}\n\t\t\t\t${Mc($.vAlign,$.hAlign)}\n\t\t\t}\n\t\t}\n\t\t${Cs(o,d,i)}\n\t`}})},Mc=(e,t)=>`\n\t${"left"===t?"left: 0; right: auto;":"center"===t?"left:50%;"+("middle"!==e?"transform: translateX(-50%);":""):"right:0;left:auto;"}\n\t${"top"===e?"top:0;bottom:auto;":"middle"===e?"top:50%;"+("center"!==t?"transform: translateY(-50%);":""):"bottom:0;top:auto;"}\n\t${"center"===t&&"middle"===e?"transform:translateY(-50%) translateX(-50%);":""}\n`,Lc=[{label:"Custom",value:"custom"},{label:"Featured Image",value:"featured"}],Pc=[{label:"Rounded",value:"rounded"},{label:"Square",value:"square"},{label:"Circle",value:"Circle"},{label:"Octagon",value:"Octagon"},{label:"Rhombus",value:"Rhombus"},{label:"Triangle",value:"Triangle"}],Ec=[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}],Ac=[{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"Fill",value:"fill"}],Bc=[{label:"No Effect",value:"none"},{label:"Zoom in",value:"zoomIn"},{label:"Zoom out",value:"zoomOut"},{label:"Blur",value:"blur"}],Ic=[{label:"Left",value:"start",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"end",icon:"align-right"}],Oc=[{
284 -label:"Left",value:"left",icon:"editor-alignleft"},{label:"Center",value:"center",icon:"editor-aligncenter"},{label:"Right",value:"right",icon:"editor-alignright"},{label:"Justify",value:"justify",icon:"editor-justify"}],Rc=[{label:"Left",value:"left",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"right",icon:"align-right"}],zc=[{label:"Top",value:"top"},{label:"Middle",value:"middle"},{label:"Bottom",value:"bottom"}],Dc=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Bounce","b-blocks"),value:"nBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"nPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"nSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"nShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"nWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"nPing"},{label:(0,x.__)("Float","b-blocks"),value:"nFloat"}],Fc=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Bounce","b-blocks"),value:"hBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"hPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"hSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"hShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"hWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"hPing"},{label:(0,x.__)("Float","b-blocks"),value:"hFloat"}],Hc=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Infinite","b-blocks"),value:"infinite"},{label:(0,x.__)("Number","b-blocks"),value:"number"}],Wc=({attributes:e,setAttributes:t,updateObj:n})=>{const{image:o,layout:i,style:a,caption:s}=e,{sourceType:r,link:c}=o,{optionType:d}=a,{enabled:u}=s;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Source","b-blocks"),labelPosition:"left",value:r,options:Lc,onChange:e=>n("image",e,"sourceType")}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Styles","b-blocks"),labelPosition:"left",value:d,options:Pc,help:"Circle"===d||"Rhombus"===d||"Octagon"===d||"Triangle"===d?`Please Use Equal 'Height' & 'Width' For Perfect ${d} Shape.`:"",onChange:e=>n("style",e,"optionType")}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Size","b-blocks"),labelPosition:"left",value:i.size,options:Ec,onChange:e=>{let n;switch(e){case"thumbnail":n="150px";break;case"medium":n="300px";break;case"large":n="1024px";break;default:n="100%"}t({layout:{...i,size:e,width:{desktop:n,tablet:n,mobile:n}}})}}),(0,l.jsx)("span",{children:(0,x.__)("Width will be change while changing the Size","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Link","b-blocks"),placeholder:"https://example.com",help:"If you want to link the image, please enter the URL. If not want to link leave as blank",value:c.url,onChange:e=>n("image",e,"link","url")}),c.url&&(0,l.jsx)(y.ToggleControl,{className:"mt20",checked:"_blank"===c.tab,label:(0,x.__)("Open in New Tab","b-blocks"),onChange:e=>n("image",e?"_blank":"_self","link","tab")})]}),"custom"===r&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.ToggleControl,{checked:u,label:(0,x.__)("Display Caption","b-blocks"),onChange:e=>n("caption",e,"enabled")})})]})},Uc=({attributes:e,updateObj:t,device:n})=>{const{image:o,layout:i,style:a,captionStyle:s,caption:r}=e,{height:c,isAutoHeight:d,isAutoFit:u,fitOptionType:p}=i,{alignment:h,hoverEffect:g,normalEffect:m="",effectOptions:b={}}=a,{textAlign:f,hAlign:w,vAlign:C,margin:j,padding:$,width:S}=s[n],{sourceType:T}=o,{typo:N,colors:M}=s,{normal:L={},hover:P={}}=b;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:i.width[n],onChange:e=>t("layout",e,"width",n)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",checked:d,label:(0,x.__)("Auto Height","b-blocks"),onChange:e=>t("layout",e,"isAutoHeight")}),!d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:c[n],onChange:e=>t("layout",e,"height",n)})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:h[n],onChange:e=>t("style",e,"alignment",n),options:Ic,isIcon:!0,size:"default"}),(0,l.jsx)(y.ToggleControl,{className:"mt20",checked:u,label:(0,x.__)("Auto Fit","b-blocks"),onChange:e=>t("layout",e,"isAutoFit")}),u&&(0,l.jsx)(Tn,{label:(0,x.__)("Image Fit","b-blocks"),value:p,onChange:e=>t("layout",e,"fitOptionType"),options:Ac,size:"small"}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Hover Effect","b-blocks"),labelPosition:"left",value:g,options:Bc,onChange:e=>t("style",e,"hoverEffect")})]}),r.enabled&&"custom"===T&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(On,{label:(0,x.__)("Colors","b-blocks"),value:M,onChange:e=>t("captionStyle",e,"colors"),defaults:{color:"black",bg:"#EEEEEE"}}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,l.jsx)(v,{children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(_,{})]}),value:S,allowReset:!0,onChange:e=>t("captionStyle",e,n,"width")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:N,onChange:e=>t("captionStyle",e,"typo"),defaults:{fontSize:13}}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:f,onChange:e=>t("captionStyle",e,n,"textAlign"),options:Oc,isIcon:!0,size:"small"}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Horizontal Align","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:w,onChange:e=>t("captionStyle",e,n,"hAlign"),options:Rc,isIcon:!0,size:"small"}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Vertical Align","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:C,onChange:e=>t("captionStyle",e,n,"vAlign"),options:zc,size:"small"}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{children:(0,x.__)("Margin","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{label:"",values:j,onChange:e=>t("captionStyle",e,n,"margin")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{children:(0,x.__)("Padding","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{label:"",values:$,onChange:e=>t("captionStyle",e,n,"padding")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!0,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Type","b-blocks"),options:Dc,value:m,onChange:e=>t("style",e,"normalEffect")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:Hc,value:L?.iteration,onChange:e=>t("style",e,"effectOptions","normal","iteration")}),"number"==L?.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:L?.iterationCount,onChange:e=>t("style",e,"effectOptions","normal","iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),min:0,max:2e4,step:50,value:L?.duration,onChange:e=>t("style",e,"effectOptions","normal","duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:L?.delay,
285 -onChange:e=>t("style",e,"effectOptions","normal","delay")})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Type","b-blocks"),options:Fc,value:g,onChange:e=>t("style",e,"hoverEffect")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:Hc,value:P?.iteration,onChange:e=>t("style",e,"effectOptions","hover","iteration")}),"number"===P?.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:P?.iterationCount,onChange:e=>t("style",e,"effectOptions","hover","iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),min:0,max:2e4,step:50,value:P?.duration,onChange:e=>t("style",e,"effectOptions","hover","duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:P?.delay,onChange:e=>t("style",e,"effectOptions","hover","delay")})]})]})})})]})},Gc=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateObj:n,isPremium:o,device:i})=>{const{image:a}=e,{sourceType:s,source:r}=a,c={attributes:e,setAttributes:t,updateObj:n,isPremium:o,device:i};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Xt,children:n=>(0,l.jsxs)(l.Fragment,{children:["general"===n.name&&(0,l.jsx)(Wc,{...c}),"style"===n.name&&(0,l.jsx)(Uc,{...c}),"advanced"===n.name&&(0,l.jsx)(Qt,{advanced:e.advanced,onChange:e=>t({advanced:e}),isPremium:o})]})})}),(0,l.jsx)(h.BlockControls,{children:r.url&&"custom"===s&&(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image/*"],onSelect:({id:e,url:t,alt:o,title:i})=>n("image",{id:e,url:t,alt:o,title:i},"source"),render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{icon:"edit",iconSize:"25",title:(0,x.__)("Edit Custom Image","b-blocks"),onClick:e})})})})})]})})),Vc=({image:e,link:t,isBackend:n=!1})=>{const{url:o,alt:i,title:a}=e||{};return o&&(0,l.jsx)(qc,{link:t,isBackend:n,children:(0,l.jsx)("img",{src:o,alt:i||a})})},qc=({link:e={},children:t,isBackend:n})=>{const{url:o="",tab:i="_self"}=e;return o&&!n?(0,l.jsx)("a",{href:$t(o),target:i,children:t}):t},Yc=({attributes:e,setAttributes:t,featuredImageURL:n})=>{const{image:o,caption:i}=e,{sourceType:a,source:s,link:r}=o,{enabled:c,text:d}=i;return(0,l.jsx)("div",{className:Tc,children:(0,l.jsx)("div",{className:"image",children:"custom"===a?(0,l.jsx)(l.Fragment,{children:s.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vc,{image:s,link:r,isBackend:!0}),c&&(0,l.jsx)("div",{className:"caption ",children:(0,l.jsx)(h.RichText,{tagName:"p",value:d,onChange:e=>t({caption:be(i,e,"text")}),placeholder:"Add Caption..."})})]}):(0,l.jsx)(_e,{label:(0,x.__)("Custom Image","b-blocks"),onChange:({id:e,url:n,alt:i,title:a})=>t({image:{...o,source:{id:e,url:n,alt:i,title:a}}})})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vc,{image:{url:n,alt:"Feature Image"},link:r,isBackend:!0}),!n&&(0,l.jsxs)("div",{className:"featureImageNotFound",children:[(0,l.jsx)("h3",{children:"Warning !!!"}),(0,l.jsx)("p",{children:"Seems like you have not added a Featured Image for this post. Please make sure to add a Featured Image and try again."})]})]})})})},Kc=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,l.jsx)("path",{d:"M448 80c8.8 0 16 7.2 16 16l0 319.8-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3L48 96c0-8.8 7.2-16 16-16l384 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})}),Qc=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,l.jsx)("path",{d:"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})}),Zc=(0,f.withSelect)(((e,t)=>{const{layout:n}=t.attributes,{size:o}=n,{getMedia:i}=e("core"),{getDeviceType:a,getEditedPostAttribute:s}=e("core/editor"),r=i(s("featured_media")),l=r?.media_details?.sizes[o]?.source_url||r?.source_url;return{device:a()?.toLowerCase(),featuredImageURL:l}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,featuredImageURL:a}=e,{image:s}=t,{sourceType:r}=s,c=bBlocksPremiumChecker,d=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Gc,{attributes:t,setAttributes:n,updateObj:d,isPremium:c}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Nc,{attributes:t,id:`block-${o}`,device:i,isBackend:!0}),(0,l.jsx)("div",{className:"bblocks-advanced-image",children:r?(0,l.jsx)(Yc,{attributes:t,setAttributes:n,featuredImageURL:a}):(0,l.jsxs)("div",{className:"sourceSelector",children:[(0,l.jsx)("h4",{children:"Choose Your Image Source"}),(0,l.jsx)("div",{className:"sourceOptions",children:[{label:"Custom Image",value:"custom",icon:Kc},{label:"Featured Image",value:"featured",icon:Qc}].map((({label:e,value:t,icon:o})=>(0,l.jsxs)("div",{onClick:()=>n({image:{...s,sourceType:t}}),children:[o,e]},t)))})]})})]})]})}));Ll(Sc.name)&&(0,p.registerBlockType)(Sc,{icon:ar,edit:Zc});const Xc=JSON.parse('{"apiVersion":3,"name":"b-blocks/alert","title":"Alert","description":"Provide contextual feedback messages.","category":"bBlocks","keywords":["alert message","alert block","custom alert"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"type":{"type":"string","default":"general"},"width":{"type":"string","default":"100%"},"alignment":{"type":"string","default":"center"},"textAlign":{"type":"string","default":"center"},"message":{"type":"string","default":"You have an alert message!","selector":".bBlocksAlert .alert .alertMessage"},"icon":{"type":"object","default":{"class":"fa-solid fa-bell"}},"isDismiss":{"type":"boolean","default":true},"typography":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"}}},"colors":{"type":"object","default":{"color":"#333","bg":"#fff"}},"padding":{"type":"object","default":{"vertical":"15px","horizontal":"30px"}},"border":{"type":"object","default":{"width":"2px","color":"#333","radius":"8px"}},"shadow":{"type":"object","default":{}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),Jc=e=>{const{className:t="",label:n=(0,x.__)("Border:"),value:o,onChange:i,defaults:a={}}=e,[s,r]=(0,m.useState)(!0),c={width:"0px",style:"solid",color:"",side:"all",radius:"0px 0px 0px 0px"},d=e=>{if(!e)return["0px","0px","0px","0px"];const t=e.trim().split(/\s+/);return 4===t.length?t:1===t.length?[t[0],t[0],t[0],t[0]]:["0px","0px","0px","0px"]},u=e=>e.join(" "),p=e=>a?.[e]||c[e],h=e=>i({...o,[e]:p(e)}),g=e=>o?.[e]||p(e),b=(e,t)=>i({...o,[e]:t}),f=e=>(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>h(e)}),k=d(g("radius")),w=d(p("radius")),_=k.every(((e,t)=>e===w[t])),C=[{key:"topLeft",index:0,label:(0,x.__)("Top-left")},{key:"topRight",index:1,label:(0,x.__)("Top-right")},{key:"bottomRight",index:2,label:(0,x.__)("Bottom-right")},{key:"bottomLeft",index:3,label:(0,x.__)("Bottom-left")}];return(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{
286 -className:"mt5",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"edit",onClick:t,"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:"),labelPosition:"left",value:g("width"),onChange:e=>b("width",e),units:[Pe(),Ae()]}),o?.width&&o?.width!==p("width")&&f("width")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Style:")}),(0,l.jsx)(y.SelectControl,{value:g("style"),onChange:e=>b("style",e),options:Le}),o?.style&&o?.style!==p("style")&&f("style")]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:"),value:g("color"),onChange:e=>b("color",e),defaultColor:p("color")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Sides:")}),(0,l.jsx)(y.SelectControl,{value:g("side"),onChange:e=>b("side",e),options:Re}),o?.side&&o?.side!==p("side")&&f("side")]}),(0,l.jsxs)("div",{className:"bPlBoxControl mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Radius:")}),(0,l.jsxs)("div",{className:"sides",children:[C.map((e=>(0,l.jsx)("div",{className:"bplUnitControlWrapper",children:(0,l.jsx)(y.__experimentalUnitControl,{onChange:t=>((e,t)=>{const n=d(g("radius"));s?b("radius",u([e,e,e,e])):(n[{topLeft:0,topRight:1,bottomRight:2,bottomLeft:3}[t]]=e,b("radius",u(n)))})(t,e.key),value:k[e.index],units:[Pe(50),Ee(50),Ae(3),Be(3)],isResetValueOnUnitChange:!0})},e.key))),(0,l.jsx)("button",{className:"bplBoxControlLinkButton "+(s?"activeLink":""),onClick:()=>r(!s),children:s?(0,l.jsx)("span",{className:"dashicons dashicons-admin-links"}):(0,l.jsx)("span",{className:"dashicons dashicons-editor-unlink"})}),!_&&(0,l.jsx)("button",{className:"bplBoxControlLinkButton",onClick:()=>h("radius"),children:(0,l.jsx)("span",{className:"dashicons dashicons-image-rotate"})})]})]})]})})]})},ed=window.wp.blob,td=(0,f.withSelect)(((e,t)=>{const{value:n}=t;return{image:n?.id?e("core").getMedia(n?.id):null,imageSizes:e("core/block-editor").getSettings().imageSizes}}))((e=>{const{className:t,value:n={},onChange:o,image:i,imageSizes:a}=e,s=(e,t)=>o({...n,[e]:t});return(0,l.jsxs)("div",{className:t,children:[n?.url&&!(0,ed.isBlobURL)(n?.url)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Alt Text (Alternative Text):")}),(0,l.jsx)(y.TextControl,{value:n?.alt,onChange:e=>s("alt",e)})]}),n?.id&&0!==ge(i,a)?.length&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Select Size:")}),(0,l.jsx)(y.SelectControl,{value:n?.url,onChange:e=>s("url",e),options:ge(i,a)})]})]})})),nd=(0,y.withNotices)((e=>{const{label:t=(0,x.__)(" Image:"),icon:n="format-image",value:o={},onChange:i,noticeOperations:a,noticeUI:s}=e;return(0,l.jsx)(h.MediaPlaceholder,{labels:{title:t},icon:n,allowedTypes:["image"],accept:"image/*",onSelect:({id:e,url:t,alt:n,title:a})=>i({...o,id:e,url:t,alt:n,title:a}),onSelectURL:e=>i({...o,id:null,url:e,alt:"",title:""}),onError:e=>a.createErrorNotice(e),notices:s})})),od=e=>{const{className:t="",label:n=(0,x.__)("Shadow"),value:o,onChange:i,defaults:a={},type:s="box"}=e,r={hOffset:"0px",vOffset:"0px",blur:"0px",spreed:"0px",color:"#7090b0",isInset:!1},c=e=>a?.[e]||r[e],d=e=>o?.[e]||c(e),u=(e,t)=>i({...o,[e]:t}),p=e=>(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>(e=>i({...o,[e]:c(e)}))(e)});return(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{className:"mt5",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"edit",onClick:t,"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Horizontal Offset:"),labelPosition:"left",value:d("hOffset"),onChange:e=>u("hOffset",e),units:[Pe(),Ae(),Be()]}),o?.hOffset&&o?.hOffset!==c("hOffset")&&p("hOffset")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Vertical Offset:"),labelPosition:"left",value:d("vOffset"),onChange:e=>u("vOffset",e),units:[Pe(),Ae(),Be()]}),o?.vOffset&&o?.vOffset!==c("vOffset")&&p("vOffset")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Blur:"),labelPosition:"left",value:d("blur"),onChange:e=>u("blur",e),units:[Pe(),Ae(),Be()]}),o?.blur&&o?.blur!==c("blur")&&p("blur")]}),(0,l.jsx)("small",{children:(0,x.__)("Blur cannot be negative value!")}),"box"===s&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Spreed:"),labelPosition:"left",value:d("spreed"),onChange:e=>u("spreed",e),units:[Pe(),Ae(),Be()]}),o?.spreed&&o?.spreed!==c("spreed")&&p("spreed")]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:"),value:d("color"),onChange:e=>u("color",e),defaultColor:c("color")}),"box"===s&&(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Shadow Inset?"),checked:d("isInset"),onChange:e=>u("isInset",e),__nextHasNoMarginBottom:!0})]})})]})},id=e=>{const{className:t="",label:n=(0,x.__)("Space:"),value:o,onChange:i,defaults:a={}}=e,s={side:2,vertical:"0px",horizontal:"0px",top:"0px",right:"0px",bottom:"0px",left:"0px"},r=e=>a?.[e]||s[e],c=e=>o?.[e]||r(e),d=(e,t)=>i({...o,[e]:t}),u=e=>parseInt(c(e)?.replace(/([a-z])+/g,"")),p=e=>null!=e&&"object"==typeof e;return(0,l.jsxs)("div",{className:`bPlSpaceControl ${t}`,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:n}),(0,l.jsxs)(y.ButtonGroup,{className:"bPlBtnGroup",children:[(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Vertical, Horizontal"),placement:"top",position:"top",children:(0,l.jsxs)(y.Button,{className:"side2",size:"small",isPrimary:2===c("side"),"aria-pressed":2===c("side"),onClick:()=>i({...o,side:2,vertical:(u("top")+u("bottom"))/2+"px",horizontal:(u("left")+u("right"))/2+"px"}),children:[(0,l.jsx)("span",{className:"scrollIcon",children:ct}),(0,l.jsx)("span",{className:"sideScrollIcon",children:ct})]})}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Top, Right, Bottom, Left"),placement:"top",position:"top",children:(0,l.jsxs)(y.Button,{size:"small",isPrimary:4===c("side"),"aria-pressed":4===c("side"),onClick:()=>i({...o,side:4,top:c("vertical"),right:c("horizontal"),bottom:c("vertical"),left:c("horizontal")}),children:[(0,l.jsx)(y.Dashicon,{icon:"arrow-up-alt"}),(0,l.jsx)(y.Dashicon,{icon:"arrow-right-alt"}),(0,l.jsx)(y.Dashicon,{icon:"arrow-down-alt"}),(0,l.jsx)(y.Dashicon,{icon:"arrow-left-alt"})]})})]}),!((e,t,n)=>{const o=Object.keys(e||{}).filter((e=>"styles"!==e)),i=(e,t)=>{const n=Object.keys(e);for(const o of n){const n=e[o],a=t[o],s=p(n)&&p(a);if(s&&!i(n,a)||!s&&n!==a)return!1}return!0};for(const a of o){const o=e[a],s=t[a],r=n[a],l=p(o)&&p(s),c=p(o)&&p(r);if(s){if(l&&!i(o,s)||!l&&o!==s)return!1}else if(c&&!i(o,r)||!c&&o!==r)return!1}return!0})(o,a,s)&&(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>{const e={side:r("side"),vertical:r("vertical"),horizontal:r("horizontal"),top:r("top"),right:r("right"),bottom:r("bottom"),left:r("left")};i({...o,...e})}})]}),2===c("side")&&(0,l.jsxs)(y.PanelRow,{className:"twoColumn",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Top Bottom:"),labelPosition:"top",value:c("vertical"),onChange:e=>d("vertical",e),units:[Pe(),Ee(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Left Right:"),labelPosition:"top",value:c("horizontal"),onChange:e=>d("horizontal",e),units:[Pe(),Ee(),Ae(),Be()]})]}),4===c("side")&&(0,l.jsxs)(y.PanelRow,{className:"fourColumn",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Top:"),labelPosition:"top",value:c("top"),onChange:e=>d("top",e),units:[Pe(),Ee(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,
287 -x.__)("Right:"),labelPosition:"top",value:c("right"),onChange:e=>d("right",e),units:[Pe(),Ee(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Bottom:"),labelPosition:"top",value:c("bottom"),onChange:e=>d("bottom",e),units:[Pe(),Ee(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Left:"),labelPosition:"top",value:c("left"),onChange:e=>d("left",e),units:[Pe(),Ee(),Ae(),Be()]})]})]})},ad=[{label:(0,x.__)("General","b-blocks"),value:"general"},{label:(0,x.__)("Success","b-blocks"),value:"success"},{label:(0,x.__)("Info","b-blocks"),value:"info"},{label:(0,x.__)("Warning","b-blocks"),value:"warning"},{label:(0,x.__)("Error","b-blocks"),value:"error"},{label:(0,x.__)("Minimal","b-blocks"),value:"minimal"}],sd=e=>({general:{color:"#333",icon:"fa-solid fa-bell"},success:{color:"#12b878",icon:"fa-regular fa-circle-check"},info:{color:"#2cacff",icon:"fa-solid fa-circle-info"},warning:{color:"#f1ae2a",icon:"fa-solid fa-gear"},error:{color:"#db4b68",icon:"fa-solid fa-circle-exclamation"}}[e]),rd=(e,t,n)=>"minimal"===e?{width:"0px",icon:{class:sd("info").icon},isDismiss:"minimal"!==e,colors:{color:"#00AB6D",bg:"#fff"},padding:{vertical:"10px",horizontal:"13px"},border:{...t,color:"#00AB6D",radius:"50px"},shadow:{...n,blur:"10px",color:"#00AB6D"}}:{width:"100%",icon:{class:sd(e).icon},isDismiss:"minimal"!==e,colors:{color:sd(e).color,bg:`${sd(e).color}1a`},padding:{vertical:"15px",horizontal:"30px"},border:{...t,color:sd(e).color,radius:"8px"},shadow:{}},ld=({attributes:e,setAttributes:t})=>{const{type:n,width:o,alignment:i,textAlign:a,icon:s,isDismiss:r,typography:c,colors:d,padding:u,border:p,shadow:g}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:sn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Alert Settings","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:n,onChange:e=>t({type:e,...rd(e,p,g)}),options:ad})]}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when type will be changed.","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:o,onChange:e=>t({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")}),(0,l.jsx)(Un,{label:(0,x.__)("Alert Icon:","b-blocks"),value:s,onChange:e=>t({icon:e}),defaults:{class:"fa-solid fa-bell"},isSize:!1,isColor:!1}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Alert Dismissible?","b-blocks"),checked:r,onChange:e=>t({isDismiss:e})}),(0,l.jsx)(Oa,{className:"mt20",label:(0,x.__)("Typography:","b-blocks"),value:c,onChange:e=>t({typography:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}}),(0,l.jsx)(On,{value:d,onChange:e=>t({colors:e}),defaults:{color:"#333",bg:"#fff"}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:u,onChange:e=>t({padding:e}),defaults:{vertical:"15px",horizontal:"30px"}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:p,onChange:e=>t({border:e}),defaults:{width:"2px",color:"#333",radius:"8px"}}),(0,l.jsx)(od,{label:(0,x.__)("Shadow:","b-blocks"),value:g,onChange:e=>t({shadow:e})})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.AlignmentToolbar,{value:i,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Alert Alignment"),alignmentControls:[{title:(0,x.__)("Alert in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Alert in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Alert in right","b-blocks"),align:"right",icon:"align-right"}]}),(0,l.jsx)(h.AlignmentToolbar,{value:a,onChange:e=>t({textAlign:e})})]})]})},cd="bBlocksAlert",dd=({attributes:e,id:t})=>{const{width:n,alignment:o,textAlign:i,typography:a,colors:s,padding:r,border:c,shadow:d}=e,u=`#${t} .${cd} .alert`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",a)?.googleFontLink}\n\t\t${ps(u,a)?.styles}\n\n\t\t${u}{\n\t\t\ttext-align: ${o};\n\t\t}\n\t\t${u}{\n\t\t\ttext-align: ${i};\n\t\t\twidth: ${["0px","0%","0em"].includes(n)?"auto":n};\n\t\t\t${ss(s)}\n\t\t\tpadding: ${us(r)};\n\t\t\t${is(c)}\n\t\t\tbox-shadow: ${ds(d)};\n\t\t}\n\t\t${u} .alertIcon{\n\t\t\tfont-size: ${a?.fontSize?.desktop};\n\t\t\tcolor: ${s?.color};\n\t\t}\n\t\t${u} .alertClose{\n\t\t\tcolor: ${s?.color};\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${u} .alertIcon{\n\t\t\t\tfont-size: ${a?.fontSize?.tablet};\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${u} .alertIcon{\n\t\t\t\tfont-size: ${a?.fontSize?.mobile};\n\t\t\t}c\n\t\t}\n\t\t`.replace(/\s+/g," ")}})};Ll(Xc.name)&&(0,p.registerBlockType)(Xc,{icon:sr,transforms:{from:[{type:"block",blocks:["abb/alert-box"],transform:e=>(0,p.createBlock)("b-blocks/alert",e)},{type:"block",blocks:["core/paragraph"],transform:({content:e,align:t})=>(0,p.createBlock)("b-blocks/alert",{message:e,textAlign:t})},{type:"block",blocks:["core/heading"],transform:({content:e,textAlign:t})=>(0,p.createBlock)("b-blocks/alert",{message:e,textAlign:t})},{type:"prefix",prefix:"alert",transform:()=>(0,p.createBlock)("b-blocks/alert")}],to:[{type:"block",blocks:["abb/alert-box"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("abb/alert-box",e)},{type:"block",blocks:["core/paragraph"],isMatch:({message:e})=>!!e,transform:({message:e,textAlign:t})=>(0,p.createBlock)("core/paragraph",{content:e,align:t})},{type:"block",blocks:["core/heading"],isMatch:({message:e})=>!!e,transform:({message:e,textAlign:t})=>(0,p.createBlock)("core/heading",{content:e,textAlign:t})}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e,{message:a,icon:s,isDismiss:r}=t;return(0,m.useEffect)((()=>me()),[i]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ld,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(dd,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:cd,children:(0,l.jsxs)("div",{className:"alert",children:[s?.class&&(0,l.jsx)("i",{className:`alertIcon ${s?.class}`}),(0,l.jsx)(h.RichText,{className:"alertMessage",tagName:"span",value:a,onChange:e=>n({message:e}),placeholder:(0,x.__)("Alert Message","b-blocks"),inlineToolbar:!0}),r&&(0,l.jsx)(y.Tooltip,{text:"Hide will only work in frontend",placement:"top",position:"top",children:(0,l.jsx)("i",{className:"alertClose fa fa-times-circle"})})]})})]})]})},save:()=>null});const ud=JSON.parse('{"apiVersion":3,"name":"b-blocks/animated-text","title":"Animated Text","description":"Apply animation on any text.","category":"bBlocks","keywords":["animated text","text animation","text animated"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"loop":{"type":"boolean","default":true},"animateIn":{"type":"string","default":"char"},"inEffect":{"type":"string","default":"fadeInLeftBig"},"inSequence":{"type":"string","default":"default"},"outEffect":{"type":"string","default":"rollOut"},"outSequence":{"type":"string","default":"shuffle"},"textAlign":{"type":"string","default":"center"},"background":{"type":"object","default":{"color":"#0000"}},"content":{"type":"string","default":"Animated text for animation","selector":".atbAnimatedText .content"},"typography":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"}}},"color":{"type":"string","default":"#333"},"padding":{"type":"object","default":{"vertical":"15px","horizontal":"15px"}},"border":{"type":"object","default":{"radius":"5px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","animate"],"render":"file:./render.php","viewScript":["file:./view.js","textillate"]}'),pd=[{label:(0,x.__)("Char","b-blocks"),value:"char"},{label:(0,x.__)("Word","b-blocks"),value:"word"}],hd=[{label:(0,
288 -x.__)("Flash","b-blocks"),value:"flash"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"},{label:(0,x.__)("Shake","b-blocks"),value:"shake"},{label:(0,x.__)("Tada","b-blocks"),value:"tada"},{label:(0,x.__)("Swing","b-blocks"),value:"swing"},{label:(0,x.__)("Wobble","b-blocks"),value:"wobble"},{label:(0,x.__)("Pulse","b-blocks"),value:"pulse"},{label:(0,x.__)("Flip","b-blocks"),value:"flip"}],gd=[{label:(0,x.__)("Fade In","b-blocks"),value:"fadeIn"},{label:(0,x.__)("Flip In X","b-blocks"),value:"flipInX"},{label:(0,x.__)("Flip In Y","b-blocks"),value:"flipInY"},{label:(0,x.__)("Fade In Up","b-blocks"),value:"fadeInUp"},{label:(0,x.__)("Fade In Down","b-blocks"),value:"fadeInDown"},{label:(0,x.__)("Fade In Left","b-blocks"),value:"fadeInLeft"},{label:(0,x.__)("Fade In Right","b-blocks"),value:"fadeInRight"},{label:(0,x.__)("Fade In Up Big","b-blocks"),value:"fadeInUpBig"},{label:(0,x.__)("Fade In Down Big","b-blocks"),value:"fadeInDownBig"},{label:(0,x.__)("Fade In Left Big","b-blocks"),value:"fadeInLeftBig"},{label:(0,x.__)("Fade In Right Big","b-blocks"),value:"fadeInRightBig"},{label:(0,x.__)("Bounce In","b-blocks"),value:"bounceIn"},{label:(0,x.__)("Bounce In Up","b-blocks"),value:"bounceInUp"},{label:(0,x.__)("Bounce In Down","b-blocks"),value:"bounceInDown"},{label:(0,x.__)("Bounce In Left","b-blocks"),value:"bounceInLeft"},{label:(0,x.__)("Bounce In Right","b-blocks"),value:"bounceInRight"},{label:(0,x.__)("Rotate In","b-blocks"),value:"rotateIn"},{label:(0,x.__)("Rotate In Up Left","b-blocks"),value:"rotateInUpLeft"},{label:(0,x.__)("Rotate In Up Right","b-blocks"),value:"rotateInUpRight"},{label:(0,x.__)("Rotate In Down Left","b-blocks"),value:"rotateInDownLeft"},{label:(0,x.__)("Rotate In Down Right","b-blocks"),value:"rotateInDownRight"},{label:(0,x.__)("Roll In","b-blocks"),value:"rollIn"}],md=[{label:(0,x.__)("Fade Out","b-blocks"),value:"fadeOut"},{label:(0,x.__)("Flip Out X","b-blocks"),value:"flipOutX"},{label:(0,x.__)("Flip Out Y","b-blocks"),value:"flipOutY"},{label:(0,x.__)("Fade Out Up","b-blocks"),value:"fadeOutUp"},{label:(0,x.__)("Fade Out Down","b-blocks"),value:"fadeOutDown"},{label:(0,x.__)("Fade Out Left","b-blocks"),value:"fadeOutLeft"},{label:(0,x.__)("Fade Out Right","b-blocks"),value:"fadeOutRight"},{label:(0,x.__)("Fade Out Up Big","b-blocks"),value:"fadeOutUpBig"},{label:(0,x.__)("Fade Out Down Big","b-blocks"),value:"fadeOutDownBig"},{label:(0,x.__)("Fade Out Left Big","b-blocks"),value:"fadeOutLeftBig"},{label:(0,x.__)("Fade Out Right Big","b-blocks"),value:"fadeOutRightBig"},{label:(0,x.__)("Bounce Out","b-blocks"),value:"bounceOut"},{label:(0,x.__)("Bounce Out Up","b-blocks"),value:"bounceOutUp"},{label:(0,x.__)("Bounce Out Down","b-blocks"),value:"bounceOutDown"},{label:(0,x.__)("Bounce Out Left","b-blocks"),value:"bounceOutLeft"},{label:(0,x.__)("Bounce Out Right","b-blocks"),value:"bounceOutRight"},{label:(0,x.__)("Rotate Out","b-blocks"),value:"rotateOut"},{label:(0,x.__)("Rotate Out Up Left","b-blocks"),value:"rotateOutUpLeft"},{label:(0,x.__)("Rotate Out Up Right","b-blocks"),value:"rotateOutUpRight"},{label:(0,x.__)("Rotate Out Down Left","b-blocks"),value:"rotateOutDownLeft"},{label:(0,x.__)("Rotate Out Down Right","b-blocks"),value:"rotateOutDownRight"},{label:(0,x.__)("Hinge","b-blocks"),value:"hinge"},{label:(0,x.__)("Roll Out","b-blocks"),value:"rollOut"}],bd=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Sync","b-blocks"),value:"sync"},{label:(0,x.__)("Shuffle","b-blocks"),value:"shuffle"},{label:(0,x.__)("Reverse","b-blocks"),value:"reverse"}],fd=({attributes:e,setAttributes:t})=>{const{loop:n,animateIn:o,inEffect:i,inSequence:a,outEffect:s,outSequence:r,textAlign:c,background:d,content:u,typography:p,color:g,padding:m,border:b}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:rn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animated Text Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Animate text:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:u,onChange:e=>t({content:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Loop","b-blocks"),checked:n,onChange:e=>t({loop:e})}),(0,l.jsx)("small",{children:(0,x.__)("Loop will not work instantly in editor! you have to refresh the page.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Animate in:","b-blocks")}),(0,l.jsx)(Tn,{value:o,onChange:e=>t({animateIn:e}),options:pd})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("In Effect:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,onChange:e=>t({inEffect:e}),options:[...hd,...gd]})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("In Sequence:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:a,onChange:e=>t({inSequence:e}),options:bd})]}),n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Out Effect:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:s,onChange:e=>t({outEffect:e}),options:[...hd,...md]})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Out Sequence:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:r,onChange:e=>t({outSequence:e}),options:bd})]})]})]})]}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animated Text Style","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(Oa,{className:"mt20",label:(0,x.__)("Typography:","b-blocks"),value:p,onChange:e=>t({typography:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:g,onChange:e=>t({color:e}),defaultColor:"#333"}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:m,onChange:e=>t({padding:e}),defaults:{vertical:"15px",horizontal:"15px"}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:b,onChange:e=>t({border:e}),defaults:{radius:"5px"}})]})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:c,onChange:e=>t({textAlign:e})})})]})},xd="bBlocksAnimatedText",yd=({attributes:e,id:t})=>{const{textAlign:n,background:o,typography:i,color:a,padding:s,border:r}=e,c=`#${t} .${xd}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",i)?.googleFontLink}\n\t\t${ps(`${c} .content`,i)?.styles}\n\n\t\t${c}{\n\t\t\ttext-align: ${n};\n\t\t\t${os(o)}\n\t\t\tpadding: ${us(s)};\n\t\t\t${is(r)}\n\t\t}\n\t\t${c} .content{\n\t\t\tcolor: ${a};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},vd=jQuery;Ll(ud.name)&&(0,p.registerBlockType)(ud,{icon:rr,transforms:{from:[{type:"block",blocks:["atb/animated-text"],transform:e=>(0,p.createBlock)("b-blocks/animated-text",e)},{type:"block",blocks:["b-blocks/alert"],transform:({message:e,textAlign:t})=>(0,p.createBlock)("b-blocks/animated-text",{content:e,textAlign:t})},{type:"block",blocks:["core/paragraph"],transform:({content:e,align:t})=>(0,p.createBlock)("b-blocks/animated-text",{content:e,textAlign:t})},{type:"block",blocks:["core/heading"],transform:({content:e,textAlign:t})=>(0,p.createBlock)("b-blocks/animated-text",{content:e,textAlign:t})},{type:"prefix",prefix:"animated-text",transform:()=>(0,p.createBlock)("b-blocks/animated-text")}],to:[{type:"block",blocks:["atb/animated-text"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("atb/animated-text",e)},{type:"block",blocks:["core/paragraph"],isMatch:({content:e})=>!!e,transform:({content:e,textAlign:t})=>(0,p.createBlock)("core/paragraph",{content:e,align:t})},{type:"block",blocks:["b-blocks/alert"],isMatch:({content:e})=>!!e,
289 -transform:({content:e,textAlign:t})=>(0,p.createBlock)("b-blocks/alert",{message:e,textAlign:t})},{type:"block",blocks:["core/heading"],isMatch:({content:e})=>!!e,transform:({content:e,textAlign:t})=>(0,p.createBlock)("core/heading",{content:e,textAlign:t})}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{loop:i,animateIn:a,inEffect:s,inSequence:r,outEffect:c,outSequence:d,content:u}=t,p=`block-${o}`,g=(0,m.useRef)(null);return(0,m.useEffect)((()=>{g.current&&vd(g.current).textillate((e=>{const{loop:t,animateIn:n,inEffect:o,inSequence:i,outEffect:a,outSequence:s}=e;return{loop:t,minDisplayTime:2e3,initialDelay:0,autoStart:!0,inEffects:[],outEffects:["hinge"],in:{effect:o,delayScale:1.5,delay:50,sync:"sync"===i,shuffle:"shuffle"===i,reverse:"reverse"===i},out:{effect:a,delayScale:1.5,delay:50,sync:"sync"===s,shuffle:"shuffle"===s,reverse:"reverse"===s},type:n}})(t))}),[i,a,s,r,c,d,u]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(fd,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(yd,{attributes:t,id:p}),(0,l.jsx)("div",{className:xd,children:(0,l.jsx)("p",{className:"content",ref:g,children:u})})]})]})},save:()=>null})
290 -;const kd=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/advanced-tabs","title":"Advanced Tabs","category":"bBlocks","description":"Display content in responsive, customizable tabs with support for nested blocks and flexible layouts.","keywords":["tabs","tab","content","advanced tabs","tab content"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"clientId":{"type":"string","default":""},"tabLists":{"type":"array","default":[{"title":"Tab 1","subTitle":"","id":1,"iconType":"none","image":"","svg":"","library":"","iconPosition":"left","isExpanded":true,"isDefault":true,"customId":""},{"title":"Tab 2","subTitle":"","id":2,"iconType":"none","image":"","svg":"","library":"","iconPosition":"left","isExpanded":false,"isDefault":false,"customId":""},{"title":"Tab 3","subTitle":"","id":3,"iconType":"none","image":"","svg":"","library":"","iconPosition":"left","isExpanded":false,"isDefault":false,"customId":""}]},"tabs":{"type":"object","default":{"desktop":{"direction":"row","columnJustify":"center","rowJustify":"","contentAlign":"center","wrap":"nowrap"},"tablet":{"direction":"","columnJustify":"","rowJustify":"","contentAlign":"center","wrap":""},"mobile":{"direction":"","columnJustify":"","rowJustify":"","contentAlign":"center","wrap":""},"isShowTitle":true,"isShowSubTitle":false,"isShowActiveSubTitle":false,"isShowIcon":false,"isCloseAllTab":false}},"styles":{"type":"object","default":{"tabContainer":{"bg":{},"border":{},"desktop":{"spaceBetween":"","padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"spaceBetween":"","padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"spaceBetween":"","padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}}},"tabs":{"normal":{"normal":{"bg":{"color":"#eeeeee"},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}}},"hover":{"bg":{},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"transition":0.2}},"active":{"normal":{"bg":{"color":"#146EF5"},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"transition":0.2},"hover":{"bg":{},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"transition":0.2}},"desktop":{"gap":"10px","width":""},"tablet":{"gap":"10px","width":""},"mobile":{"gap":"10px","width":""}},"tabTitle":{"typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}},"normal":{"normal":{"color":"#242424"},"hover":{"color":""}},"active":{"normal":{"color":"#fff"},"hover":{"color":""}}},"tabSubTitle":{"typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"normal":{"normal":{"color":"#242424"},"hover":{"color":""}},"active":{"normal":{"color":"#fff"},"hover":{"color":""}}},"icon":{"desktop":{"size":"","position":"row"},"tablet":{"size":"","position":""},"mobile":{"size":"","position":""},"normal":{"normal":{"color":"#242424","bg":{},"border":{},"desktop":{"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"hover":{"color":"","bg":{},"border":{},"desktop":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"transition":0.2},"active":{"normal":{"color":"#fff","bg":{},"border":{},"desktop":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"hover":{"color":"","bg":{},"border":{},"desktop":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"transition":0.2}},"content":{"bg":{},"border":{},"desktop":{"padding":{},"margin":{},"radius":{},"width":""},"tablet":{"padding":{},"margin":{},"radius":{},"width":""},"mobile":{"padding":{},"margin":{},"radius":{},"width":""}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","lodash"],"render":"file:./render.php","viewScript":"file:./view.js","style":"file:./view.css"}'),wd=[{
291 -name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],_d=()=>{const[e,t]=(0,m.useState)("desktop"),n=()=>{const e=window.innerWidth;t(e>1024?"desktop":e>640?"tablet":"mobile")};return(0,m.useEffect)((()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)})),[]),{device:e}},Cd=(e,t={},n=!0)=>{const[o,i]=(0,m.useState)(!1),[a,s]=(0,m.useState)(!1),[r,l]=(0,m.useState)(null),[c,d]=(0,m.useState)(null);if(!wp.ajax)return void console.error("Please use wp-util as a dependency");const u=(n={})=>{i(!0),s(!1),l(null),wp.ajax.post(e,{...t,...n}).done((e=>{i(!1),d(e)})).fail((e=>{i(!1),s(!0),l(e)}))},p=(e={})=>{u(e)};return(0,m.useEffect)((()=>{n&&u(t)}),[]),{data:c,saveData:p,refetch:p,isLoading:o,isError:a,error:r}},jd=e=>{const[t,n]=(0,m.useState)(!0),[o,i]=(0,m.useState)(!1),[a,s]=(0,m.useState)(null),[r,l]=(0,m.useState)(null);(0,m.useEffect)((()=>{i(!1),s(null),wp.api.loadPromise.then((()=>{(new wp.api.models.Settings).fetch().then((t=>{l(c(t[e])),n(!1)}))}))}),[]);const c=e=>{let t=e;try{t=JSON.parse(e)}catch(e){i(!0),s(e.message)}return t};return{data:r,isLoading:t,isError:o,error:a}},$d=()=>{const e=window?.wp?.Uploader?.defaults||window?._wpPluploadSettings?.defaults,t=e?.filters?.mime_types;Array.isArray(t)&&t.forEach((e=>{const t=String(e?.extensions||"");t.split(",").includes("svg")||(e.extensions=t?`${t},svg`:"svg")}))},Sd=({attributes:e,setAttributes:t,index:n,updateObj:o})=>{const{tabLists:i,tabs:a}=e,{isCloseAllTab:s}=a,r=i[n],{data:c}=jd("bBlocksUtils"),{refetch:d}=Cd("b-blocks-enable-svg-mime-type",{_wpnonce:c?.nonce},!1),u=new Tt;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Initial Active","b-blocks"),checked:r.isDefault,value:r.isDefault,onChange:()=>{const e=i.map(((e,t)=>t===n?{...e,isDefault:!0}:{...e,isDefault:!1}));s||t({tabLists:e})}}),(0,l.jsx)(y.TextControl,{type:"text",className:"mt10",label:(0,x.__)("Title","b-blocks"),value:r.title,onChange:e=>o("tabLists",e,n,"title")}),(0,l.jsx)(y.TextareaControl,{rows:2,className:"mt10",label:(0,x.__)("Sub Title","b-blocks"),value:r.subTitle,onChange:e=>o("tabLists",e,n,"subTitle")}),(0,l.jsx)(v,{children:(0,x.__)("Icon Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r.iconType,onChange:e=>o("tabLists",e,n,"iconType"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"None",value:"none"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Library",value:"library"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Upload SVG",value:"svg"})]}),"library"===r.iconType&&(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon Library","b-blocks"),value:r.library,onChange:e=>o("tabLists",e,n,"library")}),"svg"===r.iconType&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(we,{className:"mt10",label:(0,x.__)("Upload SVG","b-blocks"),types:["image/svg+xml"],onClick:()=>($d(),d()),value:{url:r.svg},onChange:async e=>{const t=e?.url?await u.sanitizeFile(e?.url):"";o("tabLists",t,n,"svg")},isSvgEnabled:!0})})]})},Td=({clientId:e,tabLists:t,setAttributes:n,handleTabTitleClick:o})=>{const i=[...(0,f.select)("core/block-editor").getBlocks(e)],a=(t||[]).reduce(((e,t)=>Math.max(Number(e),Number(t?.id||0))),0)+1,s={title:`Tab ${a}`,subTitle:"",id:a,iconType:"none",image:"",svg:"",library:"",isExpanded:!1,isDefault:!1,customId:""},r=(0,p.createBlock)("b-blocks/container",{lock:{remove:!0,move:!0},className:"b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-"+a});i.push(r),(0,f.dispatch)("core/block-editor").replaceInnerBlocks(e,i,!1).then((()=>{n({tabLists:[...t||[],s]}),o&&o(String(a))}))},Nd=e=>{const{attributes:t,setAttributes:n,updateObj:o,clientId:i,activeIndex:a,setActiveIndex:s}=e,{tabLists:r}=t,c={title:`Tab ${r.length+1}`,subTitle:"",id:r.length+1,iconType:"none",image:"",svg:"",library:"",isExpanded:!1,isDefault:!1,customId:""};return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tab Lists","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:t,setAttributes:n,handleAdd:()=>{Td({clientId:i,blockId:"",tabLists:r,setAttributes:n})},handleDelete:e=>{const t=[...(0,f.select)("core/block-editor").getBlocks(i)],o=r[e];o?.id&&t.forEach(((a,s)=>{if(a?.attributes?.className.split(" ").includes(`b-blocks-advanced-tabs-panel-${o?.id}`)){const o=[...t.slice(0,s),...t.slice(s+1)];(0,f.dispatch)("core/block-editor").replaceInnerBlocks(i,o,!1);const a=[...r.slice(0,e),...r.slice(e+1)];n({tabLists:a})}}))},newItem:c,design:"sortable",itemLabel:"Tab",arrKey:"tabLists",title:"title",ItemSettings:Sd,handleCopy:e=>{const t=(r||[]).reduce(((e,t)=>Math.max(Number(e),Number(t?.id||0))),0),o=[...(0,f.select)("core/block-editor").getBlocks(i)],a=r[e];a?.id&&o.forEach(((o,s)=>{if(o?.attributes?.className.split(" ").includes(`b-blocks-advanced-tabs-panel-${a?.id}`)){const l=(0,p.createBlock)(o.name,{...o.attributes,className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-${t+1}`,lock:{remove:!0,move:!0}},o?.innerBlocks?.length>0?o?.innerBlocks:[]);(0,f.dispatch)("core/block-editor").insertBlocks(l,s+1,i);const c=[...r.slice(0,e),{...a,id:t+1},...r.slice(e)];n({tabLists:c}),(0,f.dispatch)("core/block-editor").selectBlock(i)}}))},minItem:0,updateObj:o,activeIndex:a,setActiveIndex:s})})},Md=e=>{const{attributes:t,updateObj:n,setAttributes:o}=e,{tabs:i,tabLists:a}=t;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Title","b-blocks"),checked:i?.isShowTitle,value:i.isShowTitle,onChange:e=>n("tabs",e,"isShowTitle")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Sub Title","b-blocks"),checked:i?.isShowSubTitle,value:i.isShowSubTitle,onChange:e=>n("tabs",e,"isShowSubTitle")}),i.isShowSubTitle&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Only Tab Active Sub Title","b-blocks"),checked:i?.isShowActiveSubTitle,value:i.isShowActiveSubTitle,onChange:e=>n("tabs",e,"isShowActiveSubTitle")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:i?.isShowIcon,value:i.isShowIcon,onChange:e=>n("tabs",e,"isShowIcon")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Close All Tabs Initially","b-blocks"),checked:i?.isCloseAllTab,value:i.isCloseAllTab,onChange:e=>{const t=e?a?.map((e=>({...e,isDefault:!1}))):a?.map(((e,t)=>({...e,isDefault:0===t})));o({tabLists:t,tabs:{...i,isCloseAllTab:e}})}})]})},Ld=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M12 10l0 10"}),(0,l.jsx)("path",{d:"M12 10l4 4"}),(0,l.jsx)("path",{d:"M12 10l-4 4"}),(0,l.jsx)("path",{d:"M4 4l16 0"})]}),Pd=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M4 20l16 0"}),(0,l.jsx)("path",{d:"M12 14l0 -10"}),(0,l.jsx)("path",{d:"M12 14l4 -4"}),(0,l.jsx)("path",{d:"M12 14l-4 -4"})]}),Ed=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M10 12l10 0"}),(0,l.jsx)("path",{d:"M10 12l4 4"}),(0,l.jsx)("path",{d:"M10 12l4 -4"}),(0,l.jsx)("path",{d:"M4 4l0 16"})]}),Ad=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M14 12l-10 0"}),(0,l.jsx)("path",{d:"M14 12l-4 4"
292 -}),(0,l.jsx)("path",{d:"M14 12l-4 -4"}),(0,l.jsx)("path",{d:"M20 4l0 16"})]}),Bd=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),Id=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),Od=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),Rd=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Items-Stretch--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M8 17.75c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C7.3219 17.3906 7.25 17.2125 7.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1Zm7 0c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C14.3219 17.3906 14.25 17.2125 14.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1ZM2.75 22c-0.2125 0 -0.390585 -0.07235 -0.53425 -0.217C2.071915 21.6385 2 21.45935 2 21.2455c0 -0.21365 0.071915 -0.39135 0.21575 -0.533C2.359415 20.57085 2.5375 20.5 2.75 20.5h18.5c0.2125 0 0.39065 0.07235 0.5345 0.217 0.14365 0.1445 0.2155 0.32365 0.2155 0.5375 0 0.21365 -0.07185 0.39135 -0.2155 0.533 -0.14385 0.14165 -0.322 0.2125 -0.5345 0.2125h-18.5Zm0 -18.5c-0.2125 0 -0.390585 -0.072335 -0.53425 -0.217C2.071915 3.1385 2 2.959335 2 2.7455c0 -0.213665 0.071915 -0.391335 0.21575 -0.533C2.359415 2.070835 2.5375 2 2.75 2h18.5c0.2125 0 0.39065 0.072335 0.5345 0.217 0.14365 0.1445 0.2155 0.323665 0.2155 0.5375 0 0.213665 -0.07185 0.391335 -0.2155 0.533 -0.14385 0.141665 -0.322 0.2125 -0.5345 0.2125h-18.5Z",strokeWidth:"0.5"})}),zd=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Dd=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),Fd=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Hd=e=>(0,l.jsxs)("svg",{height:"16",viewBox:"0 0 512 512",width:"16",xmlns:"http://www.w3.org/2000/svg",...e,style:{height:"16px",width:"16px"},children:[(0,l.jsx)("path",{d:"m349.4 289.3h-13c-68.4 0-92.1.1-160.5-.1-26.4-.1-42.3-23.1-32.3-46.8 6.1-14.5 18-19.9 33.3-19.8 68 .1 91.3 0 159.4 0h14.7c-3.8-4.3-5.9-7.1-8.3-9.5-11.2-11-22.6-21.8-33.6-33-13.9-14.2-14.6-35.1-1.9-48.5 12.8-13.5 34.9-13.7 49.4.5 33.3 32.8 66.3 65.8 99.1 99.1 14.3 14.6 14.4 34.7.1 49.2-32.8 33.4-65.8 66.4-99.2 99.2-14.5 14.3-36.5 14.2-49.4.7s-11.9-34.4 2.4-49.3c13-13.4 25.7-26.9 39.8-41.7z"}),(0,l.jsx)("path",{d:"m112.3 256.1v226.7c0 21.3-21.9 34.3-45.4 27.3-13.6-4-21.3-13.7-21.3-27.2-.1-41.1 0-82.2 0-123.3 0-109.7 0-219.4 0-329.1 0-18.8 13.4-30.7 33.9-30.5 19.6.2 32.8 11.9 32.8 29.4.1 75.6.1 151.2 0 226.7z"})]}),Wd=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),Ud=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",style:{rotate:"180deg"},...e,children:(0,l.jsx)("path",{
293 -d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),Gd=e=>{const{attributes:t,updateObj:n,device:o}=e,{tabs:i,styles:a}=t,{tabs:s,content:r}=a,c=["row","row-reverse"],d=["column","column-reverse"];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Layout","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{style:{padding:"2px"},className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i?.[o]?.direction,onChange:e=>{n("tabs",e,o,"direction")},size:"small",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"column",icon:Ld}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"column-reverse",icon:Pd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"row-reverse",icon:Ad}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"row",icon:Ed})]})]}),d.includes(i?.[o]?.direction)&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Justify ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.columnJustify,onChange:e=>n("tabs",e,o,"columnJustify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Bd,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Id,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Od,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(Rd,{style:{rotate:"-90deg"}})})]})]}),c.includes(i?.[o]?.direction)&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Justify ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.rowJustify,onChange:e=>n("tabs",e,o,"rowJustify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Bd,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Id,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Od,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(Rd,{})})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Tab Content Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i?.[o]?.contentAlign,onChange:e=>n("tabs",e,o,"contentAlign"),isDeselectable:!0,size:"small",style:{padding:"2px"},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"start",icon:zd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:Dd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"end",icon:Fd})]})]}),d.includes(i?.[o]?.direction)&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Wrap","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i?.[o]?.wrap,onChange:e=>n("tabs",e,o,"wrap"),isDeselectable:!0,style:{padding:"2px"},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap",value:"wrap",icon:(0,l.jsx)(Wd,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"No Wrap",value:"nowrap",icon:(0,l.jsx)(Hd,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap Reverse",value:"wrap-reverse",icon:(0,l.jsx)(Ud,{})})]})]}),c.includes(i?.[o]?.direction)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Tabs Menu Width","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s[o].width,onChange:e=>n("styles",e,"tabs",o,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Content Width","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r[o].width,onChange:e=>n("styles",e,"content",o,"width")})]})]})]})},Vd=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Gd,{...e}),(0,l.jsx)(Nd,{...e}),(0,l.jsx)(Md,{...e})]}),qd=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{tabContainer:a}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tab Container","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:a[o].margin,onChange:e=>n("styles",e,"tabContainer",o,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:a[o].padding,onChange:e=>n("styles",e,"tabContainer",o,"padding")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a.bg,onChange:e=>n("styles",e,"tabContainer","bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>n("styles",e,"tabContainer","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:a[o].radius,onChange:e=>n("styles",e,"tabContainer",o,"radius")})]})},Yd=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),[a,s]=(0,m.useState)("normal"),{styles:r}=e,{icon:c}=r;return(0,l.jsxs)(y.PanelBody,{
294 -className:"bPlPanelBody",title:(0,x.__)("Tabs Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",value:c[n].size,onChange:e=>t("styles",e,"icon",n,"size")}),(0,l.jsxs)(v,{children:[(0,x.__)("Icon Position","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:c[n].position,onChange:e=>t("styles",e,"icon",n,"position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Top",value:"column"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Bottom",value:"column-reverse"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Left",value:"row"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Right",value:"row-reverse"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e),s("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].margin,onChange:e=>t("styles",e,"icon",o,a,n,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].padding,onChange:e=>t("styles",e,"icon",o,a,n,"padding")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:c[o][a].color,onChange:e=>t("styles",e,"icon",o,a,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:c[o][a].bg,onChange:e=>t("styles",e,"icon",o,a,"bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:c[o][a].border,onChange:e=>t("styles",e,"icon",o,a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].radius,onChange:e=>t("styles",e,"icon",o,a,n,"radius")})]})},Kd=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),[a,s]=(0,m.useState)("normal"),{styles:r}=e,{tabs:c}=r;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tabs","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Tabs Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",value:c[n].gap,onChange:e=>t("styles",e,"tabs",n,"gap")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e),s("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].margin,onChange:e=>t("styles",e,"tabs",o,a,n,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].padding,onChange:e=>t("styles",e,"tabs",o,a,n,"padding")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:c[o][a].bg,onChange:e=>t("styles",e,"tabs",o,a,"bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:c[o][a].border,onChange:e=>t("styles",e,"tabs",o,a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].radius,onChange:e=>t("styles",e,"tabs",o,a,n,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.01,value:c.normal.hover.transition,onChange:e=>t("styles",e,"tabs","normal","hover","transition")})]})},Qd=({attributes:e,updateObj:t})=>{const[n,o]=(0,m.useState)("normal"),[i,a]=(0,m.useState)("normal"),{styles:s}=e,{tabSubTitle:r}=s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tabs SubTitle","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:r.typography,onChange:e=>t("styles",e,"tabSubTitle","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n,onChange:e=>{o(e),a("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>a(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r[n][i].color,onChange:e=>t("styles",e,"tabSubTitle",n,i,"color")})]})},Zd=({attributes:e,updateObj:t})=>{const[n,o]=(0,m.useState)("normal"),[i,a]=(0,m.useState)("normal"),{styles:s}=e,{tabTitle:r}=s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tabs Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:r.typography,onChange:e=>t("styles",e,"tabTitle","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n,onChange:e=>{o(e),a("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>a(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r[n][i].color,onChange:e=>t("styles",e,"tabTitle",n,i,"color")})]})},Xd=e=>{const{attributes:t}=e,{tabs:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qd,{...e}),(0,l.jsx)(Kd,{...e}),n.isShowTitle&&(0,l.jsx)(Zd,{...e}),n.isShowSubTitle&&(0,l.jsx)(Qd,{...e}),n.isShowIcon&&(0,l.jsx)(Yd,{...e})]})},Jd=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:wd,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Vd,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Xd,{...e})})]})})})}),eu=(e,o)=>{
277 +fill:"none",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.4"}),(0,l.jsx)("path",{d:"M3 9h18",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.4"}),(0,l.jsx)("path",{d:"M8 3v3M16 3v3",stroke:o,strokeWidth:"1.6",strokeLinecap:"round"}),(0,l.jsx)("rect",{x:"6",y:"12",width:"5",height:"5",rx:"1",fill:o}),(0,l.jsx)("path",{d:"M13 13h5M13 16h3",stroke:i,strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.6"})]}),Sl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M3 4h2l1.2 9.2a1.6 1.6 0 0 0 1.6 1.4h8.1a1.6 1.6 0 0 0 1.55-1.18L20 7H6",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.55"}),(0,l.jsx)("circle",{cx:"9",cy:"19",r:"1.4",fill:o}),(0,l.jsx)("circle",{cx:"17",cy:"19",r:"1.4",fill:o}),(0,l.jsx)("path",{d:"M13 4.5v4M11 6.5h4",stroke:o,strokeWidth:"1.6",strokeLinecap:"round"})]}),Tl=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"3",y:"3",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.45"}),(0,l.jsx)("rect",{x:"13",y:"3",width:"8",height:"8",rx:"1.5",fill:o,opacity:"0.85"}),(0,l.jsx)("rect",{x:"3",y:"13",width:"8",height:"8",rx:"1.5",fill:o,opacity:"0.85"}),(0,l.jsx)("rect",{x:"13",y:"13",width:"8",height:"8",rx:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.45"}),(0,l.jsx)("path",{d:"M15.4 5.6h3.2M15.4 7.6h2.2",stroke:i,strokeWidth:"1.2",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"M5.4 15.6h3.2M5.4 17.6h2.2",stroke:"#ffffff",strokeWidth:"1.2",strokeLinecap:"round",opacity:"0.9"})]}),Nl=(0,l.jsx)("svg",{...er,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M13.5 2h-12l-.5.5v11l.5.5h12l.5-.5v-11l-.5-.5zM2 3h11v1H2V3zm7 4H6V5h3v2zm0 1v2H6V8h3zM2 5h3v2H2V5zm0 3h3v2H2V8zm0 5v-2h3v2H2zm4 0v-2h3v2H6zm7 0h-3v-2h3v2zm0-3h-3V8h3v2zm-3-3V5h3v2h-3z"})}),Ml=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M12 3v18",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.45"}),(0,l.jsx)("circle",{cx:"12",cy:"6.5",r:"2.6",fill:o}),(0,l.jsx)("circle",{cx:"12",cy:"12",r:"2.6",fill:o,opacity:"0.75"}),(0,l.jsx)("circle",{cx:"12",cy:"17.5",r:"2.6",fill:o,opacity:"0.55"}),(0,l.jsx)("rect",{x:"1.5",y:"4.5",width:"7",height:"4",rx:"1",fill:"currentColor",opacity:"0.35"}),(0,l.jsx)("rect",{x:"15.5",y:"10",width:"7",height:"4",rx:"1",fill:"currentColor",opacity:"0.35"}),(0,l.jsx)("rect",{x:"1.5",y:"15.5",width:"7",height:"4",rx:"1",fill:"currentColor",opacity:"0.35"})]}),Ll=(0,l.jsxs)("svg",{...er,viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{d:"M19 3v18",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.45"}),(0,l.jsx)("circle",{cx:"19",cy:"12",r:"2.8",fill:o}),(0,l.jsx)("rect",{x:"2",y:"8",width:"12",height:"8",rx:"1.5",fill:"currentColor",opacity:"0.35"}),(0,l.jsx)("path",{d:"M14 12l2.2 0",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",opacity:"0.45"})]}),Pl=e=>{const t="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,n="undefined"!=typeof bBlocksDisabledBlocks&&bBlocksDisabledBlocks||[],o=wn.includes(e);return!(!t&&o||n.includes(e))};Pl(g.name)&&(0,p.registerBlockType)(g,{icon:tr,edit:Js,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{}),variations:[{isDefault:!0}]});const El=JSON.parse('{"apiVersion":3,"name":"b-blocks/row","title":"Row","description":"Implement row and column layout.","category":"bBlocks","keywords":["row","columns","multi columns"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"layout":{"type":"object","default":{"type":"flex","desktop":{"direction":"row","justify":"","alignItems":"","columnGap":"","wrap":"wrap","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"tablet":{"direction":"","justify":"","alignItems":"","columnGap":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"mobile":{"direction":"","justify":"","alignItems":"","columnGap":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""}}},"columns":{"type":"number"},"columnGap":{"type":"string","default":"0px"},"heightType":{"type":"string","default":"auto"},"height":{"type":"string","default":"0px"},"columnPositionY":{"type":"string","default":"center"},"columnPositionX":{"type":"string","default":"center"},"overflow":{"type":"string","default":"hidden"},"background":{"type":"object","default":{"color":""}},"padding":{"type":"object","default":{"vertical":"0px","horizontal":"0px"}},"border":{"type":"object","default":{}},"shadow":{"type":"object","default":{}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"providesContext":{"b-blocks/rowColumns":"columns","b-blocks/rowColumnGap":"columnGap"},"supports":{"align":["wide","full"],"html":false,"interactivity":{"clientNavigation":true}},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Al="bBlocksColumn",{getBlocks:Bl,getBlockAttributes:Il}=(0,f.select)("core/block-editor"),{updateBlockAttributes:Ol}=(0,f.dispatch)("core/block-editor"),Rl=e=>parseInt(e.match(/\d+/g)[0]),zl=e=>parseFloat(e.toFixed(2)),Dl=[50,50],Fl=[100,100],Hl=[100,100,100],Wl=[{label:"100",columns:1,layout:{desktop:[100],tablet:[100],mobile:[100]}},{label:"50/50",columns:2,layout:{desktop:[50,50],tablet:Fl,mobile:Fl}},{label:"34/66",columns:2,layout:{desktop:[34,66],tablet:Fl,mobile:Fl}},{label:"66/34",columns:2,layout:{desktop:[66,34],tablet:Fl,mobile:Fl}},{label:"33.33/33.33/33.34",columns:3,layout:{desktop:[33.33,33.33,33.34],tablet:[50,50,50],mobile:Hl}},{label:"25/25/50",columns:3,layout:{desktop:[25,25,50],tablet:[...Dl,100],mobile:Hl}},{label:"50/25/25",columns:3,layout:{desktop:[50,25,25],tablet:[100,...Dl],mobile:Hl}},{label:"25/50/25",columns:3,layout:{desktop:[25,50,25],tablet:Hl,mobile:Hl}},{label:"16.66/66.68/16.66",columns:3,layout:{
278 +desktop:[16.66,66.68,16.66],tablet:Hl,mobile:Hl}},{label:"25/25/25/25",columns:4,layout:{desktop:[25,25,25,25],tablet:[50,50,50,50],mobile:[100,100,100,100]}},{label:"20/20/20/20/20",columns:5,layout:{desktop:[20,20,20,20,20],tablet:[33.33,33.33,33.34,50,50],mobile:[50,50,50,50,100]}},{label:"16.66/16.67/16.67/16.67/16.67/16.66",columns:6,layout:{desktop:[16.66,16.67,16.67,16.67,16.67,16.66],tablet:[33.33,33.33,33.34,33.33,33.33,33.34],mobile:[50,50,50,50,50,50]}}],Ul=((0,x.__)("Auto","b-blocks"),(0,x.__)("Hidden","b-blocks"),(0,x.__)("Visible","b-blocks"),(0,x.__)("Default","b-blocks"),(0,x.__)("Top","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Bottom","b-blocks"),(0,x.__)("Baseline","b-blocks"),(0,x.__)("Stretch","b-blocks"),(0,x.__)("Default","b-blocks"),(0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),(0,x.__)("Space Between","b-blocks"),(0,x.__)("Space Around","b-blocks"),(0,x.__)("Space Evenly","b-blocks"),(0,x.__)("Stretch","b-blocks"),{dimension:["padding","margin","maxWidth","maxHeight"],transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0}),Gl=(e,o,i=!1)=>{const{layout:a={},columns:s,columnGap:r,height:l,columnPositionY:c,columnPositionX:d,overflow:u,background:p,padding:h,border:g,shadow:m,advanced:b}=e,f=i?`#${o} > div > div`:`#${o} > div`,x=i?`${f} >.block-editor-inner-blocks >.block-editor-block-list__layout`:f,y=e=>`\n\t\t${ns("justify-content",a?.[e]?.justify)}\n\t\t${ns("align-items",a?.[e]?.alignItems)}\n\t\t${ns("flex-direction",a?.[e]?.direction)}\n\t\t${(e=>{const t=["column-reverse","column"].includes(a?.[e]?.direction),n=a?.[e]?.wrap;return t?ns("flex-wrap","nowrap"):`${ns("flex-wrap",n)} ${ns("align-content","nowrap"!==a?.[e]?.wrap||""!==a?.[e]?.wrap?a?.[e]?.alignContent:"")}`})(e)}\n\t`;return`\n\t\t${f}{\n\t\t\t${ns("overflow",u)}\n\t\t\t${ns("padding",us(h))}\n\t\t\t${ns("box-shadow",ds(m))}\n\t\t\t${os(p)}\n\t\t\t${is(g)}\n\t\t}\n\t\t${x}{\n\t\t\t${ns("gap",r)}\n\t\t\t${ns("min-height",l)}\n\t\t\t${ns("align-items",c)}\n\t\t\t${ns("align-content",d)}\n\t\t\t${"flex"===a.type?y("desktop"):""}\n\t\t}\n\t\t${t}{\n\t\t\t${x}{\n\t\t\t\t${ns("gap",a?.tablet?.columnGap)}\n\t\t\t\t${"flex"===a.type?y("tablet"):""}\n\t\t\t}\n\t\t}\n\n\t\t${n}{\n\t\t\t${x}{\n\t\t\t\t${ns("gap",a?.mobile?.columnGap)}\n\t\t\t\t${"flex"===a.type?y("mobile"):""}\n\t\t\t}\n\t\t}\n\n\t\t${s>0?Cs(o,b,i):""}\n\t`.replace(/\s+/g," ")},Vl=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z"})}),ql=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M566.6 342.6C579.1 330.1 579.1 309.8 566.6 297.3L406.6 137.3C394.1 124.8 373.8 124.8 361.3 137.3C348.8 149.8 348.8 170.1 361.3 182.6L466.7 288L96 288C78.3 288 64 302.3 64 320C64 337.7 78.3 352 96 352L466.7 352L361.3 457.4C348.8 469.9 348.8 490.2 361.3 502.7C373.8 515.2 394.1 515.2 406.6 502.7L566.6 342.7z"})}),Yl=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M297.4 566.6C309.9 579.1 330.2 579.1 342.7 566.6L502.7 406.6C515.2 394.1 515.2 373.8 502.7 361.3C490.2 348.8 469.9 348.8 457.4 361.3L352 466.7L352 96C352 78.3 337.7 64 320 64C302.3 64 288 78.3 288 96L288 466.7L182.6 361.3C170.1 348.8 149.8 348.8 137.3 361.3C124.8 373.8 124.8 394.1 137.3 406.6L297.3 566.6z"})}),Kl=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,l.jsx)("path",{d:"M342.6 81.4C330.1 68.9 309.8 68.9 297.3 81.4L137.3 241.4C124.8 253.9 124.8 274.2 137.3 286.7C149.8 299.2 170.1 299.2 182.6 286.7L288 181.3L288 552C288 569.7 302.3 584 320 584C337.7 584 352 569.7 352 552L352 181.3L457.4 286.7C469.9 299.2 490.2 299.2 502.7 286.7C515.2 274.2 515.2 253.9 502.7 241.4L342.7 81.4z"})}),Ql=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Flex-Start-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M2 22V2h1.5v20H2Zm11.25 -5.25v-9.5h2.5v9.5h-2.5Zm-6 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),Zl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Center--Streamline-Sharp-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{fill:"currentColor",d:"M11.25 22V2h1.5v20h-1.5Zm3 -5.25v-9.5h2.5v9.5h-2.5Zm-7 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),Xl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Flex-End--Streamline-Sharp-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{fill:"currentColor",d:"M20.5 22V2h1.5v20h-1.5ZM14.25 16.75v-9.5h2.5v9.5h-2.5Zm-6 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),Jl=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Space-Between-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M20.5 22V16.75h-2.5v-9.5h2.5V2h1.5v20h-1.5ZM2 22V2h1.5v5.25h2.5v9.5H3.5V22H2Z",strokeWidth:"0.5"})}),ec=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Space-Around-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M20.5 22V2h1.5v20h-1.5ZM2 22V2h1.5v20H2Zm13.25 -5.25v-9.5h2.5v9.5h-2.5Zm-9 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),tc=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Justify-Space-Even-Fill--Streamline-Sharp-Fill-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M20.5 22V2h1.5v20h-1.5ZM2 22V2h1.5v20H2Zm12.25 -5.25v-9.5h2.5v9.5h-2.5Zm-7 0v-9.5h2.5v9.5h-2.5Z",strokeWidth:"0.5"})}),nc=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),oc=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),ic=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),ac=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Items-Stretch--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{
279 +d:"M8 17.75c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C7.3219 17.3906 7.25 17.2125 7.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1Zm7 0c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C14.3219 17.3906 14.25 17.2125 14.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1ZM2.75 22c-0.2125 0 -0.390585 -0.07235 -0.53425 -0.217C2.071915 21.6385 2 21.45935 2 21.2455c0 -0.21365 0.071915 -0.39135 0.21575 -0.533C2.359415 20.57085 2.5375 20.5 2.75 20.5h18.5c0.2125 0 0.39065 0.07235 0.5345 0.217 0.14365 0.1445 0.2155 0.32365 0.2155 0.5375 0 0.21365 -0.07185 0.39135 -0.2155 0.533 -0.14385 0.14165 -0.322 0.2125 -0.5345 0.2125h-18.5Zm0 -18.5c-0.2125 0 -0.390585 -0.072335 -0.53425 -0.217C2.071915 3.1385 2 2.959335 2 2.7455c0 -0.213665 0.071915 -0.391335 0.21575 -0.533C2.359415 2.070835 2.5375 2 2.75 2h18.5c0.2125 0 0.39065 0.072335 0.5345 0.217 0.14365 0.1445 0.2155 0.323665 0.2155 0.5375 0 0.213665 -0.07185 0.391335 -0.2155 0.533 -0.14385 0.141665 -0.322 0.2125 -0.5345 0.2125h-18.5Z",strokeWidth:"0.5"})}),sc=e=>(0,l.jsxs)("svg",{height:"16",viewBox:"0 0 512 512",width:"16",xmlns:"http://www.w3.org/2000/svg",...e,style:{height:"16px",width:"16px"},children:[(0,l.jsx)("path",{d:"m349.4 289.3h-13c-68.4 0-92.1.1-160.5-.1-26.4-.1-42.3-23.1-32.3-46.8 6.1-14.5 18-19.9 33.3-19.8 68 .1 91.3 0 159.4 0h14.7c-3.8-4.3-5.9-7.1-8.3-9.5-11.2-11-22.6-21.8-33.6-33-13.9-14.2-14.6-35.1-1.9-48.5 12.8-13.5 34.9-13.7 49.4.5 33.3 32.8 66.3 65.8 99.1 99.1 14.3 14.6 14.4 34.7.1 49.2-32.8 33.4-65.8 66.4-99.2 99.2-14.5 14.3-36.5 14.2-49.4.7s-11.9-34.4 2.4-49.3c13-13.4 25.7-26.9 39.8-41.7z"}),(0,l.jsx)("path",{d:"m112.3 256.1v226.7c0 21.3-21.9 34.3-45.4 27.3-13.6-4-21.3-13.7-21.3-27.2-.1-41.1 0-82.2 0-123.3 0-109.7 0-219.4 0-329.1 0-18.8 13.4-30.7 33.9-30.5 19.6.2 32.8 11.9 32.8 29.4.1 75.6.1 151.2 0 226.7z"})]}),rc=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),lc=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",style:{rotate:"180deg"},...e,children:(0,l.jsx)("path",{d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),cc=e=>{const{attributes:t,setAttributes:n,updateObj:o,device:i}=e,{layout:a,heightType:s,columnGap:r,height:c}=t,d="column"===a[i]?.direction||"column-reverse"===a[i]?.direction?{style:{rotate:"90deg"}}:{},u=[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Window Height (100%)","b-blocks"),value:"window"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Height:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:s,onChange:e=>{n({heightType:e,height:"window"===e?"100vh":"auto"===e?"auto":"initial"})},options:u})]}),"custom"===s&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Min Height:","b-blocks"),labelPosition:"left",value:c,onChange:e=>n({height:e}),units:[Pe(),Ae(),Oe()]}),"flex"===a.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"flex1 mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Direction","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.direction,onChange:e=>o("layout",e,i,"direction"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row",value:"row",icon:ql}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Column",value:"column",icon:Yl}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row Reverse",value:"row-reverse",icon:Vl}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Column Reverse",value:"column-reverse",icon:Kl})]}),(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Justify Content","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},
280 +__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.justify,onChange:e=>o("layout",e,i,"justify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Ql,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Zl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Xl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:(0,l.jsx)(Jl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Around",value:"space-around",icon:(0,l.jsx)(ec,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Evenly",value:"space-evenly",icon:(0,l.jsx)(tc,{...d})})]}),(0,l.jsx)(v,{className:"flex1 mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Align Items","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.alignItems,onChange:e=>o("layout",e,i,"alignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(nc,{style:{rotate:"column"===a[i]?.direction||"column-reverse"===a[i]?.direction?"-90deg":"0deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(oc,{style:{rotate:"column"===a[i]?.direction||"column-reverse"===a[i]?.direction?"-90deg":"0deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(ic,{style:{rotate:"column"===a[i]?.direction||"column-reverse"===a[i]?.direction?"-90deg":"0deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(ac,{style:{rotate:"column"===a[i]?.direction||"column-reverse"===a[i]?.direction?"-90deg":"0deg"}})})]}),!["column","column-reverse"].includes(a[i]?.direction)&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{gap:0,children:[(0,x.__)("Wrap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.wrap,onChange:e=>o("layout",e,i,"wrap"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"No Wrap",value:"nowrap",icon:(0,l.jsx)(sc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap",value:"wrap",icon:(0,l.jsx)(rc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap Reverse",value:"wrap-reverse",icon:(0,l.jsx)(lc,{})})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,l.jsxs)(y.Flex,{gap:5,justify:"flex-start",children:[(0,x.__)("Gap:","b-blocks"),(0,l.jsx)(_,{})]})}),"desktop"===i&&(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"left",value:r,onChange:e=>n({columnGap:e}),units:[Pe()]}),"desktop"!==i&&(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"left",value:a[i]?.columnGap,onChange:e=>o("layout",e,i,"columnGap"),units:[Pe()]})]}),"nowrap"!==a[i]?.wrap&&""!==a[i]?.wrap&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Align Content","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.alignContent,onChange:e=>o("layout",e,i,"alignContent"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Ql,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Zl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Xl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:(0,l.jsx)(Jl,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Around",value:"space-around",icon:(0,l.jsx)(ec,{...d})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Evenly",value:"space-evenly",icon:(0,l.jsx)(tc,{...d})})]})]})]}),"grid"===a.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Justify Content","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.gridJustify,onChange:e=>o("layout",e,i,"gridJustify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Ql,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Zl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Xl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:(0,l.jsx)(Jl,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Around",value:"space-around",icon:(0,l.jsx)(ec,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Evenly",value:"space-evenly",icon:(0,l.jsx)(tc,{})})]}),(0,l.jsx)(v,{className:"flex1 mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Align Items","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[i]?.gridAlignItems,onChange:e=>o("layout",e,i,"gridAlignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(nc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(oc,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(ic,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(ac,{})})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Columns","b-blocks"),min:0,max:12,value:a[i]?.gridColumns,onChange:e=>o("layout",e,i,"gridColumns")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Rows","b-blocks"),min:0,max:12,value:a[i]?.gridRows,onChange:e=>o("layout",e,i,"gridRows")})]})]})},dc=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(cc,{...e})}),uc=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:mn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(dc,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),enabled:Ul,isPremium:o})})]})})]})};let pc={desktop:[33.33,33.33,33.34],tablet:[50,50,50],mobile:[100,100,100]};const hc=(0,w.compose)((0,f.withSelect)(((e,t)=>{const{clientId:n}=t,{getBlocks:o}=e("core/block-editor"),{getDeviceType:i}=e("core/editor");return{innerBlocks:o(n),device:i()?.toLowerCase()}})),(0,f.withDispatch)((e=>({updateAttributes:(t,n)=>e("core/block-editor").updateBlockAttributes(t,n)}))))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,innerBlocks:a,device:s}=e,{columns:r}=t,c=bBlocksPremiumChecker;(0,
281 +m.useEffect)((()=>me()),[i]);const d=e=>{const t="add"===e?r+1:r-1,i=6===t?16.66:zl(100/t);var a;n({columns:t}),a=i,Bl(o).forEach((e=>{const t=e.clientId,n=Il(t)?.width;Ol(t,{width:{...n,desktop:a}})}))};(0,m.useEffect)((()=>{r<a.length?d("add"):r>a.length&&d("delete")}),[a.length]);const u=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(uc,{attributes:t,setAttributes:n,isPremium:c,updateObj:u,device:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:Gl(t,`block-${o}`,!0)}}),r?(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:`bBlocksRow has-${r}-columns ${i?"":"notSelected"}`,children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:["b-blocks/column"],template:(e=>[...Array(e)]?.map(((e,t)=>["b-blocks/column",{width:{desktop:pc.desktop[t],tablet:pc.tablet[t],mobile:pc.mobile[t]}}])))(r),renderAppender:()=>r<12&&i?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):null})})}):(0,l.jsxs)("div",{className:"columnLayoutContainer",children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(y.Dashicon,{icon:"layout"})," ",(0,x.__)("Select a column layout","b-blocks")]}),(0,l.jsx)("div",{className:"columnLayouts",children:Wl.map(((e,t)=>(0,l.jsx)(y.Button,{showTooltip:!0,label:e.label,tooltipPosition:"top",onClick:()=>{n({columns:e.columns}),pc=e.layout},children:e.layout?.[s]?.map(((e,t)=>(0,l.jsx)("i",{style:{width:e+"%"}},t)))},t)))})]})]})]})}));Pl(El.name)&&(0,p.registerBlockType)(El,{icon:nr,edit:hc,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const gc=JSON.parse('{"apiVersion":3,"name":"b-blocks/column","title":"Column","description":"Column of the row.","category":"bBlocks","parent":["b-blocks/row"],"keywords":["column","columns","multi columns"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"width":{"type":"object","default":{"mobile":100,"tablet":50,"desktop":33.33}},"overflow":{"type":"string","default":"hidden"},"background":{"type":"object","default":{"color":""}},"padding":{"type":"object","default":{"vertical":"","horizontal":""}},"border":{"type":"object","default":{}},"shadow":{"type":"object","default":{}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"usesContext":["b-blocks/rowColumns","b-blocks/rowColumnGap"],"supports":{"align":["wide","full"],"html":false,"interactivity":{"clientNavigation":true}},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),mc=(e,o,i,a,s=!1)=>{const{width:r,overflow:l,background:c,padding:d,border:u,shadow:p,advanced:h}=e,g=`#${o}`,m=s?`${g} > div > div:first-child`:`${g} > div`;return`\n\t\t${g}{\n\t\t\tflex-basis: calc(${r.desktop}% - (${a} * (${i} - 1) / ${i}));\n\t\t}\n\n\t\t${t} {\n\t\t\t${g}{\n\t\t\t\tflex-basis: calc(${r.tablet}% - (${a} * (${i} - 1) / ${i}));\n\t\t\t}\n\t\t}\n\n\t\t${n} {\n\t\t\t${g}{\n\t\t\t\tflex-basis: calc(${r.mobile}% - (${a} * (${i} - 1) / ${i}));\n\t\t\t}\n\t\t}\n\n\t\t${m}{\n\t\t\toverflow: ${l};\n\t\t\t${os(c)}\n\t\t\tpadding: ${us(d)};\n\t\t\t${is(u)}\n\t\t\tbox-shadow: ${ds(p)};\n\t\t}\n\t\t${Cs(o,h,s)}\n\t\t`.replace(/\s+/g," ")},bc=({attributes:e,updateColumnWidth:t,device:n,MINWIDTH:o,columns:i})=>{const{width:a}=e,s=100-(i-1)*o;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Width (%):","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:a[n],onChange:e=>t(n,e),min:o,max:"desktop"===n?s:100,step:.01})]})})},fc={dimension:["padding","margin","height","minHeight","maxHeight"],floating:!0,motion:!0,position:!0,transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0},xc=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,columns:o,updateColumns:i}=e,{advanced:a}=t,s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel bPlRemPrev",activeClass:"activeTab",tabs:Zt,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(bc,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:a,onChange:e=>n({advanced:e}),enabled:fc,isPremium:s})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsxs)(y.ToolbarGroup,{label:(0,x.__)("Column Options","b-blocks"),children:[o<6&&(0,l.jsx)(y.ToolbarButton,{icon:"plus",label:(0,x.__)("Add Column","b-blocks"),onClick:()=>i("add")}),o>1&&(0,l.jsx)(y.ToolbarButton,{icon:"trash",label:(0,x.__)("Delete Column","b-blocks"),onClick:()=>i("delete")})]})})]})})),{replaceInnerBlocks:yc}=(0,f.dispatch)("core/block-editor"),vc=(0,w.compose)((0,f.withSelect)(((e,t)=>{const{clientId:n}=t,{getBlocks:o,getBlockParents:i,getBlockIndex:a,getBlockAttributes:s,getPreviousBlockClientId:r,getNextBlockClientId:l}=e("core/block-editor"),c=document.querySelector('iframe[name="editor-canvas"]'),d=c?c?.contentDocument:document,u=i(n)[0],p=d?.querySelector(`#block-${u}`),h=p?"100%":"0px",g=l(n),m=r(n);return{parentBlockId:u,rowWidth:Rl(h),parentInnerBlocks:o(u),currentIndex:a(n,u),innerBlocks:o(n),nextClientId:g,nextWidth:s(g)?.width,prevClientId:m,prevWidth:s(m)?.width}})),(0,f.withDispatch)((e=>({updateAttributes:(t,n)=>e("core/block-editor").updateBlockAttributes(t,n)}))))((e=>{const{attributes:t,context:n,setAttributes:o,clientId:i,isSelected:a,toggleSelection:s,parentBlockId:r,rowWidth:c,parentInnerBlocks:d,currentIndex:u,innerBlocks:g,prevWidth:b,nextClientId:f,nextWidth:x,updateAttributes:v}=e,{width:k}=t,w=n["b-blocks/rowColumns"],_=n["b-blocks/rowColumnGap"],C=(0,m.useRef)(null),j=C?.current,$=j?.ownerDocument||document;(0,m.useEffect)((()=>me()),[a]);const[S,T]=(0,m.useState)(!1),N=(0,m.useRef)(k),M=(0,m.useRef)(x),L=(0,
282 +m.useRef)(b),P=`block-${i}`,E=$?.querySelector(`#block-${i}`),A=$?.querySelector(`#block-${f}`);(0,m.useEffect)((()=>{N.current={...k},M.current={...x},L.current={...b}}),[a,E,c]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(xc,{...e,attributes:t,setAttributes:o,nextClientId:f,columns:w,updateColumns:e=>{const t=100/("add"===e?w+1:w-1),n={...k,desktop:t};let o=[...d];"delete"===e?o.splice(u,1):o.splice(u+1,0,(0,p.createBlock)("b-blocks/column",{width:n})),yc(r,o)},updateColumnWidth:(e,t)=>{if("desktop"!==e)return void o({width:{...k,[e]:t}});if(t<5)return;const n=t-k.desktop;let i={};if(A&&null!==f&&(i={...x},i.desktop=parseFloat(i.desktop)-n,i.desktop>=5&&t>=5&&(v(f,{width:{...i}}),M.current={...i})),i.desktop>=5&&t>=5){const e=Math.abs(t);o({width:{...k,desktop:e}}),N.current={...N.current,desktop:e}}},MINWIDTH:5}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:C}),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:mc(t,P,w,_,!0)}}),(0,l.jsx)(y.ResizableBox,{className:S?`${Al}Resizing`:"",enable:{top:!1,right:!!f,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResize:(e,t,n,i)=>((e,t,n,i)=>{const a=(s=i.width,100*parseFloat(s/c));var s;const r=N.current.desktop+a;let l=0;A&&null!==f&&(l=parseFloat(M.current.desktop)-a,l>=5&&r>=5&&(l=Math.abs(l),v(f,{width:{...x,desktop:l}}))),l>=5&&r>=5&&o({width:{...k,desktop:r}})})(0,0,0,i),onResizeStop:(e,t,n,o)=>(s(!0),T(!1),N.current={...k},void(M.current={...x})),onResizeStart:(e,t,n)=>(s(!1),void T(!0)),size:{width:"auto",height:"100%"},minWidth:c/5-Rl(_||"0px"),children:(0,l.jsx)("div",{className:Al,style:0===g?.length?{padding:"10px",background:"#fff"}:{},children:(0,l.jsx)(h.InnerBlocks,{renderAppender:()=>g?.length?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{className:"columnEmpty"})})})}),(0,l.jsx)("span",{className:"widthPlaceholder",children:a&&zl(k?.desktop)})]})]})}));Pl("b-blocks/row")&&(0,p.registerBlockType)(gc,{icon:or,edit:vc,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const kc=JSON.parse('{"apiVersion":3,"name":"b-blocks/td-viewer","title":"3D Viewer","description":"Display interactive 3D models on the web","category":"bBlocks","keywords":["3d","3d model","3d viewer"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"alignment":{"type":"string","default":"center"},"sourceType":{"type":"string","default":"upload"},"model":{"type":"object","default":{"id":null,"url":"https://modelviewer.dev/assets/ShopifyModels/ToyTrain.glb","title":""}},"modelLink":{"type":"string","default":"https://modelviewer.dev/assets/ShopifyModels/ToyTrain.glb"},"width":{"type":"string","default":"100%"},"height":{"type":"string","default":"350px"},"isTouchMove":{"type":"boolean","default":true},"isZoom":{"type":"boolean","default":true},"loadingType":{"type":"string","default":"auto"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"sourceType":"link"}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","modelViewer"]}'),wc=((0,x.__)("Upload","b-blocks"),(0,x.__)("Link","b-blocks"),[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Lazy","b-blocks"),value:"lazy"},{label:(0,x.__)("Eager","b-blocks"),value:"eager"}]),_c=({attributes:e,setAttributes:t})=>{const{alignment:n,model:o,width:i,height:a,isTouchMove:s,isZoom:r,loadingType:c}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:an}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("3D Model Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Model:","b-blocks")}),(0,l.jsx)(ke,{types:["model/gltf-binary"],value:o,onChange:e=>t({model:e}),placeholder:(0,x.__)("Enter Model URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:i,onChange:e=>t({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({height:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep height 0, to 350px height.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Controls via mouse/touch","b-blocks"),checked:s,onChange:e=>t({isTouchMove:e})}),s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Zoom","b-blocks"),checked:r,onChange:e=>t({isZoom:e})}),(0,l.jsx)("small",{children:(0,x.__)("Enable 'Controls via mouse/touch' to work Zoom!","b-blocks")})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Loading Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>t({loadingType:e}),options:wc})]})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(Ce,{label:(0,x.__)("Edit 3D Model:","b-blocks"),icon:"edit",types:["model/gltf-binary"],value:o,onChange:({id:e,url:n,title:i})=>t({model:{...o,id:e,url:n,title:i}})}),(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("3D Model Alignment"),alignmentControls:[{title:(0,x.__)("3D Model in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("3D Model in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("3D Model in right","b-blocks"),align:"right",icon:"align-right"}]})]})]})},Cc="bBlocks3DViewer",jc=({attributes:e,id:t})=>{const{alignment:n,width:o,height:i}=e,a=`#${t} .${Cc}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${a}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${a} model-viewer{\n\t\t\twidth: ${["0px","0%","0em"].includes(o)?"auto":o};\n\t\t\theight: ${["0px","0%","0em"].includes(i)?"350px":i};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},$c=(0,m.forwardRef)((({attributes:e},t)=>{const{sourceType:n,model:o,modelLink:i,isTouchMove:a,isZoom:s,loadingType:r}=e,c=a?{"camera-controls":""}:{},d=s?{}:{"disable-zoom":""};return(0,l.jsx)("div",{className:Cc,ref:t,children:(0,l.jsx)("model-viewer",{src:"upload"===n?o?.url:i,alt:"upload"===n?o?.title:"",loading:r,"auto-rotate":!0,...c,...d})})})),Sc=(e,t,n,o)=>{t&&e?.setAttribute(n,o),!t&&e?.removeAttribute(n,o)};Pl(kc.name)&&(0,p.registerBlockType)(kc,{icon:ir,transforms:{from:[{type:"block",blocks:["tdvb/td-viewer"],transform:e=>(0,p.createBlock)("b-blocks/td-viewer",e)},{type:"prefix",prefix:"3d",transform:()=>(0,p.createBlock)("b-blocks/td-viewer")}],to:[{type:"block",blocks:["tdvb/td-viewer"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("tdvb/td-viewer",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e,{sourceType:a,model:s,modelLink:r,isTouchMove:c,isZoom:d,loadingType:u}=t;(0,m.useEffect)((()=>me()),[i]);const p=(0,m.useRef)(null);return(0,m.useEffect)((()=>{p.current.innerHTML="";const e=document.createElement("model-viewer");Sc(e,!0,"src","upload"===a?s?.url:r),Sc(e,!0,"alt","upload"===a?s?.title:""),Sc(e,c,"camera-controls",""),Sc(e,!d,"disable-zoom",""),Sc(e,!0,"loading",u),Sc(e,!0,"auto-rotate",""),p.current.appendChild(e)}),[a,s,r,c,d,u]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_c,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(jc,{attributes:t,id:`block-${o}`}),"upload"!==a||s.url?"":(0,l.jsx)("p",{className:"noModel",children:(0,x.__)("Please, upload Model or enter Model Link first!","3d-viewer-block")}),(0,l.jsx)($c,{attributes:t,ref:p})]})]})},save:()=>null})
283 +;const Tc=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/advanced-image","title":"Advanced Image","category":"bBlocks","description":"A block that allows for advanced image handling with custom features.","keywords":["b blocks","advanced","image","advanced image"],"textdomain":"b-blocks","attributes":{"image":{"type":"object","default":{"sourceType":"","source":{"id":"","url":"","alt":"","title":""},"link":{"url":"","tab":"_self"}}},"layout":{"type":"object","default":{"size":"default","width":{"desktop":"100%","tablet":"100%","mobile":"100%"},"isAutoHeight":true,"height":{"desktop":"230px","tablet":"200px","mobile":"150px"},"isAutoFit":false,"fitOptionType":"cover"}},"style":{"type":"object","default":{"hoverEffect":"none","normalEffect":"none","effectOptions":{"normal":{"duration":1000,"delay":0,"iteration":"initial","iterationCount":1},"hover":{"duration":1000,"delay":0,"iteration":"initial","iterationCount":1}},"optionType":"rounded","alignment":{"desktop":"start","tablet":"start","mobile":"start"}}},"caption":{"type":"object","default":{"enabled":false,"text":""}},"captionStyle":{"type":"object","default":{"typo":{},"desktop":{"textAlign":"center","hAlign":"left","vAlign":"bottom","width":"","margin":{},"padding":{}},"tablet":{"textAlign":"center","hAlign":"left","vAlign":"top","width":"","margin":{},"padding":{}},"mobile":{"textAlign":"center","hAlign":"left","vAlign":"middle","width":"","margin":{},"padding":{}},"colors":{"color":"black","bg":"#eee"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),Nc="bBlocksAdvancedImage",Mc=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:a,style:s,captionStyle:r,image:c,advanced:d}=e,{width:u,height:p,isAutoHeight:h,isAutoFit:g,fitOptionType:m}=a,{hoverEffect:b,optionType:f,alignment:x,normalEffect:y="",effectOptions:v={}}=s,{normal:k={},hover:w={}}=v,{typo:_,desktop:C,tablet:j,mobile:$,colors:S}=r,T=`#${o} .${Nc}`,N=`${T} .image`,M=`${N} .caption`,L=(e,t,n,o,i)=>`${t} ${n}ms ${t==e+"Spin"?"linear":t===e+"Ping"?"cubic-bezier(0, 0, 0.2, 1)":"ease-in-out"} ${o}ms ${i};`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",_)?.googleFontLink}\n\t\t${ps(M,_)?.styles}\n\n\t\t${T}{\n\t\t\talign-items:${x.desktop};\n\t\t}\n\n\t\t${N}{\n\t\t\twidth : ${c.source?.url?u.desktop:"100%"};\n\t\t\theight: ${h?"auto":p.desktop};\n\t\t\tborder-radius: ${"rounded"===f?"15px":"square"===f?"0px":"Circle"===f?"100%":"0"};\n\t\t\t${ns("clip-path","Triangle"===f?"polygon(50% 0%, 0% 100%, 100% 100%)":"Rhombus"===f?"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)":"Octagon"===f?"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)":"square"===f?"inset(0%)":"")}\n\t\t}\n\n\t\t${T} img{\n\t\t\t${g?`object-fit: ${m};`:ns("object-fit","Triangle"===f||"Octagon"===f||"Rhombus"===f?"cover":"")}\n\t\t\t${ns("transform","zoomOut"===b?"scale(1.5)":"")}\n\t\t\tfilter: ${"blur"===b?"blur(3px)":"blur(0px)"};\n\t\t}\n\t\t${T}:hover img{\n\t\t\t${ns("transform","zoomIn"===b?"scale(1.5)":"zoomOut"===b?"scale(1)":"")}\n\t\t\t${ns("filter","blur"===b?"blur(0px)":"")}\n\t\t}\n\n\t\t${N}{\n\t\t\tanimation:${L("n",y,k?.duration,k?.delay,"number"===k?.iteration?k?.iterationCount:k?.iteration)}\n\t\t}\n\n\t\t${N}:hover{\n\t\t\tanimation:${L("h",b,w?.duration,w?.delay,"number"===w?.iteration?w?.iterationCount:w?.iteration)}\n\t\t}\n\n\t\t${M}{\n\t\t\twidth: ${C.width?C.width:"100%"};\n\t\t\ttext-align:${C.textAlign};\n\t\t\t${ss(S)}\n\t\t\t${ns("padding",hs(C.padding))}\n\t\t\t${ns("margin",hs(C.margin))}\n\t\t\t${Lc(C.vAlign,C.hAlign)}\n\t\t}\n\n\t\t${t}{\n\t\t\t${T}{\n\t\t\t\talign-items:${x.tablet};\n\t\t\t}\n\n\t\t\t${N}{\n\t\t\t\twidth : ${c.source?.url?u.tablet:"100%"};\n\t\t\t\theight: ${h?"auto":p.tablet};\n\t\t\t}\n\n\t\t\t${M}{\n\t\t\t\twidth: ${j.width?j.width:"100%"};\n\t\t\t\ttext-align:${j.textAlign};\n\t\t\t\t${ns("padding",hs(j.padding))}\n\t\t\t\t${ns("margin",hs(j.margin))}\n\t\t\t\t${Lc(j.vAlign,j.hAlign)}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t${n}{\n\t\t\t${T}{\n\t\t\t\talign-items:${x.mobile};\n\t\t\t}\n\n\t\t\t${N}{\n\t\t\t\twidth : ${c.source?.url?u.mobile:"100%"};\n\t\t\t\theight: ${h?"auto":p.mobile};\n\t\t\t}\n\n\t\t\t${M}{\n\t\t\t\twidth: ${$.width?$.width:"100%"};\n\t\t\t\ttext-align:${$.textAlign};\n\t\t\t\t${ns("padding",hs($.padding))}\n\t\t\t\t${ns("margin",hs($.margin))}\n\t\t\t\t${Lc($.vAlign,$.hAlign)}\n\t\t\t}\n\t\t}\n\t\t${Cs(o,d,i)}\n\t`}})},Lc=(e,t)=>`\n\t${"left"===t?"left: 0; right: auto;":"center"===t?"left:50%;"+("middle"!==e?"transform: translateX(-50%);":""):"right:0;left:auto;"}\n\t${"top"===e?"top:0;bottom:auto;":"middle"===e?"top:50%;"+("center"!==t?"transform: translateY(-50%);":""):"bottom:0;top:auto;"}\n\t${"center"===t&&"middle"===e?"transform:translateY(-50%) translateX(-50%);":""}\n`,Pc=[{label:"Custom",value:"custom"},{label:"Featured Image",value:"featured"}],Ec=[{label:"Rounded",value:"rounded"},{label:"Square",value:"square"},{label:"Circle",value:"Circle"},{label:"Octagon",value:"Octagon"},{label:"Rhombus",value:"Rhombus"},{label:"Triangle",value:"Triangle"}],Ac=[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}],Bc=[{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"Fill",value:"fill"}],Ic=[{label:"No Effect",value:"none"},{label:"Zoom in",value:"zoomIn"},{label:"Zoom out",value:"zoomOut"},{label:"Blur",value:"blur"}],Oc=[{label:"Left",value:"start",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"end",icon:"align-right"}],Rc=[{
284 +label:"Left",value:"left",icon:"editor-alignleft"},{label:"Center",value:"center",icon:"editor-aligncenter"},{label:"Right",value:"right",icon:"editor-alignright"},{label:"Justify",value:"justify",icon:"editor-justify"}],zc=[{label:"Left",value:"left",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"right",icon:"align-right"}],Dc=[{label:"Top",value:"top"},{label:"Middle",value:"middle"},{label:"Bottom",value:"bottom"}],Fc=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Bounce","b-blocks"),value:"nBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"nPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"nSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"nShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"nWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"nPing"},{label:(0,x.__)("Float","b-blocks"),value:"nFloat"}],Hc=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Bounce","b-blocks"),value:"hBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"hPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"hSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"hShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"hWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"hPing"},{label:(0,x.__)("Float","b-blocks"),value:"hFloat"}],Wc=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Infinite","b-blocks"),value:"infinite"},{label:(0,x.__)("Number","b-blocks"),value:"number"}],Uc=({attributes:e,setAttributes:t,updateObj:n})=>{const{image:o,layout:i,style:a,caption:s}=e,{sourceType:r,link:c}=o,{optionType:d}=a,{enabled:u}=s;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Source","b-blocks"),labelPosition:"left",value:r,options:Pc,onChange:e=>n("image",e,"sourceType")}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Styles","b-blocks"),labelPosition:"left",value:d,options:Ec,help:"Circle"===d||"Rhombus"===d||"Octagon"===d||"Triangle"===d?`Please Use Equal 'Height' & 'Width' For Perfect ${d} Shape.`:"",onChange:e=>n("style",e,"optionType")}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Size","b-blocks"),labelPosition:"left",value:i.size,options:Ac,onChange:e=>{let n;switch(e){case"thumbnail":n="150px";break;case"medium":n="300px";break;case"large":n="1024px";break;default:n="100%"}t({layout:{...i,size:e,width:{desktop:n,tablet:n,mobile:n}}})}}),(0,l.jsx)("span",{children:(0,x.__)("Width will be change while changing the Size","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Link","b-blocks"),placeholder:"https://example.com",help:"If you want to link the image, please enter the URL. If not want to link leave as blank",value:c.url,onChange:e=>n("image",e,"link","url")}),c.url&&(0,l.jsx)(y.ToggleControl,{className:"mt20",checked:"_blank"===c.tab,label:(0,x.__)("Open in New Tab","b-blocks"),onChange:e=>n("image",e?"_blank":"_self","link","tab")})]}),"custom"===r&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.ToggleControl,{checked:u,label:(0,x.__)("Display Caption","b-blocks"),onChange:e=>n("caption",e,"enabled")})})]})},Gc=({attributes:e,updateObj:t,device:n})=>{const{image:o,layout:i,style:a,captionStyle:s,caption:r}=e,{height:c,isAutoHeight:d,isAutoFit:u,fitOptionType:p}=i,{alignment:h,hoverEffect:g,normalEffect:m="",effectOptions:b={}}=a,{textAlign:f,hAlign:w,vAlign:C,margin:j,padding:$,width:S}=s[n],{sourceType:T}=o,{typo:N,colors:M}=s,{normal:L={},hover:P={}}=b;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:i.width[n],onChange:e=>t("layout",e,"width",n)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",checked:d,label:(0,x.__)("Auto Height","b-blocks"),onChange:e=>t("layout",e,"isAutoHeight")}),!d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:c[n],onChange:e=>t("layout",e,"height",n)})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:h[n],onChange:e=>t("style",e,"alignment",n),options:Oc,isIcon:!0,size:"default"}),(0,l.jsx)(y.ToggleControl,{className:"mt20",checked:u,label:(0,x.__)("Auto Fit","b-blocks"),onChange:e=>t("layout",e,"isAutoFit")}),u&&(0,l.jsx)(Tn,{label:(0,x.__)("Image Fit","b-blocks"),value:p,onChange:e=>t("layout",e,"fitOptionType"),options:Bc,size:"small"}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Hover Effect","b-blocks"),labelPosition:"left",value:g,options:Ic,onChange:e=>t("style",e,"hoverEffect")})]}),r.enabled&&"custom"===T&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(On,{label:(0,x.__)("Colors","b-blocks"),value:M,onChange:e=>t("captionStyle",e,"colors"),defaults:{color:"black",bg:"#EEEEEE"}}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,l.jsx)(v,{children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(_,{})]}),value:S,allowReset:!0,onChange:e=>t("captionStyle",e,n,"width")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:N,onChange:e=>t("captionStyle",e,"typo"),defaults:{fontSize:13}}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:f,onChange:e=>t("captionStyle",e,n,"textAlign"),options:Rc,isIcon:!0,size:"small"}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Horizontal Align","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:w,onChange:e=>t("captionStyle",e,n,"hAlign"),options:zc,isIcon:!0,size:"small"}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Vertical Align","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{value:C,onChange:e=>t("captionStyle",e,n,"vAlign"),options:Dc,size:"small"}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{children:(0,x.__)("Margin","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{label:"",values:j,onChange:e=>t("captionStyle",e,n,"margin")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{children:(0,x.__)("Padding","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{label:"",values:$,onChange:e=>t("captionStyle",e,n,"padding")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!0,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Type","b-blocks"),options:Fc,value:m,onChange:e=>t("style",e,"normalEffect")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:Wc,value:L?.iteration,onChange:e=>t("style",e,"effectOptions","normal","iteration")}),"number"==L?.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:L?.iterationCount,onChange:e=>t("style",e,"effectOptions","normal","iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),min:0,max:2e4,step:50,value:L?.duration,onChange:e=>t("style",e,"effectOptions","normal","duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:L?.delay,
285 +onChange:e=>t("style",e,"effectOptions","normal","delay")})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Type","b-blocks"),options:Hc,value:g,onChange:e=>t("style",e,"hoverEffect")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:Wc,value:P?.iteration,onChange:e=>t("style",e,"effectOptions","hover","iteration")}),"number"===P?.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:P?.iterationCount,onChange:e=>t("style",e,"effectOptions","hover","iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),min:0,max:2e4,step:50,value:P?.duration,onChange:e=>t("style",e,"effectOptions","hover","duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:P?.delay,onChange:e=>t("style",e,"effectOptions","hover","delay")})]})]})})})]})},Vc=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateObj:n,isPremium:o,device:i})=>{const{image:a}=e,{sourceType:s,source:r}=a,c={attributes:e,setAttributes:t,updateObj:n,isPremium:o,device:i};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Xt,children:n=>(0,l.jsxs)(l.Fragment,{children:["general"===n.name&&(0,l.jsx)(Uc,{...c}),"style"===n.name&&(0,l.jsx)(Gc,{...c}),"advanced"===n.name&&(0,l.jsx)(Qt,{advanced:e.advanced,onChange:e=>t({advanced:e}),isPremium:o})]})})}),(0,l.jsx)(h.BlockControls,{children:r.url&&"custom"===s&&(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image/*"],onSelect:({id:e,url:t,alt:o,title:i})=>n("image",{id:e,url:t,alt:o,title:i},"source"),render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{icon:"edit",iconSize:"25",title:(0,x.__)("Edit Custom Image","b-blocks"),onClick:e})})})})})]})})),qc=({image:e,link:t,isBackend:n=!1})=>{const{url:o,alt:i,title:a}=e||{};return o&&(0,l.jsx)(Yc,{link:t,isBackend:n,children:(0,l.jsx)("img",{src:o,alt:i||a})})},Yc=({link:e={},children:t,isBackend:n})=>{const{url:o="",tab:i="_self"}=e;return o&&!n?(0,l.jsx)("a",{href:$t(o),target:i,children:t}):t},Kc=({attributes:e,setAttributes:t,featuredImageURL:n})=>{const{image:o,caption:i}=e,{sourceType:a,source:s,link:r}=o,{enabled:c,text:d}=i;return(0,l.jsx)("div",{className:Nc,children:(0,l.jsx)("div",{className:"image",children:"custom"===a?(0,l.jsx)(l.Fragment,{children:s.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qc,{image:s,link:r,isBackend:!0}),c&&(0,l.jsx)("div",{className:"caption ",children:(0,l.jsx)(h.RichText,{tagName:"p",value:d,onChange:e=>t({caption:be(i,e,"text")}),placeholder:"Add Caption..."})})]}):(0,l.jsx)(_e,{label:(0,x.__)("Custom Image","b-blocks"),onChange:({id:e,url:n,alt:i,title:a})=>t({image:{...o,source:{id:e,url:n,alt:i,title:a}}})})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qc,{image:{url:n,alt:"Feature Image"},link:r,isBackend:!0}),!n&&(0,l.jsxs)("div",{className:"featureImageNotFound",children:[(0,l.jsx)("h3",{children:"Warning !!!"}),(0,l.jsx)("p",{children:"Seems like you have not added a Featured Image for this post. Please make sure to add a Featured Image and try again."})]})]})})})},Qc=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,l.jsx)("path",{d:"M448 80c8.8 0 16 7.2 16 16l0 319.8-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3L48 96c0-8.8 7.2-16 16-16l384 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})}),Zc=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,l.jsx)("path",{d:"M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})}),Xc=(0,f.withSelect)(((e,t)=>{const{layout:n}=t.attributes,{size:o}=n,{getMedia:i}=e("core"),{getDeviceType:a,getEditedPostAttribute:s}=e("core/editor"),r=i(s("featured_media")),l=r?.media_details?.sizes[o]?.source_url||r?.source_url;return{device:a()?.toLowerCase(),featuredImageURL:l}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,featuredImageURL:a}=e,{image:s}=t,{sourceType:r}=s,c=bBlocksPremiumChecker,d=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vc,{attributes:t,setAttributes:n,updateObj:d,isPremium:c}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Mc,{attributes:t,id:`block-${o}`,device:i,isBackend:!0}),(0,l.jsx)("div",{className:"bblocks-advanced-image",children:r?(0,l.jsx)(Kc,{attributes:t,setAttributes:n,featuredImageURL:a}):(0,l.jsxs)("div",{className:"sourceSelector",children:[(0,l.jsx)("h4",{children:"Choose Your Image Source"}),(0,l.jsx)("div",{className:"sourceOptions",children:[{label:"Custom Image",value:"custom",icon:Qc},{label:"Featured Image",value:"featured",icon:Zc}].map((({label:e,value:t,icon:o})=>(0,l.jsxs)("div",{onClick:()=>n({image:{...s,sourceType:t}}),children:[o,e]},t)))})]})})]})]})}));Pl(Tc.name)&&(0,p.registerBlockType)(Tc,{icon:ar,edit:Xc});const Jc=JSON.parse('{"apiVersion":3,"name":"b-blocks/alert","title":"Alert","description":"Provide contextual feedback messages.","category":"bBlocks","keywords":["alert message","alert block","custom alert"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"type":{"type":"string","default":"general"},"width":{"type":"string","default":"100%"},"alignment":{"type":"string","default":"center"},"textAlign":{"type":"string","default":"center"},"message":{"type":"string","default":"You have an alert message!","selector":".bBlocksAlert .alert .alertMessage"},"icon":{"type":"object","default":{"class":"fa-solid fa-bell"}},"isDismiss":{"type":"boolean","default":true},"typography":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"}}},"colors":{"type":"object","default":{"color":"#333","bg":"#fff"}},"padding":{"type":"object","default":{"vertical":"15px","horizontal":"30px"}},"border":{"type":"object","default":{"width":"2px","color":"#333","radius":"8px"}},"shadow":{"type":"object","default":{}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),ed=e=>{const{className:t="",label:n=(0,x.__)("Border:"),value:o,onChange:i,defaults:a={}}=e,[s,r]=(0,m.useState)(!0),c={width:"0px",style:"solid",color:"",side:"all",radius:"0px 0px 0px 0px"},d=e=>{if(!e)return["0px","0px","0px","0px"];const t=e.trim().split(/\s+/);return 4===t.length?t:1===t.length?[t[0],t[0],t[0],t[0]]:["0px","0px","0px","0px"]},u=e=>e.join(" "),p=e=>a?.[e]||c[e],h=e=>i({...o,[e]:p(e)}),g=e=>o?.[e]||p(e),b=(e,t)=>i({...o,[e]:t}),f=e=>(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>h(e)}),k=d(g("radius")),w=d(p("radius")),_=k.every(((e,t)=>e===w[t])),C=[{key:"topLeft",index:0,label:(0,x.__)("Top-left")},{key:"topRight",index:1,label:(0,x.__)("Top-right")},{key:"bottomRight",index:2,label:(0,x.__)("Bottom-right")},{key:"bottomLeft",index:3,label:(0,x.__)("Bottom-left")}];return(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{
286 +className:"mt5",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"edit",onClick:t,"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:"),labelPosition:"left",value:g("width"),onChange:e=>b("width",e),units:[Pe(),Ae()]}),o?.width&&o?.width!==p("width")&&f("width")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Style:")}),(0,l.jsx)(y.SelectControl,{value:g("style"),onChange:e=>b("style",e),options:Le}),o?.style&&o?.style!==p("style")&&f("style")]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:"),value:g("color"),onChange:e=>b("color",e),defaultColor:p("color")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Sides:")}),(0,l.jsx)(y.SelectControl,{value:g("side"),onChange:e=>b("side",e),options:Re}),o?.side&&o?.side!==p("side")&&f("side")]}),(0,l.jsxs)("div",{className:"bPlBoxControl mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Radius:")}),(0,l.jsxs)("div",{className:"sides",children:[C.map((e=>(0,l.jsx)("div",{className:"bplUnitControlWrapper",children:(0,l.jsx)(y.__experimentalUnitControl,{onChange:t=>((e,t)=>{const n=d(g("radius"));s?b("radius",u([e,e,e,e])):(n[{topLeft:0,topRight:1,bottomRight:2,bottomLeft:3}[t]]=e,b("radius",u(n)))})(t,e.key),value:k[e.index],units:[Pe(50),Ee(50),Ae(3),Be(3)],isResetValueOnUnitChange:!0})},e.key))),(0,l.jsx)("button",{className:"bplBoxControlLinkButton "+(s?"activeLink":""),onClick:()=>r(!s),children:s?(0,l.jsx)("span",{className:"dashicons dashicons-admin-links"}):(0,l.jsx)("span",{className:"dashicons dashicons-editor-unlink"})}),!_&&(0,l.jsx)("button",{className:"bplBoxControlLinkButton",onClick:()=>h("radius"),children:(0,l.jsx)("span",{className:"dashicons dashicons-image-rotate"})})]})]})]})})]})},td=window.wp.blob,nd=(0,f.withSelect)(((e,t)=>{const{value:n}=t;return{image:n?.id?e("core").getMedia(n?.id):null,imageSizes:e("core/block-editor").getSettings().imageSizes}}))((e=>{const{className:t,value:n={},onChange:o,image:i,imageSizes:a}=e,s=(e,t)=>o({...n,[e]:t});return(0,l.jsxs)("div",{className:t,children:[n?.url&&!(0,td.isBlobURL)(n?.url)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Alt Text (Alternative Text):")}),(0,l.jsx)(y.TextControl,{value:n?.alt,onChange:e=>s("alt",e)})]}),n?.id&&0!==ge(i,a)?.length&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Select Size:")}),(0,l.jsx)(y.SelectControl,{value:n?.url,onChange:e=>s("url",e),options:ge(i,a)})]})]})})),od=(0,y.withNotices)((e=>{const{label:t=(0,x.__)(" Image:"),icon:n="format-image",value:o={},onChange:i,noticeOperations:a,noticeUI:s}=e;return(0,l.jsx)(h.MediaPlaceholder,{labels:{title:t},icon:n,allowedTypes:["image"],accept:"image/*",onSelect:({id:e,url:t,alt:n,title:a})=>i({...o,id:e,url:t,alt:n,title:a}),onSelectURL:e=>i({...o,id:null,url:e,alt:"",title:""}),onError:e=>a.createErrorNotice(e),notices:s})})),id=e=>{const{className:t="",label:n=(0,x.__)("Shadow"),value:o,onChange:i,defaults:a={},type:s="box"}=e,r={hOffset:"0px",vOffset:"0px",blur:"0px",spreed:"0px",color:"#7090b0",isInset:!1},c=e=>a?.[e]||r[e],d=e=>o?.[e]||c(e),u=(e,t)=>i({...o,[e]:t}),p=e=>(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>(e=>i({...o,[e]:c(e)}))(e)});return(0,l.jsxs)(y.PanelRow,{className:`bPlDropdown ${t}`,children:[(0,l.jsx)(v,{className:"mt5",children:n}),(0,l.jsx)(y.Dropdown,{className:"bPlDropdownContainer",contentClassName:"bPlDropdownPopover",popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:t})=>(0,l.jsx)(y.Button,{icon:"edit",onClick:t,"aria-expanded":e}),renderContent:()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Horizontal Offset:"),labelPosition:"left",value:d("hOffset"),onChange:e=>u("hOffset",e),units:[Pe(),Ae(),Be()]}),o?.hOffset&&o?.hOffset!==c("hOffset")&&p("hOffset")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Vertical Offset:"),labelPosition:"left",value:d("vOffset"),onChange:e=>u("vOffset",e),units:[Pe(),Ae(),Be()]}),o?.vOffset&&o?.vOffset!==c("vOffset")&&p("vOffset")]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Blur:"),labelPosition:"left",value:d("blur"),onChange:e=>u("blur",e),units:[Pe(),Ae(),Be()]}),o?.blur&&o?.blur!==c("blur")&&p("blur")]}),(0,l.jsx)("small",{children:(0,x.__)("Blur cannot be negative value!")}),"box"===s&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Spreed:"),labelPosition:"left",value:d("spreed"),onChange:e=>u("spreed",e),units:[Pe(),Ae(),Be()]}),o?.spreed&&o?.spreed!==c("spreed")&&p("spreed")]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:"),value:d("color"),onChange:e=>u("color",e),defaultColor:c("color")}),"box"===s&&(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Shadow Inset?"),checked:d("isInset"),onChange:e=>u("isInset",e),__nextHasNoMarginBottom:!0})]})})]})},ad=e=>{const{className:t="",label:n=(0,x.__)("Space:"),value:o,onChange:i,defaults:a={}}=e,s={side:2,vertical:"0px",horizontal:"0px",top:"0px",right:"0px",bottom:"0px",left:"0px"},r=e=>a?.[e]||s[e],c=e=>o?.[e]||r(e),d=(e,t)=>i({...o,[e]:t}),u=e=>parseInt(c(e)?.replace(/([a-z])+/g,"")),p=e=>null!=e&&"object"==typeof e;return(0,l.jsxs)("div",{className:`bPlSpaceControl ${t}`,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:n}),(0,l.jsxs)(y.ButtonGroup,{className:"bPlBtnGroup",children:[(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Vertical, Horizontal"),placement:"top",position:"top",children:(0,l.jsxs)(y.Button,{className:"side2",size:"small",isPrimary:2===c("side"),"aria-pressed":2===c("side"),onClick:()=>i({...o,side:2,vertical:(u("top")+u("bottom"))/2+"px",horizontal:(u("left")+u("right"))/2+"px"}),children:[(0,l.jsx)("span",{className:"scrollIcon",children:ct}),(0,l.jsx)("span",{className:"sideScrollIcon",children:ct})]})}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Top, Right, Bottom, Left"),placement:"top",position:"top",children:(0,l.jsxs)(y.Button,{size:"small",isPrimary:4===c("side"),"aria-pressed":4===c("side"),onClick:()=>i({...o,side:4,top:c("vertical"),right:c("horizontal"),bottom:c("vertical"),left:c("horizontal")}),children:[(0,l.jsx)(y.Dashicon,{icon:"arrow-up-alt"}),(0,l.jsx)(y.Dashicon,{icon:"arrow-right-alt"}),(0,l.jsx)(y.Dashicon,{icon:"arrow-down-alt"}),(0,l.jsx)(y.Dashicon,{icon:"arrow-left-alt"})]})})]}),!((e,t,n)=>{const o=Object.keys(e||{}).filter((e=>"styles"!==e)),i=(e,t)=>{const n=Object.keys(e);for(const o of n){const n=e[o],a=t[o],s=p(n)&&p(a);if(s&&!i(n,a)||!s&&n!==a)return!1}return!0};for(const a of o){const o=e[a],s=t[a],r=n[a],l=p(o)&&p(s),c=p(o)&&p(r);if(s){if(l&&!i(o,s)||!l&&o!==s)return!1}else if(c&&!i(o,r)||!c&&o!==r)return!1}return!0})(o,a,s)&&(0,l.jsx)(y.Button,{icon:"image-rotate",className:"bPlResetVal",onClick:()=>{const e={side:r("side"),vertical:r("vertical"),horizontal:r("horizontal"),top:r("top"),right:r("right"),bottom:r("bottom"),left:r("left")};i({...o,...e})}})]}),2===c("side")&&(0,l.jsxs)(y.PanelRow,{className:"twoColumn",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Top Bottom:"),labelPosition:"top",value:c("vertical"),onChange:e=>d("vertical",e),units:[Pe(),Ee(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Left Right:"),labelPosition:"top",value:c("horizontal"),onChange:e=>d("horizontal",e),units:[Pe(),Ee(),Ae(),Be()]})]}),4===c("side")&&(0,l.jsxs)(y.PanelRow,{className:"fourColumn",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Top:"),labelPosition:"top",value:c("top"),onChange:e=>d("top",e),units:[Pe(),Ee(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,
287 +x.__)("Right:"),labelPosition:"top",value:c("right"),onChange:e=>d("right",e),units:[Pe(),Ee(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Bottom:"),labelPosition:"top",value:c("bottom"),onChange:e=>d("bottom",e),units:[Pe(),Ee(),Ae(),Be()]}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Left:"),labelPosition:"top",value:c("left"),onChange:e=>d("left",e),units:[Pe(),Ee(),Ae(),Be()]})]})]})},sd=[{label:(0,x.__)("General","b-blocks"),value:"general"},{label:(0,x.__)("Success","b-blocks"),value:"success"},{label:(0,x.__)("Info","b-blocks"),value:"info"},{label:(0,x.__)("Warning","b-blocks"),value:"warning"},{label:(0,x.__)("Error","b-blocks"),value:"error"},{label:(0,x.__)("Minimal","b-blocks"),value:"minimal"}],rd=e=>({general:{color:"#333",icon:"fa-solid fa-bell"},success:{color:"#12b878",icon:"fa-regular fa-circle-check"},info:{color:"#2cacff",icon:"fa-solid fa-circle-info"},warning:{color:"#f1ae2a",icon:"fa-solid fa-gear"},error:{color:"#db4b68",icon:"fa-solid fa-circle-exclamation"}}[e]),ld=(e,t,n)=>"minimal"===e?{width:"0px",icon:{class:rd("info").icon},isDismiss:"minimal"!==e,colors:{color:"#00AB6D",bg:"#fff"},padding:{vertical:"10px",horizontal:"13px"},border:{...t,color:"#00AB6D",radius:"50px"},shadow:{...n,blur:"10px",color:"#00AB6D"}}:{width:"100%",icon:{class:rd(e).icon},isDismiss:"minimal"!==e,colors:{color:rd(e).color,bg:`${rd(e).color}1a`},padding:{vertical:"15px",horizontal:"30px"},border:{...t,color:rd(e).color,radius:"8px"},shadow:{}},cd=({attributes:e,setAttributes:t})=>{const{type:n,width:o,alignment:i,textAlign:a,icon:s,isDismiss:r,typography:c,colors:d,padding:u,border:p,shadow:g}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:sn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Alert Settings","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:n,onChange:e=>t({type:e,...ld(e,p,g)}),options:sd})]}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when type will be changed.","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:o,onChange:e=>t({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")}),(0,l.jsx)(Un,{label:(0,x.__)("Alert Icon:","b-blocks"),value:s,onChange:e=>t({icon:e}),defaults:{class:"fa-solid fa-bell"},isSize:!1,isColor:!1}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Alert Dismissible?","b-blocks"),checked:r,onChange:e=>t({isDismiss:e})}),(0,l.jsx)(Oa,{className:"mt20",label:(0,x.__)("Typography:","b-blocks"),value:c,onChange:e=>t({typography:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}}),(0,l.jsx)(On,{value:d,onChange:e=>t({colors:e}),defaults:{color:"#333",bg:"#fff"}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:u,onChange:e=>t({padding:e}),defaults:{vertical:"15px",horizontal:"30px"}}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:p,onChange:e=>t({border:e}),defaults:{width:"2px",color:"#333",radius:"8px"}}),(0,l.jsx)(id,{label:(0,x.__)("Shadow:","b-blocks"),value:g,onChange:e=>t({shadow:e})})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.AlignmentToolbar,{value:i,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Alert Alignment"),alignmentControls:[{title:(0,x.__)("Alert in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Alert in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Alert in right","b-blocks"),align:"right",icon:"align-right"}]}),(0,l.jsx)(h.AlignmentToolbar,{value:a,onChange:e=>t({textAlign:e})})]})]})},dd="bBlocksAlert",ud=({attributes:e,id:t})=>{const{width:n,alignment:o,textAlign:i,typography:a,colors:s,padding:r,border:c,shadow:d}=e,u=`#${t} .${dd} .alert`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",a)?.googleFontLink}\n\t\t${ps(u,a)?.styles}\n\n\t\t${u}{\n\t\t\ttext-align: ${o};\n\t\t}\n\t\t${u}{\n\t\t\ttext-align: ${i};\n\t\t\twidth: ${["0px","0%","0em"].includes(n)?"auto":n};\n\t\t\t${ss(s)}\n\t\t\tpadding: ${us(r)};\n\t\t\t${is(c)}\n\t\t\tbox-shadow: ${ds(d)};\n\t\t}\n\t\t${u} .alertIcon{\n\t\t\tfont-size: ${a?.fontSize?.desktop};\n\t\t\tcolor: ${s?.color};\n\t\t}\n\t\t${u} .alertClose{\n\t\t\tcolor: ${s?.color};\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${u} .alertIcon{\n\t\t\t\tfont-size: ${a?.fontSize?.tablet};\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${u} .alertIcon{\n\t\t\t\tfont-size: ${a?.fontSize?.mobile};\n\t\t\t}c\n\t\t}\n\t\t`.replace(/\s+/g," ")}})};Pl(Jc.name)&&(0,p.registerBlockType)(Jc,{icon:sr,transforms:{from:[{type:"block",blocks:["abb/alert-box"],transform:e=>(0,p.createBlock)("b-blocks/alert",e)},{type:"block",blocks:["core/paragraph"],transform:({content:e,align:t})=>(0,p.createBlock)("b-blocks/alert",{message:e,textAlign:t})},{type:"block",blocks:["core/heading"],transform:({content:e,textAlign:t})=>(0,p.createBlock)("b-blocks/alert",{message:e,textAlign:t})},{type:"prefix",prefix:"alert",transform:()=>(0,p.createBlock)("b-blocks/alert")}],to:[{type:"block",blocks:["abb/alert-box"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("abb/alert-box",e)},{type:"block",blocks:["core/paragraph"],isMatch:({message:e})=>!!e,transform:({message:e,textAlign:t})=>(0,p.createBlock)("core/paragraph",{content:e,align:t})},{type:"block",blocks:["core/heading"],isMatch:({message:e})=>!!e,transform:({message:e,textAlign:t})=>(0,p.createBlock)("core/heading",{content:e,textAlign:t})}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e,{message:a,icon:s,isDismiss:r}=t;return(0,m.useEffect)((()=>me()),[i]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(cd,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(ud,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:dd,children:(0,l.jsxs)("div",{className:"alert",children:[s?.class&&(0,l.jsx)("i",{className:`alertIcon ${s?.class}`}),(0,l.jsx)(h.RichText,{className:"alertMessage",tagName:"span",value:a,onChange:e=>n({message:e}),placeholder:(0,x.__)("Alert Message","b-blocks"),inlineToolbar:!0}),r&&(0,l.jsx)(y.Tooltip,{text:"Hide will only work in frontend",placement:"top",position:"top",children:(0,l.jsx)("i",{className:"alertClose fa fa-times-circle"})})]})})]})]})},save:()=>null});const pd=JSON.parse('{"apiVersion":3,"name":"b-blocks/animated-text","title":"Animated Text","description":"Apply animation on any text.","category":"bBlocks","keywords":["animated text","text animation","text animated"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"loop":{"type":"boolean","default":true},"animateIn":{"type":"string","default":"char"},"inEffect":{"type":"string","default":"fadeInLeftBig"},"inSequence":{"type":"string","default":"default"},"outEffect":{"type":"string","default":"rollOut"},"outSequence":{"type":"string","default":"shuffle"},"textAlign":{"type":"string","default":"center"},"background":{"type":"object","default":{"color":"#0000"}},"content":{"type":"string","default":"Animated text for animation","selector":".atbAnimatedText .content"},"typography":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"}}},"color":{"type":"string","default":"#333"},"padding":{"type":"object","default":{"vertical":"15px","horizontal":"15px"}},"border":{"type":"object","default":{"radius":"5px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","animate"],"render":"file:./render.php","viewScript":["file:./view.js","textillate"]}'),hd=[{label:(0,x.__)("Char","b-blocks"),value:"char"},{label:(0,x.__)("Word","b-blocks"),value:"word"}],gd=[{label:(0,
288 +x.__)("Flash","b-blocks"),value:"flash"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"},{label:(0,x.__)("Shake","b-blocks"),value:"shake"},{label:(0,x.__)("Tada","b-blocks"),value:"tada"},{label:(0,x.__)("Swing","b-blocks"),value:"swing"},{label:(0,x.__)("Wobble","b-blocks"),value:"wobble"},{label:(0,x.__)("Pulse","b-blocks"),value:"pulse"},{label:(0,x.__)("Flip","b-blocks"),value:"flip"}],md=[{label:(0,x.__)("Fade In","b-blocks"),value:"fadeIn"},{label:(0,x.__)("Flip In X","b-blocks"),value:"flipInX"},{label:(0,x.__)("Flip In Y","b-blocks"),value:"flipInY"},{label:(0,x.__)("Fade In Up","b-blocks"),value:"fadeInUp"},{label:(0,x.__)("Fade In Down","b-blocks"),value:"fadeInDown"},{label:(0,x.__)("Fade In Left","b-blocks"),value:"fadeInLeft"},{label:(0,x.__)("Fade In Right","b-blocks"),value:"fadeInRight"},{label:(0,x.__)("Fade In Up Big","b-blocks"),value:"fadeInUpBig"},{label:(0,x.__)("Fade In Down Big","b-blocks"),value:"fadeInDownBig"},{label:(0,x.__)("Fade In Left Big","b-blocks"),value:"fadeInLeftBig"},{label:(0,x.__)("Fade In Right Big","b-blocks"),value:"fadeInRightBig"},{label:(0,x.__)("Bounce In","b-blocks"),value:"bounceIn"},{label:(0,x.__)("Bounce In Up","b-blocks"),value:"bounceInUp"},{label:(0,x.__)("Bounce In Down","b-blocks"),value:"bounceInDown"},{label:(0,x.__)("Bounce In Left","b-blocks"),value:"bounceInLeft"},{label:(0,x.__)("Bounce In Right","b-blocks"),value:"bounceInRight"},{label:(0,x.__)("Rotate In","b-blocks"),value:"rotateIn"},{label:(0,x.__)("Rotate In Up Left","b-blocks"),value:"rotateInUpLeft"},{label:(0,x.__)("Rotate In Up Right","b-blocks"),value:"rotateInUpRight"},{label:(0,x.__)("Rotate In Down Left","b-blocks"),value:"rotateInDownLeft"},{label:(0,x.__)("Rotate In Down Right","b-blocks"),value:"rotateInDownRight"},{label:(0,x.__)("Roll In","b-blocks"),value:"rollIn"}],bd=[{label:(0,x.__)("Fade Out","b-blocks"),value:"fadeOut"},{label:(0,x.__)("Flip Out X","b-blocks"),value:"flipOutX"},{label:(0,x.__)("Flip Out Y","b-blocks"),value:"flipOutY"},{label:(0,x.__)("Fade Out Up","b-blocks"),value:"fadeOutUp"},{label:(0,x.__)("Fade Out Down","b-blocks"),value:"fadeOutDown"},{label:(0,x.__)("Fade Out Left","b-blocks"),value:"fadeOutLeft"},{label:(0,x.__)("Fade Out Right","b-blocks"),value:"fadeOutRight"},{label:(0,x.__)("Fade Out Up Big","b-blocks"),value:"fadeOutUpBig"},{label:(0,x.__)("Fade Out Down Big","b-blocks"),value:"fadeOutDownBig"},{label:(0,x.__)("Fade Out Left Big","b-blocks"),value:"fadeOutLeftBig"},{label:(0,x.__)("Fade Out Right Big","b-blocks"),value:"fadeOutRightBig"},{label:(0,x.__)("Bounce Out","b-blocks"),value:"bounceOut"},{label:(0,x.__)("Bounce Out Up","b-blocks"),value:"bounceOutUp"},{label:(0,x.__)("Bounce Out Down","b-blocks"),value:"bounceOutDown"},{label:(0,x.__)("Bounce Out Left","b-blocks"),value:"bounceOutLeft"},{label:(0,x.__)("Bounce Out Right","b-blocks"),value:"bounceOutRight"},{label:(0,x.__)("Rotate Out","b-blocks"),value:"rotateOut"},{label:(0,x.__)("Rotate Out Up Left","b-blocks"),value:"rotateOutUpLeft"},{label:(0,x.__)("Rotate Out Up Right","b-blocks"),value:"rotateOutUpRight"},{label:(0,x.__)("Rotate Out Down Left","b-blocks"),value:"rotateOutDownLeft"},{label:(0,x.__)("Rotate Out Down Right","b-blocks"),value:"rotateOutDownRight"},{label:(0,x.__)("Hinge","b-blocks"),value:"hinge"},{label:(0,x.__)("Roll Out","b-blocks"),value:"rollOut"}],fd=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Sync","b-blocks"),value:"sync"},{label:(0,x.__)("Shuffle","b-blocks"),value:"shuffle"},{label:(0,x.__)("Reverse","b-blocks"),value:"reverse"}],xd=({attributes:e,setAttributes:t})=>{const{loop:n,animateIn:o,inEffect:i,inSequence:a,outEffect:s,outSequence:r,textAlign:c,background:d,content:u,typography:p,color:g,padding:m,border:b}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:rn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animated Text Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Animate text:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:u,onChange:e=>t({content:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Loop","b-blocks"),checked:n,onChange:e=>t({loop:e})}),(0,l.jsx)("small",{children:(0,x.__)("Loop will not work instantly in editor! you have to refresh the page.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Animate in:","b-blocks")}),(0,l.jsx)(Tn,{value:o,onChange:e=>t({animateIn:e}),options:hd})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("In Effect:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,onChange:e=>t({inEffect:e}),options:[...gd,...md]})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("In Sequence:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:a,onChange:e=>t({inSequence:e}),options:fd})]}),n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Out Effect:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:s,onChange:e=>t({outEffect:e}),options:[...gd,...bd]})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Out Sequence:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:r,onChange:e=>t({outSequence:e}),options:fd})]})]})]})]}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animated Text Style","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(Oa,{className:"mt20",label:(0,x.__)("Typography:","b-blocks"),value:p,onChange:e=>t({typography:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:g,onChange:e=>t({color:e}),defaultColor:"#333"}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:m,onChange:e=>t({padding:e}),defaults:{vertical:"15px",horizontal:"15px"}}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:b,onChange:e=>t({border:e}),defaults:{radius:"5px"}})]})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:c,onChange:e=>t({textAlign:e})})})]})},yd="bBlocksAnimatedText",vd=({attributes:e,id:t})=>{const{textAlign:n,background:o,typography:i,color:a,padding:s,border:r}=e,c=`#${t} .${yd}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",i)?.googleFontLink}\n\t\t${ps(`${c} .content`,i)?.styles}\n\n\t\t${c}{\n\t\t\ttext-align: ${n};\n\t\t\t${os(o)}\n\t\t\tpadding: ${us(s)};\n\t\t\t${is(r)}\n\t\t}\n\t\t${c} .content{\n\t\t\tcolor: ${a};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},kd=jQuery;Pl(pd.name)&&(0,p.registerBlockType)(pd,{icon:rr,transforms:{from:[{type:"block",blocks:["atb/animated-text"],transform:e=>(0,p.createBlock)("b-blocks/animated-text",e)},{type:"block",blocks:["b-blocks/alert"],transform:({message:e,textAlign:t})=>(0,p.createBlock)("b-blocks/animated-text",{content:e,textAlign:t})},{type:"block",blocks:["core/paragraph"],transform:({content:e,align:t})=>(0,p.createBlock)("b-blocks/animated-text",{content:e,textAlign:t})},{type:"block",blocks:["core/heading"],transform:({content:e,textAlign:t})=>(0,p.createBlock)("b-blocks/animated-text",{content:e,textAlign:t})},{type:"prefix",prefix:"animated-text",transform:()=>(0,p.createBlock)("b-blocks/animated-text")}],to:[{type:"block",blocks:["atb/animated-text"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("atb/animated-text",e)},{type:"block",blocks:["core/paragraph"],isMatch:({content:e})=>!!e,transform:({content:e,textAlign:t})=>(0,p.createBlock)("core/paragraph",{content:e,align:t})},{type:"block",blocks:["b-blocks/alert"],isMatch:({content:e})=>!!e,
289 +transform:({content:e,textAlign:t})=>(0,p.createBlock)("b-blocks/alert",{message:e,textAlign:t})},{type:"block",blocks:["core/heading"],isMatch:({content:e})=>!!e,transform:({content:e,textAlign:t})=>(0,p.createBlock)("core/heading",{content:e,textAlign:t})}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{loop:i,animateIn:a,inEffect:s,inSequence:r,outEffect:c,outSequence:d,content:u}=t,p=`block-${o}`,g=(0,m.useRef)(null);return(0,m.useEffect)((()=>{g.current&&kd(g.current).textillate((e=>{const{loop:t,animateIn:n,inEffect:o,inSequence:i,outEffect:a,outSequence:s}=e;return{loop:t,minDisplayTime:2e3,initialDelay:0,autoStart:!0,inEffects:[],outEffects:["hinge"],in:{effect:o,delayScale:1.5,delay:50,sync:"sync"===i,shuffle:"shuffle"===i,reverse:"reverse"===i},out:{effect:a,delayScale:1.5,delay:50,sync:"sync"===s,shuffle:"shuffle"===s,reverse:"reverse"===s},type:n}})(t))}),[i,a,s,r,c,d,u]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(xd,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(vd,{attributes:t,id:p}),(0,l.jsx)("div",{className:yd,children:(0,l.jsx)("p",{className:"content",ref:g,children:u})})]})]})},save:()=>null})
290 +;const wd=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/advanced-tabs","title":"Advanced Tabs","category":"bBlocks","description":"Display content in responsive, customizable tabs with support for nested blocks and flexible layouts.","keywords":["tabs","tab","content","advanced tabs","tab content"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"clientId":{"type":"string","default":""},"tabLists":{"type":"array","default":[{"title":"Tab 1","subTitle":"","id":1,"iconType":"none","image":"","svg":"","library":"","iconPosition":"left","isExpanded":true,"isDefault":true,"customId":""},{"title":"Tab 2","subTitle":"","id":2,"iconType":"none","image":"","svg":"","library":"","iconPosition":"left","isExpanded":false,"isDefault":false,"customId":""},{"title":"Tab 3","subTitle":"","id":3,"iconType":"none","image":"","svg":"","library":"","iconPosition":"left","isExpanded":false,"isDefault":false,"customId":""}]},"tabs":{"type":"object","default":{"desktop":{"direction":"row","columnJustify":"center","rowJustify":"","contentAlign":"center","wrap":"nowrap"},"tablet":{"direction":"","columnJustify":"","rowJustify":"","contentAlign":"center","wrap":""},"mobile":{"direction":"","columnJustify":"","rowJustify":"","contentAlign":"center","wrap":""},"isShowTitle":true,"isShowSubTitle":false,"isShowActiveSubTitle":false,"isShowIcon":false,"isCloseAllTab":false}},"styles":{"type":"object","default":{"tabContainer":{"bg":{},"border":{},"desktop":{"spaceBetween":"","padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"spaceBetween":"","padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"spaceBetween":"","padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}}},"tabs":{"normal":{"normal":{"bg":{"color":"#eeeeee"},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}}},"hover":{"bg":{},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"transition":0.2}},"active":{"normal":{"bg":{"color":"#146EF5"},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"transition":0.2},"hover":{"bg":{},"border":{},"desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"transition":0.2}},"desktop":{"gap":"10px","width":""},"tablet":{"gap":"10px","width":""},"mobile":{"gap":"10px","width":""}},"tabTitle":{"typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}},"normal":{"normal":{"color":"#242424"},"hover":{"color":""}},"active":{"normal":{"color":"#fff"},"hover":{"color":""}}},"tabSubTitle":{"typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"normal":{"normal":{"color":"#242424"},"hover":{"color":""}},"active":{"normal":{"color":"#fff"},"hover":{"color":""}}},"icon":{"desktop":{"size":"","position":"row"},"tablet":{"size":"","position":""},"mobile":{"size":"","position":""},"normal":{"normal":{"color":"#242424","bg":{},"border":{},"desktop":{"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"hover":{"color":"","bg":{},"border":{},"desktop":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"transition":0.2},"active":{"normal":{"color":"#fff","bg":{},"border":{},"desktop":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"hover":{"color":"","bg":{},"border":{},"desktop":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"tablet":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}},"mobile":{"border":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""},"padding":{"top":"","bottom":"","left":"","right":""},"margin":{"top":"","bottom":"","left":"","right":""}}},"transition":0.2}},"content":{"bg":{},"border":{},"desktop":{"padding":{},"margin":{},"radius":{},"width":""},"tablet":{"padding":{},"margin":{},"radius":{},"width":""},"mobile":{"padding":{},"margin":{},"radius":{},"width":""}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","lodash"],"render":"file:./render.php","viewScript":"file:./view.js","style":"file:./view.css"}'),_d=[{
291 +name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Cd=()=>{const[e,t]=(0,m.useState)("desktop"),n=()=>{const e=window.innerWidth;t(e>1024?"desktop":e>640?"tablet":"mobile")};return(0,m.useEffect)((()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)})),[]),{device:e}},jd=(e,t={},n=!0)=>{const[o,i]=(0,m.useState)(!1),[a,s]=(0,m.useState)(!1),[r,l]=(0,m.useState)(null),[c,d]=(0,m.useState)(null);if(!wp.ajax)return void console.error("Please use wp-util as a dependency");const u=(n={})=>{i(!0),s(!1),l(null),wp.ajax.post(e,{...t,...n}).done((e=>{i(!1),d(e)})).fail((e=>{i(!1),s(!0),l(e)}))},p=(e={})=>{u(e)};return(0,m.useEffect)((()=>{n&&u(t)}),[]),{data:c,saveData:p,refetch:p,isLoading:o,isError:a,error:r}},$d=e=>{const[t,n]=(0,m.useState)(!0),[o,i]=(0,m.useState)(!1),[a,s]=(0,m.useState)(null),[r,l]=(0,m.useState)(null);(0,m.useEffect)((()=>{i(!1),s(null),wp.api.loadPromise.then((()=>{(new wp.api.models.Settings).fetch().then((t=>{l(c(t[e])),n(!1)}))}))}),[]);const c=e=>{let t=e;try{t=JSON.parse(e)}catch(e){i(!0),s(e.message)}return t};return{data:r,isLoading:t,isError:o,error:a}},Sd=()=>{const e=window?.wp?.Uploader?.defaults||window?._wpPluploadSettings?.defaults,t=e?.filters?.mime_types;Array.isArray(t)&&t.forEach((e=>{const t=String(e?.extensions||"");t.split(",").includes("svg")||(e.extensions=t?`${t},svg`:"svg")}))},Td=({attributes:e,setAttributes:t,index:n,updateObj:o})=>{const{tabLists:i,tabs:a}=e,{isCloseAllTab:s}=a,r=i[n],{data:c}=$d("bBlocksUtils"),{refetch:d}=jd("b-blocks-enable-svg-mime-type",{_wpnonce:c?.nonce},!1),u=new Tt;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Initial Active","b-blocks"),checked:r.isDefault,value:r.isDefault,onChange:()=>{const e=i.map(((e,t)=>t===n?{...e,isDefault:!0}:{...e,isDefault:!1}));s||t({tabLists:e})}}),(0,l.jsx)(y.TextControl,{type:"text",className:"mt10",label:(0,x.__)("Title","b-blocks"),value:r.title,onChange:e=>o("tabLists",e,n,"title")}),(0,l.jsx)(y.TextareaControl,{rows:2,className:"mt10",label:(0,x.__)("Sub Title","b-blocks"),value:r.subTitle,onChange:e=>o("tabLists",e,n,"subTitle")}),(0,l.jsx)(v,{children:(0,x.__)("Icon Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r.iconType,onChange:e=>o("tabLists",e,n,"iconType"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"None",value:"none"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Library",value:"library"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Upload SVG",value:"svg"})]}),"library"===r.iconType&&(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon Library","b-blocks"),value:r.library,onChange:e=>o("tabLists",e,n,"library")}),"svg"===r.iconType&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(we,{className:"mt10",label:(0,x.__)("Upload SVG","b-blocks"),types:["image/svg+xml"],onClick:()=>(Sd(),d()),value:{url:r.svg},onChange:async e=>{const t=e?.url?await u.sanitizeFile(e?.url):"";o("tabLists",t,n,"svg")},isSvgEnabled:!0})})]})},Nd=({clientId:e,tabLists:t,setAttributes:n,handleTabTitleClick:o})=>{const i=[...(0,f.select)("core/block-editor").getBlocks(e)],a=(t||[]).reduce(((e,t)=>Math.max(Number(e),Number(t?.id||0))),0)+1,s={title:`Tab ${a}`,subTitle:"",id:a,iconType:"none",image:"",svg:"",library:"",isExpanded:!1,isDefault:!1,customId:""},r=(0,p.createBlock)("b-blocks/container",{lock:{remove:!0,move:!0},className:"b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-"+a});i.push(r),(0,f.dispatch)("core/block-editor").replaceInnerBlocks(e,i,!1).then((()=>{n({tabLists:[...t||[],s]}),o&&o(String(a))}))},Md=e=>{const{attributes:t,setAttributes:n,updateObj:o,clientId:i,activeIndex:a,setActiveIndex:s}=e,{tabLists:r}=t,c={title:`Tab ${r.length+1}`,subTitle:"",id:r.length+1,iconType:"none",image:"",svg:"",library:"",isExpanded:!1,isDefault:!1,customId:""};return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tab Lists","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:t,setAttributes:n,handleAdd:()=>{Nd({clientId:i,blockId:"",tabLists:r,setAttributes:n})},handleDelete:e=>{const t=[...(0,f.select)("core/block-editor").getBlocks(i)],o=r[e];o?.id&&t.forEach(((a,s)=>{if(a?.attributes?.className.split(" ").includes(`b-blocks-advanced-tabs-panel-${o?.id}`)){const o=[...t.slice(0,s),...t.slice(s+1)];(0,f.dispatch)("core/block-editor").replaceInnerBlocks(i,o,!1);const a=[...r.slice(0,e),...r.slice(e+1)];n({tabLists:a})}}))},newItem:c,design:"sortable",itemLabel:"Tab",arrKey:"tabLists",title:"title",ItemSettings:Td,handleCopy:e=>{const t=(r||[]).reduce(((e,t)=>Math.max(Number(e),Number(t?.id||0))),0),o=[...(0,f.select)("core/block-editor").getBlocks(i)],a=r[e];a?.id&&o.forEach(((o,s)=>{if(o?.attributes?.className.split(" ").includes(`b-blocks-advanced-tabs-panel-${a?.id}`)){const l=(0,p.createBlock)(o.name,{...o.attributes,className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-${t+1}`,lock:{remove:!0,move:!0}},o?.innerBlocks?.length>0?o?.innerBlocks:[]);(0,f.dispatch)("core/block-editor").insertBlocks(l,s+1,i);const c=[...r.slice(0,e),{...a,id:t+1},...r.slice(e)];n({tabLists:c}),(0,f.dispatch)("core/block-editor").selectBlock(i)}}))},minItem:0,updateObj:o,activeIndex:a,setActiveIndex:s})})},Ld=e=>{const{attributes:t,updateObj:n,setAttributes:o}=e,{tabs:i,tabLists:a}=t;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Title","b-blocks"),checked:i?.isShowTitle,value:i.isShowTitle,onChange:e=>n("tabs",e,"isShowTitle")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Sub Title","b-blocks"),checked:i?.isShowSubTitle,value:i.isShowSubTitle,onChange:e=>n("tabs",e,"isShowSubTitle")}),i.isShowSubTitle&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Only Tab Active Sub Title","b-blocks"),checked:i?.isShowActiveSubTitle,value:i.isShowActiveSubTitle,onChange:e=>n("tabs",e,"isShowActiveSubTitle")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:i?.isShowIcon,value:i.isShowIcon,onChange:e=>n("tabs",e,"isShowIcon")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Close All Tabs Initially","b-blocks"),checked:i?.isCloseAllTab,value:i.isCloseAllTab,onChange:e=>{const t=e?a?.map((e=>({...e,isDefault:!1}))):a?.map(((e,t)=>({...e,isDefault:0===t})));o({tabLists:t,tabs:{...i,isCloseAllTab:e}})}})]})},Pd=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M12 10l0 10"}),(0,l.jsx)("path",{d:"M12 10l4 4"}),(0,l.jsx)("path",{d:"M12 10l-4 4"}),(0,l.jsx)("path",{d:"M4 4l16 0"})]}),Ed=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M4 20l16 0"}),(0,l.jsx)("path",{d:"M12 14l0 -10"}),(0,l.jsx)("path",{d:"M12 14l4 -4"}),(0,l.jsx)("path",{d:"M12 14l-4 -4"})]}),Ad=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M10 12l10 0"}),(0,l.jsx)("path",{d:"M10 12l4 4"}),(0,l.jsx)("path",{d:"M10 12l4 -4"}),(0,l.jsx)("path",{d:"M4 4l0 16"})]}),Bd=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M14 12l-10 0"}),(0,l.jsx)("path",{d:"M14 12l-4 4"
292 +}),(0,l.jsx)("path",{d:"M14 12l-4 -4"}),(0,l.jsx)("path",{d:"M20 4l0 16"})]}),Id=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),Od=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),Rd=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),zd=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Align-Items-Stretch--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M8 17.75c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C7.3219 17.3906 7.25 17.2125 7.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1Zm7 0c-0.2125 0 -0.3906 -0.0719 -0.53425 -0.21575C14.3219 17.3906 14.25 17.2125 14.25 17V7c0 -0.2125 0.0719 -0.39065 0.21575 -0.5345 0.14365 -0.14365 0.32175 -0.2155 0.53425 -0.2155h1c0.2125 0 0.39065 0.07185 0.5345 0.2155 0.14365 0.14385 0.2155 0.322 0.2155 0.5345v10c0 0.2125 -0.07185 0.3906 -0.2155 0.53425 -0.14385 0.14385 -0.322 0.21575 -0.5345 0.21575h-1ZM2.75 22c-0.2125 0 -0.390585 -0.07235 -0.53425 -0.217C2.071915 21.6385 2 21.45935 2 21.2455c0 -0.21365 0.071915 -0.39135 0.21575 -0.533C2.359415 20.57085 2.5375 20.5 2.75 20.5h18.5c0.2125 0 0.39065 0.07235 0.5345 0.217 0.14365 0.1445 0.2155 0.32365 0.2155 0.5375 0 0.21365 -0.07185 0.39135 -0.2155 0.533 -0.14385 0.14165 -0.322 0.2125 -0.5345 0.2125h-18.5Zm0 -18.5c-0.2125 0 -0.390585 -0.072335 -0.53425 -0.217C2.071915 3.1385 2 2.959335 2 2.7455c0 -0.213665 0.071915 -0.391335 0.21575 -0.533C2.359415 2.070835 2.5375 2 2.75 2h18.5c0.2125 0 0.39065 0.072335 0.5345 0.217 0.14365 0.1445 0.2155 0.323665 0.2155 0.5375 0 0.213665 -0.07185 0.391335 -0.2155 0.533 -0.14385 0.141665 -0.322 0.2125 -0.5345 0.2125h-18.5Z",strokeWidth:"0.5"})}),Dd=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Fd=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),Hd=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Wd=e=>(0,l.jsxs)("svg",{height:"16",viewBox:"0 0 512 512",width:"16",xmlns:"http://www.w3.org/2000/svg",...e,style:{height:"16px",width:"16px"},children:[(0,l.jsx)("path",{d:"m349.4 289.3h-13c-68.4 0-92.1.1-160.5-.1-26.4-.1-42.3-23.1-32.3-46.8 6.1-14.5 18-19.9 33.3-19.8 68 .1 91.3 0 159.4 0h14.7c-3.8-4.3-5.9-7.1-8.3-9.5-11.2-11-22.6-21.8-33.6-33-13.9-14.2-14.6-35.1-1.9-48.5 12.8-13.5 34.9-13.7 49.4.5 33.3 32.8 66.3 65.8 99.1 99.1 14.3 14.6 14.4 34.7.1 49.2-32.8 33.4-65.8 66.4-99.2 99.2-14.5 14.3-36.5 14.2-49.4.7s-11.9-34.4 2.4-49.3c13-13.4 25.7-26.9 39.8-41.7z"}),(0,l.jsx)("path",{d:"m112.3 256.1v226.7c0 21.3-21.9 34.3-45.4 27.3-13.6-4-21.3-13.7-21.3-27.2-.1-41.1 0-82.2 0-123.3 0-109.7 0-219.4 0-329.1 0-18.8 13.4-30.7 33.9-30.5 19.6.2 32.8 11.9 32.8 29.4.1 75.6.1 151.2 0 226.7z"})]}),Ud=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",...e,children:(0,l.jsx)("path",{d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),Gd=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",id:"Format-Text-Wrap--Streamline-Rounded-Material",height:"24",width:"24",style:{rotate:"180deg"},...e,children:(0,l.jsx)("path",{
293 +d:"M4.7455 19.975c-0.213665 0 -0.391335 -0.0719 -0.533 -0.21575C4.070835 19.6156 4 19.4375 4 19.225V4.75c0 -0.2125 0.072335 -0.390665 0.217 -0.5345C4.3615 4.071835 4.540665 4 4.7545 4c0.213665 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.323665 0.21575 -0.5375 0.21575Zm14.5 0c-0.21365 0 -0.39135 -0.0719 -0.533 -0.21575 -0.14165 -0.14365 -0.2125 -0.32175 -0.2125 -0.53425V4.75c0 -0.2125 0.07235 -0.390665 0.217 -0.5345 0.1445 -0.143665 0.32365 -0.2155 0.5375 -0.2155 0.21365 0 0.39135 0.071835 0.533 0.2155 0.14165 0.143835 0.2125 0.322 0.2125 0.5345v14.475c0 0.2125 -0.07235 0.3906 -0.217 0.53425 -0.1445 0.14385 -0.32365 0.21575 -0.5375 0.21575ZM9.075 16.9l-2.15 -2.125c-0.15 -0.15 -0.225 -0.325 -0.225 -0.525s0.075 -0.375 0.225 -0.525l2.15 -2.125c0.15 -0.13335 0.32585 -0.20415 0.5275 -0.2125 0.20165 -0.00835 0.37585 0.0625 0.5225 0.2125 0.15 0.15 0.225 0.325 0.225 0.525s-0.075 0.375 -0.225 0.525l-0.85 0.85h4.475c0.7 0 1.29165 -0.24165 1.775 -0.725 0.48335 -0.48335 0.725 -1.075 0.725 -1.775s-0.24165 -1.29165 -0.725 -1.775C15.04165 8.74165 14.45 8.5 13.75 8.5H7c-0.2125 0 -0.3906 -0.07235 -0.53425 -0.217 -0.14385 -0.1445 -0.21575 -0.32365 -0.21575 -0.5375 0 -0.21365 0.0719 -0.39135 0.21575 -0.533C6.6094 7.07085 6.7875 7 7 7h6.75c1.1 0 2.04165 0.39165 2.825 1.175S17.75 9.9 17.75 11s-0.39165 2.04165 -1.175 2.825S14.85 15 13.75 15h-4.475l0.85 0.85c0.15 0.15 0.225 0.32635 0.225 0.529 0 0.20265 -0.07175 0.37765 -0.21525 0.525 -0.1565 0.14735 -0.3356 0.221 -0.53725 0.221s-0.37585 -0.075 -0.5225 -0.225Z",strokeWidth:"0.5"})}),Vd=e=>{const{attributes:t,updateObj:n,device:o}=e,{tabs:i,styles:a}=t,{tabs:s,content:r}=a,c=["row","row-reverse"],d=["column","column-reverse"];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Layout","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{style:{padding:"2px"},className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i?.[o]?.direction,onChange:e=>{n("tabs",e,o,"direction")},size:"small",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"column",icon:Pd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"column-reverse",icon:Ed}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"row-reverse",icon:Bd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"row",icon:Ad})]})]}),d.includes(i?.[o]?.direction)&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Justify ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.columnJustify,onChange:e=>n("tabs",e,o,"columnJustify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Id,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Od,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Rd,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(zd,{style:{rotate:"-90deg"}})})]})]}),c.includes(i?.[o]?.direction)&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Justify ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.rowJustify,onChange:e=>n("tabs",e,o,"rowJustify"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Id,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Od,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Rd,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Stretch",value:"stretch",icon:(0,l.jsx)(zd,{})})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Tab Content Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i?.[o]?.contentAlign,onChange:e=>n("tabs",e,o,"contentAlign"),isDeselectable:!0,size:"small",style:{padding:"2px"},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"start",icon:Dd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:Fd}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"end",icon:Hd})]})]}),d.includes(i?.[o]?.direction)&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Wrap","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i?.[o]?.wrap,onChange:e=>n("tabs",e,o,"wrap"),isDeselectable:!0,style:{padding:"2px"},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap",value:"wrap",icon:(0,l.jsx)(Ud,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"No Wrap",value:"nowrap",icon:(0,l.jsx)(Wd,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Wrap Reverse",value:"wrap-reverse",icon:(0,l.jsx)(Gd,{})})]})]}),c.includes(i?.[o]?.direction)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Tabs Menu Width","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s[o].width,onChange:e=>n("styles",e,"tabs",o,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Content Width","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r[o].width,onChange:e=>n("styles",e,"content",o,"width")})]})]})]})},qd=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vd,{...e}),(0,l.jsx)(Md,{...e}),(0,l.jsx)(Ld,{...e})]}),Yd=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{tabContainer:a}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tab Container","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:a[o].margin,onChange:e=>n("styles",e,"tabContainer",o,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:a[o].padding,onChange:e=>n("styles",e,"tabContainer",o,"padding")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a.bg,onChange:e=>n("styles",e,"tabContainer","bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>n("styles",e,"tabContainer","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:a[o].radius,onChange:e=>n("styles",e,"tabContainer",o,"radius")})]})},Kd=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),[a,s]=(0,m.useState)("normal"),{styles:r}=e,{icon:c}=r;return(0,l.jsxs)(y.PanelBody,{
294 +className:"bPlPanelBody",title:(0,x.__)("Tabs Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",value:c[n].size,onChange:e=>t("styles",e,"icon",n,"size")}),(0,l.jsxs)(v,{children:[(0,x.__)("Icon Position","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:c[n].position,onChange:e=>t("styles",e,"icon",n,"position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Top",value:"column"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Bottom",value:"column-reverse"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Left",value:"row"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Right",value:"row-reverse"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e),s("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].margin,onChange:e=>t("styles",e,"icon",o,a,n,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].padding,onChange:e=>t("styles",e,"icon",o,a,n,"padding")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:c[o][a].color,onChange:e=>t("styles",e,"icon",o,a,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:c[o][a].bg,onChange:e=>t("styles",e,"icon",o,a,"bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:c[o][a].border,onChange:e=>t("styles",e,"icon",o,a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].radius,onChange:e=>t("styles",e,"icon",o,a,n,"radius")})]})},Qd=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),[a,s]=(0,m.useState)("normal"),{styles:r}=e,{tabs:c}=r;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tabs","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Tabs Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",value:c[n].gap,onChange:e=>t("styles",e,"tabs",n,"gap")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e),s("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].margin,onChange:e=>t("styles",e,"tabs",o,a,n,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].padding,onChange:e=>t("styles",e,"tabs",o,a,n,"padding")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:c[o][a].bg,onChange:e=>t("styles",e,"tabs",o,a,"bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:c[o][a].border,onChange:e=>t("styles",e,"tabs",o,a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c[o][a][n].radius,onChange:e=>t("styles",e,"tabs",o,a,n,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.01,value:c.normal.hover.transition,onChange:e=>t("styles",e,"tabs","normal","hover","transition")})]})},Zd=({attributes:e,updateObj:t})=>{const[n,o]=(0,m.useState)("normal"),[i,a]=(0,m.useState)("normal"),{styles:s}=e,{tabSubTitle:r}=s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tabs SubTitle","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:r.typography,onChange:e=>t("styles",e,"tabSubTitle","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n,onChange:e=>{o(e),a("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>a(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r[n][i].color,onChange:e=>t("styles",e,"tabSubTitle",n,i,"color")})]})},Xd=({attributes:e,updateObj:t})=>{const[n,o]=(0,m.useState)("normal"),[i,a]=(0,m.useState)("normal"),{styles:s}=e,{tabTitle:r}=s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tabs Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:r.typography,onChange:e=>t("styles",e,"tabTitle","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n,onChange:e=>{o(e),a("normal")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>a(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r[n][i].color,onChange:e=>t("styles",e,"tabTitle",n,i,"color")})]})},Jd=e=>{const{attributes:t}=e,{tabs:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Yd,{...e}),(0,l.jsx)(Qd,{...e}),n.isShowTitle&&(0,l.jsx)(Xd,{...e}),n.isShowSubTitle&&(0,l.jsx)(Zd,{...e}),n.isShowIcon&&(0,l.jsx)(Kd,{...e})]})},eu=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:_d,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(qd,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Jd,{...e})})]})})})}),tu=(e,o)=>{
295 295 const{tabs:i,styles:a}=e,{tabContainer:s,tabs:r,tabTitle:l,tabSubTitle:c,icon:d,content:u}=a,p=`#${o} .b-blocks-advanced-tabs-main-wrapper`,h=`${p} .b-blocks-advanced-tabs-wrapper`,g=`${h} .b-blocks-advanced-tabs-button-lists`,m=`${g} .b-blocks-advanced-tabs-button`,b=`${m}.b-blocks-advanced-tabs-button-active`,f=`${m}.b-blocks-advanced-tabs-button-normal`,x=`${m} .b-blocks-advanced-tabs-button-title-container`,y=`${x} .b-blocks-advanced-tabs-button-title`,v=`${b} .b-blocks-advanced-tabs-button-title`,k=`${x} .b-blocks-advanced-tabs-button-subTitle`,w=`${b} .b-blocks-advanced-tabs-button-subTitle`,_=`${m} .b-blocks-advanced-tabs-button-icon`,C=`${p} .b-blocks-advanced-tabs-contents`,j=(e="desktop")=>"row-reverse"===i?.[e].direction||"row"===i?.[e].direction,$=(e="desktop")=>"column"===i?.[e].direction||"column-reverse"===i?.[e].direction,S=(e="normal",t="normal",n="desktop")=>`\n\t\t\t\t\t${ns("margin",hs(r[e][t][n].margin))}\n\t\t\t\t\t${ns("padding",hs(r[e][t][n].padding))}\n\t\t\t\t\t${ns("border-radius",hs(r[e][t][n].radius))}\n\t\t\t\t\t${"desktop"===n?os(r[e][t].bg):""}\n\t\t\t\t\t${"desktop"===n?as(r[e][t].border):""}\n\t\t\t\t`,T=(e="normal",t="normal",n="desktop")=>`\n\t\t\t\t${ns("margin",hs(d[e][t][n].margin))}\n\t\t\t\t${ns("padding",hs(d[e][t][n].padding))}\n\t\t\t\t${ns("border-radius",hs(d[e][t][n].radius))}\n\t\t\t\t${"desktop"===n?os(d[e][t].bg):""}\n\t\t\t\t${"desktop"===n?as(d[e][t].border):""}\n\t`,N=["row","row-reverse"],M=["column","column-reverse"]
296 -;return`\n\n\t\t\t${ps("",l.typography).googleFontLink}\n\t\t\t${ps("",c.typography).googleFontLink}\n\n\t\t\t${ps(y,l.typography).styles}\n\t\t\t${ps(k,c.typography).styles}\n\n\t\t\t${h}{\n\t\t\t\t${ns("flex-direction",i.desktop.direction)}\n\t\t\t}\n\n\t\t\t${g}{\n\t\t\t\t${ns("justify-content",$("desktop")?i.desktop.columnJustify:i.desktop.rowJustify)}\n\t\t\t\t${ns("flex-direction",j("desktop")?"column":"")}\n\t\t\t\t${ns("gap",r.desktop.gap)}\n\t\t\t\t${ns("padding",hs(s.desktop.padding))}\n\t\t\t\t${ns("margin",hs(s.desktop.margin))}\n\t\t\t\t${ns("border-radius",hs(s.desktop.radius))}\n\t\t\t\t${as(s.border)}\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${N.includes(i?.desktop?.direction)?ns("width",r.desktop.width):""}\n\t\t\t\t${M.includes(i.desktop.direction)?ns("flex-wrap",i.desktop.wrap):""}\n\t\t\t}\n\n\t\t\t${m}{\n\t\t\t\t${ns("width",$("desktop")&&"stretch"===i.desktop.columnJustify?"100%":"")}\n\t\t\t\t${ns("height",j("desktop")&&"stretch"===i.desktop.rowJustify?"100%":"")}\n\t\t\t\t${ns("justify-content",i.desktop.contentAlign)}\n\t\t\t\t${ns("flex-direction",d.desktop.position)}\n\t\t\t\t${S("normal","normal")}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out; \n\t\t\t}\n\n\t\t\t${f}:hover{\n\t\t\t\t${S("normal","hover")}\n\t\t\t}\n\t\t\t\n\t\t\t${b}{\n\t\t\t\t${S("active","normal")}\n\t\t\t}\n\t\t\t${b}:hover{\n\t\t\t\t${S("active","hover")}\n\t\t\t}\n\n\t\t\t${x}{\n\t\t\t\t${ns("text-align",i.desktop.contentAlign)}\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-title{\n\t\t\t\t${ns("color",l.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-title{\n\t\t\t\t${ns("color",l.active.hover.color)}\n\t\t\t}\n\n\t\t\t${y}{\n\t\t\t\t${ns("color",l.normal.normal.color)}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out; \n\t\t\t}\n\n\t\t\t${v}{\n\t\t\t\t${ns("color",l.active.normal.color)}\n\t\t\t}\n\n\t\t\t${k}{\n\t\t\t ${ns("color",c.normal.normal.color)}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out;\n\t\t\t\t${i.isShowActiveSubTitle?ns("display","none"):""}\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-subTitle{\n\t\t\t\t${ns("color",c.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${w}{\n\t\t\t\t${ns("color",c.active.normal.color)}\n\t\t\t\t${i.isShowActiveSubTitle?ns("display","block"):""}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-subTitle{\n\t\t\t\t${ns("color",jt(c.active.hover.color)?c.active.hover.color:c.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${T("normal","normal")}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t${T("normal","hover")}\n\t\t\t}\n\n\t\t\t${_}>svg{\n\t\t\t\t${ns("height",d.desktop.size)}\n\t\t\t\t${ns("width",d.desktop.size)}\n\t\t\t\t${ns("fill",d.normal.normal.color)}\n\t\t\t\t${ns("color",d.normal.normal.color)}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon>svg{\n\t\t\t\t${ns("fill",d.normal.hover.color)}\n\t\t\t\t${ns("color",d.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${b} .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t${T("active","normal")}\n\t\t\t}\n\n\t\t\t${b} .b-blocks-advanced-tabs-button-icon>svg{\n\t\t\t\t${ns("fill",d.active.normal.color)}\n\t\t\t\t${ns("color",d.active.normal.color)}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("active","hover")}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon>svg{\n\t\t\t\t${ns("fill",jt(d.active.hover.color)?d.active.hover.color:d.normal.hover.color)}\n\t\t\t\t${ns("color",jt(d.active.hover.color)?d.active.hover.color:d.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${C}{\n\t\t\t\t${N.includes(i?.desktop?.direction)&&ns("max-width",u.desktop.width)}\n\t\t\t}\n\n\t\t\t${t}{\n\t\t\t\t${h}{\n\t\t\t\t\t${ns("flex-direction",i?.tablet?.direction)}\n\t\t\t\t}\n\t\t\t\t\t${g}{\n\t\t\t\t\t${ns("justify-content",$("tablet")?i?.tablet?.columnJustify:i?.tablet?.rowJustify)}\n\t\t\t\t\t${ns("flex-direction",j("tablet")?"column":"")}\n\t\t\t\t\t${ns("gap",r?.tablet?.gap)}\n\t\t\t\t\t${ns("padding",hs(s?.tablet?.padding))}\n\t\t\t\t\t${ns("margin",hs(s?.tablet?.margin))}\n\t\t\t\t\t${ns("border-radius",hs(s?.tablet?.radius))}\n\t\t\t\t\t${N.includes(i?.tablet?.direction)?ns("width",r?.tablet?.width):""}\n\t\t\t\t\t${M.includes(i?.tablet?.direction)?ns("flex-wrap",i?.tablet?.wrap):""}\n\t\t\t\t}\n\n\t\t\t\t${m}{\n\t\t\t\t\t${ns("width",$("tablet")&&"stretch"===i?.tablet.columnJustify?"100%":"")}\n\t\t\t\t\t${ns("height",j("tablet")&&"stretch"===i?.tablet.rowJustify?"100%":"")}\n\t\t\t\t\t${ns("justify-content",i?.tablet.contentAlign)}\n\t\t\t\t\t${ns("flex-direction",d?.tablet.position)}\n\t\t\t\t\t${S("normal","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${f}:hover{\n\t\t\t\t\t${S("normal","hover","tablet")}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t${b}{\n\t\t\t\t\t${S("active","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${b}:hover{\n\t\t\t\t\t${S("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${x}{\n\t\t\t\t\t${ns("text-align",i?.tablet.contentAlign)}\n\t\t\t\t}\n\n\t\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("normal","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${_}>svg{\n\t\t\t\t\t${ns("height",d?.tablet.size)}\n\t\t\t\t\t${ns("width",d?.tablet.size)}\n\t\t\t\t}\n\n\t\t\t\t${b} .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("active","normal","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t\t${T("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${C}{\n\t\t\t\t\t${N.includes(i?.tablet?.direction)&&ns("max-width",u?.tablet.width)}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t${h}{\n\t\t\t\t\t${ns("flex-direction",i?.tablet?.direction)}\n\t\t\t\t}\n\t\t\t\t\t${g}{\n\t\t\t\t\t${ns("justify-content",$("tablet")?i?.tablet?.columnJustify:i?.tablet?.rowJustify)}\n\t\t\t\t\t${ns("flex-direction",j("tablet")?"column":"")}\n\t\t\t\t\t${ns("gap",r?.tablet?.gap)}\n\t\t\t\t\t${ns("padding",hs(s?.tablet?.padding))}\n\t\t\t\t\t${ns("margin",hs(s?.tablet?.margin))}\n\t\t\t\t\t${ns("border-radius",hs(s?.tablet?.radius))}\n\t\t\t\t\t${N.includes(i?.tablet?.direction)?ns("width",r?.tablet?.width):""}\n\t\t\t\t\t${M.includes(i?.tablet?.direction)?ns("flex-wrap",i?.tablet?.wrap):""}\n\t\t\t\t}\n\n\t\t\t\t${m}{\n\t\t\t\t\t${ns("width",$("tablet")&&"stretch"===i?.tablet.columnJustify?"100%":"")}\n\t\t\t\t\t${ns("height",j("tablet")&&"stretch"===i?.tablet.rowJustify?"100%":"")}\n\t\t\t\t\t${ns("justify-content",i?.tablet.contentAlign)}\n\t\t\t\t\t${ns("flex-direction",d?.tablet.position)}\n\t\t\t\t\t${S("normal","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${f}:hover{\n\t\t\t\t\t${S("normal","hover","tablet")}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t${b}{\n\t\t\t\t\t${S("active","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${b}:hover{\n\t\t\t\t\t${S("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${x}{\n\t\t\t\t\t${ns("text-align",i?.tablet.contentAlign)}\n\t\t\t\t}\n\n\t\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("normal","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${_}>svg{\n\t\t\t\t\t${ns("height",d?.tablet.size)}\n\t\t\t\t\t${ns("width",d?.tablet.size)}\n\t\t\t\t}\n\n\t\t\t\t${b} .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("active","normal","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t\t${T("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${C}{\n\t\t\t\t\t${N.includes(i?.tablet?.direction)&&ns("max-width",u?.tablet.width)}\n\t\t\t\t}\n\t\t\t}\n\n\t`},tu=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{tabLists:a=[],tabs:s}=t,r=(0,m.useRef)(null),[c,d]=(0,m.useState)(null),[u,p]=(0,m.useState)(null),g=(0,m.useRef)(null),b=(0,m.useMemo)((()=>{const e=(a||[]).find((e=>e.isDefault));return s.isCloseAllTab?"":(e||{id:1})?.id}),[a]);(0,
297 -m.useEffect)((()=>{c||d(b)}),[b]);const f="b-blocks/container",x=[[f,{className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-1 b-blocks-advanced-tabs-parent-${t.clientId}`,lock:{remove:!0,move:!0}}],[f,{className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-2 b-blocks-advanced-tabs-parent-${t.clientId}`,lock:{remove:!0,move:!0}}],[f,{className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-3 b-blocks-advanced-tabs-parent-${t.clientId}`,lock:{remove:!0,move:!0}}]],v=fe(t,n);return(0,m.useEffect)((()=>{if(c){const e=g?.current,t=e?.querySelector(`.b-blocks-advanced-tabs-panel-${c}`),n=e?.querySelector(".b-blocks-advanced-tabs-panel");t?t.style.display="block":n&&(n.style.display="none")}}),[g,c]),(0,m.useEffect)((()=>{n({clientId:o.slice(0,12)})}),[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Jd,{attributes:t,setAttributes:n,updateObj:v,clientId:o,device:i,activeIndex:u,setActiveIndex:p}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:eu(t,`block-${o}`)}}),(0,l.jsx)("div",{className:"b-blocks-advanced-tabs-main-wrapper",children:(0,l.jsxs)("div",{className:"b-blocks-advanced-tabs-wrapper",ref:r,children:[(0,l.jsxs)("div",{className:"b-blocks-advanced-tabs-button-lists",children:[(a||[]).map(((e,t)=>(0,l.jsxs)("button",{"data-title-tab-id":e.id,onClick:()=>{(e=>{d(String(e));const t=g?.current,n=t.querySelectorAll(".b-blocks-advanced-tabs-panel");(Array.from(n)||[]).forEach((t=>{t.classList.contains(`b-blocks-advanced-tabs-panel-${e}`)?t.style.display="block":t.style.display="none"}))})(e.id),p(t)},className:"b-blocks-advanced-tabs-button "+(c==e.id?"b-blocks-advanced-tabs-button-active":"b-blocks-advanced-tabs-button-normal"),children:[s.isShowIcon&&"none"!==e.iconType&&(0,l.jsx)("p",{className:"b-blocks-advanced-tabs-button-icon",dangerouslySetInnerHTML:{__html:e?.[e.iconType]}}),(0,l.jsxs)("div",{className:"b-blocks-advanced-tabs-button-title-container",children:[s.isShowTitle&&(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-advanced-tabs-button-title",placeholder:"Tab Title",value:e.title,onChange:e=>v("tabLists",e,t,"title")}),s.isShowSubTitle&&(0,l.jsx)(h.RichText,{className:"b-blocks-advanced-tabs-button-subTitle",placeholder:"Tab SubTitle",value:e.subTitle,onChange:e=>v("tabLists",e,t,"subTitle")})]})]},`${t}-${e.id}`))),(0,l.jsx)("div",{className:"b-blocks-advanced-tabs-button-add",onClick:()=>{Td({clientId:o,blockId:"",tabLists:a,setAttributes:n})},children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})]}),(0,l.jsx)("div",{className:"b-blocks-advanced-tabs-contents",ref:g,children:(0,l.jsx)(h.InnerBlocks,{templateLock:!1,template:a.length>0?x:[],renderAppender:!1})})]})})]})]})}));Ll(kd.name)&&(0,p.registerBlockType)(kd,{icon:sl,edit:tu,save:h.InnerBlocks.Content,deprecated:[{attributes:{...kd.attributes,oldHTML:{type:"string",source:"html"}},isEligible:()=>!0,migrate:(e,t)=>[e,t],save:()=>null}]})
298 -;const nu=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/article-card","title":"Article Card","category":"bBlocks","description":"A single static article, resource, or featured-page preview card — image, category badge, heading, excerpt, optional meta line, and CTA link — in horizontal or vertical layout. No JavaScript required.","keywords":["article","card","resource","read also","featured","preview","link"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"type":{"desktop":"horizontal","tablet":"","mobile":"vertical"},"alignment":{"desktop":"left","tablet":"","mobile":""}}},"image":{"type":"object","default":{"id":{"desktop":0,"tablet":0,"mobile":0},"url":{"desktop":"","tablet":"","mobile":""},"alt":"","objectFit":{"desktop":"cover","tablet":"","mobile":""},"objectPosition":{"desktop":"center","tablet":"","mobile":""},"filter":{"desktop":{},"tablet":{},"mobile":{}},"position":{"desktop":"left","tablet":"","mobile":""},"splitRatio":{"desktop":"40","tablet":"","mobile":""},"splitLeft":{"desktop":"40%","tablet":"","mobile":""},"splitRight":{"desktop":"60%","tablet":"","mobile":""}}},"content":{"type":"object","default":{"badge":"Read Also","heading":"Article title goes here","headingTag":"h3","excerpt":"","meta":"","metaIcon":""}},"link":{"type":"object","default":{"url":"","target":false,"ctaLabel":"Read More","ctaStyle":"button","cardLinkMode":false}},"badge":{"type":"object","default":{"align":"left","bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","padding":{"desktop":{"top":"3px","right":"10px","bottom":"3px","left":"10px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"999px","right":"999px","bottom":"999px","left":"999px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"colors":{"type":"object","default":{"heading":"#111827","text":"#374151","meta":"#6b7280"}},"heading":{"type":"object","default":{"background":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"excerpt":{"type":"object","default":{"background":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"meta":{"type":"object","default":{"color":"#6b7280","iconColor":"#6b7280","bg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"card":{"type":"object","default":{"background":{"type":"solid","color":""},"padding":{"desktop":{"top":"20px","right":"20px","bottom":"20px","left":"20px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"1px","style":"solid","color":"#e5e7eb"},"borderRadius":{"desktop":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[{"hOffset":"0px","vOffset":"1px","blur":"3px","spreed":"0px","color":"rgba(0,0,0,0.12)","isInset":false}]}},"cta":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","border":{"width":"","style":"solid","color":""},"shadow":[]},"hover":{"bg":{"type":"solid","color":"#1d4ed8"},"color":"#ffffff","border":{"width":"","style":"solid","color":""},"shadow":[]},"padding":{"desktop":{"top":"8px","right":"18px","bottom":"8px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"typography":{"type":"object","default":{"heading":{"fontSize":{"desktop":"18px","tablet":"","mobile":""},"fontWeight":"600"},"excerpt":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":"400"},"cta":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":"600"},"badge":{"fontSize":{"desktop":"12px","tablet":"","mobile":""},"fontWeight":"600"},"meta":{"fontSize":{"desktop":"13px","tablet":"","mobile":""},"fontWeight":"400"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 0)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":["file:../index.js"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),ou=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,iu={
299 -left:"flex-start",center:"center",right:"flex-end"},au=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:a,layout:s={},image:r={},badge:c={},meta:d={},colors:u={},card:p={},cta:h={},typography:g={},heading:m={},excerpt:b={}}=e,{type:f={},alignment:x}=s,y="string"==typeof x?{desktop:x,tablet:"",mobile:""}:x||{},{position:v={},objectFit:k={},objectPosition:w={},filter:_={},splitRatio:C={},splitLeft:j={},splitRight:$={}}=r,{align:S,bg:T,color:N,padding:M={},margin:L={},border:P={},borderRadius:E={}}=c,{heading:A,text:B,meta:I}=u,{background:O={},padding:R={},border:z={},borderRadius:D={},shadow:F}=p,{normal:H={},hover:W={},padding:U={},margin:G={},borderRadius:V={},transition:q=.2}=h,{heading:Y={},excerpt:K={},cta:Q={},badge:Z={},meta:X={}}=g,J=`#${o} .b-blocks-article-card`,ee=`${J} .b-blocks-article-card-card`,te=`${J} .b-blocks-article-card-media`,ne=`${J} .b-blocks-article-card-img`,oe=`${J} .b-blocks-article-card-media-placeholder`,ie=`${J} .b-blocks-article-card-body`,ae=`${J} .b-blocks-article-card-badge`,se=`${J} .b-blocks-article-card-heading`,re=`${J} .b-blocks-article-card-excerpt`,le=`${J} .b-blocks-article-card-meta`,ce=`${J} .b-blocks-article-card-meta-icon`,de=`${J} .b-blocks-article-card-cta`,ue=`${J} .b-blocks-article-card-link`,pe=`#${o} .b-blocks-article-card--cta-button .b-blocks-article-card-cta`,he=`#${o} .b-blocks-article-card--cta-link .b-blocks-article-card-cta`,ge=(e,t,n)=>ns(e,hs(t?.[n])),me=e=>`\n\t\t${ie}{ ${ge("padding",R,e)} }\n\t\t${ee}{ ${ge("border-radius",D,e)} }\n\t\t${ae}{ ${ge("padding",M,e)} ${ge("margin",L,e)} ${ge("border-radius",E,e)} }\n\t\t${se}{ ${ge("padding",m.padding,e)} ${ge("margin",m.margin,e)} ${ge("border-radius",m.borderRadius,e)} }\n\t\t${re}{ ${ge("padding",b.padding,e)} ${ge("margin",b.margin,e)} ${ge("border-radius",b.borderRadius,e)} }\n\t\t${le}{ ${ge("padding",d.padding,e)} ${ge("margin",d.margin,e)} ${ge("border-radius",d.borderRadius,e)} }\n\t\t${pe}{ ${ge("padding",U,e)} ${ge("margin",G,e)} ${ge("border-radius",V,e)} }\n\t`,be=e=>{const t=ou(k,e)||"cover",n=ou(w,e)||"center";return`\n\t\t\t${ne}{ ${ns("object-fit",t)} ${ns("object-position",n)} ${(e=>{if(!e)return"";const t=[];return e.blur&&t.push(`blur(${e.blur}px)`),null!=e.brightness&&100!==e.brightness&&t.push(`brightness(${e.brightness}%)`),null!=e.contrast&&100!==e.contrast&&t.push(`contrast(${e.contrast}%)`),null!=e.saturate&&100!==e.saturate&&t.push(`saturate(${e.saturate}%)`),e.grayscale&&t.push(`grayscale(${e.grayscale}%)`),t.length?`filter:${t.join(" ")};`:""})(_?.[e])} }\n\t\t`},fe=e=>{const t="horizontal"===(ou(f,e)||"horizontal"),n=ou(v,e)||(t?"left":"top"),o=ou(C,e),i=parseInt(o,10)||40,a="custom"===o?ou(j,e)||"40%":`${i}%`,s="custom"===o?ou($,e)||"60%":100-i+"%",r=t?"right"===n?"row-reverse":"row":"bottom"===n?"column-reverse":"column",l=ou(y,e)||"left";let c="";return c="center"===l?`\n\t\t\t\t${J}{ display: flex; justify-content: center; }\n\t\t\t\t${ie}{ align-items: center; text-align: center; }\n\t\t\t\t${de}{ align-self: center !important; }\n\t\t\t`:"right"===l?`\n\t\t\t\t${J}{ display: flex; justify-content: flex-end; }\n\t\t\t\t${ie}{ align-items: flex-end; text-align: right; }\n\t\t\t\t${de}{ align-self: flex-end !important; }\n\t\t\t`:`\n\t\t\t\t${J}{ display: block; }\n\t\t\t\t${ie}{ align-items: flex-start; text-align: left; }\n\t\t\t\t${de}{ align-self: flex-start; }\n\t\t\t`,`\n\t\t\t${ee}, ${ue}{ flex-direction:${r}; }\n\t\t\t${t?`\n\t\t\t\t${te}{ flex:0 0 ${a}; max-width:${a}; width:${a}; align-self:stretch; position:relative; }\n\t\t\t\t${ne}{ width:100%; height:100%; aspect-ratio:auto; }\n\t\t\t\t${oe}{ width:100%; height:100%; min-height:180px; }\n\t\t\t\t${ie}{ flex:1 1 ${s}; max-width:${s}; width:${s}; justify-content:center; }\n\t\t\t`:`\n\t\t\t\t${te}{ flex:0 0 auto; width:100%; max-width:100%; align-self:auto; }\n\t\t\t\t${ne}{ width:100%; height:auto; }\n\t\t\t\t${oe}{ width:100%; min-height:180px; }\n\t\t\t\t${ie}{ flex:1 1 auto; width:100%; max-width:100%; justify-content:normal; }\n\t\t\t`}\n\t\t\t${c}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",Y).googleFontLink}\n\t\t\t${ps("",K).googleFontLink}\n\t\t\t${ps("",Q).googleFontLink}\n\t\t\t${ps("",Z).googleFontLink}\n\t\t\t${ps("",X).googleFontLink}\n\t\t\t${ee}{\n\t\t\t\t${ns("box-shadow",ls(F))}\n\t\t\t\t${os(O)}\n\t\t\t\t${is(z)}\n\t\t\t}\n\t\t\t${ae}{\n\t\t\t\talign-self:${iu[S]||"flex-start"} !important;\n\t\t\t\t${os(T)}\n\t\t\t\tcolor:${N||"#ffffff"};\n\t\t\t\t${is(P)}\n\t\t\t}\n\t\t\t${se}{\n\t\t\t\tcolor:${A||"#111827"};\n\t\t\t\t${os(m.background)}\n\t\t\t\t${is(m.border)}\n\t\t\t}\n\t\t\t${re}{\n\t\t\t\tcolor:${B||"#374151"};\n\t\t\t\t${os(b.background)}\n\t\t\t\t${is(b.border)}\n\t\t\t}\n\t\t\t${le}{\n\t\t\t\tcolor:${d.color||I||"#6b7280"};\n\t\t\t\t${os(d.bg)}\n\t\t\t\t${is(d.border)}\n\t\t\t}\n\t\t\t${ce}{\n\t\t\t\tcolor:${d.iconColor||d.color||I||"#6b7280"};\n\t\t\t}\n\t\t\t${ce} svg{\n\t\t\t\tfill: currentColor;\n\t\t\t}\n\t\t\t${ps(se,Y).styles}\n\t\t\t${ps(re,K).styles}\n\t\t\t${ps(de,Q).styles}\n\t\t\t${ps(ae,Z).styles}\n\t\t\t${ps(le,X).styles}\n\t\t\t${pe}{\n\t\t\t\t${is(H.border)}\n\t\t\t\t${os(H.bg)}\n\t\t\t\t${ns("box-shadow",ls(H.shadow))}\n\t\t\t\tcolor:${H.color||"#ffffff"};\n\t\t\t\ttransition:all ${q}s ease;\n\t\t\t}\n\t\t\t${pe}:hover, ${pe}:focus-visible{\n\t\t\t\t${os(W.bg)}\n\t\t\t\t${is(W.border)}\n\t\t\t\t${ns("box-shadow",ls(W.shadow))}\n\t\t\t\tcolor:${W.color||"#ffffff"};\n\t\t\t}\n\t\t\t${he}{ color:${H.bg?.color||"#2563eb"}; }\n\t\t\t${de}:focus-visible, ${ue}:focus-visible{\n\t\t\t\toutline:2px solid ${H.bg?.color||"#2563eb"};\n\t\t\t\toutline-offset:2px;\n\t\t\t}\n\t\t\t${me("desktop")}\n\t\t\t${be("desktop")}\n\t\t\t${fe("desktop")}\n\t\t\t${t}{\n\t\t\t\t${me("tablet")}\n\t\t\t\t${be("tablet")}\n\t\t\t\t${fe("tablet")}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${me("mobile")}\n\t\t\t\t${be("mobile")}\n\t\t\t\t${fe("mobile")}\n\t\t\t}\n\t\t\t${_s(o,a,i,!1)}\n\t\t\t`}})},su=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],ru={top:"",right:"",bottom:"",left:""},lu=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],cu=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",...e,children:(0,l.jsx)("path",{d:"M4 11h12.17l-3.58-3.59L14 6l6 6-6 6-1.41-1.41L16.17 13H4z"})}),du=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,uu=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},image:a={},content:s={},link:r={},colors:c={}}=e,{type:d={},alignment:u}=i,p="string"==typeof u?{desktop:u,tablet:"",mobile:""}:u||{},{id:h={},url:g={},alt:m="",objectFit:b={},objectPosition:f={},filter:k={},position:w={},splitRatio:C={},splitLeft:j={},splitRight:$={}}=a,S=k[o]||{},{badge:T,headingTag:N,meta:M,metaIcon:L}=s,{url:P,target:E,ctaLabel:A,ctaStyle:B,cardLinkMode:I}=r,{meta:O}=c,R="horizontal"===du(d,o),z=du(C,o),D=!!du(g,o);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:2,children:[(0,x.__)("Layout","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",isBlock:!0,isDeselectable:!0,value:d[o]||"",onChange:e=>{const n=w[o]||"";let s=n;"horizontal"!==e||["left","right"].includes(n)||(s="left"),"vertical"!==e||["top","bottom"].includes(n)||(s="top"),t({layout:{...i,type:{...d,[o]:e||""}},image:{...a,position:{...w,[o]:s}}})},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"})]}),(0,l.jsxs)(y.Flex,{align:"center",
300 -className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Image Position","b-blocks")," ",(0,l.jsx)(_,{})]})}),R?(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:w[o]||"",onChange:e=>n("image",e,"position",o),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(cu,{style:{rotate:"180deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(cu,{})})]}):(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:w[o]||"",onChange:e=>n("image",e,"position",o),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Top","b-blocks"),value:"top",icon:(0,l.jsx)(cu,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Bottom","b-blocks"),value:"bottom",icon:(0,l.jsx)(cu,{style:{rotate:"90deg"}})})]})]}),R&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Image Split Ratio","b-blocks")," ",(0,l.jsx)(_,{})]}),value:z||"",options:[{label:"30 / 70",value:"30"},{label:"40 / 60",value:"40"},{label:"50 / 50",value:"50"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}],onChange:e=>{"custom"===e?n("image",e,"splitRatio",o):t({image:{...a,splitRatio:{...C,[o]:e},splitLeft:{...j,[o]:`${e}%`},splitRight:{...$,[o]:100-parseInt(e,10)+"%"}}})},__nextHasNoMarginBottom:!0}),"custom"===z&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Left","b-blocks"),className:"flex1",value:j[o],onChange:e=>n("image",e,"splitLeft",o)}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Right","b-blocks"),className:"flex1",value:$[o],onChange:e=>n("image",e,"splitRight",o)})]})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:p[o]||"",onChange:e=>{const t="string"==typeof u?{desktop:u,tablet:"",mobile:""}:{...u};t[o]=e,n("layout",t,"alignment")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:"editor-alignleft"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:"editor-aligncenter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:"editor-alignright"})]})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Wrap entire card in link","b-blocks"),help:(0,x.__)("The whole card becomes a single link (no separate CTA button).","b-blocks"),checked:!!I,onChange:e=>n("link",e,"cardLinkMode")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Image:","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(we,{label:g[o]?(0,x.__)("Replace Image","b-blocks"):(0,x.__)("Select Image","b-blocks"),value:{id:h[o],url:g[o],alt:m},types:["image"],height:"100%",width:"100%",onChange:e=>t({image:{...a,id:{...h,[o]:e?.id||0},url:{...g,[o]:e?.url||""},alt:e?.alt||m||""}})}),"desktop"!==o&&(0,l.jsx)("p",{style:{margin:"6px 0 0",fontSize:11,color:"#777"},children:(0,x.__)("Leave empty to reuse the Desktop image on this device.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Alt Text","b-blocks"),value:m||"",onChange:e=>n("image",e,"alt"),help:(0,x.__)("Describes the image; leave empty for a decorative image.","b-blocks"),__nextHasNoMarginBottom:!0}),D&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Object Fit","b-blocks")," ",(0,l.jsx)(_,{})]}),value:b[o]||"",options:[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"},{label:(0,x.__)("Fill","b-blocks"),value:"fill"},{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Scale Down","b-blocks"),value:"scale-down"}],onChange:e=>n("image",e,"objectFit",o),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Object Position","b-blocks")," ",(0,l.jsx)(_,{})]}),value:f[o]||"",options:[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"},{label:(0,x.__)("Top Left","b-blocks"),value:"top left"},{label:(0,x.__)("Top Right","b-blocks"),value:"top right"},{label:(0,x.__)("Bottom Left","b-blocks"),value:"bottom left"},{label:(0,x.__)("Bottom Right","b-blocks"),value:"bottom right"}],onChange:e=>n("image",e,"objectPosition",o),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt20",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Filter","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Blur (px)","b-blocks"),value:S.blur??0,onChange:e=>n("image",e,"filter",o,"blur"),min:0,max:20,step:.5}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Brightness (%)","b-blocks"),value:S.brightness??100,onChange:e=>n("image",e,"filter",o,"brightness"),min:0,max:200}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Contrast (%)","b-blocks"),value:S.contrast??100,onChange:e=>n("image",e,"filter",o,"contrast"),min:0,max:200}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Saturation (%)","b-blocks"),value:S.saturate??100,onChange:e=>n("image",e,"filter",o,"saturate"),min:0,max:200}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Grayscale (%)","b-blocks"),value:S.grayscale??0,onChange:e=>n("image",e,"filter",o,"grayscale"),min:0,max:100})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Badge Text","b-blocks"),value:T||"",onChange:e=>n("content",e,"badge"),placeholder:(0,x.__)("e.g. Read Also","b-blocks"),help:(0,x.__)("Empty hides the badge.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Heading Tag","b-blocks"),labelPosition:"edge",value:N,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:(0,x.__)("Paragraph","b-blocks"),value:"p"}],onChange:e=>n("content",e,"headingTag"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Meta Line","b-blocks"),value:M||"",onChange:e=>n("content",e,"meta"),placeholder:(0,x.__)("e.g. 5 min read","b-blocks"),help:(0,x.__)("Empty hides the meta line.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Meta Icon","b-blocks"),value:L,onChange:e=>n("content",e,"metaIcon")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Meta Color:","b-blocks"),value:O||"#6b7280",onChange:e=>n("colors",e,"meta"),defaultColor:"#6b7280"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Link & CTA","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link URL","b-blocks"),value:P||"",
301 -onChange:e=>n("link",e,"url"),type:"url",placeholder:"https://",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open in new tab","b-blocks"),checked:!!E,onChange:e=>n("link",e,"target")}),!I&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("CTA Label","b-blocks"),value:A||"",onChange:e=>n("link",e,"ctaLabel"),placeholder:(0,x.__)("Read More","b-blocks"),help:(0,x.__)("Empty hides the CTA.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("CTA Style","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:B,options:[{label:(0,x.__)("Button","b-blocks"),value:"button"},{label:(0,x.__)("Arrow Link","b-blocks"),value:"link"}],onChange:e=>n("link",e,"ctaStyle"),__nextHasNoMarginBottom:!0})]})]})]})]})},pu=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,m.useState)("normal"),{card:a={},colors:s={},cta:r={},link:c={},typography:d={},badge:u={},meta:p={},heading:h={},excerpt:g={}}=e,{background:b={},padding:f={},border:v={},borderRadius:w={},shadow:C}=a,{heading:j,text:$}=s,{align:S,bg:T={},color:N,padding:M={},margin:L={},border:P={},borderRadius:E={}}=u,{padding:A={},margin:B={},borderRadius:I={},transition:O}=r,R=r[o]||{},{ctaStyle:z,cardLinkMode:D,ctaLabel:F}=c,{heading:H={},excerpt:W={},cta:U={},badge:G={},meta:V={}}=d,q="button"===z,Y=(e,o,i,a,s)=>(0,l.jsx)(k,{className:s,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:su,values:a?.[n],resetValues:ru,onChange:e=>t(o,e,i,n)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:b,onChange:e=>t("card",e,"background")}),Y((0,x.__)("Padding","b-blocks"),"card","padding",f,"mt10"),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:v,onChange:e=>t("card",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"card","borderRadius",w),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Shadow","b-blocks"),value:C,onChange:e=>t("card",e,"shadow")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Heading","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:j||"#111827",onChange:e=>t("colors",e,"heading"),defaultColor:"#111827"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:H,onChange:e=>t("typography",e,"heading")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:h.background,onChange:e=>t("heading",e,"background")}),Y((0,x.__)("Padding","b-blocks"),"heading","padding",h.padding),Y((0,x.__)("Margin","b-blocks"),"heading","margin",h.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:h.border,onChange:e=>t("heading",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"heading","borderRadius",h.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Excerpt","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:$||"#374151",onChange:e=>t("colors",e,"text"),defaultColor:"#374151"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:W,onChange:e=>t("typography",e,"excerpt")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:g.background,onChange:e=>t("excerpt",e,"background")}),Y((0,x.__)("Padding","b-blocks"),"excerpt","padding",g.padding),Y((0,x.__)("Margin","b-blocks"),"excerpt","margin",g.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:g.border,onChange:e=>t("excerpt",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"excerpt","borderRadius",g.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Alignment","b-blocks"),labelPosition:"edge",value:S,options:[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],onChange:e=>t("badge",e,"align"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:T,onChange:e=>t("badge",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:N||"#ffffff",onChange:e=>t("badge",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:G,onChange:e=>t("typography",e,"badge")}),Y((0,x.__)("Padding","b-blocks"),"badge","padding",M),Y((0,x.__)("Margin","b-blocks"),"badge","margin",L),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:P,onChange:e=>t("badge",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"badge","borderRadius",E)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:p.color||s.meta||"#6b7280",onChange:e=>t("meta",e,"color"),defaultColor:"#6b7280"}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:p.iconColor||p.color||s.meta||"#6b7280",onChange:e=>t("meta",e,"iconColor"),defaultColor:"#6b7280"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:V,onChange:e=>t("typography",e,"meta")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:p.bg,onChange:e=>t("meta",e,"bg")}),Y((0,x.__)("Padding","b-blocks"),"meta","padding",p.padding),Y((0,x.__)("Margin","b-blocks"),"meta","margin",p.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:p.border,onChange:e=>t("meta",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"meta","borderRadius",p.borderRadius)]}),!D&&F&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:U,onChange:e=>t("typography",e,"cta")}),q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:R.bg,onChange:e=>t("cta",e,o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:R.color||"#ffffff",onChange:e=>t("cta",e,o,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:R.border,onChange:e=>t("cta",e||{},o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Shadow","b-blocks"),value:R.shadow,onChange:e=>t("cta",e,o,"shadow")}),Y((0,x.__)("Padding","b-blocks"),"cta","padding",A),Y((0,x.__)("Margin","b-blocks"),"cta","margin",B),Y((0,x.__)("Border Radius","b-blocks"),"cta","borderRadius",I),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:O,onChange:e=>t("cta",e,"transition"),min:0,max:5,step:.01})]}),!q&&(0,l.jsx)(Ue,{label:(0,x.__)("Link Color:","b-blocks"),value:r.normal?.bg?.color||"#2563eb",onChange:e=>t("cta",{...r.normal?.bg||{},type:"solid",color:e},"normal","bg"),defaultColor:"#2563eb"})]})]})},hu=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",
302 -tabs:lu,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(uu,{...e}),"style"===t.name&&(0,l.jsx)(pu,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},gu=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,mu=(0,w.compose)((0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop"}=e,{layout:a={},image:s={},content:r={},link:c={}}=t,{alignment:d}=a,u="string"==typeof d?{desktop:d,tablet:"",mobile:""}:d||{},{id:p={},url:g={},alt:m=""}=s,{badge:b,heading:f,headingTag:v,excerpt:k,meta:w,metaIcon:_}=r,{ctaLabel:C,ctaStyle:j,cardLinkMode:$}=c,S="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,T=fe(t,n),N=gu(g,i),M=v||"h3",L=["b-blocks-article-card",`b-blocks-article-card--cta-${j}`].filter(Boolean).join(" "),P=N?(0,l.jsx)("div",{className:"b-blocks-article-card-media",children:(0,l.jsx)("img",{className:"b-blocks-article-card-img",src:N,alt:m||""})}):(0,l.jsx)("div",{className:"b-blocks-article-card-media",children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{onSelect:e=>{n({image:{...s,id:{...p,[i]:e?.id||0},url:{...g,[i]:e?.url||""},alt:e?.alt||m||""}})},allowedTypes:["image"],value:gu(p,i),render:({open:e})=>(0,l.jsxs)("div",{className:"b-blocks-article-card-media-placeholder",onClick:e,children:[(0,l.jsx)(y.Dashicon,{icon:"format-image",style:{fontSize:36,width:36,height:36,marginBottom:8}}),(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:(0,x.__)("Select or Upload Image","b-blocks")})}),(0,l.jsx)("span",{style:{fontSize:12,opacity:.8,marginTop:4},children:(0,x.__)("Click to open Media Library","b-blocks")})]})})})}),E=(0,l.jsxs)("div",{className:"b-blocks-article-card-body",children:[b?(0,l.jsx)("span",{className:"b-blocks-article-card-badge",children:b}):null,(0,l.jsx)(h.RichText,{tagName:M,className:"b-blocks-article-card-heading",value:f,onChange:e=>T("content",e,"heading"),placeholder:(0,x.__)("Article title goes here","b-blocks"),allowedFormats:["core/bold","core/italic"]}),(0,l.jsx)(h.RichText,{tagName:"p",className:"b-blocks-article-card-excerpt",value:k,onChange:e=>T("content",e,"excerpt"),placeholder:(0,x.__)("Add a short excerpt or description…","b-blocks"),allowedFormats:["core/bold","core/italic"]}),w?(0,l.jsxs)("span",{className:"b-blocks-article-card-meta",children:[_?(0,l.jsx)("span",{className:"b-blocks-article-card-meta-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:_}}):null,(0,l.jsx)("span",{className:"b-blocks-article-card-meta-text",children:w})]}):null,!$&&C?(0,l.jsxs)("span",{className:"b-blocks-article-card-cta",children:[(0,l.jsx)("span",{className:"b-blocks-article-card-cta-label",children:C}),"link"===j?(0,l.jsx)("svg",{className:"b-blocks-article-card-cta-arrow",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null]}):null]}),A=(0,h.useBlockProps)({id:`block-${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hu,{...e,updateObj:T,isPremium:S}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],value:p[i]||0,onSelect:e=>n({image:{...s,id:{...p,[i]:e?.id||0},url:{...g,[i]:e?.url||""},alt:e?.alt||m||""}}),render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{icon:"format-image",label:N?(0,x.__)("Replace image","b-blocks"):(0,x.__)("Add image","b-blocks"),onClick:e})})})}),(0,l.jsx)(h.AlignmentToolbar,{value:u[i]||gu(u,i)||"left",onChange:e=>{const t="string"==typeof d?{desktop:d,tablet:"",mobile:""}:{...d};t[i]=e||"",T("layout",t,"alignment")}})]}),(0,l.jsxs)("div",{...A,children:[(0,l.jsx)(au,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:L,children:(0,l.jsxs)("article",{className:"b-blocks-article-card-card",children:[P,E]})})})]})]})}));Ll(nu.name)&&(0,p.registerBlockType)(nu,{icon:Cl,edit:mu,save:()=>null})
303 -;const bu=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/audio-player","title":"Audio Player","category":"bBlocks","description":"A custom-styled HTML5 audio player with bar, card, sound-bars, vinyl, coverflow and playlist themes.","keywords":["audio player","podcast","music","mp3","html5 audio","playlist"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"audio":{"type":"object","default":{"url":"","id":0,"trackTitle":"","artistName":"","albumArt":{"url":"","id":0}}},"tracks":{"type":"array","default":[]},"behavior":{"type":"object","default":{"autoPlay":false,"loop":false,"showDownload":true,"showSeek":true,"showTimecode":true,"showVolume":true,"showSkip":true,"skipSeconds":10,"showRestart":false,"showStop":false,"showRepeat":false,"showSpeed":false,"speeds":[1,1.25,1.5,2],"showRemaining":false}},"layout":{"type":"object","default":{"style":"bar","alignment":"left","maxWidth":{"desktop":"","tablet":"","mobile":""}}},"player":{"type":"object","default":{"bg":{"type":"solid","color":"#006F9E"},"border":{},"borderRadius":{"desktop":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"16px","right":"20px","bottom":"16px","left":"20px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"colors":{"type":"object","default":{"control":"#ffffff","accent":"","track":"","trackActive":""}},"title":{"type":"object","default":{"color":"#ffffff","typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""},"fontWeight":"600"},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"artist":{"type":"object","default":{"color":"#ffffff","typo":{"fontSize":{"desktop":"13px","tablet":"","mobile":""}},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"buttonStyle":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"hoverColor":"","hoverBg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"playBtnStyle":{"type":"object","default":{"color":"#fff","bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"skipBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"restartBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"repeatBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"stopBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"speedBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""}}},"volumeStyle":{"type":"object","default":{"trackColor":"#FFFFFF","fillColor":"#EAEAEA","margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{}}},"downloadStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"seekStyle":{"type":"object","default":{"trackColor":"#FFFFFF","fillColor":"#EAEAEA","margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"trackSize":{"desktop":"","tablet":"","mobile":""},"fillSize":{"desktop":"","tablet":"","mobile":""}}},"timecode":{"type":"object","default":{"position":"left","color":"","typo":{}}},"playlistStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"color":"","activeBg":{"type":"solid","color":""},"activeColor":"","itemPadding":{"desktop":{"top":"","left":"","bottom":"","right":""},"tablet":{"top":"","left":"","bottom":"","right":""},"mobile":{"top":"","left":"","bottom":"","right":""}},"border":{},"borderRadius":{"desktop":{"top":"","left":"","bottom":"","right":""},"tablet":{"top":"","left":"","bottom":"","right":""},"mobile":{"top":"","left":"","bottom":"","right":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 0)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),fu=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,xu=({attributes:e,id:o,isBackend:i=!1})=>{
304 -const{layout:a={},player:s={},colors:r={},title:c={},artist:d={},timecode:u={},buttonStyle:p={},playBtnStyle:h={},skipBtnStyle:g={},restartBtnStyle:m={},repeatBtnStyle:b={},stopBtnStyle:f={},speedBtnStyle:x={},volumeStyle:y={},downloadStyle:v={},seekStyle:k={},playlistStyle:w={},advanced:_}=e,C=r.control,j=r.accent,$=s.bg?.color,S=r.track,T=r.trackActive,N=`#${o} .b-blocks-audio-player`,M=`${N} .b-blocks-audio-player-player`,L=`${N} .b-blocks-audio-player-title`,P=`${N} .b-blocks-audio-player-artist`,E=`${N} .b-blocks-audio-player-time, ${N} .b-blocks-audio-player-current, ${N} .b-blocks-audio-player-duration`,A=`${N} .b-blocks-audio-player-playpause, ${N} .b-blocks-audio-player-skip, ${N} .b-blocks-audio-player-restart, ${N} .b-blocks-audio-player-repeat, ${N} .b-blocks-audio-player-stop, ${N} .b-blocks-audio-player-speed`,B=`${N} .b-blocks-audio-player-playpause`,I=`${N} .b-blocks-audio-player-skip`,O=`${N} .b-blocks-audio-player-restart`,R=`${N} .b-blocks-audio-player-repeat`,z=`${N} .b-blocks-audio-player-stop`,D=`${N} .b-blocks-audio-player-speed`,F=`${N} input[type='range'].b-blocks-audio-player-volume`,H=`${N} .b-blocks-audio-player-download`,W=`${N} .b-blocks-audio-player-seek-wrap`,U=`${N} input[type='range'].b-blocks-audio-player-seek`,G=`${N} .b-blocks-audio-player-list-item`,V=`${N} .b-blocks-audio-player-list-item.is-active`,q=(e,t,n)=>ns(e,hs(t?.[n])),Y=(e,t)=>e.split(",").map((e=>`${e.trim()}${t}`)).join(", "),K=(e,t)=>`\n\t\t${e}{\n\t\t\t${ns("color",t?.color)}\n\t\t\t${os(t?.bg)}\n\t\t\t${is(t?.border)}\n\t\t}\n\t\t${Y(e,":hover")}{\n\t\t\t${ns("color",t?.hoverColor)}\n\t\t\t${os(t?.hoverBg)}\n\t\t}\n\t`,Q=(e,t,n)=>{const o=fu(t?.iconSize,n);return`\n\t\t\t${e}{\n\t\t\t\t${q("margin",t?.margin,n)}\n\t\t\t\t${q("padding",t?.padding,n)}\n\t\t\t\t${q("border-radius",t?.borderRadius,n)}\n\t\t\t}\n\t\t\t${o?`${Y(e," svg")}{ ${ns("width",o)} ${ns("height",o)} }`:""}\n\t\t`},Z=e=>`\n\t\t${M}{\n\t\t\t${ns("max-width",fu(a.maxWidth,e))}\n\t\t\t${q("margin",s.margin,e)}\n\t\t\t${q("padding",s.padding,e)}\n\t\t\t${q("border-radius",s.borderRadius,e)}\n\t\t}\n\t\t${Q(A,p,e)}\n\t\t${Q(B,h,e)}\n\t\t${Q(I,g,e)}\n\t\t${Q(O,m,e)}\n\t\t${Q(R,b,e)}\n\t\t${Q(z,f,e)}\n\t\t${Q(D,x,e)}\n\t\t${Q(F,y,e)}\n\t\t${Q(H,v,e)}\n\t\t${W}{\n\t\t\t${q("margin",k.margin,e)}\n\t\t}\n\t\t${U}::-webkit-slider-runnable-track{\n\t\t\t${ns("height",fu(k.trackSize,e))}\n\t\t\t${q("border-radius",k.borderRadius,e)}\n\t\t}\n\t\t${U}::-moz-range-track{\n\t\t\t${ns("height",fu(k.trackSize,e))}\n\t\t\t${q("border-radius",k.borderRadius,e)}\n\t\t}\n\t\t${L}{\n\t\t\t${q("margin",c.margin,e)}\n\t\t\t${q("padding",c.padding,e)}\n\t\t\t${q("border-radius",c.borderRadius,e)}\n\t\t}\n\t\t${P}{\n\t\t\t${q("margin",d.margin,e)}\n\t\t\t${q("padding",d.padding,e)}\n\t\t\t${q("border-radius",d.borderRadius,e)}\n\t\t}\n\t\t${G}{\n\t\t\t${q("padding",w.itemPadding,e)}\n\t\t\t${q("border-radius",w.borderRadius,e)}\n\t\t}\n\t`,X=k.fillColor||j,J=k.trackColor,ee=k.trackColor||"rgba(127, 127, 127, 0.3)",te=y.fillColor||j,ne=y.trackColor||"rgba(127, 127, 127, 0.3)";return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",c.typo).googleFontLink}\n\t\t\t${ps("",d.typo).googleFontLink}\n\t\t\t${ps("",u.typo).googleFontLink}\n\n\t\t\t${M}{\n\t\t\t\t${ns("color",C)}\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${is(s.border)}\n\t\t\t}\n\n\t\t\t${A}{\n\t\t\t\t${ns("color",C)}\n\t\t\t}\n\n\t\t\t${B}{\n\t\t\t\t${ns("background",j)}\n\t\t\t\t${ns("color",$)}\n\t\t\t}\n\n\t\t\t${R}.is-active{\n\t\t\t\t${ns("color",j)}\n\t\t\t}\n\n\t\t\t${K(A,p)}\n\t\t\t${K(B,h)}\n\t\t\t${K(I,g)}\n\t\t\t${K(O,m)}\n\t\t\t${K(R,b)}\n\t\t\t${K(z,f)}\n\t\t\t${K(D,x)}\n\t\t\t${K(F,y)}\n\t\t\t${K(H,v)}\n\n\t\t\t${U}::-webkit-slider-runnable-track{ background: linear-gradient(to right, ${X} 0%, ${X} var(--b-blocks-audio-player-var-progress, 0%), ${ee} var(--b-blocks-audio-player-var-progress, 0%), ${ee} 100%); }\n\t\t\t${U}::-moz-range-track{ background: ${ee}; }\n\t\t\t${U}::-moz-range-progress{ background: ${X}; }\n\t\t\t${U}::-webkit-slider-thumb {\n\t\t\t\t${ns("border-color",X)}\n\t\t\t\t${ns("background",C)}\n\t\t\t}\n\t\t\t${U}::-moz-range-thumb {\n\t\t\t\t${ns("border-color",X)}\n\t\t\t\t${ns("background",C)}\n\t\t\t}\n\n\t\t\t${F}::-webkit-slider-runnable-track{ background: linear-gradient(to right, ${te} 0%, ${te} var(--b-blocks-audio-player-var-progress, 0%), ${ne} var(--b-blocks-audio-player-var-progress, 0%), ${ne} 100%); }\n\t\t\t${F}::-moz-range-track{ background: ${ne}; }\n\t\t\t${F}::-moz-range-progress{ background: ${te}; }\n\t\t\t${F}::-webkit-slider-thumb{ border-color: ${te}; }\n\t\t\t${F}::-moz-range-thumb{ border-color: ${te}; }\n\n\t\t\t${N} .b-blocks-audio-player-bar {\n\t\t\t\t${ns("background",J||"rgba(127, 127, 127, 0.35)")}\n\t\t\t}\n\n\t\t\t${N} .b-blocks-audio-player-bar.is-played {\n\t\t\t\tbackground: ${X};\n\t\t\t}\n\n\t\t\t${N} .b-blocks-audio-player-vinyl-disc {\n\t\t\t\t${ns("border-color",j)}\n\t\t\t}\n\n\t\t\t${N} .b-blocks-audio-player-vinyl-center {\n\t\t\t\t${ns("background",j)}\n\t\t\t}\n\n\t\t\t${L}{\n\t\t\t\t${ns("color",c.color||C)}\n\t\t\t\t${os(c.bg)}\n\t\t\t\t${is(c.border)}\n\t\t\t}\n\t\t\t${ps(L,c.typo).styles}\n\t\t\t${P}{\n\t\t\t\t${ns("color",d.color||C)}\n\t\t\t\t${os(d.bg)}\n\t\t\t\t${is(d.border)}\n\t\t\t}\n\t\t\t${ps(P,d.typo).styles}\n\t\t\t${E}{ ${ns("color",u.color||C)} }\n\t\t\t${ps(E,u.typo).styles}\n\n\t\t\t${G}{\n\t\t\t\t${ns("color",w.color||C)}\n\t\t\t\t${os(w.bg)||`background:${S};`}\n\t\t\t\t${is(w.border)}\n\t\t\t}\n\n\t\t\t${V}{\n\t\t\t\t${ns("color",w.activeColor)}\n\t\t\t\t${os(w.activeBg)||`background:${T};`}\n\t\t\t}\n\n\t\t\t${Z("desktop")}\n\t\t\t${t}{ ${Z("tablet")} }\n\t\t\t${n}{ ${Z("mobile")} }\n\t\t\t${_s(o,_,i,!1)}\n\t\t\t`}})},yu=e=>{(!isFinite(e)||e<0)&&(e=0);const t=Math.floor(e),n=Math.floor(t/3600),o=Math.floor(t%3600/60),i=t%60,a=e=>String(e).padStart(2,"0");return n>0?`${n}:${a(o)}:${a(i)}`:`${o}:${a(i)}`},vu=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M8 5v14l11-7z"})}),ku=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M6 5h4v14H6zM14 5h4v14h-4z"})}),wu=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M6 6h12v12H6z"})}),_u=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M11 12l8.5 6V6L11 12zM4 6h2.5v12H4z"})}),Cu=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M13 12L4.5 6v12L13 12zM17.5 6H20v12h-2.5z"})}),ju=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M4 4v6h6M4.5 10a8 8 0 1 1-1 5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),$u=()=>(0,l.jsx)("svg",{viewBox:"0 0 640 640",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M534.6 182.6C547.1 170.1 547.1 149.8 534.6 137.3L470.6 73.3C461.4 64.1 447.7 61.4 435.7 66.4C423.7 71.4 416 83.1 416 96L416 128L256 128C150 128 64 214 64 320C64 337.7 78.3 352 96 352C113.7 352 128 337.7 128 320C128 249.3 185.3 192 256 192L416 192L416 224C416 236.9 423.8 248.6 435.8 253.6C447.8 258.6 461.5 255.8 470.7 246.7L534.7 182.7zM105.4 457.4C92.9 469.9 92.9 490.2 105.4 502.7L169.4 566.7C178.6 575.9 192.3 578.6 204.3 573.6C216.3 568.6 224 556.9 224 544L224 512L384 512C490 512 576 426 576 320C576 302.3 561.7 288 544 288C526.3 288 512 302.3 512 320C512 390.7 454.7 448 384 448L224 448L224 416C224 403.1 216.2 391.4 204.2 386.4C192.2 381.4 178.5 384.2 169.3 393.3L105.3 457.3z"})}),Su=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M5 21h14",
305 -stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})}),Tu=()=>(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[(0,l.jsx)("path",{d:"M9 18V6l10-2v12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("circle",{cx:"6",cy:"18",r:"3",stroke:"currentColor",strokeWidth:"1.6"}),(0,l.jsx)("circle",{cx:"16",cy:"16",r:"3",stroke:"currentColor",strokeWidth:"1.6"})]}),Nu="b-blocks-audio-player",Mu=({player:e,className:t=""})=>{const{playing:n,buffering:o,togglePlay:i}=e;return(0,l.jsx)("button",{type:"button",className:`${Nu}-playpause ${t}`.trim(),"aria-label":n?(0,x.__)("Pause","b-blocks"):(0,x.__)("Play","b-blocks"),"aria-pressed":n?"true":"false",onClick:i,children:o?(0,l.jsx)("span",{className:`${Nu}-spinner`,"aria-hidden":"true"}):(0,l.jsx)("span",{className:`${Nu}-icon`,"aria-hidden":"true",children:n?(0,l.jsx)(ku,{}):(0,l.jsx)(vu,{})})})},Lu=({player:e,dir:t,className:n=""})=>(0,l.jsx)("button",{type:"button",className:`${Nu}-skip ${Nu}-skip--${t<0?"prev":"next"} ${n}`.trim(),"aria-label":t<0?(0,x.__)("Previous","b-blocks"):(0,x.__)("Next","b-blocks"),onClick:()=>e.skip(t),children:t<0?(0,l.jsx)(_u,{}):(0,l.jsx)(Cu,{})}),Pu=({player:e,className:t=""})=>(0,l.jsx)("button",{type:"button",className:`${Nu}-stop ${t}`.trim(),"aria-label":(0,x.__)("Stop","b-blocks"),onClick:e.stop,children:(0,l.jsx)(wu,{})}),Eu=({player:e,className:t=""})=>(0,l.jsx)("button",{type:"button",className:`${Nu}-restart ${t}`.trim(),"aria-label":(0,x.__)("Restart","b-blocks"),onClick:e.restart,children:(0,l.jsx)(ju,{})}),Au=({player:e,className:t=""})=>(0,l.jsx)("button",{type:"button",className:`${Nu}-repeat ${e.repeat?"is-active":""} ${t}`.trim(),"aria-label":(0,x.__)("Repeat","b-blocks"),"aria-pressed":e.repeat?"true":"false",onClick:e.toggleRepeat,children:(0,l.jsx)($u,{})}),Bu=({player:e,className:t=""})=>(0,l.jsxs)("button",{type:"button",className:`${Nu}-speed ${t}`.trim(),"aria-label":(0,x.__)("Playback speed","b-blocks"),onClick:e.cycleSpeed,children:[e.speed,"x"]}),Iu=({player:e,className:t=""})=>{const{seekingRef:n,currentTime:o,duration:i,seekTo:a}=e,[s,r]=(0,m.useState)(null),c=(0,m.useRef)(null),d=(0,m.useRef)(a);c.current=s,d.current=a;const u=null!==s?s:o,p=i>0?Math.min(100,u/i*100):0;return(0,m.useEffect)((()=>{const e=()=>{if(null===c.current)return;const e=c.current;n.current=!1,r(null),d.current(e)};return window.addEventListener("pointerup",e),window.addEventListener("mouseup",e),window.addEventListener("touchend",e),window.addEventListener("pointercancel",e),()=>{window.removeEventListener("pointerup",e),window.removeEventListener("mouseup",e),window.removeEventListener("touchend",e),window.removeEventListener("pointercancel",e)}}),[n]),(0,l.jsx)("input",{type:"range",className:`${Nu}-seek ${t}`.trim(),min:"0",max:i||0,step:"0.1",value:u,"aria-label":(0,x.__)("Seek","b-blocks"),"aria-valuemin":"0","aria-valuemax":Math.floor(i),"aria-valuenow":Math.floor(u),"aria-valuetext":yu(u),style:{"--b-blocks-audio-player-var-progress":`${p}%`},onPointerDown:()=>{n.current=!0},onChange:e=>{n.current=!0,r(parseFloat(e.target.value)||0)},onKeyUp:e=>{const t=parseFloat(e.currentTarget.value)||0;n.current=!1,r(null),a(t)}})},Ou=({player:e,className:t=""})=>(0,l.jsx)("input",{type:"range",className:`${Nu}-volume ${t}`.trim(),min:"0",max:"1",step:"0.01",value:e.muted?0:e.volume,"aria-label":(0,x.__)("Volume","b-blocks"),style:{"--b-blocks-audio-player-var-progress":100*(e.muted?0:e.volume)+"%"},onChange:t=>e.setVol(t.target.value)}),Ru=({player:e,remaining:t=!1,className:n=""})=>{const{currentTime:o,duration:i}=e;return t?(0,l.jsxs)("span",{className:`${Nu}-time ${n}`.trim(),"aria-hidden":"true",children:["-",yu(Math.max(0,i-o))]}):(0,l.jsxs)("span",{className:`${Nu}-time ${n}`.trim(),"aria-hidden":"true",children:[(0,l.jsx)("span",{className:`${Nu}-current`,children:yu(o)}),(0,l.jsx)("span",{className:`${Nu}-sep`,children:" / "}),(0,l.jsx)("span",{className:`${Nu}-duration`,children:yu(i)})]})},zu=({url:e,className:t=""})=>(0,l.jsxs)("a",{className:`${Nu}-download ${t}`.trim(),href:e,download:!0,"aria-label":(0,x.__)("Download audio","b-blocks"),children:[(0,l.jsx)(Su,{}),(0,l.jsx)("span",{className:"screen-reader-text",children:(0,x.__)("Download audio","b-blocks")})]}),Du="b-blocks-audio-player",Fu=({track:e})=>e.title||e.artist?(0,l.jsxs)("div",{className:`${Du}-meta`,children:[e.title?(0,l.jsx)("p",{className:`${Du}-title`,children:e.title}):null,e.artist?(0,l.jsx)("p",{className:`${Du}-artist`,children:e.artist}):null]}):null,Hu=({track:e,className:t=""})=>(0,l.jsx)("div",{className:`${Du}-art ${t}`.trim(),children:e.art?(0,l.jsx)("img",{className:`${Du}-art-img`,src:e.art,alt:"",loading:"lazy",decoding:"async"}):(0,l.jsx)("span",{className:`${Du}-art-placeholder`,"aria-hidden":"true",children:(0,l.jsx)(Tu,{})})}),Wu=e=>{const t=43758.5453*Math.sin(12.9898*e);return 18+42*(t-Math.floor(t))},Uu=new WeakMap,Gu=({player:e})=>{const t=(0,m.useRef)([]),n=(0,m.useRef)(0),{playing:o,audioRef:i,url:a}=e,s=()=>{for(let e=0;e<t.current.length;e++){const n=t.current[e];n&&(n.style.height=`${Wu(e)}%`)}};return(0,m.useEffect)((()=>{s()}),[]),(0,m.useEffect)((()=>{const e=i.current;if(!o||!e)return void s();const a=(e=>{if(Uu.has(e))return Uu.get(e);let t=null;try{const n=window.AudioContext||window.webkitAudioContext;if(n){const o=new n,i=o.createMediaElementSource(e),a=o.createAnalyser();a.fftSize=128,a.smoothingTimeConstant=.75,i.connect(a),a.connect(o.destination),t={ctx:o,analyser:a,data:new Uint8Array(a.frequencyBinCount)}}}catch(e){t=null}return Uu.set(e,t),t})(e);if(!a)return void s();"suspended"===a.ctx.state&&a.ctx.resume();const{analyser:r,data:l}=a,c=l.length,d=()=>{r.getByteFrequencyData(l);for(let e=0;e<56;e++){const n=t.current[e];if(!n)continue;const o=Math.min(c-1,Math.floor((e/56)**.85*c)),i=l[o]/255;n.style.height=8+92*i+"%"}n.current=requestAnimationFrame(d)};return n.current=requestAnimationFrame(d),()=>cancelAnimationFrame(n.current)}),[o,a]),(0,l.jsx)("div",{className:`${Du}-bars`,"aria-hidden":"true",children:Array.from({length:56}).map(((n,o)=>(0,l.jsx)("span",{ref:e=>{t.current[o]=e},className:`${Du}-bar${o/56*100<=e.seekPct?" is-played":""}`},o)))})},Vu=({attributes:e,isBackend:t=!1})=>{const{layout:n={},behavior:o={},timecode:i={}}=e,a=((e,t=!1)=>{const{behavior:n={}}=e,{autoPlay:o=!1,loop:i=!1,skipSeconds:a=10,speeds:s=[1,1.25,1.5,2]}=n,r=(0,m.useMemo)((()=>(e=>{const{audio:t={},tracks:n=[]}=e,o=(Array.isArray(n)?n:[]).map((e=>({url:e?.url||"",title:e?.title||"",artist:e?.artist||"",art:e?.art?.url||""}))).filter((e=>e.url));return o.length?o:[{url:t.url||"",title:t.trackTitle||"",artist:t.artistName||"",art:t.albumArt?.url||""}]})(e)),[e]),l=r.length>1,c=(0,m.useRef)(null),d=(0,m.useRef)(!1),u=(0,m.useRef)(!1),p=(0,m.useRef)(0),h=(0,m.useRef)(""),g=(0,m.useRef)(!1),[b,f]=(0,m.useState)({}),[x,y]=(0,m.useState)(0),[v,k]=(0,m.useState)(!1),[w,_]=(0,m.useState)(!1),[C,j]=(0,m.useState)(0),[$,S]=(0,m.useState)(0),[T,N]=(0,m.useState)(1),[M,L]=(0,m.useState)(!1),[P,E]=(0,m.useState)(1),[A,B]=(0,m.useState)(!!i),I=r[Math.min(x,r.length-1)]||{},O=I.url||"",[R,z]=(0,m.useState)(O);(0,m.useEffect)((()=>{if(z(O),!O||"undefined"==typeof fetch)return;let e=!1;return fetch(O).then((e=>e.ok?e.blob():Promise.reject(e.status))).then((t=>{if(e)return;const n=URL.createObjectURL(t),o=c.current;o&&(p.current=o.currentTime||0,u.current=!o.paused),h.current&&URL.revokeObjectURL(h.current),h.current=n,z(n)})).catch((()=>{})),()=>{e=!0}}),[O]),(0,m.useEffect)((()=>()=>{h.current&&URL.revokeObjectURL(h.current)}),[]),(0,m.useEffect)((()=>{if("undefined"==typeof window||"undefined"==typeof Audio||!r||!r.length)return;const e=[];return r.forEach((t=>{if(!t.url)return;const n=new Audio;n.preload="metadata";const o=()=>{isFinite(n.duration)&&n.duration>0&&f((e=>({...e,[t.url]:n.duration})))};n.addEventListener("loadedmetadata",o),n.src=t.url,e.push({
306 -audio:n,onMeta:o})})),()=>{e.forEach((({audio:e,onMeta:t})=>{e.removeEventListener("loadedmetadata",t)}))}}),[r]),(0,m.useEffect)((()=>{const e=c.current;if(!e)return;const t=()=>k(!0),n=()=>k(!1),o=()=>{if(e.duration===1/0){g.current=!0;try{e.currentTime=1e101}catch(e){}return}const t=isFinite(e.duration)?e.duration:0;if(t>0&&(j(t),O&&f((e=>({...e,[O]:t})))),g.current||p.current>0){g.current=!1;const t=p.current||0;p.current=0;try{e.currentTime=t}catch(e){}S(t)}if(u.current){u.current=!1;const t=e.play();t&&"function"==typeof t.catch&&t.catch((()=>k(!1)))}},i=()=>{d.current||g.current||S(e.currentTime||0)},a=()=>_(!0),s=()=>{_(!1),k(!0)},h=()=>_(!1),m=()=>{N(e.volume),L(e.muted)},b=()=>{if(A&&!l)return e.currentTime=0,void e.play().catch((()=>{}));l&&x<r.length-1?y((e=>e+1)):l&&A?y(0):k(!1)};return e.addEventListener("play",t),e.addEventListener("pause",n),e.addEventListener("loadedmetadata",o),e.addEventListener("durationchange",o),e.addEventListener("timeupdate",i),e.addEventListener("waiting",a),e.addEventListener("playing",s),e.addEventListener("canplay",h),e.addEventListener("volumechange",m),e.addEventListener("ended",b),e.playbackRate=P,e.readyState>=1&&o(),()=>{e.removeEventListener("play",t),e.removeEventListener("pause",n),e.removeEventListener("loadedmetadata",o),e.removeEventListener("durationchange",o),e.removeEventListener("timeupdate",i),e.removeEventListener("waiting",a),e.removeEventListener("playing",s),e.removeEventListener("canplay",h),e.removeEventListener("volumechange",m),e.removeEventListener("ended",b)}}),[O,A,l,x,r.length]),(0,m.useEffect)((()=>{c.current&&(c.current.playbackRate=P)}),[P,O]);const D=(0,m.useRef)(!1);(0,m.useEffect)((()=>{const e=c.current;e&&(D.current||!o||t||(D.current=!0,e.muted=!0,e.play().catch((()=>{}))))}),[o,t,O]);const F=()=>{const e=c.current;if(!e)return;const t=e.play();t&&"function"==typeof t.catch&&t.catch((()=>k(!1)))},H=()=>{const e=c.current;e&&(e.paused||e.ended?F():c.current&&c.current.pause())},W=e=>{let t=parseFloat(e);if(Number.isNaN(t))return null;const n=c.current,o=(n&&isFinite(n.duration)?n.duration:0)||C||b[O]||0;return o>0&&(t=Math.min(t,o)),Math.max(0,t)},U=e=>{const t=W(e);if(null===t)return;S(t);const n=c.current;if(n)try{n.currentTime=t}catch(e){}},G=e=>{const t=(e%r.length+r.length)%r.length;t!==x?(u.current=!0,y(t),S(0)):H()},V=C||b[O]||0;return{audioRef:c,seekingRef:d,mediaSrc:R,list:r,index:x,multi:l,track:I,url:O,playing:v,buffering:w,duration:V,durations:b,currentTime:$,volume:T,muted:M,speed:P,repeat:A,seekPct:V>0?$/V*100:0,togglePlay:H,stop:()=>{const e=c.current;e&&(e.pause(),e.currentTime=0,S(0))},restart:()=>{const e=c.current;e&&(e.currentTime=0,S(0),F())},skip:e=>{if(l)return void G(x+e);const t=c.current;if(!t)return;const n=Math.min(Math.max(0,(t.currentTime||0)+e*a),t.duration||0);U(n)},seekTo:U,previewTime:e=>{const t=W(e);null!==t&&S(t)},playIndex:G,setVol:e=>{const t=c.current,n=Math.min(1,Math.max(0,parseFloat(e)||0));N(n),t&&(t.volume=n,n>0&&(t.muted=!1))},toggleMute:()=>{const e=c.current;e&&(e.muted=!e.muted)},cycleSpeed:()=>{const e=s&&s.length?s:[1],t=e.indexOf(P);E(e[(t+1)%e.length])},toggleRepeat:()=>B((e=>!e))}})(e,t),{url:s,track:r,list:c,index:d,playing:u}=a,p=n.style||"bar",h="left"===i.position,g=!1!==o.showSeek,b=!1!==o.showSkip,f=!1!==o.showTimecode,y=!1!==o.showVolume,v=!1!==o.showDownload,k=!!o.showRestart,w=!!o.showStop,_=!!o.showRepeat,C=!!o.showSpeed,j=!!o.showRemaining,$=[Du,`${Du}--style-${p}`,`${Du}--align-${n.alignment||"left"}`,u?"is-playing":""].filter(Boolean).join(" ");if(!s)return(0,l.jsx)("div",{className:$,children:(0,l.jsxs)("div",{className:`${Du}-empty`,children:[(0,l.jsx)("span",{className:`${Du}-empty-icon`,"aria-hidden":"true",children:(0,l.jsx)(Tu,{})}),(0,l.jsx)("span",{className:`${Du}-empty-title`,children:(0,x.__)("No audio selected","b-blocks")}),(0,l.jsx)("span",{className:`${Du}-empty-text`,children:(0,x.__)("Add an audio file to start playing.","b-blocks")})]})});const S=(0,l.jsx)("audio",{ref:a.audioRef,className:`${Du}-audio`,preload:"metadata",src:a.mediaSrc||s,children:(0,x.__)("Your browser does not support the audio element.","b-blocks")}),T=(e=null)=>(0,l.jsxs)("div",{className:`${Du}-transport`,children:[k?(0,l.jsx)(Eu,{player:a}):null,b?(0,l.jsx)(Lu,{player:a,dir:-1}):null,(0,l.jsx)(Mu,{player:a}),b?(0,l.jsx)(Lu,{player:a,dir:1}):null,w?(0,l.jsx)(Pu,{player:a}):null,_?(0,l.jsx)(Au,{player:a}):null,e]}),N=f?(0,l.jsx)(Ru,{player:a}):null,M=(0,l.jsxs)("div",{className:`${Du}-controls`,children:[T(),h?N:null,g?(0,l.jsx)("div",{className:`${Du}-seek-wrap`,children:(0,l.jsx)(Iu,{player:a})}):null,h?null:N,j?(0,l.jsx)(Ru,{player:a,remaining:!0}):null,C?(0,l.jsx)(Bu,{player:a}):null,y?(0,l.jsx)(Ou,{player:a}):null,v?(0,l.jsx)(zu,{url:s}):null]});let L;return"bar"===p||"card"===p?L=(0,l.jsxs)("div",{className:`${Du}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:["card"===p?(0,l.jsx)(Hu,{track:r}):null,(0,l.jsxs)("div",{className:`${Du}-body`,children:[(0,l.jsx)(Fu,{track:r}),M]})]}):"bars"===p?L=(0,l.jsxs)("div",{className:`${Du}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[(0,l.jsx)(Fu,{track:r}),(0,l.jsxs)("div",{className:`${Du}-wave-seek`,children:[(0,l.jsx)(Gu,{player:a}),(0,l.jsx)(Iu,{player:a,className:`${Du}-seek--overlay`})]}),(0,l.jsxs)("div",{className:`${Du}-controls`,children:[T(),h&&f?(0,l.jsx)(Ru,{player:a,className:`${Du}-time--current`,remaining:!1}):null,g?(0,l.jsx)("div",{className:`${Du}-seek-wrap`,children:(0,l.jsx)(Iu,{player:a})}):null,!h&&f?(0,l.jsx)(Ru,{player:a,className:`${Du}-time--current`,remaining:!1}):null,y?(0,l.jsx)(Ou,{player:a}):null,j?(0,l.jsx)(Ru,{player:a,remaining:!0}):null,C?(0,l.jsx)(Bu,{player:a}):null,v?(0,l.jsx)(zu,{url:s}):null]})]}):"vinyl"===p?L=(0,l.jsxs)("div",{className:`${Du}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[(0,l.jsxs)("div",{className:`${Du}-vinyl`,children:[(0,l.jsxs)("div",{className:`${Du}-vinyl-disc`,children:[r.art?(0,l.jsx)("img",{className:`${Du}-vinyl-art`,src:r.art,alt:""}):null,(0,l.jsx)("span",{className:`${Du}-vinyl-center`})]}),(0,l.jsxs)("div",{className:`${Du}-vinyl-arm`,"aria-hidden":"true",children:[(0,l.jsx)("span",{className:`${Du}-vinyl-arm-base`}),(0,l.jsx)("span",{className:`${Du}-vinyl-arm-stick`}),(0,l.jsx)("span",{className:`${Du}-vinyl-arm-head`})]})]}),(0,l.jsxs)("div",{className:`${Du}-body`,children:[r.title?(0,l.jsx)("p",{className:`${Du}-title ${Du}-title--pill`,children:r.title}):null,g?(0,l.jsx)("div",{className:`${Du}-seek-wrap`,children:(0,l.jsx)(Iu,{player:a})}):null,T(),(0,l.jsxs)("div",{className:`${Du}-vinyl-row`,children:[f?(0,l.jsxs)("span",{className:`${Du}-time ${Du}-time--pill`,"aria-hidden":"true",children:[yu(a.currentTime)," / ",yu(a.duration)]}):null,j?(0,l.jsx)(Ru,{player:a,remaining:!0,className:`${Du}-time--pill`}):null,y?(0,l.jsx)(Ou,{player:a}):null]})]}),v?(0,l.jsx)(zu,{url:s}):null]}):"coverflow"===p?L=(0,l.jsxs)("div",{className:`${Du}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[v?(0,l.jsx)(zu,{url:s}):null,(0,l.jsx)("div",{className:`${Du}-coverflow`,children:c.map(((e,t)=>{const n=t-d;return Math.abs(n)>2?null:(0,l.jsx)("button",{type:"button",className:`${Du}-cover ${Du}-cover--pos${n}`,"aria-label":e.title||(0,x.__)("Track","b-blocks"),"aria-current":0===n?"true":void 0,onClick:()=>a.playIndex(t),children:e.art?(0,l.jsx)("img",{src:e.art,alt:""}):(0,l.jsx)("span",{className:`${Du}-art-placeholder`,"aria-hidden":"true",children:(0,l.jsx)(Tu,{})})},t)}))}),(0,l.jsx)(Fu,{track:r}),(0,l.jsxs)("div",{className:`${Du}-controls`,children:[f?(0,l.jsx)("span",{className:`${Du}-current`,children:yu(a.currentTime)}):null,g?(0,l.jsx)("div",{className:`${Du}-seek-wrap`,children:(0,l.jsx)(Iu,{player:a})}):null,f?(0,l.jsx)("span",{className:`${Du}-duration`,children:yu(a.duration)}):null,j?(0,l.jsx)(Ru,{player:a,remaining:!0}):null]}),T()]
307 -}):"playlist"===p&&(L=(0,l.jsxs)("div",{className:`${Du}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[v?(0,l.jsx)(zu,{url:s}):null,(0,l.jsxs)("div",{className:`${Du}-nowplaying`,children:[f?(0,l.jsx)("span",{className:`${Du}-current`,children:yu(a.currentTime)}):null,r.title?(0,l.jsx)("span",{className:`${Du}-np-title`,children:r.title}):null,f?(0,l.jsx)("span",{className:`${Du}-duration`,children:yu(a.duration)}):null,j?(0,l.jsx)(Ru,{player:a,remaining:!0}):null]}),g?(0,l.jsx)("div",{className:`${Du}-seek-wrap`,children:(0,l.jsx)(Iu,{player:a})}):null,T(),y?(0,l.jsx)("div",{className:`${Du}-volume-row`,children:(0,l.jsx)(Ou,{player:a})}):null,(0,l.jsx)("ul",{className:`${Du}-list`,children:c.map(((e,t)=>{const n=t===d&&a.duration>0?a.duration:a.durations?.[e.url]||e.duration||0,o=()=>t===d?a.togglePlay():a.playIndex(t);return(0,l.jsxs)("li",{className:`${Du}-list-item ${t===d?"is-active":""}`.trim(),onClick:o,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o())},role:"button",tabIndex:0,"aria-label":e.title||`${(0,x.__)("Track","b-blocks")} ${t+1}`,children:[(0,l.jsx)("button",{type:"button",className:`${Du}-list-play`,"aria-hidden":"true",tabIndex:-1,onClick:e=>{e.stopPropagation(),o()},children:t===d&&u?(0,l.jsx)(ku,{}):(0,l.jsx)(vu,{})}),(0,l.jsx)("span",{className:`${Du}-list-title`,children:e.title||`${(0,x.__)("Track","b-blocks")} ${t+1}`}),(0,l.jsx)("span",{className:`${Du}-list-time`,children:yu(n)})]},t)}))})]})),(0,l.jsxs)("div",{className:$,children:[S,L]})},qu=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],Yu={top:"",right:"",bottom:"",left:""},Ku=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Qu=[{label:(0,x.__)("Bar (compact)","b-blocks"),value:"bar"},{label:(0,x.__)("Card (album art top)","b-blocks"),value:"card"},{label:(0,x.__)("Sound Bars","b-blocks"),value:"bars"},{label:(0,x.__)("Vinyl (spinning record)","b-blocks"),value:"vinyl"},{label:(0,x.__)("Coverflow (multi-track)","b-blocks"),value:"coverflow"},{label:(0,x.__)("Playlist (multi-track)","b-blocks"),value:"playlist"}],Zu=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Xu={url:"",id:0,title:"",artist:"",art:{url:"",id:0}},Ju=({attributes:e,setAttributes:t,index:n})=>{const o=e?.tracks||[],i=o[n]||Xu,a=e=>{const i=[...o];i[n]={...Xu,...i[n],...e},t({tracks:i})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Audio:","b-blocks")}),(0,l.jsx)(ve,{value:i.url||"",types:["audio"],onChange:e=>a({url:e||"",id:0}),placeholder:(0,x.__)("Audio URL","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Title","b-blocks"),value:i.title||"",onChange:e=>a({title:e}),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Artist","b-blocks"),value:i.artist||"",onChange:e=>a({artist:e}),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Album Art:","b-blocks")}),(0,l.jsx)(ve,{value:i.art?.url||"",types:["image"],onChange:e=>a({art:{url:e||"",id:0}}),placeholder:(0,x.__)("Art URL","b-blocks")})]})},ep={url:"",id:0,title:"",artist:"",art:{url:"",id:0}},tp=({attributes:e,updateObj:t,setAttributes:n,device:o="desktop",activeIndex:i,setActiveIndex:a})=>{const{behavior:s={},layout:r={}}=e,{autoPlay:c,loop:d,showDownload:u,showTimecode:p,showVolume:h,showSkip:g,skipSeconds:m=10,showRestart:b,showStop:f,showRepeat:k,showSpeed:w,showRemaining:C,showSeek:j}=s,$="playlist"===r.style||"coverflow"===r.style,S=r.maxWidth||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tracks (playlist / coverflow)","b-blocks"),initialOpen:!1,children:[!$&&(0,l.jsx)(y.Notice,{status:"info",isDismissible:!1,children:(0,x.__)("The track list is used by the Playlist and Coverflow themes. Other themes play the single Audio file above.","b-blocks")}),(0,l.jsx)(_a,{attributes:e,setAttributes:n,arrKey:"tracks",newItem:ep,itemLabel:"Track",title:"title",design:"sortable",minItem:0,activeIndex:i,setActiveIndex:a,ItemSettings:Ju})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:r.style||"bar",options:Qu,onChange:e=>t("layout",e,"style"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Alignment:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:r.alignment,onChange:e=>t("layout",e,"alignment"),children:Zu.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:`editor-align${e.value}`},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:S?.[o],units:qu,onChange:e=>{const t=S&&"object"==typeof S?S:{};n({layout:{...r,maxWidth:{...t,[o]:e}}})},__next40pxDefaultSize:!0})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Controls","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Skip / Prev-Next","b-blocks"),checked:!1!==g,onChange:e=>t("behavior",!!e,"showSkip")}),!1!==g&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Skip seconds","b-blocks"),value:m,onChange:e=>t("behavior",e,"skipSeconds"),min:5,max:60,step:5,__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Restart","b-blocks"),checked:!!b,onChange:e=>t("behavior",!!e,"showRestart")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Stop","b-blocks"),checked:!!f,onChange:e=>t("behavior",!!e,"showStop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Repeat","b-blocks"),checked:!!k,onChange:e=>t("behavior",!!e,"showRepeat")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Playback Speed","b-blocks"),checked:!!w,onChange:e=>t("behavior",!!e,"showSpeed")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Seek Bar / Progress","b-blocks"),checked:!1!==j,onChange:e=>t("behavior",!!e,"showSeek")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Timecode","b-blocks"),checked:!1!==p,onChange:e=>t("behavior",!!e,"showTimecode")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Remaining Time","b-blocks"),checked:!!C,onChange:e=>t("behavior",!!e,"showRemaining")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Volume Slider","b-blocks"),checked:!1!==h,onChange:e=>t("behavior",!!e,"showVolume")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Download Link","b-blocks"),checked:!1!==u,onChange:e=>t("behavior",!!e,"showDownload")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Autoplay","b-blocks"),checked:!!c,onChange:e=>t("behavior",!!e,"autoPlay")}),c&&(0,l.jsx)(y.Notice,{status:"warning",isDismissible:!1,children:(0,x.__)("Most browsers block autoplay with sound; the player starts muted. The visitor must interact to hear audio.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Loop","b-blocks"),checked:!!d,onChange:e=>t("behavior",!!e,"loop")})]})]})},np=({player:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Player Container","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(An,{label:(0,
308 -x.__)("Background","b-blocks"),value:e.bg,onChange:e=>t("player",e,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("player",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("player",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("player",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("player",e,"borderRadius",n)})]}),op=({colors:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Color Palette","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Controls & Text","b-blocks"),value:e.control,onChange:e=>t("colors",e,"control")}),(0,l.jsx)(Ue,{label:(0,x.__)("Accent Color","b-blocks"),value:e.accent,onChange:e=>t("colors",e,"accent")}),(0,l.jsx)(Ue,{label:(0,x.__)("Playlist Row","b-blocks"),value:e.track,onChange:e=>t("colors",e,"track")}),(0,l.jsx)(Ue,{label:(0,x.__)("Playlist Active Row","b-blocks"),value:e.trackActive,onChange:e=>t("colors",e,"trackActive")})]}),ip=({buttonStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("All Buttons (Global)","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color","b-blocks"),value:e.color,onChange:e=>t("buttonStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:e.bg,onChange:e=>t("buttonStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color","b-blocks"),value:e.hoverColor,onChange:e=>t("buttonStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background","b-blocks"),value:e.hoverBg,onChange:e=>t("buttonStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:qu,onChange:e=>t("buttonStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("buttonStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("buttonStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("buttonStyle",e,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("buttonStyle",e,"borderRadius",n)})]}),ap=({playBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Play / Pause Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color,onChange:e=>t("playBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("playBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor,onChange:e=>t("playBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("playBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:qu,onChange:e=>t("playBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("playBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("playBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("playBtnStyle",e,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("playBtnStyle",e,"borderRadius",n)})]}),sp=({skipBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Skip Buttons (Next / Prev)","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("skipBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("skipBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("skipBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("skipBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:qu,onChange:e=>t("skipBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("skipBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("skipBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("skipBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("skipBtnStyle",e,"borderRadius",n)})]}),rp=({restartBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Restart Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("restartBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("restartBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("restartBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("restartBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,
309 -x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:qu,onChange:e=>t("restartBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("restartBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("restartBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("restartBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("restartBtnStyle",e,"borderRadius",n)})]}),lp=({repeatBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Repeat Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("repeatBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("repeatBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("repeatBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("repeatBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:qu,onChange:e=>t("repeatBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("repeatBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("repeatBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("repeatBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("repeatBtnStyle",e,"borderRadius",n)})]}),cp=({stopBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Stop Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("stopBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("stopBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("stopBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("stopBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:qu,onChange:e=>t("stopBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("stopBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("stopBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("stopBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("stopBtnStyle",e,"borderRadius",n)})]}),dp=({speedBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Speed Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("speedBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("speedBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("speedBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("speedBtnStyle",e,"hoverBg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("speedBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("speedBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("speedBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("speedBtnStyle",e,"borderRadius",n)})]}),up=({volumeStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Volume Control","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Track Color","b-blocks"),value:e.trackColor,onChange:e=>t("volumeStyle",e,"trackColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Fill Color","b-blocks"),value:e.fillColor,onChange:e=>t("volumeStyle",e,"fillColor")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("volumeStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("volumeStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("volumeStyle",e,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("volumeStyle",e,"borderRadius",n)})]}),pp=({downloadStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Download Link","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",
310 -onChange:e=>t("downloadStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("downloadStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("downloadStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("downloadStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:qu,onChange:e=>t("downloadStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("downloadStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("downloadStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("downloadStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("downloadStyle",e,"borderRadius",n)})]}),hp=({seekStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Seek Bar / Progress","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Track Color","b-blocks"),value:e.trackColor,onChange:e=>t("seekStyle",e,"trackColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Progress Fill Color","b-blocks"),value:e.fillColor,onChange:e=>t("seekStyle",e,"fillColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Track Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.trackSize?.[n],units:qu,onChange:e=>t("seekStyle",e,"trackSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Progress Fill Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.fillSize?.[n],units:qu,onChange:e=>t("seekStyle",e,"fillSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("seekStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("seekStyle",e,"borderRadius",n)})]}),gp=({title:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Track Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:e.color||"#ffffff",onChange:e=>t("title",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("title",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("title",e,"typo")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("title",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("title",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("title",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("title",e,"borderRadius",n)})]}),mp=({artist:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Artist","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:e.color||"#ffffff",onChange:e=>t("artist",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("artist",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("artist",e,"typo")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.margin?.[n],resetValues:Yu,onChange:e=>t("artist",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.padding?.[n],resetValues:Yu,onChange:e=>t("artist",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("artist",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("artist",e,"borderRadius",n)})]}),bp=({timecode:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Timecode","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:e.position,onChange:e=>t("timecode",e,"position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Left","b-blocks"),value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Right","b-blocks"),value:"right"})]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color:","b-blocks"),value:e.color,onChange:e=>t("timecode",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("timecode",e,"typo")})]}),fp=({playlistStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Playlist Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Item Background:","b-blocks"),value:e.bg,onChange:e=>t("playlistStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Item Color:","b-blocks"),value:e.color,onChange:e=>t("playlistStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Active Background:","b-blocks"),value:e.activeBg,onChange:e=>t("playlistStyle",e,"activeBg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Active Color:","b-blocks"),value:e.activeColor,onChange:e=>t("playlistStyle",e,"activeColor")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Item Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.itemPadding?.[n],resetValues:Yu,onChange:e=>t("playlistStyle",e,"itemPadding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Item Border","b-blocks"),value:e.border,onChange:e=>t("playlistStyle",e,"border"),withSlider:!0,
311 -__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Item Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:qu,values:e.borderRadius?.[n],resetValues:Yu,onChange:e=>t("playlistStyle",e,"borderRadius",n)})]}),xp=({attributes:e,updateObj:t,device:n="desktop"})=>{const{layout:o={},behavior:i={},player:a={},colors:s={},title:r={},artist:c={},timecode:d={},buttonStyle:u={},playBtnStyle:p={},skipBtnStyle:h={},restartBtnStyle:g={},repeatBtnStyle:m={},stopBtnStyle:b={},speedBtnStyle:f={},volumeStyle:x={},downloadStyle:y={},seekStyle:v={},playlistStyle:k={}}=e,w={skip:!1!==i.showSkip,restart:!!i.showRestart,stop:!!i.showStop,repeat:!!i.showRepeat,speed:!!i.showSpeed,volume:!1!==i.showVolume,download:!1!==i.showDownload,seek:!1!==i.showSeek,timecode:!1!==i.showTimecode||!!i.showRemaining,playlist:"playlist"===o.style};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(np,{player:a,updateObj:t,device:n}),(0,l.jsx)(op,{colors:s,updateObj:t}),(0,l.jsx)(ip,{buttonStyle:u,updateObj:t,device:n}),(0,l.jsx)(ap,{playBtnStyle:p,updateObj:t,device:n}),w.skip&&(0,l.jsx)(sp,{skipBtnStyle:h,updateObj:t,device:n}),w.restart&&(0,l.jsx)(rp,{restartBtnStyle:g,updateObj:t,device:n}),w.repeat&&(0,l.jsx)(lp,{repeatBtnStyle:m,updateObj:t,device:n}),w.stop&&(0,l.jsx)(cp,{stopBtnStyle:b,updateObj:t,device:n}),w.speed&&(0,l.jsx)(dp,{speedBtnStyle:f,updateObj:t,device:n}),w.volume&&(0,l.jsx)(up,{volumeStyle:x,updateObj:t,device:n}),w.download&&(0,l.jsx)(pp,{downloadStyle:y,updateObj:t,device:n}),w.seek&&(0,l.jsx)(hp,{seekStyle:v,updateObj:t,device:n}),(0,l.jsx)(gp,{title:r,updateObj:t,device:n}),(0,l.jsx)(mp,{artist:c,updateObj:t,device:n}),w.timecode&&(0,l.jsx)(bp,{timecode:d,updateObj:t,device:n}),w.playlist&&(0,l.jsx)(fp,{playlistStyle:k,updateObj:t,device:n})]})},yp=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Ku,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(tp,{...e}),"style"===t.name&&(0,l.jsx)(xp,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},vp=()=>(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[(0,l.jsx)("path",{d:"M9 18V6l10-2v12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("circle",{cx:"6",cy:"18",r:"3",stroke:"currentColor",strokeWidth:"1.6"}),(0,l.jsx)("circle",{cx:"16",cy:"16",r:"3",stroke:"currentColor",strokeWidth:"1.6"})]}),kp=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{layout:i={},audio:a={},tracks:s=[]}=t,[r,c]=(0,Qa.useState)(0),d="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,u=fe(t,n),p=(0,h.useBlockProps)({id:`block-${o}`}),g=!(!a.url&&!s.some((e=>e?.url)));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(yp,{...e,updateObj:u,isPremium:d,activeIndex:r,setActiveIndex:c}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:i.alignment,onChange:e=>u("layout",e,"alignment")})}),(0,l.jsxs)("div",{...p,children:[(0,l.jsx)(xu,{attributes:t,id:`block-${o}`,isBackend:!0}),g?(0,l.jsx)(Vu,{attributes:t,isBackend:!0}):(0,l.jsxs)("div",{className:"b-blocks-audio-player-placeholder",children:[(0,l.jsx)("span",{className:"b-blocks-audio-player-placeholder-icon","aria-hidden":"true",children:(0,l.jsx)(vp,{})}),(0,l.jsx)("h4",{className:"b-blocks-audio-player-placeholder-title",children:(0,x.__)("Audio Player","b-blocks")}),(0,l.jsx)("p",{className:"b-blocks-audio-player-placeholder-text",children:(0,x.__)("Upload an audio file or pick one from your media library.","b-blocks")}),(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["audio"],value:a.id,onSelect:e=>n({audio:{...a,url:e?.url||"",id:e?.id||0,trackTitle:a.trackTitle||e?.title||""}}),render:({open:e})=>(0,l.jsx)(y.Button,{variant:"primary",icon:"upload",onClick:e,children:(0,x.__)("Select Audio","b-blocks")})})})]})]})]})}));Ll(bu.name)&&(0,p.registerBlockType)(bu,{icon:pl,edit:kp,save:()=>null})
312 -;const _p=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/blockquote","title":"Blockquote","category":"bBlocks","description":"Styled blockquote with an accent bar or large decorative quote-mark, optional author photo, name, and role — the designer alternative to the core Quote block.","keywords":["blockquote","quote","pullquote","indent","testimonial","citation","author"],"textdomain":"b-blocks","attributes":{"quote":{"type":"object","default":{"text":"The details are not the details. They make the design.","color":"","bg":{"type":"solid","color":""},"typography":{"fontSize":{"desktop":"20px","tablet":"","mobile":""}},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""}}},"authorName":{"type":"object","default":{"text":"Charles Eames","color":"","typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":600},"bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"authorRole":{"type":"object","default":{"text":"","show":true,"color":"","typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"avatar":{"type":"object","default":{"show":true,"id":0,"url":"","alt":"","size":"48px","shape":"circle","bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"layout":{"type":"object","default":{"type":"border","alignment":"left"}},"icon":{"type":"object","default":{"color":"#6366f1","size":"48px","align":"left","bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"15px","right":"15px","bottom":"15px","left":"15px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"color":"#6366f1","style":"solid","width":"4px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":["file:./view.css"],"viewScript":"file:./view.js","render":"file:./render.php"}'),Cp=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],jp=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],$p=[{label:(0,x.__)("Border — left accent bar","b-blocks"),value:"border"},{label:(0,x.__)("Quotation — large decorative mark","b-blocks"),value:"quotation"}],Sp=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Tp=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"},{label:(0,x.__)("Square","b-blocks"),value:"square"}],Np=(e={})=>`\n\t${os(e.bg)}\n\t${ns("padding",hs(e.padding))}\n\t${ns("margin",hs(e.margin))}\n\t${is(e.border)}\n\t${ns("border-radius",hs(e.borderRadius))}\n`,Mp=({attributes:e,id:t,isBackend:n=!1})=>{const{quote:o={},authorName:i={},authorRole:a={},avatar:s={},icon:r={},advanced:c}=e,{color:d,bg:u={},typography:p={},padding:h={},margin:g={},border:m={},borderRadius:b={}}=o,{color:f,typography:x={}}=i,{color:y,typography:v={}}=a,{size:k,shape:w}=s,{color:_,size:C,align:j}=r,$="circle"===w?"50%":"rounded"===w?"12px":"0",S="center"===j?"center":"right"===j?"flex-end":"flex-start",T=C||"48px",N=`#${t} .bBlocks-blockquote-wrapper`,M=`${N} .bBlocks-blockquote-quote`,L=`${N} .bBlocks-blockquote-avatar`,P=`${N} .bBlocks-blockquote-author`,E=`${N} .bBlocks-blockquote-role`,A=`${N} .bBlocks-blockquote-icon`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",p).googleFontLink}\n\t\t\t${ps("",x).googleFontLink}\n\t\t\t${ps("",v).googleFontLink}\n\t\t\t${A}{\n\t\t\t\t${ns("width",T)}\n\t\t\t\t${ns("height",T)}\n\t\t\t\t${ns("color",_)}\n\t\t\t\talign-self: ${S};\n\t\t\t\t${Np(r)}\n\t\t\t}\n\t\t\t${ps(M,p).styles}\n\t\t\t${M}{\n\t\t\t\t${ns("color",d)}\n\t\t\t\t${os(u)}\n\t\t\t\t${ns("padding",hs(h))}\n\t\t\t\t${ns("margin",hs(g))}\n\t\t\t\t${is(m)}\n\t\t\t\t${ns("border-radius",hs(b))}\n\t\t\t}\n\t\t\t${L}{\n\t\t\t\t${ns("width",k)}\n\t\t\t\t${ns("height",k)}\n\t\t\t\t${ns("border-radius",$)}\n\t\t\t\t${Np(s)}\n\t\t\t}\n\t\t\t${ps(P,x).styles}\n\t\t\t${P}{\n\t\t\t\t${ns("color",f)}\n\t\t\t\t${Np(i)}\n\t\t\t}\n\t\t\t${ps(E,v).styles}\n\t\t\t${E}{\n\t\t\t\t${ns("color",y)}\n\t\t\t\t${Np(a)}\n\t\t\t}\n\t\t\t${_s(t,c,n,!1)}\n\t\t\t`}})},Lp={style:"none",width:"0px"},Pp={top:Lp,right:Lp,bottom:Lp,left:{color:"#6366f1",style:"solid",width:"4px"}},Ep={top:Lp,right:Lp,bottom:Lp,left:Lp},Ap={top:"10px",right:"10px",bottom:"10px",left:"10px"},Bp=({attributes:e,updateObj:t})=>{const{layout:n={},authorName:o={},authorRole:i={},avatar:a={},advanced:s={}}=e,{text:r}=o,{text:c,show:d}=i,{show:u,url:p,alt:h}=a;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,
313 -x.__)("Layout","b-blocks"),labelPosition:"edge",value:n.type||"border",options:$p,onChange:e=>{t("layout",e,"type");const n=s?.borderShadow?.normal||{};t("advanced",{...n,border:"border"===e?Pp:Ep,radius:"border"===e?Ap:n.radius},"borderShadow","normal")},help:(0,x.__)("Border = left accent bar (editable in the Advanced tab). Quotation = large decorative quote mark.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Alignment","b-blocks"),labelPosition:"edge",className:"mt10",value:n.alignment||"left",options:Sp,onChange:e=>t("layout",e,"alignment"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Name","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Author Name","b-blocks"),value:r||"",onChange:e=>t("authorName",e,"text"),placeholder:(0,x.__)("Jane Doe","b-blocks"),__nextHasNoMarginBottom:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Role / Company","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Role / Company","b-blocks"),checked:!!d,onChange:e=>t("authorRole",e,"show")}),d&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Role / Company","b-blocks"),value:c||"",onChange:e=>t("authorRole",e,"text"),placeholder:(0,x.__)("CEO, Acme","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Photo","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Author Photo","b-blocks"),checked:!!u,onChange:e=>t("avatar",e,"show")}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(we,{className:"mt10",label:p?(0,x.__)("Replace Photo","b-blocks"):(0,x.__)("Select Photo","b-blocks"),value:a,types:["image"],width:"90%",height:"90%",onChange:e=>{return n={id:e?.id||0,url:e?.url||"",alt:e?.alt||h||""},t("avatar",{...a,...n});var n}}),p&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Image Alt Text","b-blocks"),value:h||"",onChange:e=>t("avatar",e,"alt"),placeholder:(0,x.__)("Photo of Jane Doe","b-blocks"),help:(0,x.__)('Defaults to "Photo of <author name>" when empty.',"b-blocks"),__nextHasNoMarginBottom:!0})]})]})]})},Ip={top:"",right:"",bottom:"",left:""},Op=({attrKey:e,value:t={},updateObj:n})=>{const{bg:o={},padding:i={},margin:a={},border:s={},borderRadius:r={}}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o,onChange:t=>n(e,t,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),units:Cp,values:i,resetValues:Ip,onChange:t=>n(e,t,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),units:Cp,values:a,resetValues:Ip,onChange:t=>n(e,t,"margin")}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border:","b-blocks"),value:s,onChange:t=>n(e,t||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),units:Cp,values:r,resetValues:Ip,onChange:t=>n(e,t,"borderRadius")})]})},Rp=({attributes:e,updateObj:t})=>{const{quote:n={},authorName:o={},authorRole:i={},avatar:a={},layout:s={},icon:r={}}=e,{color:c,bg:d={},typography:u={},padding:p={},margin:h={},border:g={},borderRadius:m={}}=n,{color:b,typography:f={}}=o,{color:v,typography:w={}}=i,{size:_,shape:C}=a,{color:j,size:$,align:S}=r,T="quotation"===s.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Quote Text","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:c||"",onChange:e=>t("quote",e||"","color"),defaultColor:""}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:u,onChange:e=>t("quote",e,"typography")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t("quote",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),units:Cp,values:p,resetValues:Ip,onChange:e=>t("quote",e,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),units:Cp,values:h,resetValues:Ip,onChange:e=>t("quote",e,"margin")}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:g,onChange:e=>t("quote",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),units:Cp,values:m,resetValues:Ip,onChange:e=>t("quote",e,"borderRadius")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Name","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Name Color","b-blocks"),value:b,onChange:e=>t("authorName",e||"","color"),defaultColor:""}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:f,onChange:e=>t("authorName",e,"typography")}),(0,l.jsx)(Op,{attrKey:"authorName",value:o,updateObj:t})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Role / Company","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Role Color:","b-blocks"),value:v,onChange:e=>t("authorRole",e||"","color"),defaultColor:""}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:w,onChange:e=>t("authorRole",e,"typography")}),(0,l.jsx)(Op,{attrKey:"authorRole",value:i,updateObj:t})]}),T&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Quote Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Icon Alignment","b-blocks"),labelPosition:"edge",value:S,options:Sp,onChange:e=>t("icon",e,"align"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size","b-blocks"),className:"mt10",labelPosition:"edge",units:Cp,isUnitSelectTabbable:!0,value:$||"48px",onChange:e=>t("icon",e,"size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:j,onChange:e=>t("icon",e,"color"),defaultColor:"#6366f1"}),(0,l.jsx)(Op,{attrKey:"icon",value:r,updateObj:t})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Photo","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Avatar Size","b-blocks"),labelPosition:"edge",units:Cp,isUnitSelectTabbable:!0,value:_||"48px",onChange:e=>t("avatar",e,"size")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Avatar Shape","b-blocks"),labelPosition:"edge",className:"mt10",value:C,options:Tp,onChange:e=>t("avatar",e,"shape"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Op,{attrKey:"avatar",value:a,updateObj:t})]})]})},zp=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:jp,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(Bp,{...e}),"style"===t.name&&(0,l.jsx)(Rp,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},Dp=["border","quotation"],Fp=["left","center","right"],Hp=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{quote:a={},authorName:s={},authorRole:r={},avatar:c={},layout:d={}}=t,{text:u}=a,{text:p}=s,{text:g,show:m}=r,{show:b,url:f,alt:y,size:v}=c,k=parseInt(v,10)||48,w=bBlocksPremiumChecker,_=fe(t,n),C=Dp.includes(d.type)?d.type:"border",j=Fp.includes(d.alignment)?d.alignment:"left",$=["bBlocks-blockquote-wrapper",`bBlocks-blockquote-layout-${C}`,`bBlocks-blockquote-align-${j}`].join(" "),S=b&&!!f,T=!(!p||!p.trim()),N=m&&!(!g||!g.trim()),M=S||T||N,L=y||(T?(0,x.sprintf)((0,x.__)("Photo of %s","b-blocks"),p):"");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:j,onChange:e=>_("layout",e||"left","alignment")})}),(0,l.jsx)(zp,{attributes:t,setAttributes:n,updateObj:_,isPremium:w,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Mp,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{children:(0,l.jsxs)("figure",{className:$,
314 -children:["quotation"===C&&(0,l.jsx)("span",{className:"bBlocks-blockquote-icon","aria-hidden":"true",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 435 332",fill:"currentColor",focusable:"false",children:(0,l.jsx)("path",{d:"m142.6 0.7h-99.6c-23.5 0-42.7 19.2-42.7 42.6v99.7c0 23.4 19.2 42.6 42.7 42.6h60.4c0 47.2-34.6 85.4-81.7 85.4v60.3c86.4 0 156.3-69.9 156.3-156.3v-131.7c0-23.4-19.2-42.6-35.4-42.6zm256 0h-99.6c-23.5 0-42.7 19.2-42.7 42.6v99.7c0 23.4 19.2 42.6 42.7 42.6h60.4c0 47.2-34.6 85.4-81.7 85.4v60.3c86.4 0 156.3-69.9 156.3-156.3v-131.7c0-23.4-19.2-42.6-35.4-42.6z"})})}),(0,l.jsx)("blockquote",{className:"bBlocks-blockquote-quote",children:(0,l.jsx)(h.RichText,{tagName:"p",className:"bBlocks-blockquote-quoteText",value:u||"",onChange:e=>_("quote",e,"text"),placeholder:(0,x.__)("Type the quote…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]})}),M&&(0,l.jsxs)("figcaption",{className:"bBlocks-blockquote-caption",children:[S&&(0,l.jsx)("img",{className:"bBlocks-blockquote-avatar",src:f,alt:L,width:k,height:k}),(T||N)&&(0,l.jsxs)("cite",{className:"bBlocks-blockquote-cite",children:[T&&(0,l.jsx)("span",{className:"bBlocks-blockquote-author",children:p}),N&&(0,l.jsx)("span",{className:"bBlocks-blockquote-role",children:g})]})]})]})})})]})]})}));Ll(_p.name)&&(0,p.registerBlockType)(_p,{icon:fl,edit:Hp,save:()=>null});const Wp=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/breadcrumb","title":"Breadcrumb","category":"bBlocks","description":"Show a breadcrumb navigation trail for better navigation","keywords":["breadcrumb","breadcrumb block","navigation"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"home":{"type":"object","default":{"label":"Home"}},"separator":{"type":"object","default":{"type":"text","text":">","library":"","image":"","upload":""}},"prefix":{"type":"object","default":{"type":"text","text":"Browse:","library":"","image":"","upload":""}},"options":{"type":"object","default":{"isHomeShow":true,"isSchema":false,"isShowPrefix":false,"isBeforeSeparator":false}},"styles":{"type":"object","default":{"crumbs":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}},"normal":{"color":"","bg":{},"border":{},"shadow":[{}],"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"transition":0.2,"color":"","bg":{},"border":{},"shadow":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"active":{"color":"","bg":{},"border":{},"shadow":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"desktop":{"align":"start","gap":""},"tablet":{"align":"","gap":""},"mobile":{"align":"","gap":""}},"separator":{"color":"","text":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}}},"library":{"desktop":{"size":""},"tablet":{"size":""},"mobile":{"size":""}}},"prefix":{"color":"","text":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}}},"library":{"desktop":{"size":""},"tablet":{"size":""},"mobile":{"size":""}},"image":{"height":"","width":""},"bg":{},"border":{},"shadow":{},"desktop":{"rightGap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"rightGap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"rightGap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Up=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Gp=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Vp=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),qp=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Yp=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,home:a,options:s}=t,{crumbs:r}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("BreadCrumb","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r?.[o]?.align,onChange:e=>n("styles",e,"crumbs",o,"align"),isDeselectable:!0,size:"small",style:{padding:"2px"},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"start",icon:Gp}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:Vp}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"end",icon:qp})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2 mb0",children:[(0,x.__)("Gap","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r?.[o]?.gap,onChange:e=>n("styles",e,"crumbs",o,"gap")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Home Page","b-blocks"),checked:s?.isHomeShow,onChange:e=>n("options",e,"isHomeShow")}),s?.isHomeShow&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Home Label","b-blocks"),value:a?.label,
315 -onChange:e=>n("home",e,"label")})]})},Kp=({attributes:e,updateObj:t})=>{const{options:n,prefix:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Prefix","b-blocks"),checked:n?.isShowPrefix,onChange:e=>t("options",e,"isShowPrefix")}),n.isShowPrefix&&(0,l.jsxs)(m.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Before Separator","b-blocks"),checked:n?.isBeforeSeparator,onChange:e=>t("options",e,"isBeforeSeparator")}),(0,l.jsx)(v,{className:"flex1 mb0 mt10",children:(0,x.__)("Prefix Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o?.type,onChange:e=>t("prefix",e,"type"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Text","b-blocks"),value:"text"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Icon","b-blocks"),value:"library"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Image","b-blocks"),value:"image"})]}),"text"===o.type&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Prefix Text","b-blocks"),value:o?.text,onChange:e=>t("prefix",e,"text")}),"library"===o.type&&(0,l.jsx)(Zn,{className:"mt10",value:o?.library,onChange:e=>t("prefix",e,"library")}),"image"===o.type&&(0,l.jsx)(we,{height:"80%",width:"80%",className:"mt10",value:{url:o?.image},onChange:e=>t("prefix",e?.url,"image")})]})]})},Qp=({attributes:e,updateObj:t})=>{const{separator:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Separator Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n?.type,onChange:e=>t("separator",e,"type"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Text","b-blocks"),value:"text"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Icon","b-blocks"),value:"library"})]})]}),"text"===n.type&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Separator Text","b-blocks"),value:n?.text,onChange:e=>t("separator",e,"text")}),"library"===n.type&&(0,l.jsx)(Zn,{className:"mt10",value:n?.library,onChange:e=>t("separator",e,"library")})]})},Zp=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Yp,{...e}),(0,l.jsx)(Qp,{...e}),(0,l.jsx)(Kp,{...e})]}),Xp=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{crumbs:i}=o,[a,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Breadcrumb Styles","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Oa,{value:i.typo,onChange:e=>t("styles",e,"crumbs","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Active","b-blocks"),value:"active"})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:i[a][n].padding,onChange:e=>t("styles",e,"crumbs",a,n,"padding")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i[a].color,onChange:e=>t("styles",e,"crumbs",a,"color")}),(0,l.jsx)(An,{isImage:!1,label:(0,x.__)("Background","b-blocks"),value:i[a].bg,onChange:e=>t("styles",e,"crumbs",a,"bg")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),values:i[a].shadow,onChange:e=>t("styles",e,"crumbs",a,"shadow")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i[a].border,onChange:e=>t("styles",e,"crumbs",a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i[a][n].radius,onChange:e=>t("styles",e,"crumbs",a,n,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.01,value:i.hover.transition,onChange:e=>t("styles",e,"crumbs","hover","transition")})]})},Jp=({attributes:e,updateObj:t,device:n})=>{const{styles:o,prefix:i}=e,{prefix:a}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix","b-blocks"),initialOpen:!1,children:["text"===i.type&&(0,l.jsx)(Oa,{value:a.text.typo,onChange:e=>t("styles",e,"prefix","text","typo")}),"library"===i.type&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"flex2 mb0",children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.library[n].size,onChange:e=>t("styles",e,"prefix","library",n,"size")})]})}),"image"===i.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.image.height,onChange:e=>t("styles",e,"prefix","image","height")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.image.width,onChange:e=>t("styles",e,"prefix","image","width")})]})]}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),values:a[n].padding,onChange:e=>t("styles",e,"prefix",n,"padding")}),"text"===i.type&&(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color,onChange:e=>t("styles",e,"prefix","color")}),(0,l.jsx)(An,{isImage:!1,label:(0,x.__)("Background","b-blocks"),value:a.bg,onChange:e=>t("styles",e,"prefix","bg")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:a.shadow,onChange:e=>t("styles",e,"prefix","shadow")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("styles",e,"prefix","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:a[n].radius,onChange:e=>t("styles",e,"prefix",n,"radius")})]})},eh=({attributes:e,updateObj:t,device:n})=>{const{styles:o,separator:i}=e,{separator:a}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color,onChange:e=>t("styles",e,"separator","color")}),"text"===i.type&&(0,l.jsx)(Oa,{value:a.text.typo,onChange:e=>t("styles",e,"separator","text","typo")}),"library"===i.type&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.library[n].size,onChange:e=>t("styles",e,"separator","library",n,"size")})]})]})},th=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Xp,{...e}),(0,l.jsx)(eh,{...e}),(0,l.jsx)(Jp,{...e})]}),nh=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Up,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Zp,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(th,{...e})})]})})})}),oh=({attributes:e,id:o})=>{
316 -const{styles:i}=e,{crumbs:a,separator:s,prefix:r}=i,c=`#${o} .bBlocks-breadCrumb-wrapper .bBlocks-breadCrumb-items`,d=`${c} .bBlocks-breadCrumb-item`,u=`${c} .bBlocks-breadCrumb-item-active`,p=`${c} .bBlocks-breadCrumb-item-separator`,h=`${p}.bBlocks-breadCrumb-item-separator-library`,g=`${c} .bBlocks-breadCrumbItem-prefix`,m=(e="")=>`\n\t\t${ns("padding",hs(a[e].desktop.padding))}\n\t\t${ns("color",a[e].color)}\n\t\t${os(a[e].bg)}\n\t\t${as(a[e].border)}\n\t\t${ns("border-radius",hs(a[e].desktop.radius))}\n\t\t${ns("box-shadow",ls(a[e].shadow))}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",a.typo).googleFontLink}\n\t\t${ps("",s.text.typo).googleFontLink}\n\t\t${ps("",r.text.typo).googleFontLink}\n\n\t\t${ps(d,a.typo).styles}\n\t\t${ps(p,s.text.typo).styles}\n\t\t${ps(`${g}.bBlocks-breadCrumbItem-prefixText`,r.text.typo).styles}\n\n\t\t${c}{\n\t\t\t${ns("justify-content",a.desktop.align)}\n\t\t\t${ns("gap",a.desktop.gap)}\n\t\t}\n\n\t\t${d}{\n\t\t\t${m("normal")}\n\t\t\t${ns("transition",jt(a.hover.transition)?"all "+a.hover.transition+"s ease-in-out":"")}\n\t\t}\n\n\t\t${d}:hover{\n\t\t\t${m("hover")}\n\t\t}\n\n\t\t${u}{\n\t\t\t${m("active")}\n\t\t}\n\n\t\t${p}{\n\t\t\t${ns("color",s.color)}\n\t\t\t${ns("fill",s.color)}\n\t\t}\n\n\t\t${h}>svg{\n\t\t\t${ns("fill",s.color)}\n\t\t\t${ns("height",s.library.desktop.size)}\n\t\t\t${ns("width",s.library.desktop.size)}\n\t\t}\n\n\t\t${g}{\n\t\t\t${ns("color",r.color)}\n\t\t\t${ns("padding",hs(r.desktop.padding))}\n\t\t\t${os(r.bg)}\n\t\t\t${as(r.border)}\n\t\t\t${ns("border-radius",hs(r.desktop.radius))}\n\t\t\t${ns("box-shadow",ls(r.shadow))}\n\t\t}\n\n\t\t${g}.bBlocks-breadCrumbItem-prefixIcon>svg{\n\t\t\t${ns("fill",r.color)}\n\t\t\t${ns("height",r.library.desktop.size)}\n\t\t\t${ns("width",r.library.desktop.size)}\n\t\t}\n\t\t${g}.bBlocks-breadCrumbItem-prefixImage>img{\n\t\t\t${ns("height",r.image.height)}\n\t\t\t${ns("width",r.image.width)}\n\t\t}\n\n\t\t${t}{\n\n\t\t\t${d}{\n\t\t\t\t${ns("padding",hs(a.normal.tablet.padding))}\n\t\t\t\t${ns("border-radius",hs(a.normal.tablet.radius))}\n\t\t\t}\n\n\t\t\t${d}:hover{\n\t\t\t\t${ns("padding",hs(a.hover.tablet.padding))}\n\t\t\t\t${ns("border-radius",hs(a.hover.tablet.radius))}\n\t\t\t}\n\n\t\t\t${u}{\n\t\t\t\t${ns("padding",hs(a.active.tablet.padding))}\n\t\t\t\t${ns("border-radius",hs(a.active.tablet.radius))}\n\t\t\t}\n\t\t\t\n\t\t\t${h}>svg{\n\t\t\t\t${ns("height",s.library.tablet.size)}\n\t\t\t\t${ns("width",s.library.tablet.size)}\n\t\t\t}\n\n\t\t\t${g}{\n\t\t\t\t${ns("padding",hs(r.tablet.padding))}\n\t\t\t\t${ns("border-radius",hs(r.tablet.radius))}\n\t\t\t}\n\n\t\t\t${g}.bBlocks-breadCrumbItem-prefixIcon>svg{\n\t\t\t\t${ns("height",r.library.tablet.size)}\n\t\t\t\t${ns("width",r.library.tablet.size)}\n\t\t\t}\n\n\t\t}\n\n\t\t${n}{\n\t\t\t${d}{\n\t\t\t\t${ns("padding",hs(a.normal.mobile.padding))}\n\t\t\t\t${ns("border-radius",hs(a.normal.mobile.radius))}\n\t\t\t}\n\n\t\t\t${d}:hover{\n\t\t\t\t${ns("padding",hs(a.hover.mobile.padding))}\n\t\t\t\t${ns("border-radius",hs(a.hover.mobile.radius))}\n\t\t\t}\n\n\t\t\t${u}{\n\t\t\t\t${ns("padding",hs(a.active.mobile.padding))}\n\t\t\t\t${ns("border-radius",hs(a.active.mobile.radius))}\n\t\t\t}\n\t\t\t\n\t\t\t${h}>svg{\n\t\t\t\t${ns("height",s.library.mobile.size)}\n\t\t\t\t${ns("width",s.library.mobile.size)}\n\t\t\t}\n\n\t\t\t${g}{\n\t\t\t\t${ns("padding",hs(r.mobile.padding))}\n\t\t\t\t${ns("border-radius",hs(r.mobile.radius))}\n\t\t\t}\n\n\t\t\t${g}.bBlocks-breadCrumbItem-prefixIcon>svg{\n\t\t\t\t${ns("height",r.library.mobile.size)}\n\t\t\t\t${ns("width",r.library.mobile.size)}\n\t\t\t}\n\t\t}\n\n\t\t\n\t`}})},ih=({separator:e})=>{const{type:t,text:n,library:o}=e;return(0,l.jsxs)(m.Fragment,{children:["text"===t&&(0,l.jsxs)("span",{className:"bBlocks-breadCrumb-item-separator",children:[" ",n]}),"library"===t&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item-separator bBlocks-breadCrumb-item-separator-library",dangerouslySetInnerHTML:{__html:o}})]})},ah=({prefix:e,isBeforeSeparator:t,separator:n})=>{const{type:o,text:i,library:a,image:s}=e;return(0,l.jsxs)(m.Fragment,{children:["text"===o&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item bBlocks-breadCrumbItem-prefix bBlocks-breadCrumbItem-prefixText",children:i}),"library"===o&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item bBlocks-breadCrumbItem-prefix bBlocks-breadCrumbItem-prefixIcon",dangerouslySetInnerHTML:{__html:a}}),"image"===o&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item bBlocks-breadCrumbItem-prefix bBlocks-breadCrumbItem-prefixImage",children:s&&(0,l.jsx)("img",{src:s,alt:""})}),t&&(0,l.jsx)(ih,{separator:n})]})},sh=({attributes:e,crumbs:t})=>{const{separator:n,options:o,prefix:i}=e;return(0,l.jsx)("div",{className:"bBlocks-breadCrumb-wrapper",children:(0,l.jsxs)("div",{className:"bBlocks-breadCrumb-items",children:[o.isShowPrefix&&(0,l.jsx)(ah,{prefix:i,separator:n,isBeforeSeparator:o.isBeforeSeparator}),t.map(((e,o)=>(0,l.jsxs)(m.Fragment,{children:[0!==o&&(0,l.jsx)(ih,{separator:n}),e?.url?(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item "+(o===t.length-1?"bBlocks-breadCrumb-item-active":""),children:(0,l.jsx)("a",{href:e.url,children:e.label})}):(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item "+(o===t.length-1?"bBlocks-breadCrumb-item-active":""),children:e.label})]},o)))]})})},rh=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{home:a,options:s}=t,r=fe(t,n),c=[s.isHomeShow&&{label:a.label},{label:"Template"},{label:"Current Page"}].filter(Boolean);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nh,{attributes:t,setAttributes:n,isPremium:!1,updateObj:r,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(oh,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{children:(0,l.jsx)(sh,{attributes:t,crumbs:c})})]})]})}));Ll(Wp.name)&&(0,p.registerBlockType)(Wp,{icon:rl,edit:rh})
317 -;const lh=JSON.parse('{"apiVersion":3,"name":"b-blocks/button","title":"Button","description":"Implement multi-functional button.","category":"bBlocks","keywords":["multi-functional button","download button","link button"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"text":{"type":"string","default":"Button"},"actionType":{"type":"string","default":"link"},"security":{"type":"string","default":"none"},"securityPassword":{"type":"string","default":""},"securityRole":{"type":"string"},"url":{"type":"string","default":""},"tooltip":{"type":"string","default":""},"tooltipPos":{"type":"string","default":"top"},"target":{"type":"string","default":"_self"},"attrs":{"type":"object","default":{"rel":"noreferrer","referrerpolicy":"no-referrer"}},"hideOn":{"type":"object","default":{"desktop":false,"tablet":false,"mobile":false}},"isDownload":{"type":"boolean","default":false},"downloadFileName":{"type":"string","default":""},"isUpIcon":{"type":"boolean","default":false},"icon":{"type":"object","default":{"class":"fa fa-paper-plane"}},"upIcon":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"iconPos":{"type":"string","default":"left"},"type":{"type":"string","default":"flat"},"isFullWidth":{"type":"boolean","default":false},"size":{"type":"string","default":"medium"},"popup":{"type":"object","default":{"type":"image","content":"","caption":"","width":"","videoOptions":{"autoplay":false}}},"animationType":{"type":"string","default":""},"animationDuration":{"type":"number","default":0.4},"addID":{"type":"string","default":""},"addCSS":{"type":"string","default":""},"alignment":{"type":"string","default":"center"},"typography":{"type":"object","default":{"fontSize":{"desktop":"16px"},"fontWeight":600,"textDecoration":"none"}},"colors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"hovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"padding":{"type":"object","default":{"vertical":"12px","horizontal":"24px"}},"border":{"type":"object","default":{"radius":"5px"}},"shadow":{"type":"array","default":[]},"buttonHover":{"type":"object","default":{"padding":{},"shadow":[],"border":{}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos","wp-util"]}'),ch="bBlocksButton",dh=(e,t="none",n,o,i=!1)=>{const{actionType:a="link",url:s,tooltip:r,tooltipPos:l="top",target:c,attrs:d={rel:"noreferrer",referrerpolicy:"no-referrer"},isDownload:u,downloadFileName:p="",animationType:h,animationDuration:g,addID:m}=e,b=d?.referrerpolicy||"no-referrer",f=d?.rel||"noreferrer",x=s&&(n||"none"===t)?{href:$t(s)}:{},y="popup"===a||i?{}:{...x,target:c,...o?{referrerPolicy:b,rel:f}:{},...u?{download:o?p:""}:{}};return{className:i?`${ch} btnEditor`:ch,...y,tooltip:r,"tooltip-pos":o?l:"top","data-aos":h,"data-aos-duration":1e3*g,id:m}},uh=({attributes:e})=>{const{isUpIcon:t,icon:n,upIcon:o}=e;return(0,l.jsxs)(l.Fragment,{children:[t&&o?.url&&(0,l.jsx)("img",{src:o?.url,alt:o?.alt}),!t&&n?.class&&(0,l.jsx)("i",{className:n?.class})]})};function ph(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hh(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function gh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function bh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mh(Object(n),!0).forEach((function(t){gh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fh={addCSS:!0,thumbWidth:15,watch:!0},xh=function(e){return null!=e?e.constructor:null},yh=function(e,t){return!!(e&&t&&e instanceof t)},vh=function(e){return xh(e)===String},kh=function(e){return Array.isArray(e)},wh=function(e){return yh(e,NodeList)},_h=vh,Ch=kh,jh=wh,$h=function(e){return yh(e,Element)},Sh=function(e){return yh(e,Event)},Th=function(e){return function(e){return null==e}(e)||(vh(e)||kh(e)||wh(e))&&!e.length||function(e){return xh(e)===Object}(e)&&!Object.keys(e).length};var Nh=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),$h(t)?this.element=t:_h(t)&&(this.element=document.querySelector(t)),$h(this.element)&&Th(this.element.rangeTouch)&&(this.config=bh({},fh,{},n),this.init())}return function(e,t,n){t&&hh(e.prototype,t),n&&hh(e,n)}(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(e){t.element[n](e,(function(e){return t.set(e)}),!1)}))}},{key:"get",value:function(t){if(!e.enabled||!Sh(t))return null;var n,o=t.target,i=t.changedTouches[0],a=parseFloat(o.getAttribute("min"))||0,s=parseFloat(o.getAttribute("max"))||100,r=parseFloat(o.getAttribute("step"))||1,l=o.getBoundingClientRect(),c=100/l.width*(this.config.thumbWidth/2)/100;return 0>(n=100/l.width*(i.clientX-l.left))?n=0:100<n&&(n=100),50>n?n-=(100-2*n)*c:50<n&&(n+=2*(n-50)*c),a+function(e,t){if(1>t){var n=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(n))}return Math.round(e/t)*t}(n/100*(s-a),r)}},{key:"set",value:function(t){e.enabled&&Sh(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var n=new Event(t,{bubbles:!0});e.dispatchEvent(n)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=null;if(Th(t)||_h(t)?o=Array.from(document.querySelectorAll(_h(t)?t:'input[type="range"]')):$h(t)?o=[t]:jh(t)?o=Array.from(t):Ch(t)&&(o=t.filter($h)),Th(o))return null;var i=bh({},fh,{},n);if(_h(t)&&i.watch){var a=new MutationObserver((function(n){Array.from(n).forEach((function(n){Array.from(n.addedNodes).forEach((function(n){$h(n)&&function(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}(n,t)&&new e(n,i)}))}))}));a.observe(document.body,{childList:!0,subtree:!0})}return o.map((function(t){return new e(t,n)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const Mh=e=>null!=e?e.constructor:null,Lh=(e,t)=>Boolean(e&&t&&e instanceof t),Ph=e=>null==e,Eh=e=>Mh(e)===Object,Ah=e=>Mh(e)===String,Bh=e=>"function"==typeof e,Ih=e=>Array.isArray(e),Oh=e=>Lh(e,NodeList);function Rh(e){return Ph(e)||(Ah(e)||Ih(e)||Oh(e))&&!e.length||Eh(e)&&!Object.keys(e).length}var zh={nullOrUndefined:Ph,object:Eh,
318 -number:e=>Mh(e)===Number&&!Number.isNaN(e),string:Ah,boolean:e=>Mh(e)===Boolean,function:Bh,array:Ih,weakMap:e=>Lh(e,WeakMap),nodeList:Oh,element:function(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument},textNode:e=>Mh(e)===Text,event:e=>Lh(e,Event),keyboardEvent:e=>Lh(e,KeyboardEvent),cue:e=>Lh(e,window.TextTrackCue)||Lh(e,window.VTTCue),track:e=>Lh(e,TextTrack)||!Ph(e)&&Ah(e.kind),promise:e=>Lh(e,Promise)&&Bh(e.then),url:function(e){if(Lh(e,window.URL))return!0;if(!Ah(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t=`http://${e}`);try{return!Rh(new URL(t).hostname)}catch{return!1}},empty:Rh};const Dh=(()=>{const e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n=Object.keys(t).find((t=>void 0!==e.style[t]));return!!zh.string(n)&&t[n]})();function Fh(e,t){setTimeout((()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}}),t)}function Hh(e,t){return t.split(".").reduce(((e,t)=>e&&e[t]),e)}function Wh(e={},...t){if(!t.length)return e;const n=t.shift();return zh.object(n)?(Object.keys(n).forEach((t=>{zh.object(n[t])?(Object.keys(e).includes(t)||Object.assign(e,{[t]:{}}),Wh(e[t],n[t])):Object.assign(e,{[t]:n[t]})})),Wh(e,...t)):e}function Uh(e,t){const n=e.length?e:[e];Array.from(n).reverse().forEach(((e,n)=>{const o=n>0?t.cloneNode(!0):t,i=e.parentNode,a=e.nextSibling;o.appendChild(e),a?i.insertBefore(o,a):i.appendChild(o)}))}function Gh(e,t){zh.element(e)&&!zh.empty(t)&&Object.entries(t).filter((([,e])=>!zh.nullOrUndefined(e))).forEach((([t,n])=>e.setAttribute(t,n)))}function Vh(e,t,n){const o=document.createElement(e);return zh.object(t)&&Gh(o,t),zh.string(n)&&(o.textContent=n),o}function qh(e,t,n,o){zh.element(t)&&t.appendChild(Vh(e,n,o))}function Yh(e){zh.nodeList(e)||zh.array(e)?Array.from(e).forEach(Yh):zh.element(e)&&zh.element(e.parentNode)&&e.parentNode.removeChild(e)}function Kh(e){if(!zh.element(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function Qh(e,t){return zh.element(t)&&zh.element(t.parentNode)&&zh.element(e)?(t.parentNode.replaceChild(e,t),e):null}function Zh(e,t){if(!zh.string(e)||zh.empty(e))return{};const n={},o=Wh({},t);return e.split(",").forEach((e=>{const t=e.trim(),i=t.replace(".",""),a=t.replace(/[[\]]/g,"").split("="),[s]=a,r=a.length>1?a[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":zh.string(o.class)?n.class=`${o.class} ${i}`:n.class=i;break;case"#":n.id=t.replace("#","");break;case"[":n[s]=r}})),Wh(o,n)}function Xh(e,t){if(!zh.element(e))return;let n=t;zh.boolean(n)||(n=!e.hidden),e.hidden=n}function Jh(e,t,n){if(zh.nodeList(e))return Array.from(e).map((e=>Jh(e,t,n)));if(zh.element(e)){let o="toggle";return void 0!==n&&(o=n?"add":"remove"),e.classList[o](t),e.classList.contains(t)}return!1}function eg(e,t){return zh.element(e)&&e.classList.contains(t)}function tg(e,t){const{prototype:n}=Element;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function ng(e){return this.elements.container.querySelectorAll(e)}function og(e){return this.elements.container.querySelector(e)}function ig(e=null,t=!1){zh.element(e)&&e.focus({preventScroll:!0,focusVisible:t})}const ag={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},sg={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t){const n=sg[e]||"html5"!==t;return{api:n,ui:n&&sg.rangeInput}},pip:document.pictureInPictureEnabled&&!Vh("video").disablePictureInPicture,airplay:zh.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(zh.empty(e))return!1;const[t]=e.split("/");let n=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(ag).includes(n)&&(n+=`; codecs="${ag[e]}"`);try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range","range"===e.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==Dh,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},rg=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e})();function lg(e,t,n,o=!1,i=!0,a=!1){if(!e||!("addEventListener"in e)||zh.empty(t)||!zh.function(n))return;const s=t.split(" ");let r=a;rg&&(r={passive:i,capture:a}),s.forEach((t=>{this&&this.eventListeners&&o&&this.eventListeners.push({element:e,type:t,callback:n,options:r}),e[o?"addEventListener":"removeEventListener"](t,n,r)}))}function cg(e,t="",n,o=!0,i=!1){lg.call(this,e,t,n,!0,o,i)}function dg(e,t="",n,o=!0,i=!1){lg.call(this,e,t,n,!1,o,i)}function ug(e,t="",n,o=!0,i=!1){const a=(...s)=>{dg(e,t,a,o,i),n.apply(this,s)};lg.call(this,e,t,a,!0,o,i)}function pg(e,t="",n=!1,o={}){if(!zh.element(e)||zh.empty(t))return;const i=new CustomEvent(t,{bubbles:n,detail:{...o,plyr:this}});e.dispatchEvent(i)}function hg(){this&&this.eventListeners&&(this.eventListeners.forEach((e=>{const{element:t,type:n,callback:o,options:i}=e;t.removeEventListener(n,o,i)})),this.eventListeners=[])}function gg(){return new Promise((e=>this.ready?setTimeout(e,0):cg.call(this,this.elements.container,"ready",e))).then((()=>{}))}function mg(e){zh.promise(e)&&e.then(null,(()=>{}))}function bg(e){return zh.array(e)?e.filter(((t,n)=>e.indexOf(t)===n)):e}function fg(e,t){return zh.array(e)&&e.length?e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)):null}function xg(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const yg=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce(((e,[t,n])=>({...e,[t/n]:[t,n]})),{});function vg(e){return!!(zh.array(e)||zh.string(e)&&e.includes(":"))&&(zh.array(e)?e:e.split(":")).map(Number).every(zh.number)}function kg(e){if(!zh.array(e)||!e.every(zh.number))return null;const[t,n]=e,o=(e,t)=>0===t?e:o(t,e%t),i=o(t,n);return[t/i,n/i]}function wg(e){const t=e=>vg(e)?e.split(":").map(Number):null;let n=t(e);if(null===n&&(n=t(this.config.ratio)),null===n&&!zh.empty(this.embed)&&zh.array(this.embed.ratio)&&({ratio:n}=this.embed),null===n&&this.isHTML5){const{videoWidth:e,videoHeight:t}=this.media;n=[e,t]}return kg(n)}function _g(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,n=wg.call(this,e);if(!zh.array(n))return{};const[o,i]=kg(n),a=100/o*i;if(xg(`aspect-ratio: ${o}/${i}`)?t.style.aspectRatio=`${o}/${i}`:t.style.paddingBottom=`${a}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const e=100/this.media.offsetWidth*Number.parseInt(window.getComputedStyle(this.media).paddingBottom,10),n=(e-a)/(e/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${n}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:a,ratio:n}}function Cg(e,t,n=.05){const o=e/t,i=fg(Object.keys(yg),o);return Math.abs(i-o)<=n?yg[i]:[e,t]}const jg={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((e=>{const t=e.getAttribute("type");return!!zh.empty(t)||sg.mime.call(this,t)})):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:jg.getSources.call(this).map((e=>Number(e.getAttribute("size")))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,zh.empty(this.config.ratio)||_g.call(e),Object.defineProperty(e.media,"quality",{get(){const t=jg.getSources.call(e).find((t=>t.getAttribute("src")===e.source))
319 -;return t&&Number(t.getAttribute("size"))},set(t){if(e.quality!==t){if(e.config.quality.forced&&zh.function(e.config.quality.onChange))e.config.quality.onChange(t);else{const n=jg.getSources.call(e).find((e=>Number(e.getAttribute("size"))===t));if(!n)return;const{currentTime:o,paused:i,preload:a,readyState:s,playbackRate:r}=e.media;e.media.src=n.getAttribute("src"),("none"!==a||s)&&(e.once("loadedmetadata",(()=>{e.speed=r,e.currentTime=o,i||mg(e.play())})),e.media.load())}pg.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(Yh(jg.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};var $g={isIE:Boolean(window.document.documentMode),isEdge:/Edge/.test(navigator.userAgent),isWebKit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPadOS:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,isIos:/iPad|iPhone|iPod/i.test(navigator.userAgent)&&navigator.maxTouchPoints>1};function Sg(e,...t){return zh.empty(e)?e:e.toString().replace(/\{(\d+)\}/g,((e,n)=>t[n].toString()))}function Tg(e="",t="",n=""){return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),n.toString())}function Ng(e=""){return e.toString().replace(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()))}function Mg(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const Lg={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Pg={get(e="",t={}){if(zh.empty(e)||zh.empty(t))return"";let n=Hh(t.i18n,e);if(zh.empty(n))return Object.keys(Lg).includes(e)?Lg[e]:"";const o={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(o).forEach((([e,t])=>{n=Tg(n,e,t)})),n}};class Eg{constructor(e){ph(this,"get",(e=>{if(!Eg.supported||!this.enabled)return null;const t=window.localStorage.getItem(this.key);if(zh.empty(t))return null;const n=JSON.parse(t);return zh.string(e)&&e.length?n[e]:n})),ph(this,"set",(e=>{if(!Eg.supported||!this.enabled)return;if(!zh.object(e))return;let t=this.get();zh.empty(t)&&(t={}),Wh(t,e);try{window.localStorage.setItem(this.key,JSON.stringify(t))}catch{}})),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}}function Ag(e,t="text",n=!1){return new Promise(((o,i)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;n&&(i.withCredentials=!0),i.addEventListener("load",(()=>{if("text"===t)try{o(JSON.parse(i.responseText))}catch{o(i.responseText)}else o(i.response)})),i.addEventListener("error",(()=>{throw new Error(i.status)})),i.open("GET",e,!0),i.responseType=t,i.send()}catch(e){i(e)}}))}function Bg(e,t){if(!zh.string(e))return;const n="cache",o=zh.string(t);let i=!1;const a=()=>null!==document.getElementById(t),s=(e,t)=>{e.innerHTML=t,o&&a()||document.body.insertAdjacentElement("afterbegin",e)};if(!o||!a()){const a=Eg.supported,r=document.createElement("div");if(r.setAttribute("hidden",""),o&&r.setAttribute("id",t),a){const e=window.localStorage.getItem(`${n}-${t}`);if(i=null!==e,i){const t=JSON.parse(e);s(r,t.content)}}Ag(e).then((e=>{if(!zh.empty(e)){if(a)try{window.localStorage.setItem(`${n}-${t}`,JSON.stringify({content:e}))}catch{}s(r,e)}})).catch((()=>{}))}}const Ig=e=>Math.trunc(e/60/60%60,10);function Og(e=0,t=!1,n=!1){if(!zh.number(e))return Og(void 0,t,n);const o=e=>`0${e}`.slice(-2);let i=Ig(e);const a=(s=e,Math.trunc(s/60%60,10));var s;const r=(e=>Math.trunc(e%60,10))(e);return i=t||i>0?`${i}:`:"",`${n&&e>0?"-":""}${i}${o(a)}:${o(r)}`}const Rg={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,n=e.host!==t||$g.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:n}},findElements(){try{return this.elements.controls=og.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:ng.call(this,this.config.selectors.buttons.play),pause:og.call(this,this.config.selectors.buttons.pause),restart:og.call(this,this.config.selectors.buttons.restart),rewind:og.call(this,this.config.selectors.buttons.rewind),fastForward:og.call(this,this.config.selectors.buttons.fastForward),mute:og.call(this,this.config.selectors.buttons.mute),pip:og.call(this,this.config.selectors.buttons.pip),airplay:og.call(this,this.config.selectors.buttons.airplay),settings:og.call(this,this.config.selectors.buttons.settings),captions:og.call(this,this.config.selectors.buttons.captions),fullscreen:og.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=og.call(this,this.config.selectors.progress),this.elements.inputs={seek:og.call(this,this.config.selectors.inputs.seek),volume:og.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:og.call(this,this.config.selectors.display.buffer),currentTime:og.call(this,this.config.selectors.display.currentTime),duration:og.call(this,this.config.selectors.display.duration)},zh.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,t){const n="http://www.w3.org/2000/svg",o=Rg.getIconUrl.call(this),i=`${o.cors?"":o.url}#${this.config.iconPrefix}`,a=document.createElementNS(n,"svg");Gh(a,Wh(t,{"aria-hidden":"true",focusable:"false"}));const s=document.createElementNS(n,"use"),r=`${i}-${e}`;return"href"in s&&s.setAttributeNS("http://www.w3.org/1999/xlink","href",r),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),a.appendChild(s),a},createLabel(e,t={}){const n=Pg.get(e,this.config);return Vh("span",{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")},n)},createBadge(e){if(zh.empty(e))return null;const t=Vh("span",{class:this.config.classNames.menu.value});return t.appendChild(Vh("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const n=Wh({},t);let o=function(e=""){let t=e.toString();return t=function(e=""){let t=e.toString();return t=Tg(t,"-"," "),t=Tg(t,"_"," "),t=Ng(t),Tg(t," ","")}(t),t.charAt(0).toLowerCase()+t.slice(1)}(e);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((e=>{Object.keys(n).includes(e)&&(i[e]=n[e],delete n[e])})),"button"!==i.element||Object.keys(n).includes("type")||(n.type="button"),Object.keys(n).includes("class")?n.class.split(" ").includes(this.config.classNames.control)||Wh(n,{class:`${n.class} ${this.config.classNames.control}`}):n.class=this.config.classNames.control,e){case"play":i.toggle=!0,i.label="play",i.labelPressed="pause",i.icon="play",i.iconPressed="pause";break;case"mute":i.toggle=!0,i.label="mute",i.labelPressed="unmute",i.icon="volume",i.iconPressed="muted";break;case"captions":i.toggle=!0,i.label="enableCaptions",i.labelPressed="disableCaptions",i.icon="captions-off",i.iconPressed="captions-on";break;case"fullscreen":i.toggle=!0,i.label="enterFullscreen",i.labelPressed="exitFullscreen",i.icon="enter-fullscreen",i.iconPressed="exit-fullscreen";break;case"play-large":n.class+=` ${this.config.classNames.control}--overlaid`,o="play",i.label="play",i.icon="play";break;default:zh.empty(i.label)&&(i.label=o),zh.empty(i.icon)&&(i.icon=e)}const a=Vh(i.element);return i.toggle?(a.appendChild(Rg.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),a.appendChild(Rg.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),a.appendChild(Rg.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),a.appendChild(Rg.createLabel.call(this,i.label,{class:"label--not-pressed"
320 -}))):(a.appendChild(Rg.createIcon.call(this,i.icon)),a.appendChild(Rg.createLabel.call(this,i.label))),Wh(n,Zh(this.config.selectors.buttons[o],n)),Gh(a,n),"play"===o?(zh.array(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(a)):this.elements.buttons[o]=a,a},createRange(e,t){const n=Vh("input",Wh(Zh(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Pg.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,Rg.updateRangeFill.call(this,n),Nh.setup(n),n},createProgress(e,t){const n=Vh("progress",Wh(Zh(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){n.appendChild(Vh("span",null,"0"));const t={played:"played",buffer:"buffered"}[e],o=t?Pg.get(t,this.config):"";n.textContent=`% ${o.toLowerCase()}`}return this.elements.display[e]=n,n},createTime(e,t){const n=Zh(this.config.selectors.display[e],t),o=Vh("div",Wh(n,{class:`${n.class?n.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Pg.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=o,o},bindMenuItemShortcuts(e,t){cg.call(this,e,"keydown keyup",(n=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(n.key))return;if(n.preventDefault(),n.stopPropagation(),"keydown"===n.type)return;const o=tg(e,'[role="menuitemradio"]');if(!o&&[" ","ArrowRight"].includes(n.key))Rg.showMenuPanel.call(this,t,!0);else{let t;" "!==n.key&&("ArrowDown"===n.key||o&&"ArrowRight"===n.key?(t=e.nextElementSibling,zh.element(t)||(t=e.parentNode.firstElementChild)):(t=e.previousElementSibling,zh.element(t)||(t=e.parentNode.lastElementChild)),ig.call(this,t,!0))}}),!1),cg.call(this,e,"keyup",(e=>{"Return"===e.key&&Rg.focusFirstMenuItem.call(this,null,!0)}))},createMenuItem({value:e,list:t,type:n,title:o,badge:i=null,checked:a=!1}){const s=Zh(this.config.selectors.inputs[n]),r=Vh("button",Wh(s,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${s.class?s.class:""}`.trim(),"aria-checked":a,value:e})),l=Vh("span");l.innerHTML=o,zh.element(i)&&l.appendChild(i),r.appendChild(l),Object.defineProperty(r,"checked",{enumerable:!0,get:()=>"true"===r.getAttribute("aria-checked"),set(e){e&&Array.from(r.parentNode.children).filter((e=>tg(e,'[role="menuitemradio"]'))).forEach((e=>e.setAttribute("aria-checked","false"))),r.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(r,"click keyup",(t=>{if(!zh.keyboardEvent(t)||" "===t.key){switch(t.preventDefault(),t.stopPropagation(),r.checked=!0,n){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=Number.parseFloat(e)}Rg.showMenuPanel.call(this,"home",zh.keyboardEvent(t))}}),n,!1),Rg.bindMenuItemShortcuts.call(this,r,n),t.appendChild(r)},formatTime(e=0,t=!1){return zh.number(e)?Og(e,Ig(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,n=!1){zh.element(e)&&zh.number(t)&&(e.textContent=Rg.formatTime(t,n))},updateVolume(){this.supported.ui&&(zh.element(this.elements.inputs.volume)&&Rg.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),zh.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(e,t=0){zh.element(e)&&(e.value=t,Rg.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!zh.event(e))return;let t=0;const n=(e,t)=>{const n=zh.number(t)?t:0,o=zh.element(e)?e:this.elements.display.buffer;if(zh.element(o)){o.value=n;const e=o.getElementsByTagName("span")[0];zh.element(e)&&(e.childNodes[0].nodeValue=n)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":o=this.currentTime,i=this.duration,t=0===o||0===i||Number.isNaN(o)||Number.isNaN(i)?0:(o/i*100).toFixed(2),"timeupdate"===e.type&&Rg.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":n(this.elements.display.buffer,100*this.buffered)}var o,i},updateRangeFill(e){const t=zh.event(e)?e.target:e;if(zh.element(t)&&"range"===t.getAttribute("type")){if(tg(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const e=Rg.formatTime(this.currentTime),n=Rg.formatTime(this.duration),o=Pg.get("seekLabel",this.config);t.setAttribute("aria-valuetext",o.replace("{currentTime}",e).replace("{duration}",n))}else if(tg(t,this.config.selectors.inputs.volume)){const e=100*t.value;t.setAttribute("aria-valuenow",e),t.setAttribute("aria-valuetext",`${e.toFixed(1)}%`)}else t.setAttribute("aria-valuenow",t.value);($g.isWebKit||$g.isIPadOS)&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){var t,n;if(!this.config.tooltips.seek||!zh.element(this.elements.inputs.seek)||!zh.element(this.elements.display.seekTooltip)||0===this.duration)return;const o=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,a=e=>Jh(o,i,e);if(this.touch)return void a(!1);let s=0;const r=this.elements.progress.getBoundingClientRect();if(zh.event(e)){const t=e.pageX-e.clientX;s=100/r.width*(e.pageX-r.left-t)}else{if(!eg(o,i))return;s=Number.parseFloat(o.style.left,10)}s<0?s=0:s>100&&(s=100);const l=this.duration/100*s;o.textContent=Rg.formatTime(l);const c=null===(t=this.config.markers)||void 0===t||null===(n=t.points)||void 0===n?void 0:n.find((({time:e})=>e===Math.round(l)));c&&o.insertAdjacentHTML("afterbegin",`${c.label}<br>`),o.style.left=`${s}%`,zh.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&a("mouseenter"===e.type)},timeUpdate(e){const t=!zh.element(this.elements.display.duration)&&this.config.invertTime;Rg.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||Rg.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return Xh(this.elements.display.currentTime,!0),void Xh(this.elements.progress,!0);zh.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=zh.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&Rg.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&Rg.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&Rg.setMarkers.call(this),Rg.updateSeekTooltip.call(this)},toggleMenuButton(e,t){Xh(this.elements.settings.buttons[e],!t)},updateSetting(e,t,n){const o=this.elements.settings.panels[e];let i=null,a=t;if("captions"===e)i=this.currentTrack;else{if(i=zh.empty(n)?this[e]:n,zh.empty(i)&&(i=this.config[e].default),!zh.empty(this.options[e])&&!this.options[e].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${e}`);if(!this.config[e].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${e}`)}if(zh.element(a)||(a=o&&o.querySelector('[role="menu"]')),!zh.element(a))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=Rg.getLabel.call(this,e,i);const s=a&&a.querySelector(`[value="${i}"]`);zh.element(s)&&(s.checked=!0)},getLabel(e,t){switch(e){case"speed":return 1===t?Pg.get("normal",this.config):`${t}&times;`;case"quality":if(zh.number(t)){const e=Pg.get(`qualityLabel.${t}`,this.config);return e.length?e:`${t}p`}return Ng(t);case"captions":return Fg.getLabel.call(this);default:return null}},setQualityMenu(e){if(!zh.element(this.elements.settings.panels.quality))return;const t="quality",n=this.elements.settings.panels.quality.querySelector('[role="menu"]');zh.array(e)&&(this.options.quality=bg(e).filter((e=>this.config.quality.options.includes(e))));const o=!zh.empty(this.options.quality)&&this.options.quality.length>1;if(Rg.toggleMenuButton.call(this,t,o),Kh(n),Rg.checkMenu.call(this),!o)return;const i=e=>{
321 -const t=Pg.get(`qualityBadge.${e}`,this.config);return t.length?Rg.createBadge.call(this,t):null};this.options.quality.sort(((e,t)=>{const n=this.config.quality.options;return n.indexOf(e)>n.indexOf(t)?1:-1})).forEach((e=>{Rg.createMenuItem.call(this,{value:e,list:n,type:t,title:Rg.getLabel.call(this,"quality",e),badge:i(e)})})),Rg.updateSetting.call(this,t,n)},setCaptionsMenu(){if(!zh.element(this.elements.settings.panels.captions))return;const e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),n=Fg.getTracks.call(this),o=Boolean(n.length);if(Rg.toggleMenuButton.call(this,e,o),Kh(t),Rg.checkMenu.call(this),!o)return;const i=n.map(((e,n)=>({value:n,checked:this.captions.toggled&&this.currentTrack===n,title:Fg.getLabel.call(this,e),badge:e.language&&Rg.createBadge.call(this,e.language.toUpperCase()),list:t,type:"language"})));i.unshift({value:-1,checked:!this.captions.toggled,title:Pg.get("disabled",this.config),list:t,type:"language"}),i.forEach(Rg.createMenuItem.bind(this)),Rg.updateSetting.call(this,e,t)},setSpeedMenu(){if(!zh.element(this.elements.settings.panels.speed))return;const e="speed",t=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((e=>e>=this.minimumSpeed&&e<=this.maximumSpeed));const n=!zh.empty(this.options.speed)&&this.options.speed.length>1;Rg.toggleMenuButton.call(this,e,n),Kh(t),Rg.checkMenu.call(this),n&&(this.options.speed.forEach((n=>{Rg.createMenuItem.call(this,{value:n,list:t,type:e,title:Rg.getLabel.call(this,"speed",n)})})),Rg.updateSetting.call(this,e,t))},checkMenu(){const{buttons:e}=this.elements.settings,t=!zh.empty(e)&&Object.values(e).some((e=>!e.hidden));Xh(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let n=e;zh.element(n)||(n=Object.values(this.elements.settings.panels).find((e=>!e.hidden)));const o=n.querySelector('[role^="menuitem"]');ig.call(this,o,t)},toggleMenu(e){const{popup:t}=this.elements.settings,n=this.elements.buttons.settings;if(!zh.element(t)||!zh.element(n))return;const{hidden:o}=t;let i=o;if(zh.boolean(e))i=e;else if(zh.keyboardEvent(e)&&"Escape"===e.key)i=!1;else if(zh.event(e)){const o=zh.function(e.composedPath)?e.composedPath()[0]:e.target,a=t.contains(o);if(a||!a&&e.target!==n&&i)return}n.setAttribute("aria-expanded",i),Xh(t,!i),Jh(this.elements.container,this.config.classNames.menu.open,i),i&&zh.keyboardEvent(e)?Rg.focusFirstMenuItem.call(this,null,!0):i||o||ig.call(this,n,zh.keyboardEvent(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const n=t.scrollWidth,o=t.scrollHeight;return Yh(t),{width:n,height:o}},showMenuPanel(e="",t=!1){const n=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!zh.element(n))return;const o=n.parentNode,i=Array.from(o.children).find((e=>!e.hidden));if(sg.transitions&&!sg.reducedMotion){o.style.width=`${i.scrollWidth}px`,o.style.height=`${i.scrollHeight}px`;const e=Rg.getMenuSize.call(this,n),t=e=>{e.target===o&&["width","height"].includes(e.propertyName)&&(o.style.width="",o.style.height="",dg.call(this,o,Dh,t))};cg.call(this,o,Dh,t),o.style.width=`${e.width}px`,o.style.height=`${e.height}px`}Xh(i,!0),Xh(n,!1),Rg.focusFirstMenuItem.call(this,n,t)},setDownloadUrl(){const e=this.elements.buttons.download;zh.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:t,createButton:n,createProgress:o,createRange:i,createTime:a,setQualityMenu:s,setSpeedMenu:r,showMenuPanel:l}=Rg;this.elements.controls=null,zh.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(n.call(this,"play-large"));const c=Vh("div",Zh(this.config.selectors.controls.wrapper));this.elements.controls=c;const d={class:"plyr__controls__item"};return bg(zh.array(this.config.controls)?this.config.controls:[]).forEach((s=>{if("restart"===s&&c.appendChild(n.call(this,"restart",d)),"rewind"===s&&c.appendChild(n.call(this,"rewind",d)),"play"===s&&c.appendChild(n.call(this,"play",d)),"fast-forward"===s&&c.appendChild(n.call(this,"fast-forward",d)),"progress"===s){const t=Vh("div",{class:`${d.class} plyr__progress__container`}),n=Vh("div",Zh(this.config.selectors.progress));if(n.appendChild(i.call(this,"seek",{id:`plyr-seek-${e.id}`})),n.appendChild(o.call(this,"buffer")),this.config.tooltips.seek){const e=Vh("span",{class:this.config.classNames.tooltip},"00:00");n.appendChild(e),this.elements.display.seekTooltip=e}this.elements.progress=n,t.appendChild(this.elements.progress),c.appendChild(t)}if("current-time"===s&&c.appendChild(a.call(this,"currentTime",d)),"duration"===s&&c.appendChild(a.call(this,"duration",d)),"mute"===s||"volume"===s){let{volume:t}=this.elements;if(zh.element(t)&&c.contains(t)||(t=Vh("div",Wh({},d,{class:`${d.class} plyr__volume`.trim()})),this.elements.volume=t,c.appendChild(t)),"mute"===s&&t.appendChild(n.call(this,"mute")),"volume"===s&&!$g.isIos&&!$g.isIPadOS){const n={max:1,step:.05,value:this.config.volume};t.appendChild(i.call(this,"volume",Wh(n,{id:`plyr-volume-${e.id}`})))}}if("captions"===s&&c.appendChild(n.call(this,"captions",d)),"settings"===s&&!zh.empty(this.config.settings)){const o=Vh("div",Wh({},d,{class:`${d.class} plyr__menu`.trim(),hidden:""}));o.appendChild(n.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const i=Vh("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),a=Vh("div"),s=Vh("div",{id:`plyr-settings-${e.id}-home`}),r=Vh("div",{role:"menu"});s.appendChild(r),a.appendChild(s),this.elements.settings.panels.home=s,this.config.settings.forEach((n=>{const o=Vh("button",Wh(Zh(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,o,n),cg.call(this,o,"click",(()=>{l.call(this,n,!1)}));const i=Vh("span",null,Pg.get(n,this.config)),s=Vh("span",{class:this.config.classNames.menu.value});s.innerHTML=e[n],i.appendChild(s),o.appendChild(i),r.appendChild(o);const c=Vh("div",{id:`plyr-settings-${e.id}-${n}`,hidden:""}),d=Vh("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});d.appendChild(Vh("span",{"aria-hidden":!0},Pg.get(n,this.config))),d.appendChild(Vh("span",{class:this.config.classNames.hidden},Pg.get("menuBack",this.config))),cg.call(this,c,"keydown",(e=>{"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),l.call(this,"home",!0))}),!1),cg.call(this,d,"click",(()=>{l.call(this,"home",!1)})),c.appendChild(d),c.appendChild(Vh("div",{role:"menu"})),a.appendChild(c),this.elements.settings.buttons[n]=o,this.elements.settings.panels[n]=c})),i.appendChild(a),o.appendChild(i),c.appendChild(o),this.elements.settings.popup=i,this.elements.settings.menu=o}if("pip"===s&&sg.pip&&c.appendChild(n.call(this,"pip",d)),"airplay"===s&&sg.airplay&&c.appendChild(n.call(this,"airplay",d)),"download"===s){const e=Wh({},d,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(e.download="");const{download:t}=this.config.urls;!zh.url(t)&&this.isEmbed&&Wh(e,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(n.call(this,"download",e))}"fullscreen"===s&&c.appendChild(n.call(this,"fullscreen",d))})),this.isHTML5&&s.call(this,jg.getQualityOptions.call(this)),r.call(this),c},inject(){if(this.config.loadSprite){const e=Rg.getIconUrl.call(this);e.cors&&Bg(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const t={id:this.id,seektime:this.config.seekTime,title:this.config.title};let n,o=!0;if(zh.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]),
322 -zh.element(this.config.controls)||zh.string(this.config.controls)?e=this.config.controls:(e=Rg.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Fg.getLabel.call(this)}),o=!1),o&&zh.string(this.config.controls)&&(e=(e=>{let n=e;return Object.entries(t).forEach((([e,t])=>{n=Tg(n,`{${e}}`,t)})),n})(e)),zh.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),zh.element(n)||(n=this.elements.container),n[zh.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),zh.element(this.elements.controls)||Rg.findElements.call(this),!zh.empty(this.elements.buttons)){const e=e=>{const t=this.config.classNames.controlPressed;e.setAttribute("aria-pressed","false"),Object.defineProperty(e,"pressed",{configurable:!0,enumerable:!0,get:()=>eg(e,t),set(n=!1){Jh(e,t,n),e.setAttribute("aria-pressed",n?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach((t=>{zh.array(t)||zh.nodeList(t)?Array.from(t).filter(Boolean).forEach(e):e(t)}))}if($g.isEdge&&Fh(n),this.config.tooltips.controls){const{classNames:e,selectors:t}=this.config,n=`${t.controls.wrapper} ${t.labels} .${e.hidden}`,o=ng.call(this,n);Array.from(o).forEach((e=>{Jh(e,this.config.classNames.hidden,!1),Jh(e,this.config.classNames.tooltip,!0)}))}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;const n=null===(e=this.config.markers)||void 0===e||null===(t=e.points)||void 0===t?void 0:t.filter((({time:e})=>e>0&&e<this.duration));if(null==n||!n.length)return;const o=document.createDocumentFragment(),i=document.createDocumentFragment();let a=null;const s=`${this.config.classNames.tooltip}--visible`,r=e=>Jh(a,s,e);n.forEach((e=>{const t=Vh("span",{class:this.config.classNames.marker},""),n=e.time/this.duration*100+"%";a&&(t.addEventListener("mouseenter",(()=>{e.label||(a.style.left=n,a.innerHTML=e.label,r(!0))})),t.addEventListener("mouseleave",(()=>{r(!1)}))),t.addEventListener("click",(()=>{this.currentTime=e.time})),t.style.left=n,i.appendChild(t)})),o.appendChild(i),this.config.tooltips.seek||(a=Vh("span",{class:this.config.classNames.tooltip},""),o.appendChild(a)),this.elements.markers={points:i,tip:a},this.elements.progress.appendChild(o)}};function zg(e,t=!0){let n=e;if(t){const e=document.createElement("a");e.href=n,n=e.href}try{return new URL(n)}catch{return null}}function Dg(e){const t=new URLSearchParams;return zh.object(e)&&Object.entries(e).forEach((([e,n])=>{t.set(e,n)})),t}const Fg={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!sg.textTracks)return void(zh.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Rg.setCaptionsMenu.call(this));var e,t;if(zh.element(this.elements.captions)||(this.elements.captions=Vh("div",Zh(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),e=this.elements.captions,t=this.elements.wrapper,zh.element(e)&&zh.element(t)&&t.parentNode.insertBefore(e,t.nextSibling)),$g.isIE&&window.URL){const e=this.media.querySelectorAll("track");Array.from(e).forEach((e=>{const t=e.getAttribute("src"),n=zg(t);null!==n&&n.hostname!==window.location.href.hostname&&["http:","https:"].includes(n.protocol)&&Ag(t,"blob").then((t=>{e.setAttribute("src",window.URL.createObjectURL(t))})).catch((()=>{Yh(e)}))}))}const n=bg((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((e=>e.split("-")[0])));let o=(this.storage.get("language")||this.captions.language||this.config.captions.language||"auto").toLowerCase();"auto"===o&&([o]=n);let i=this.storage.get("captions")||this.captions.active;if(zh.boolean(i)||({active:i}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:i,language:o,languages:n}),this.isHTML5){const e=this.config.captions.update?"addtrack removetrack":"removetrack";cg.call(this,this.media.textTracks,e,Fg.update.bind(this))}setTimeout(Fg.update.bind(this),0)},update(){const e=Fg.getTracks.call(this,!0),{active:t,language:n,meta:o,currentTrackNode:i}=this.captions,a=Boolean(e.find((e=>e.language===n)));this.isHTML5&&this.isVideo&&e.filter((e=>!o.get(e))).forEach((e=>{this.debug.log("Track added",e),o.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),cg.call(this,e,"cuechange",(()=>Fg.updateCues.call(this)))})),(a&&this.language!==n||!e.includes(i))&&(Fg.setLanguage.call(this,n),Fg.toggle.call(this,t&&a)),this.elements&&Jh(this.elements.container,this.config.classNames.captions.enabled,!zh.empty(e)),zh.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Rg.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:n}=this.captions,o=this.config.classNames.captions.active,i=zh.nullOrUndefined(e)?!n:e;if(i!==n){if(t||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!t){const e=Fg.getTracks.call(this),t=Fg.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=t.language,void Fg.set.call(this,e.indexOf(t))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),Jh(this.elements.container,o,i),this.captions.toggled=i,Rg.updateSetting.call(this,"captions"),pg.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout((()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")}))},set(e,t=!0){const n=Fg.getTracks.call(this);if(-1!==e)if(zh.number(e))if(e in n){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const o=n[e],{language:i}=o||{};this.captions.currentTrackNode=o,Rg.updateSetting.call(this,"captions"),t||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i,null,!1),pg.call(this,this.media,"languagechange")}Fg.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Fg.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Fg.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!zh.string(e))return void this.debug.warn("Invalid language argument",e);const n=e.toLowerCase();this.captions.language=n;const o=Fg.getTracks.call(this),i=Fg.findTrack.call(this,[n]);Fg.set.call(this,o.indexOf(i),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter((t=>!this.isHTML5||e||this.captions.meta.has(t))).filter((e=>["captions","subtitles"].includes(e.kind)))},findTrack(e,t=!1){const n=Fg.getTracks.call(this),o=e=>Number((this.captions.meta.get(e)||{}).default),i=Array.from(n).sort(((e,t)=>o(t)-o(e)));let a;return e.every((e=>(a=i.find((t=>t.language===e)),!a))),a||(t?i[0]:void 0)},getCurrentTrack(){return Fg.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!zh.track(t)&&sg.textTracks&&this.captions.toggled&&(t=Fg.getCurrentTrack.call(this)),zh.track(t)?zh.empty(t.label)?zh.empty(t.language)?Pg.get("enabled",this.config):e.language.toUpperCase():t.label:Pg.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!zh.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!zh.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const e=Fg.getCurrentTrack.call(this);t=Array.from((e||{}).activeCues||[]).map((e=>e.getCueAsHTML())).map(Mg)}const n=t.map((e=>e.trim())).join("\n");if(n!==this.elements.captions.innerHTML){Kh(this.elements.captions);const e=Vh("span",Zh(this.config.selectors.caption));e.innerHTML=n,this.elements.captions.appendChild(e),
323 -pg.call(this,this.media,"cuechange")}}},Hg={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.8.4/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:"",withCredentials:!1},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},Wg="picture-in-picture",Ug={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Gg="video";function Vg(){}class qg{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Vg}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Vg}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Vg}}class Yg{constructor(e){ph(this,"onChange",(()=>{if(!this.supported)return;const e=this.player.elements.buttons.fullscreen;zh.element(e)&&(e.pressed=this.active);const t=this.target===this.player.media?this.target:this.player.elements.container;pg.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)})),ph(this,"toggleFallback",((e=!1)=>{var t,n;if(e?this.scrollPosition={x:null!==(t=window.scrollX)&&void 0!==t?t:0,y:null!==(n=window.scrollY)&&void 0!==n?n:0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",Jh(this.target,this.player.config.classNames.fullscreen.fallback,e),$g.isIos){let t=document.head.querySelector('meta[name="viewport"]');const n="viewport-fit=cover";t||(t=document.createElement("meta"),t.setAttribute("name","viewport"));const o=zh.string(t.content)&&t.content.includes(n);e?(this.cleanupViewport=!o,o||(t.content+=`,${n}`)):this.cleanupViewport&&(t.content=t.content.split(",").filter((e=>e.trim()!==n)).join(","))}this.onChange()})),ph(this,"trapFocus",(e=>{if($g.isIos||$g.isIPadOS||!this.active||"Tab"!==e.key)return;const t=document.activeElement,n=ng.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[o]=n,i=n[n.length-1];t!==i||e.shiftKey?t===o&&e.shiftKey&&(i.focus(),e.preventDefault()):(o.focus(),e.preventDefault())})),ph(this,"update",(()=>{if(this.supported){let e;e=this.forceFallback?"Fallback (forced)":Yg.nativeSupported?"Native":"Fallback",this.player.debug.log(`${e} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Jh(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)})),ph(this,"enter",(()=>{
324 -this.supported&&($g.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Yg.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?zh.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))})),ph(this,"exit",(()=>{if(this.supported)if($g.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),mg(this.player.play());else if(!Yg.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!zh.empty(this.prefix)){const e="moz"===this.prefix?"Cancel":"Exit";document[`${this.prefix}${e}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),ph(this,"toggle",(()=>{this.active?this.exit():this.enter()})),this.player=e,this.prefix=Yg.prefix,this.property=Yg.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(e,t){const{prototype:n}=Element;return(n.closest||function(){let e=this;do{if(tg.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,e.config.fullscreen.container),cg.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":`${this.prefix}fullscreenchange`,(()=>{this.onChange()})),cg.call(this.player,this.player.elements.container,"dblclick",(e=>{zh.element(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,"fullscreen")})),cg.call(this,this.player.elements.container,"keydown",(e=>this.trapFocus(e))),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Yg.nativeSupported&&!this.forceFallback}static get prefix(){if(zh.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some((t=>!(!zh.function(document[`${t}ExitFullscreen`])&&!zh.function(document[`${t}CancelFullScreen`])||(e=t,0)))),e}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Yg.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Yg.nativeSupported||!$g.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Yg.nativeSupported||this.forceFallback)return eg(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){var e;return $g.isIos&&this.player.config.fullscreen.iosNative?this.player.media:null!==(e=this.player.elements.fullscreen)&&void 0!==e?e:this.player.elements.container}}function Kg(e,t=1){return new Promise(((n,o)=>{const i=new Image,a=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=t?n:o)(i)};Object.assign(i,{onload:a,onerror:a,src:e})}))}const Qg={addStyleHook(){Jh(this.elements.container,this.config.selectors.container.replace(".",""),!0),Jh(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Qg.toggleNativeControls.call(this,!0);zh.element(this.elements.controls)||(Rg.inject.call(this),this.listeners.controls()),Qg.toggleNativeControls.call(this),this.isHTML5&&Fg.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Rg.updateVolume.call(this),Rg.timeUpdate.call(this),Rg.durationUpdate.call(this),Qg.checkPlaying.call(this),Jh(this.elements.container,this.config.classNames.pip.supported,sg.pip&&this.isHTML5&&this.isVideo),Jh(this.elements.container,this.config.classNames.airplay.supported,sg.airplay&&this.isHTML5),Jh(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((()=>{pg.call(this,this.media,"ready")}),0),Qg.setTitle.call(this),this.poster&&Qg.setPoster.call(this,this.poster,!1).catch((()=>{})),this.config.duration&&Rg.durationUpdate.call(this),this.config.mediaMetadata&&Rg.setMediaMetadata.call(this)},setTitle(){let e=Pg.get("play",this.config);if(zh.string(this.config.title)&&!zh.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach((t=>{t.setAttribute("aria-label",e)})),this.isEmbed){const e=og.call(this,"iframe");if(!zh.element(e))return;const t=zh.empty(this.config.title)?"video":this.config.title,n=Pg.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",t))}},togglePoster(e){Jh(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),gg.call(this).then((()=>Kg(e))).catch((t=>{throw e===this.poster&&Qg.togglePoster.call(this,!1),t})).then((()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),Qg.togglePoster.call(this,!0),e))))},checkPlaying(e){Jh(this.elements.container,this.config.classNames.playing,this.playing),Jh(this.elements.container,this.config.classNames.paused,this.paused),Jh(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",Pg.get(this.playing?"pause":"play",this.config))})),zh.event(e)&&"timeupdate"===e.type||Qg.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((()=>{Jh(this.elements.container,this.config.classNames.loading,this.loading),Qg.toggleControls.call(this)}),this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const n=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||n))}},migrateStyles(){Object.values({...this.media.style}).filter((e=>!zh.empty(e)&&zh.string(e)&&e.startsWith("--plyr"))).forEach((e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)})),zh.empty(this.media.style)&&this.media.removeAttribute("style")}};class Zg{constructor(e){ph(this,"firstTouch",(()=>{const{player:e}=this,{elements:t}=e;e.touch=!0,Jh(t.container,e.config.classNames.isTouch,!0)})),ph(this,"global",((e=!0)=>{const{player:t}=this;t.config.keyboard.global&&lg.call(t,window,"keydown keyup",this.handleKey,e,!1),lg.call(t,document.body,"click",this.toggleMenu,e),ug.call(t,document.body,"touchstart",this.firstTouch)})),ph(this,"container",(()=>{const{player:e}=this,{config:t,elements:n,timers:o}=e;!t.keyboard.global&&t.keyboard.focused&&cg.call(e,n.container,"keydown keyup",this.handleKey,!1),cg.call(e,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(t=>{const{controls:i}=n;i&&"enterfullscreen"===t.type&&(i.pressed=!1,i.hover=!1);let a=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(Qg.toggleControls.call(e,!0),a=e.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout((()=>Qg.toggleControls.call(e,!1)),a)}))
325 -;const i=()=>{if(!e.isVimeo||e.config.vimeo.premium)return;const t=n.wrapper,{active:o}=e.fullscreen,[i,a]=wg.call(e),s=xg(`aspect-ratio: ${i} / ${a}`);if(!o)return void(s?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null));const[r,l]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=r/l>i/a;s?(t.style.width=c?"auto":"100%",t.style.height=c?"100%":"auto"):(t.style.maxWidth=c?l/a*i+"px":null,t.style.margin=c?"0 auto":null)},a=()=>{clearTimeout(o.resized),o.resized=setTimeout(i,50)};cg.call(e,n.container,"enterfullscreen exitfullscreen",(t=>{const{target:o}=e.fullscreen;o===n.container&&(!e.isEmbed&&zh.empty(e.config.ratio)||(i(),("enterfullscreen"===t.type?cg:dg).call(e,window,"resize",a)))}))})),ph(this,"media",(()=>{const{player:e}=this,{elements:t}=e;if(cg.call(e,e.media,"timeupdate seeking seeked",(t=>Rg.timeUpdate.call(e,t))),cg.call(e,e.media,"durationchange loadeddata loadedmetadata",(t=>Rg.durationUpdate.call(e,t))),cg.call(e,e.media,"ended",(()=>{e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())})),cg.call(e,e.media,"progress playing seeking seeked",(t=>Rg.updateProgress.call(e,t))),cg.call(e,e.media,"volumechange",(t=>Rg.updateVolume.call(e,t))),cg.call(e,e.media,"playing play pause ended emptied timeupdate",(t=>Qg.checkPlaying.call(e,t))),cg.call(e,e.media,"waiting canplay seeked playing",(t=>Qg.checkLoading.call(e,t))),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){const n=og.call(e,`.${e.config.classNames.video}`);if(!zh.element(n))return;cg.call(e,t.container,"click",(o=>{([t.container,n].includes(o.target)||n.contains(o.target))&&(e.touch&&e.config.hideControls||(e.ended?(this.proxy(o,e.restart,"restart"),this.proxy(o,(()=>{mg(e.play())}),"play")):this.proxy(o,(()=>{mg(e.togglePlay())}),"play")))}))}e.supported.ui&&e.config.disableContextMenu&&cg.call(e,t.wrapper,"contextmenu",(e=>{e.preventDefault()}),!1),cg.call(e,e.media,"volumechange",(()=>{e.storage.set({volume:e.volume,muted:e.muted})})),cg.call(e,e.media,"ratechange",(()=>{Rg.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})})),cg.call(e,e.media,"qualitychange",(t=>{Rg.updateSetting.call(e,"quality",null,t.detail.quality)})),cg.call(e,e.media,"ready qualitychange",(()=>{Rg.setDownloadUrl.call(e)}));const n=e.config.events.concat(["keyup","keydown"]).join(" ");cg.call(e,e.media,n,(n=>{let{detail:o={}}=n;"error"===n.type&&(o=e.media.error),pg.call(e,t.container,n.type,!0,o)}))})),ph(this,"proxy",((e,t,n)=>{const{player:o}=this,i=o.config.listeners[n];let a=!0;zh.function(i)&&(a=i.call(o,e)),!1!==a&&zh.function(t)&&t.call(o,e)})),ph(this,"bind",((e,t,n,o,i=!0)=>{const{player:a}=this,s=a.config.listeners[o],r=zh.function(s);cg.call(a,e,t,(e=>this.proxy(e,n,o)),i&&!r)})),ph(this,"controls",(()=>{const{player:e}=this,{elements:t}=e,n=$g.isIE?"change":"input";if(t.buttons.play&&Array.from(t.buttons.play).forEach((t=>{this.bind(t,"click",(()=>{mg(e.togglePlay())}),"play")})),this.bind(t.buttons.restart,"click",e.restart,"restart"),this.bind(t.buttons.rewind,"click",(()=>{e.lastSeekTime=Date.now(),e.rewind()}),"rewind"),this.bind(t.buttons.fastForward,"click",(()=>{e.lastSeekTime=Date.now(),e.forward()}),"fastForward"),this.bind(t.buttons.mute,"click",(()=>{e.muted=!e.muted}),"mute"),this.bind(t.buttons.captions,"click",(()=>e.toggleCaptions())),this.bind(t.buttons.download,"click",(()=>{pg.call(e,e.media,"download")}),"download"),this.bind(t.buttons.fullscreen,"click",(()=>{e.fullscreen.toggle()}),"fullscreen"),this.bind(t.buttons.pip,"click",(()=>{e.pip="toggle"}),"pip"),this.bind(t.buttons.airplay,"click",e.airplay,"airplay"),this.bind(t.buttons.settings,"click",(t=>{t.stopPropagation(),t.preventDefault(),Rg.toggleMenu.call(e,t)}),null,!1),this.bind(t.buttons.settings,"keyup",(t=>{[" ","Enter"].includes(t.key)&&("Enter"!==t.key?(t.preventDefault(),t.stopPropagation(),Rg.toggleMenu.call(e,t)):Rg.focusFirstMenuItem.call(e,null,!0))}),null,!1),this.bind(t.settings.menu,"keydown",(t=>{"Escape"===t.key&&Rg.toggleMenu.call(e,t)})),this.bind(t.inputs.seek,"mousedown mousemove",(e=>{const n=t.progress.getBoundingClientRect(),o=e.pageX-e.clientX,i=100/n.width*(e.pageX-n.left-o);e.currentTarget.setAttribute("seek-value",i)})),this.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(t=>{const n=t.currentTarget,o="play-on-seeked";if(zh.keyboardEvent(t)&&!["ArrowLeft","ArrowRight"].includes(t.key))return;e.lastSeekTime=Date.now();const i=n.hasAttribute(o),a=["mouseup","touchend","keyup"].includes(t.type);i&&a?(n.removeAttribute(o),mg(e.play())):!a&&e.playing&&(n.setAttribute(o,""),e.pause())})),$g.isIos){const t=ng.call(e,'input[type="range"]');Array.from(t).forEach((e=>this.bind(e,n,(e=>Fh(e.target)))))}this.bind(t.inputs.seek,n,(t=>{const n=t.currentTarget;let o=n.getAttribute("seek-value");zh.empty(o)&&(o=n.value),n.removeAttribute("seek-value"),e.currentTime=o/n.max*e.duration}),"seek"),this.bind(t.progress,"mouseenter mouseleave mousemove",(t=>Rg.updateSeekTooltip.call(e,t))),this.bind(t.progress,"mousemove touchmove",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.startMove(t)})),this.bind(t.progress,"mouseleave touchend click",(()=>{const{previewThumbnails:t}=e;t&&t.loaded&&t.endMove(!1,!0)})),this.bind(t.progress,"mousedown touchstart",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.startScrubbing(t)})),this.bind(t.progress,"mouseup touchend",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.endScrubbing(t)})),$g.isWebKit&&Array.from(ng.call(e,'input[type="range"]')).forEach((t=>{this.bind(t,"input",(t=>Rg.updateRangeFill.call(e,t.target)))})),e.config.toggleInvert&&!zh.element(t.display.duration)&&this.bind(t.display.currentTime,"click",(()=>{0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,Rg.timeUpdate.call(e))})),this.bind(t.inputs.volume,n,(t=>{e.volume=t.target.value}),"volume"),this.bind(t.controls,"mouseenter mouseleave",(n=>{t.controls.hover=!e.touch&&"mouseenter"===n.type})),t.fullscreen&&Array.from(t.fullscreen.children).filter((e=>!e.contains(t.container))).forEach((n=>{this.bind(n,"mouseenter mouseleave",(n=>{t.controls&&(t.controls.hover=!e.touch&&"mouseenter"===n.type)}))})),this.bind(t.controls,"mousedown mouseup touchstart touchend touchcancel",(e=>{t.controls.pressed=["mousedown","touchstart"].includes(e.type)})),this.bind(t.controls,"focusin",(()=>{const{config:n,timers:o}=e;Jh(t.controls,n.classNames.noTransition,!0),Qg.toggleControls.call(e,!0),setTimeout((()=>{Jh(t.controls,n.classNames.noTransition,!1)}),0);const i=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout((()=>Qg.toggleControls.call(e,!1)),i)})),this.bind(t.inputs.volume,"wheel",(t=>{const n=t.webkitDirectionInvertedFromDevice,[o,i]=[t.deltaX,-t.deltaY].map((e=>n?-e:e)),a=Math.sign(Math.abs(o)>Math.abs(i)?o:i);e.increaseVolume(a/50);const{volume:s}=e.media;(1===a&&s<1||-1===a&&s>0)&&t.preventDefault()}),"volume",!1)})),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:n}=t,{key:o,type:i,altKey:a,ctrlKey:s,metaKey:r,shiftKey:l}=e,c="keydown"===i,d=c&&o===this.lastKey;var u;if(!(a||s||r||l)&&o)if(c){const i=document.activeElement;if(zh.element(i)){const{editable:o}=t.config.selectors,{seek:a}=n.inputs;if(i!==a&&tg(i,o))return;if(" "===e.key&&tg(i,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(o)&&(e.preventDefault(),e.stopPropagation()),o){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d||(u=Number.parseInt(o,10),t.currentTime=t.duration/10*u);break;case" ":case"k":d||mg(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":
326 -t.decreaseVolume(.1);break;case"m":d||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":d||t.toggleCaptions();break;case"l":t.loop=!t.loop}"Escape"===o&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=o}else this.lastKey=null}toggleMenu(e){Rg.toggleMenu.call(this.player,e)}}function Xg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jg,em={exports:{}},tm=(Jg||(Jg=1,em.exports=function(){var e=function(){},t={},n={},o={};function i(e,t){if(e){var i=o[e];if(n[e]=t,i)for(;i.length;)i[0](e,t),i.splice(0,1)}}function a(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function s(t,n,o,i){var a,r,l,c=document,d=o.async,u=(o.numRetries||0)+1,p=o.before||e,h=t.replace(/[\?|#].*$/,""),g=t.replace(/^(css|img|module|nomodule)!/,"");if(i=i||0,/(^css!|\.css$)/.test(h))(l=c.createElement("link")).rel="stylesheet",l.href=g,(a="hideFocus"in l)&&l.relList&&(a=0,l.rel="preload",l.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h))(l=c.createElement("img")).src=g;else if((l=c.createElement("script")).src=g,l.async=void 0===d||d,r="noModule"in l,/^module!/.test(h)){if(!r)return n(t,"l");l.type="module"}else if(/^nomodule!/.test(h)&&r)return n(t,"l");l.onload=l.onerror=l.onbeforeload=function(e){var r=e.type[0];if(a)try{l.sheet.cssText.length||(r="e")}catch(e){18!=e.code&&(r="e")}if("e"==r){if((i+=1)<u)return s(t,n,o,i)}else if("preload"==l.rel&&"style"==l.as)return l.rel="stylesheet";n(t,r,e.defaultPrevented)},!1!==p(t,l)&&c.head.appendChild(l)}function r(e,n,o){var r,l;if(n&&n.trim&&(r=n),l=(r?o:n)||{},r){if(r in t)throw"LoadJS";t[r]=!0}function c(t,n){!function(e,t,n){var o,i,a=(e=e.push?e:[e]).length,r=a,l=[];for(o=function(e,n,o){if("e"==n&&l.push(e),"b"==n){if(!o)return;l.push(e)}--a||t(l)},i=0;i<r;i++)s(e[i],o,n)}(e,(function(e){a(l,e),t&&a({success:t,error:n},e),i(r,e)}),l)}if(l.returnPromise)return new Promise(c);c()}return r.ready=function(e,t){return function(e,t){e=e.push?e:[e];var i,a,s,r=[],l=e.length,c=l;for(i=function(e,n){n.length&&r.push(e),--c||t(r)};l--;)a=e[l],(s=n[a])?i(a,s):(o[a]=o[a]||[]).push(i)}(e,(function(e){a(t,e)})),r},r.done=function(e){i(e,[])},r.reset=function(){t={},n={},o={}},r.isDefined=function(e){return e in t},r}()),em.exports),nm=Xg(tm);function om(e){return new Promise(((t,n)=>{nm(e,{success:t,error:n})}))}function im(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,pg.call(this,this.media,e?"play":"pause"))}const am={setup(){const e=this;Jh(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,_g.call(e),zh.object(window.Vimeo)?am.ready.call(e):om(e.config.urls.vimeo.sdk).then((()=>{am.ready.call(e)})).catch((t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)}))},ready(){const e=this,t=e.config.vimeo,{premium:n,referrerPolicy:o,...i}=t;let a=e.media.getAttribute("src"),s="";zh.empty(a)?(a=e.media.getAttribute(e.config.attributes.embed.id),s=e.media.getAttribute(e.config.attributes.embed.hash)):s=function(e){const t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*h=|\/)+([\d,a-f]+)/);return t&&5===t.length?t[4]:null}(a);const r=s?{h:s}:{};n&&Object.assign(i,{controls:!1,sidedock:!1});const l=Dg({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...r,...i}),c=function(e){if(zh.empty(e))return null;if(zh.number(Number(e)))return e;const t=e.match(/^.*(vimeo.com\/|video\/)(\d+).*/);return t?t[2]:e}(a),d=Vh("iframe"),u=Sg(e.config.urls.vimeo.iframe,c,l);if(d.setAttribute("src",u),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),zh.empty(o)||d.setAttribute("referrerPolicy",o),n||!t.customControls)d.setAttribute("data-poster",e.poster),e.media=Qh(d,e.media);else{const t=Vh("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});t.appendChild(d),e.media=Qh(t,e.media)}t.customControls||Ag(Sg(e.config.urls.vimeo.api,u)).then((t=>{!zh.empty(t)&&t.thumbnail_url&&Qg.setPoster.call(e,t.thumbnail_url).catch((()=>{}))})),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(im.call(e,!0),e.embed.play()),e.media.pause=()=>(im.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:p}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>p,set(t){const{embed:n,media:o,paused:i,volume:a}=e,s=i&&!n.hasPlayed;o.seeking=!0,pg.call(e,o,"seeking"),Promise.resolve(s&&n.setVolume(0)).then((()=>n.setCurrentTime(t))).then((()=>s&&n.pause())).then((()=>s&&n.setVolume(a))).catch((()=>{}))}});let h=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>h,set(t){e.embed.setPlaybackRate(t).then((()=>{h=t,pg.call(e,e.media,"ratechange")})).catch((()=>{e.options.speed=[1]}))}});let{volume:g}=e.config;Object.defineProperty(e.media,"volume",{get:()=>g,set(t){e.embed.setVolume(t).then((()=>{g=t,pg.call(e,e.media,"volumechange")}))}});let{muted:m}=e.config;Object.defineProperty(e.media,"muted",{get:()=>m,set(t){const n=!!zh.boolean(t)&&t;e.embed.setMuted(!!n||e.config.muted).then((()=>{m=n,pg.call(e,e.media,"volumechange")}))}});let b,{loop:f}=e.config;Object.defineProperty(e.media,"loop",{get:()=>f,set(t){const n=zh.boolean(t)?t:e.config.loop.active;e.embed.setLoop(n).then((()=>{f=n}))}}),e.embed.getVideoUrl().then((t=>{b=t,Rg.setDownloadUrl.call(e)})).catch((e=>{this.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:()=>b}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((t=>{const[n,o]=t;e.embed.ratio=Cg(n,o),_g.call(this)})),e.embed.setAutopause(e.config.autopause).then((t=>{e.config.autopause=t})),e.embed.getVideoTitle().then((t=>{e.config.title=t,Qg.setTitle.call(this)})),e.embed.getCurrentTime().then((t=>{p=t,pg.call(e,e.media,"timeupdate")})),e.embed.getDuration().then((t=>{e.media.duration=t,pg.call(e,e.media,"durationchange")})),e.embed.getTextTracks().then((t=>{e.media.textTracks=t,Fg.setup.call(e)})),e.embed.on("cuechange",(({cues:t=[]})=>{const n=t.map((e=>function(e){const t=document.createDocumentFragment(),n=document.createElement("div");return t.appendChild(n),n.innerHTML=e,t.firstChild.textContent}(e.text)));Fg.updateCues.call(e,n)})),e.embed.on("loaded",(()=>{e.embed.getPaused().then((t=>{im.call(e,!t),t||pg.call(e,e.media,"playing")})),zh.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)})),e.embed.on("bufferstart",(()=>{pg.call(e,e.media,"waiting")})),e.embed.on("bufferend",(()=>{pg.call(e,e.media,"playing")})),e.embed.on("play",(()=>{im.call(e,!0),pg.call(e,e.media,"playing")})),e.embed.on("pause",(()=>{im.call(e,!1)})),e.embed.on("timeupdate",(t=>{e.media.seeking=!1,p=t.seconds,pg.call(e,e.media,"timeupdate")})),e.embed.on("progress",(t=>{e.media.buffered=t.percent,pg.call(e,e.media,"progress"),1===Number.parseInt(t.percent,10)&&pg.call(e,e.media,"canplaythrough"),e.embed.getDuration().then((t=>{t!==e.media.duration&&(e.media.duration=t,pg.call(e,e.media,"durationchange"))}))})),e.embed.on("seeked",(()=>{e.media.seeking=!1,pg.call(e,e.media,"seeked")})),e.embed.on("ended",(()=>{e.media.paused=!0,pg.call(e,e.media,"ended")})),e.embed.on("error",(t=>{e.media.error=t,pg.call(e,e.media,"error")})),t.customControls&&setTimeout((()=>Qg.build.call(e)),0)}};function sm(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,pg.call(this,this.media,e?"play":"pause"))}function rm(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}
327 -const lm={setup(){if(Jh(this.elements.wrapper,this.config.classNames.embed,!0),zh.object(window.YT)&&zh.function(window.YT.Player))lm.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{zh.function(e)&&e(),lm.ready.call(this)},om(this.config.urls.youtube.sdk).catch((e=>{this.debug.warn("YouTube API failed to load",e)}))}},getTitle(e){Ag(Sg(this.config.urls.youtube.api,e)).then((e=>{if(zh.object(e)){const{title:t,height:n,width:o}=e;this.config.title=t,Qg.setTitle.call(this),this.embed.ratio=Cg(o,n)}_g.call(this)})).catch((()=>{_g.call(this)}))},ready(){const e=this,t=e.config.youtube,n=e.media&&e.media.getAttribute("id");if(!zh.empty(n)&&n.startsWith("youtube-"))return;let o=e.media.getAttribute("src");zh.empty(o)&&(o=e.media.getAttribute(this.config.attributes.embed.id));const i=function(e){if(zh.empty(e))return null;const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&t[2]?t[2]:e}(o),a=function(e){return`${e}-${Math.floor(1e4*Math.random())}`}(e.provider),s=Vh("div",{id:a,"data-poster":t.customControls?e.poster:void 0});if(e.media=Qh(s,e.media),t.customControls){const t=e=>`https://i.ytimg.com/vi/${i}/${e}default.jpg`;Kg(t("maxres"),121).catch((()=>Kg(t("sd"),121))).catch((()=>Kg(t("hq")))).then((t=>Qg.setPoster.call(e,t.src))).then((t=>{t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")})).catch((()=>{}))}e.embed=new window.YT.Player(e.media,{videoId:i,host:rm(t),playerVars:Wh({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(t){if(!e.media.error){const n=t.data,o={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[n]||"An unknown error occurred";e.media.error={code:n,message:o},pg.call(e,e.media,"error")}},onPlaybackRateChange(t){const n=t.target;e.media.playbackRate=n.getPlaybackRate(),pg.call(e,e.media,"ratechange")},onReady(n){if(zh.function(e.media.play))return;const o=n.target;lm.getTitle.call(e,i),e.media.play=()=>{sm.call(e,!0),o.playVideo()},e.media.pause=()=>{sm.call(e,!1),o.pauseVideo()},e.media.stop=()=>{o.stopVideo()},e.media.duration=o.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(o.getCurrentTime()),set(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,pg.call(e,e.media,"seeking"),o.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>o.getPlaybackRate(),set(e){o.setPlaybackRate(e)}});let{volume:a}=e.config;Object.defineProperty(e.media,"volume",{get:()=>a,set(t){a=t,o.setVolume(100*a),pg.call(e,e.media,"volumechange")}});let{muted:s}=e.config;Object.defineProperty(e.media,"muted",{get:()=>s,set(t){const n=zh.boolean(t)?t:s;s=n,o[n?"mute":"unMute"](),o.setVolume(100*a),pg.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>o.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const r=o.getAvailablePlaybackRates();e.options.speed=r.filter((t=>e.config.speed.options.includes(t))),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),pg.call(e,e.media,"timeupdate"),pg.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval((()=>{e.media.buffered=o.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&pg.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),pg.call(e,e.media,"canplaythrough"))}),200),t.customControls&&setTimeout((()=>Qg.build.call(e)),50)},onStateChange(n){const o=n.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(n.data)&&(e.media.seeking=!1,pg.call(e,e.media,"seeked")),n.data){case-1:pg.call(e,e.media,"timeupdate"),e.media.buffered=o.getVideoLoadedFraction(),pg.call(e,e.media,"progress");break;case 0:sm.call(e,!1),e.media.loop?(o.stopVideo(),o.playVideo()):pg.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(sm.call(e,!0),pg.call(e,e.media,"playing"),e.timers.playing=setInterval((()=>{pg.call(e,e.media,"timeupdate")}),50),e.media.duration!==o.getDuration()&&(e.media.duration=o.getDuration(),pg.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),sm.call(e,!1);break;case 3:pg.call(e,e.media,"waiting")}pg.call(e,e.elements.container,"statechange",!1,{code:n.data})}}})}},cm={setup(){this.media?(Jh(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Jh(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Jh(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Vh("div",{class:this.config.classNames.video}),Uh(this.media,this.elements.wrapper),this.elements.poster=Vh("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?jg.setup.call(this):this.isYouTube?lm.setup.call(this):this.isVimeo&&am.setup.call(this)):this.debug.warn("No media element found!")}};class dm{constructor(e){ph(this,"load",(()=>{this.enabled&&(zh.object(window.google)&&zh.object(window.google.ima)?this.ready():om(this.player.config.urls.googleIMA.sdk).then((()=>{this.ready()})).catch((()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))})))})),ph(this,"ready",(()=>{var e;this.enabled||((e=this).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then((()=>{this.clearSafetyTimer("onAdsManagerLoaded()")})),this.listeners(),this.setupIMA()})),ph(this,"setupIMA",(()=>{this.elements.container=Vh("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(e=>this.onAdsManagerLoaded(e)),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e)),!1),this.requestAds()})),ph(this,"requestAds",(()=>{const{container:e}=this.player.elements;try{const t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(e){this.onAdError(e)}})),ph(this,"pollCountdown",((e=!1)=>{if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text")
328 -;this.countdownTimer=setInterval((()=>{const e=Og(Math.max(this.manager.getRemainingTime(),0)),t=`${Pg.get("advertisement",this.player.config)} - ${e}`;this.elements.container.setAttribute("data-badge-text",t)}),100)})),ph(this,"onAdsManagerLoaded",(e=>{if(!this.enabled)return;const t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,this.manager=e.getAdsManager(this.player,t),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e))),Object.keys(google.ima.AdEvent.Type).forEach((e=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],(e=>this.onAdEvent(e)))})),this.trigger("loaded")})),ph(this,"addCuePoints",(()=>{zh.empty(this.cuePoints)||this.cuePoints.forEach((e=>{if(0!==e&&-1!==e&&e<this.player.duration){const t=this.player.elements.progress;if(zh.element(t)){const n=100/this.player.duration*e,o=Vh("span",{class:this.player.config.classNames.cues});o.style.left=`${n.toString()}%`,t.appendChild(o)}}}))})),ph(this,"onAdEvent",(e=>{const{container:t}=this.player.elements,n=e.getAd(),o=e.getAdData();switch((e=>{pg.call(this.player,this.player.media,`ads${e.replace(/_/g,"").toLowerCase()}`)})(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),n.isLinear()||(n.width=t.offsetWidth,n.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&this.player.debug.warn(`Non-fatal ad error: ${o.adError.getMessage()}`)}})),ph(this,"onAdError",(e=>{this.cancel(),this.player.debug.warn("Ads error",e)})),ph(this,"listeners",(()=>{const{container:e}=this.player.elements;let t;this.player.on("canplay",(()=>{this.addCuePoints()})),this.player.on("ended",(()=>{this.loader.contentComplete()})),this.player.on("timeupdate",(()=>{t=this.player.currentTime})),this.player.on("seeked",(()=>{const e=this.player.currentTime;zh.empty(this.cuePoints)||this.cuePoints.forEach(((n,o)=>{t<n&&n<e&&(this.manager.discardAdBreak(),this.cuePoints.splice(o,1))}))})),window.addEventListener("resize",(()=>{this.manager&&this.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)}))})),ph(this,"play",(()=>{const{container:e}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then((()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(e){this.onAdError(e)}})).catch((()=>{}))})),ph(this,"resumeContent",(()=>{this.elements.container.style.zIndex="",this.playing=!1,mg(this.player.media.play())})),ph(this,"pauseContent",(()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()})),ph(this,"cancel",(()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()})),ph(this,"loadAds",(()=>{this.managerPromise.then((()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise((e=>{this.on("loaded",e),this.player.debug.log(this.manager)})),this.initialized=!1,this.requestAds()})).catch((()=>{}))})),ph(this,"trigger",((e,...t)=>{const n=this.events[e];zh.array(n)&&n.forEach((e=>{zh.function(e)&&e.apply(this,t)}))})),ph(this,"on",((e,t)=>(zh.array(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this))),ph(this,"startSafetyTimer",((e,t)=>{this.player.debug.log(`Safety timer invoked from: ${t}`),this.safetyTimer=setTimeout((()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")}),e)})),ph(this,"clearSafetyTimer",(e=>{zh.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${e}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)})),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise(((e,t)=>{this.on("loaded",e),this.on("error",t)})),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!zh.empty(e.publisherId)||zh.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return zh.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Dg({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function um(e=0,t=0,n=255){return Math.min(Math.max(e,t),n)}function pm(e){const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach((e=>{const n={};e.split(/\r\n|\n|\r/).forEach((e=>{if(zh.number(n.startTime)){if(!zh.empty(e.trim())&&zh.empty(n.text)){const t=e.trim().split("#xywh=");[n.text]=t,t[1]&&([n.x,n.y,n.w,n.h]=t[1].split(","))}}else{const t=e.match(/(\d{2})?:?(\d{2}):(\d{2}).(\d{2,3})( ?--> ?)(\d{2})?:?(\d{2}):(\d{2}).(\d{2,3})/);t&&(n.startTime=60*Number(t[1]||0)*60+60*Number(t[2])+Number(t[3])+Number(`0.${t[4]}`),n.endTime=60*Number(t[6]||0)*60+60*Number(t[7])+Number(t[8])+Number(`0.${t[9]}`))}})),n.text&&t.push(n)})),t}function hm(e,t){const n={};return e>t.width/t.height?(n.width=t.width,n.height=1/e*t.width):(n.height=t.height,n.width=e*t.height),n}class gm{constructor(e){ph(this,"load",(()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then((()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)}))})),ph(this,"getThumbnails",(()=>new Promise((e=>{const{src:t}=this.player.config.previewThumbnails;if(zh.empty(t))throw new Error("Missing previewThumbnails.src config attribute");const n=()=>{this.thumbnails.sort(((e,t)=>e.height-t.height)),this.player.debug.log("Preview thumbnails",this.thumbnails),e()};if(zh.function(t))t((e=>{this.thumbnails=e,n()}));else{const e=(zh.string(t)?[t]:t).map((e=>this.getThumbnail(e)));Promise.all(e).then(n)}})))),ph(this,"getThumbnail",(e=>new Promise((t=>{Ag(e,void 0,this.player.config.previewThumbnails.withCredentials).then((n=>{const o={frames:pm(n),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));const i=new Image;i.onload=()=>{o.height=i.naturalHeight,o.width=i.naturalWidth,this.thumbnails.push(o),t()},i.src=o.urlPrefix+o.frames[0].text}))})))),ph(this,"startMove",(e=>{if(this.loaded&&zh.event(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t,n;const o=this.player.elements.progress.getBoundingClientRect(),i=100/o.width*(e.pageX-o.left);this.seekTime=this.player.media.duration*(i/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.textContent=Og(this.seekTime);const a=null===(t=this.player.config.markers)||void 0===t||null===(n=t.points)||void 0===n?void 0:n.find((({time:e})=>e===Math.round(this.seekTime)));a&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${a.label}<br>`)}this.showImageAtCurrentTime()}})),ph(this,"endMove",(()=>{this.toggleThumbContainer(!1,!0)})),ph(this,"startScrubbing",(e=>{(zh.nullOrUndefined(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0,
329 -this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))})),ph(this,"endScrubbing",(()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):ug.call(this.player,this.player.media,"timeupdate",(()=>{this.mouseDown||this.toggleScrubbingContainer(!1)}))})),ph(this,"listeners",(()=>{this.player.on("play",(()=>{this.toggleThumbContainer(!1,!0)})),this.player.on("seeked",(()=>{this.toggleThumbContainer(!1)})),this.player.on("timeupdate",(()=>{this.lastTime=this.player.media.currentTime}))})),ph(this,"render",(()=>{this.elements.thumb.container=Vh("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=Vh("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const e=Vh("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=Vh("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(e),zh.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=Vh("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)})),ph(this,"destroy",(()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()})),ph(this,"showImageAtCurrentTime",(()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const e=this.thumbnails[0].frames.findIndex((e=>this.seekTime>=e.startTime&&this.seekTime<=e.endTime)),t=e>=0;let n=0;this.mouseDown||this.toggleThumbContainer(t),t&&(this.thumbnails.forEach(((t,o)=>{this.loadedImages.includes(t.frames[e].text)&&(n=o)})),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(n)))})),ph(this,"loadImage",((e=0)=>{const t=this.showingThumb,n=this.thumbnails[e],{urlPrefix:o}=n,i=n.frames[t],a=n.frames[t].text,s=o+a;if(this.currentImageElement&&this.currentImageElement.dataset.filename===a)this.showImage(this.currentImageElement,i,e,t,a,!1),this.currentImageElement.dataset.index=t,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const n=new Image;n.src=s,n.dataset.index=t,n.dataset.filename=a,this.showingThumbFilename=a,this.player.debug.log(`Loading image: ${s}`),n.onload=()=>this.showImage(n,i,e,t,a,!0),this.loadingImage=n,this.removeOldImages(n)}})),ph(this,"showImage",((e,t,n,o,i,a=!0)=>{this.player.debug.log(`Showing thumb: ${i}. num: ${o}. qual: ${n}. newimg: ${a}`),this.setImageSizeAndOffset(e,t),a&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(i)||this.loadedImages.push(i)),this.preloadNearby(o,!0).then(this.preloadNearby(o,!1)).then(this.getHigherQuality(n,e,t,i))})),ph(this,"removeOldImages",(e=>{Array.from(this.currentImageContainer.children).forEach((t=>{if("img"!==t.tagName.toLowerCase())return;const n=this.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;const{currentImageContainer:e}=this;setTimeout((()=>{e.removeChild(t),this.player.debug.log(`Removing thumb: ${t.dataset.filename}`)}),n)}}))})),ph(this,"preloadNearby",((e,t=!0)=>new Promise((n=>{setTimeout((()=>{const o=this.thumbnails[0].frames[e].text;if(this.showingThumbFilename===o){let i;i=t?this.thumbnails[0].frames.slice(e):this.thumbnails[0].frames.slice(0,e).reverse();let a=!1;i.forEach((e=>{const t=e.text;if(t!==o&&!this.loadedImages.includes(t)){a=!0,this.player.debug.log(`Preloading thumb filename: ${t}`);const{urlPrefix:e}=this.thumbnails[0],o=e+t,i=new Image;i.src=o,i.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${t}`),this.loadedImages.includes(t)||this.loadedImages.push(t),n()}}})),a||n()}}),300)})))),ph(this,"getHigherQuality",((e,t,n,o)=>{if(e<this.thumbnails.length-1){let i=t.naturalHeight;this.usingSprites&&(i=n.h),i<this.thumbContainerHeight&&setTimeout((()=>{this.showingThumbFilename===o&&(this.player.debug.log(`Showing higher quality thumb for: ${o}`),this.loadImage(e+1))}),300)}})),ph(this,"toggleThumbContainer",((e=!1,t=!1)=>{const n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)})),ph(this,"toggleScrubbingContainer",((e=!1)=>{const t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)})),ph(this,"determineContainerAutoSizing",(()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)})),ph(this,"setThumbContainerSizeAndPos",(()=>{const{imageContainer:e}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(e.clientHeight>20&&e.clientWidth<20){const t=Math.floor(e.clientHeight*this.thumbAspectRatio);e.style.width=`${t}px`}else if(e.clientHeight<20&&e.clientWidth>20){const t=Math.floor(e.clientWidth/this.thumbAspectRatio);e.style.height=`${t}px`}}else{const t=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);e.style.height=`${this.thumbContainerHeight}px`,e.style.width=`${t}px`}this.setThumbContainerPos()})),ph(this,"setThumbContainerPos",(()=>{const e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:n}=this.elements.thumb,o=t.left-e.left+10,i=t.right-e.left-n.clientWidth-10,a=this.mousePosX-e.left-n.clientWidth/2,s=um(a,o,i);n.style.left=`${s}px`,n.style.setProperty("--preview-arrow-offset",a-s+"px")})),ph(this,"setScrubbingContainerSize",(()=>{const{width:e,height:t}=hm(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${e}px`,this.elements.scrubbing.container.style.height=`${t}px`})),ph(this,"setImageSizeAndOffset",((e,t)=>{if(!this.usingSprites)return;const n=this.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*n+"px",e.style.width=e.naturalWidth*n+"px",e.style.left=`-${t.x*n}px`,e.style.top=`-${t.y*n}px`})),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=hm(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const mm={insertElements(e,t){zh.string(t)?qh(e,this.media,{src:t}):zh.array(t)&&t.forEach((t=>{qh(e,this.media,t)}))},change(e){Hh(e,"sources.length")?(jg.cancelRequests.call(this),this.destroy((()=>{this.options.quality=[],Yh(this.media),this.media=null,
330 -zh.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:t,type:n}=e,[{provider:o=Ug.html5,src:i}]=t,a="html5"===o?n:"div",s="html5"===o?{}:{src:i};Object.assign(this,{provider:o,type:n,supported:sg.check(n,o,this.config.playsinline),media:Vh(a,s)}),this.elements.container.appendChild(this.media),zh.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),zh.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Qg.addStyleHook.call(this),this.isHTML5&&mm.insertElements.call(this,"source",t),this.config.title=e.title,cm.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&mm.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Qg.build.call(this),this.isHTML5&&this.media.load(),zh.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new gm(this))),this.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}};class bm{constructor(e,t){if(ph(this,"play",(()=>zh.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then((()=>this.ads.play())).catch((()=>mg(this.media.play()))),this.media.play()):null)),ph(this,"pause",(()=>this.playing&&zh.function(this.media.pause)?this.media.pause():null)),ph(this,"togglePlay",(e=>(zh.boolean(e)?e:!this.playing)?this.play():this.pause())),ph(this,"stop",(()=>{this.isHTML5?(this.pause(),this.restart()):zh.function(this.media.stop)&&this.media.stop()})),ph(this,"restart",(()=>{this.currentTime=0})),ph(this,"rewind",(e=>{this.currentTime-=zh.number(e)?e:this.config.seekTime})),ph(this,"forward",(e=>{this.currentTime+=zh.number(e)?e:this.config.seekTime})),ph(this,"increaseVolume",(e=>{const t=this.media.muted?0:this.volume;this.volume=t+(zh.number(e)?e:0)})),ph(this,"decreaseVolume",(e=>{this.increaseVolume(-e)})),ph(this,"airplay",(()=>{sg.airplay&&this.media.webkitShowPlaybackTargetPicker()})),ph(this,"toggleControls",(e=>{if(this.supported.ui&&!this.isAudio){const t=eg(this.elements.container,this.config.classNames.hideControls),n=void 0===e?void 0:!e,o=Jh(this.elements.container,this.config.classNames.hideControls,n);if(o&&zh.array(this.config.controls)&&this.config.controls.includes("settings")&&!zh.empty(this.config.settings)&&Rg.toggleMenu.call(this,!1),o!==t){const e=o?"controlshidden":"controlsshown";pg.call(this,this.media,e)}return!o}return!1})),ph(this,"on",((e,t)=>{cg.call(this,this.elements.container,e,t)})),ph(this,"once",((e,t)=>{ug.call(this,this.elements.container,e,t)})),ph(this,"off",((e,t)=>{dg(this.elements.container,e,t)})),ph(this,"destroy",((e,t=!1)=>{if(!this.ready)return;const n=()=>{document.body.style.overflow="",this.embed=null,t?(Object.keys(this.elements).length&&(Yh(this.elements.buttons.play),Yh(this.elements.captions),Yh(this.elements.controls),Yh(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),zh.function(e)&&e()):(hg.call(this),jg.cancelRequests.call(this),Qh(this.elements.original,this.elements.container),pg.call(this,this.elements.original,"destroyed",!0),zh.function(e)&&e.call(this.elements.original),this.ready=!1,setTimeout((()=>{this.elements=null,this.media=null}),200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Qg.toggleNativeControls.call(this,!0),n()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&zh.function(this.embed.destroy)&&this.embed.destroy(),n()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(n),setTimeout(n,200))})),ph(this,"supports",(e=>sg.mime.call(this,e))),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=sg.touch,this.media=e,zh.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||zh.nodeList(this.media)||zh.array(this.media))&&(this.media=this.media[0]),this.config=Wh({},Hg,bm.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new qg(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",sg),zh.nullOrUndefined(this.media)||!zh.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!sg.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const o=this.media.tagName.toLowerCase();let i=null,a=null;switch(o){case"div":if(i=this.media.querySelector("iframe"),zh.element(i)){if(a=zg(i.getAttribute("src")),this.provider=function(e){return/^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Ug.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Ug.vimeo:null}(a.toString()),this.elements.container=this.media,this.media=i,this.elements.container.className="",a.search.length){const e=["1","true"];e.includes(a.searchParams.get("autoplay"))&&(this.config.autoplay=!0),e.includes(a.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=e.includes(a.searchParams.get("playsinline")),this.config.youtube.hl=a.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(zh.empty(this.provider)||!Object.values(Ug).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Gg;break;case"video":case"audio":this.type=o,this.provider=Ug.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=sg.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new Zg(this),this.storage=new Eg(this),this.media.plyr=this,zh.element(this.elements.container)||(this.elements.container=Vh("div"),Uh(this.media,this.elements.container)),Qg.migrateStyles.call(this),Qg.addStyleHook.call(this),cm.setup.call(this),this.config.debug&&cg.call(this,this.elements.container,this.config.events.join(" "),(e=>{this.debug.log(`event: ${e.type}`)})),this.fullscreen=new Yg(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Qg.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new dm(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(()=>mg(this.play()))),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new gm(this))):this.debug.error("Setup failed: no support")}
331 -get isHTML5(){return this.provider===Ug.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Ug.youtube}get isVimeo(){return this.provider===Ug.vimeo}get isVideo(){return this.type===Gg}get isAudio(){return"audio"===this.type}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&0===this.currentTime)}get ended(){return Boolean(this.media.ended)}set currentTime(e){if(!this.duration)return;const t=zh.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return zh.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const e=Number.parseFloat(this.config.duration),t=(this.media||{}).duration,n=zh.number(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;zh.string(t)&&(t=Number(t)),zh.number(t)||(t=this.storage.get("volume")),zh.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!zh.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;zh.boolean(t)||(t=this.storage.get("muted")),zh.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;zh.number(e)&&(t=e),zh.number(t)||(t=this.storage.get("speed")),zh.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:o}=this;t=um(t,n,o),this.config.speed.selected=t,setTimeout((()=>{this.media&&(this.media.playbackRate=t)}),0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let o=[!zh.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(zh.number),i=!0;if(!n.includes(o)){const e=fg(n,o);this.debug.warn(`Unsupported quality option: ${o}, using ${e} instead`),o=e,i=!1}t.selected=o,this.media.quality=o,i&&this.storage.set({quality:o})}get quality(){return this.media.quality}set loop(e){const t=zh.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(e){mm.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return zh.url(e)?e:this.source}set download(e){zh.url(e)&&(this.config.urls.download=e,Rg.setDownloadUrl.call(this))}set poster(e){this.isVideo?Qg.setPoster.call(this,e,!1).catch((()=>{})):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=kg(wg.call(this));return zh.array(e)?e.join(":"):e}set ratio(e){this.isVideo?zh.string(e)&&vg(e)?(this.config.ratio=kg(e),_g.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=zh.boolean(e)?e:this.config.autoplay}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(e){Fg.toggle.call(this,e,!1)}set currentTrack(e){Fg.set.call(this,e,!1),Fg.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Fg.setLanguage.call(this,e,!1)}get language(){return(Fg.getCurrentTrack.call(this)||{}).language}set pip(e){if(!sg.pip)return;const t=zh.boolean(e)?e:!this.pip;zh.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Wg:"inline"),zh.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return sg.pip?zh.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Wg:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new gm(this))}static supported(e,t){return sg.check(e,t)}static loadSprite(e,t){return Bg(e,t)}static setup(e,t={}){let n=null;return zh.string(e)?n=Array.from(document.querySelectorAll(e)):zh.nodeList(e)?n=Array.from(e):zh.array(e)&&(n=e.filter(zh.element)),zh.empty(n)?null:n.map((e=>new bm(e,t)))}}var fm;bm.defaults=(fm=Hg,JSON.parse(JSON.stringify(fm)));var xm=s(5556),ym=s.n(xm);const vm=(e,t)=>{const n=new bm(".plyr-react",t.options||{});return t.source&&(n.source=t.source),n},km=e=>{e&&e.destroy()},wm=()=>{},_m=e=>e?()=>({plyr:e}):()=>new Proxy({plyr:{source:null}},{get:(e,t)=>"plyr"===t?e[t]:wm});const Cm=m.forwardRef(((e,t)=>{const{source:n,options:o=null,...i}=e,a=function(e,t,n=null){return function(e,t,n=[]){const[o,i]=(0,m.useState)(null),a=(0,m.useRef)(null),{instantiate:s,destroy:r,getAPI:l,params:c}=t;(0,m.useEffect)((()=>{const e=s(a.current,c);return i(e),()=>{r&&r(e,c)}}),n);const d=(0,m.useMemo)((()=>l(o,c)),[o]);return(0,m.useImperativeHandle)(e,d,[d]),a}(e,{instantiate:vm,getAPI:_m,destroy:km,params:t},n||[t.options,t.source])}(t,{source:n,options:o});return(0,l.jsx)("video",{ref:a,className:"plyr-react plyr",...i})}));Cm.displayName="Plyr",Cm.defaultProps={options:{controls:["rewind","play","fast-forward","progress","current-time","duration","mute","volume","settings","fullscreen"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop"}},source:{type:"video",sources:[{src:"https://cdn.plyr.io/static/blank.mp4",type:"video/mp4",size:720},{src:"https://cdn.plyr.io/static/blank.mp4",type:"video/mp4",size:1080}]}},Cm.propTypes={options:ym().object,source:ym().any};const jm=({popup:e})=>{const{type:t="video",content:n="",videoOptions:o={}}=e,{autoplay:i=!1}=o||{};return(0,l.jsx)(Cm,{source:{type:t,sources:[{src:n,provider:n.includes("youtube")?"youtube":n.includes("vimeo")?"vimeo":"html5"}]},options:{autoplay:i}})},$m=(0,m.forwardRef)((({attributes:e,securityPass:t=!0,setSecurityPass:n,isPremium:o,Popup:i,popupContent:a,isBackend:s=!1,children:r,onClick:c=()=>{}},d)=>{const{actionType:u="link",iconPos:p="left"}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("a",{ref:d,...dh(e,t,o,s),onClick:()=>c(!0),children:["right"!==p&&(0,l.jsx)(uh,{attributes:e}),r,"right"===p&&(0,l.jsx)(uh,{attributes:e})]}),o&&"popup"===u&&t&&!s&&(0,l.jsx)(Sm,{attributes:e,Popup:i,popupContent:a,securityPop:t,setSecurityPass:n,btnRef:d})]})})),Sm=({attributes:e,Popup:t,popupContent:n,securityPop:o,setSecurityPass:i})=>{const{actionType:a="link",popup:s={}}=e,{caption:r=""}=s,[c,d]=(0,m.useState)(o);return(0,m.useEffect)((()=>{}),[a]),(0,l.jsx)(t,{isOpen:c,onClose:()=>{d(!1),i(!1)},caption:r,children:(0,l.jsx)(Tm,{popup:s,popupContent:n})})},Tm=({popup:e,popupContent:t})=>{
332 -const{type:n="image",content:o="",caption:i=""}=e;if(!o)return(0,l.jsxs)("p",{className:"warning",children:["Sorry! No ","iframe"===n?"Iframe Source":n," Found. Please Insert..."]});switch(n){case"image":return(0,l.jsx)("img",{className:"image",src:o,alt:i});case"audio":case"video":return(0,l.jsx)(jm,{popup:e});case"content":return t;case"document":return(0,l.jsx)("div",{className:"document",children:(0,l.jsx)("iframe",{src:`//docs.google.com/viewer?embedded=true&url=${o}`})});case"iframe":return(0,l.jsx)("div",{className:"iframe",children:(0,l.jsx)("iframe",{src:o})});default:return null}},Nm=({attributes:e,id:t})=>{const{hideOn:n={desktop:!1,tablet:!1,mobile:!1},isFullWidth:i,addCSS:s,alignment:r,typography:c,colors:d,hovColors:u,padding:p,border:h,shadow:g,buttonHover:m}=e,b=`#${t}`,f=`${b} .${ch}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",c)?.googleFontLink}\n\t\t${ps(f,c)?.styles}\n\n\t\t${b}{\n\t\t\ttext-align: ${r};\n\t\t}\n\t\t${f}:not(.btnEditor){\n\t\t\tdisplay: ${n?.desktop?"none":"inline-flex"};\n\t\t}\n\t\t${f}.btnEditor{\n\t\t\topacity: ${n?.desktop?.8:1};\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${f}:not(.btnEditor){\n\t\t\t\tdisplay: ${n?.tablet?"none":"inline-flex"};\n\t\t\t}\n\t\t\t${f}.btnEditor{\n\t\t\t\topacity: ${n?.tablet?.8:1};\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${f}:not(.btnEditor){\n\t\t\t\tdisplay: ${n?.mobile?"none":"inline-flex"};\n\t\t\t}\n\t\t\t${f}.btnEditor{\n\t\t\t\topacity: ${n?.mobile?.8:1};\n\t\t\t}\n\t\t}\n\t\t${f}{\n\t\t\t${ss(d)||`color: #fff; background-color: ${o};`}\n\t\t\twidth: ${i?"100%":"auto"};\n\t\t\tpadding: ${us(p)||"10px 20px"};\n\t\t\t${is(h)||"border-radius: 5px;"}\n\t\t\tbox-shadow: ${ls(g?.shadow||g)||"none"};\n\t\t}\n\t\t${f}:hover{\n\t\t\t${ss(u)||`color: #fff; background-color: ${a};`}\n\t\t\t${jt(m?.shadow)?`box-shadow: ${ls(m?.shadow)};`:""}\n\t\t\t${jt(m?.border)?is(m?.border):""}\n\t\t\t${jt(m?.padding)?`padding: ${us(m?.padding)}`:""}\n\t\t}\n\t\t${s}\n\t\t`.replace(/\s+/g," ")}})},Mm=({popup:e,setAttributes:t})=>{const{ShortcutProvider:n}=wp.keyboardShortcuts,[o,i]=(0,m.useState)([]);(0,m.useEffect)((()=>{i((0,p.parse)(e?.content))}),[]);const a=n=>{const o=n[n.length-1];"core/paragraph"===o.name&&""===o.attributes.content?i(n):i([...n,...(0,p.parse)("\x3c!-- wp:paragraph --\x3e\x3c!-- /wp:paragraph --\x3e")]),t({popup:{...e,content:(0,p.serialize)(n)}})};return(0,l.jsx)(h.BlockEditorProvider,{value:o,onInput:e=>a(e),onChange:e=>a(e),children:(0,l.jsx)(y.SlotFillProvider,{children:(0,l.jsxs)(n,{className:"btnContentArea",children:[(0,l.jsx)(h.BlockEditorKeyboardShortcuts,{}),(0,l.jsxs)("div",{className:"btnContentBox",children:[(0,l.jsxs)("div",{className:"btnContentEditor",children:[(0,l.jsx)(h.BlockTools,{children:(0,l.jsx)(h.WritingFlow,{children:(0,l.jsx)(h.ObserveTyping,{children:(0,l.jsx)(h.BlockList,{})})})}),(0,l.jsx)("div",{className:"popoverSlotOuter",children:(0,l.jsx)(y.Popover.Slot,{})})]}),(0,l.jsx)("div",{className:"btnContentSidebar",children:(0,l.jsx)(h.BlockInspector,{})})]})]})})})},Lm=[{label:(0,x.__)("Link","b-blocks"),value:"link"},{label:(0,x.__)("Popup","b-blocks"),value:"popup"}],Pm=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Password Protected","b-blocks"),value:"password"},{label:(0,x.__)("Login Protected","b-blocks"),value:"login"}],Em=((0,x.__)("Alternate","b-blocks"),(0,x.__)("Author","b-blocks"),(0,x.__)("Bookmark","b-blocks"),(0,x.__)("External","b-blocks"),(0,x.__)("Help","b-blocks"),(0,x.__)("License","b-blocks"),(0,x.__)("Next","b-blocks"),(0,x.__)("No Follow","b-blocks"),(0,x.__)("No Opener","b-blocks"),(0,x.__)("No Referrer","b-blocks"),(0,x.__)("Prev","b-blocks"),(0,x.__)("Search","b-blocks"),(0,x.__)("Tag","b-blocks"),(0,x.__)("No Referrer","b-blocks"),(0,x.__)("No Referrer When Downgrade","b-blocks"),(0,x.__)("Origin","b-blocks"),(0,x.__)("Origin When Cross Origin","b-blocks"),(0,x.__)("Same Origin","b-blocks"),(0,x.__)("Strict Origin When Cross Origin","b-blocks"),(0,x.__)("Unsafe Url","b-blocks"),[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Right","b-blocks"),value:"right"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"},{label:(0,x.__)("Left","b-blocks"),value:"left"}]),Am=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Bm=[{label:(0,x.__)("Flat","b-blocks"),value:"flat",icon:"Flat"},{label:(0,x.__)("3D","b-blocks"),value:"3d",icon:"3D"}],Im=[{label:(0,x.__)("Small","b-blocks"),value:"small"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"},{label:(0,x.__)("X Large","b-blocks"),value:"x-large"}],Om=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Fade Up","b-blocks"),value:"fade-up"},{label:(0,x.__)("Fade Down","b-blocks"),value:"fade-down"},{label:(0,x.__)("Fade Left","b-blocks"),value:"fade-left"},{label:(0,x.__)("Fade Right","b-blocks"),value:"fade-right"},{label:(0,x.__)("Flip Up","b-blocks"),value:"flip-up"},{label:(0,x.__)("Flip Down","b-blocks"),value:"flip-down"},{label:(0,x.__)("Flip Left","b-blocks"),value:"flip-left"},{label:(0,x.__)("Flip Right","b-blocks"),value:"flip-right"},{label:(0,x.__)("Zoom In","b-blocks"),value:"zoom-in"},{label:(0,x.__)("Zoom In Up","b-blocks"),value:"zoom-in-up"},{label:(0,x.__)("Zoom In Down","b-blocks"),value:"zoom-in-down"},{label:(0,x.__)("Zoom In Left","b-blocks"),value:"zoom-in-left"},{label:(0,x.__)("Zoom In Right","b-blocks"),value:"zoom-in-right"}],Rm=[{label:(0,x.__)("Image","b-blocks"),value:"image"},{label:(0,x.__)("Audio","b-blocks"),value:"audio"},{label:(0,x.__)("Video","b-blocks"),value:"video"},{label:(0,x.__)("Content","b-blocks"),value:"content"},{label:(0,x.__)("Document","b-blocks"),value:"document"},{label:(0,x.__)("Iframe","b-blocks"),value:"iframe"}],zm=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"popup",title:(0,x.__)("Popup","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Dm=({attributes:e,setAttributes:t,isPremium:n,setContentPopup:i})=>{const{text:s,actionType:r="link",security:c,url:d,tooltip:u,tooltipPos:p="top",target:g,attrs:b={},hideOn:f={},isDownload:k,downloadFileName:w="",isUpIcon:_,icon:C,upIcon:j,iconPos:$,type:S,isFullWidth:T,size:N,popup:M={},animationType:L,animationDuration:P,addID:E,addCSS:A,alignment:B,typography:I,colors:O,hovColors:R,padding:z,border:D,shadow:F,securityPassword:H,securityRole:W,buttonHover:U}=e,{type:G="image",content:V="",caption:q="",videoOptions:Y}=M,[K,Q]=(0,m.useState)(!1),{roles:Z}=(()=>{const{data:e}=jd("bBlocksUtils"),{data:t=null,refetch:n,isLoading:o=!0}=Cd("bBlocksUserRoles",{_wpnonce:e?.nonce},!0),i=null===t?[]:Object.entries(t).map((([e,t])=>({label:t,value:e})));return(0,m.useEffect)((()=>{n()}),[e]),{roles:i,isLoading:o}})(),X={isPremium:n,setIsProModalOpen:Q},J=(n,o,i)=>{t({[n]:{...e[n],[o]:i}})},ee="popup"===r,te={value:V,onChange:e=>J("popup","content",e)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:zm,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/button-block"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:s,onChange:e=>t({text:e})})]}),(0,l.jsx)(Za,{className:"mt20",label:(0,x.__)("Action:","b-blocks"),labelPosition:"left",value:r,onChange:e=>t({actionType:e}),options:Lm,...X,proValues:["popup"]}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Security:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({security:e}),options:Pm,...X,Component:y.SelectControl}),"login"==c&&(0,
333 -l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Set User Role:","b-blocks"),labelPosition:"left",value:W,onChange:e=>t({securityRole:e}),options:[{label:"Default",value:"default"},...Z],...X,Component:y.SelectControl})}),"password"==c&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Set Password:","b-blocks"),value:H,onChange:e=>t({securityPassword:e}),...X,Component:y.TextControl})}),!ee&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("URL:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:d,onChange:e=>t({url:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Open link in new tab","b-blocks"),checked:"_blank"===g,onChange:e=>t({target:e?"_blank":"_self"})}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("URL/Link Rel/Relation:","b-blocks"),value:b?.rel,onChange:e=>J("attrs","rel",e),...X,Component:y.TextControl}),(0,l.jsxs)("small",{children:["For more details read the ",(0,l.jsx)("a",{href:"https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel",target:"_blank",rel:"noreferrer",children:"documentation"})]}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Enter Referer Policy:","b-blocks"),value:b?.referrerpolicy,onChange:e=>J("attrs","referrerpolicy",e),...X,Component:y.TextControl}),(0,l.jsxs)("small",{children:["For more details read the ",(0,l.jsx)("a",{href:"https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/referrerPolicy",target:"_blank",rel:"noreferrer",children:"documentation"})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Download Button","b-blocks"),checked:k,onChange:e=>t({isDownload:e})}),k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("small",{children:(0,x.__)("Make sure the URL/link is downloadable!","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Download File Name:","b-blocks"),labelPosition:"left",value:w,onChange:e=>t({downloadFileName:e}),...X,Component:y.TextControl}),(0,l.jsxs)("small",{children:[(0,x.__)("This is an experimental feature, and it may not work reliably every time.","b-blocks")," ",(0,l.jsx)("a",{href:"https://www.w3schools.com/howto/howto_html_download_link.asp",target:"_blank",rel:"noreferrer",children:"Source"})]})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:_,onChange:e=>t({isUpIcon:e})}),_?(0,l.jsx)(ke,{value:j,types:["image"],onChange:e=>t({upIcon:e}),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}):(0,l.jsx)(Un,{value:C,onChange:e=>t({icon:e}),defaults:{class:"fa fa-paper-plane"},isSize:!1,isColor:!1}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Icon Position:","b-blocks"),labelPosition:"left",value:$,onChange:e=>t({iconPos:e}),options:Am,...X,Component:y.SelectControl}),(0,l.jsx)(v,{children:(0,x.__)("Tooltip Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:u,onChange:e=>t({tooltip:e})}),(0,l.jsx)("small",{children:(0,x.__)("If you want to add tooltip on button, type text rather then leave empty.","b-blocks")}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Tooltip Position:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({tooltipPos:e}),options:Em,...X,Component:y.SelectControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Hide On Desktop","b-blocks"),checked:f?.desktop,onChange:e=>J("hideOn","desktop",e),...X,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Hide On Tablet","b-blocks"),checked:f?.tablet,onChange:e=>J("hideOn","tablet",e),...X,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Hide On Mobile","b-blocks"),checked:f?.mobile,onChange:e=>J("hideOn","mobile",e),...X,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Design","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Button Full Width?","b-blocks"),checked:T,onChange:e=>t({isFullWidth:e})}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Size:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:N,onChange:e=>{t({size:e}),"small"===e&&t({typography:{...I,fontSize:12},padding:{...z,vertical:"8px",horizontal:"16px"}}),"medium"===e&&t({typography:{...I,fontSize:16},padding:{...z,vertical:"12px",horizontal:"24px"}}),"large"===e&&t({typography:{...I,fontSize:20},padding:{...z,vertical:"14px",horizontal:"30px"}}),"x-large"===e&&t({typography:{...I,fontSize:22},padding:{...z,vertical:"16px",horizontal:"46px"}})},options:Im})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Type:","b-blocks")}),(0,l.jsx)(Tn,{value:S,onChange:e=>{t({type:e}),"flat"===e&&t({shadow:[]}),"3d"===e&&t({shadow:[{hOffset:"-5px",vOffset:"6px",blur:"2px",spreed:"0px",color:"#0006",isInset:!1},{hOffset:"3px",vOffset:"-3px",blur:"0px",spreed:"2px",color:"#341b7e",isInset:!0}]})},isTextIcon:!0,options:Bm})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:L,onChange:e=>t({animationType:e}),options:Om})]}),(0,l.jsx)(v,{children:(0,x.__)("Duration (Speed) (s):","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:P,onChange:e=>t({animationDuration:e}),min:0,max:3,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Animation duration of speed in seconds")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Additional","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("ID:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:E,onChange:e=>t({addID:e}),placeholder:(0,x.__)("Enter additional ID","b-blocks")})]}),(0,l.jsx)(v,{children:(0,x.__)("CSS:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:A,onChange:e=>t({addCSS:e}),placeholder:(0,x.__)("Enter additional CSS","b-blocks")})]})]}),"popup"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),children:[!ee&&(0,l.jsx)("div",{className:"mb20",children:(0,l.jsx)("small",{children:(0,x.__)("Please select the popup from the button action to enable these options.","b-blocks")})}),(0,l.jsxs)("div",{className:ee?"":"bPlNoEvent",children:[(0,l.jsx)(Ya,{label:(0,x.__)("Content Type:","b-blocks"),labelPosition:"left",value:G,options:Rm,onChange:e=>t({popup:{...M,type:e,content:"content"===e?"\x3c!-- wp:paragraph --\x3e\x3c!-- /wp:paragraph --\x3e":""}}),...X,Component:y.SelectControl}),"image"===G&&(0,l.jsx)(Ya,{label:(0,x.__)("Image:","b-blocks"),type:["image"],...te,placeholder:(0,x.__)("Enter Image URL","b-blocks"),...X,Component:ve}),"audio"===G&&(0,l.jsx)(Ya,{label:(0,x.__)("Audio:","b-blocks"),types:["audio"],...te,placeholder:(0,x.__)("Enter Audio URL","b-blocks"),...X,Component:ve}),"video"===G&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Video:","b-blocks"),types:["video"],...te,placeholder:(0,x.__)("Enter Video URL","b-blocks"),...X,Component:ve}),(0,l.jsx)("span",{children:(0,x.__)("Also support YouTube and Vimeo video.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Autoplay Video","b-blocks"),checked:Y?.autoplay,value:Y?.autoplay,onChange:e=>t({popup:be(M,e,"videoOptions","autoplay")})})]}),"content"===G&&(0,l.jsx)(y.Flex,{className:"mt20",justify:"center",children:(0,l.jsx)(y.Button,{variant:"primary",onClick:()=>i(!0),children:"Add/Update Content"})}),"document"===G&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Document:","b-blocks"),types:["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],...te,placeholder:(0,x.__)("Enter Document URL","b-blocks"),...X,Component:ve}),(0,
334 -l.jsx)("span",{children:(0,x.__)("Supported Document: .pdf, .doc, .docx, .xls, .xlsx","b-blocks")})]}),"iframe"===G&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Iframe Source:","b-blocks"),...te,placeholder:(0,x.__)("Enter Iframe URL","b-blocks"),...X,Component:y.TextControl}),(0,l.jsx)("span",{children:(0,x.__)("Note: Enter only source URL","b-blocks")})]}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Title/Caption:","b-blocks"),value:q,onChange:e=>J("popup","caption",e),...X,Component:y.TextControl})]})]}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),children:[(0,l.jsx)(Oa,{value:I,onChange:e=>t({typography:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16},textDecoration:"none"}}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{value:O,onChange:e=>t({colors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:z,onChange:e=>t({padding:e}),defaults:{vertical:"10px",horizontal:"20px"}}),(0,l.jsx)(Jc,{className:"mt20",value:D,onChange:e=>t({border:e}),defaults:{radius:"5px"}}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow:","b-blocks"),value:F?.shadow||F,onChange:e=>t({shadow:e})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{label:(0,x.__)("Colors:","b-blocks"),value:R,onChange:e=>t({hovColors:e}),defaults:{color:"#fff",bg:a}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:U?.padding||{},onChange:e=>t({buttonHover:{...U,padding:e}})}),(0,l.jsx)(Jc,{className:"mt20",value:U?.border,onChange:e=>t({buttonHover:{border:e}}),defaults:{radius:"5px"}}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow:","b-blocks"),value:U?.shadow||[],onChange:e=>t({buttonHover:{...U,shadow:e}})})]})]})})]})})]})})}),(0,l.jsxs)(jn,{isProModalOpen:K,setIsProModalOpen:Q,block:"Button",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Button Action: ","b-blocks")}),(0,x.__)("Use the button as a link or popup trigger.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("rel Attribute: ","b-blocks")}),(0,x.__)("Add the rel/relation attribute to the anchor link.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("referrer-policy Attribute: ","b-blocks")}),(0,x.__)("Add the Referrer Policy attribute to the anchor link.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Download File Name: ","b-blocks")}),(0,x.__)("For the download, enter a custom name for the download file. This is an experimental feature, and it may not work reliably every time.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Icon Position: ","b-blocks")}),(0,x.__)("Set the icon position to the left or right.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Tooltip Position: ","b-blocks")}),(0,x.__)("Choose a different position for the tooltip.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Hide on Devices: ","b-blocks")}),(0,x.__)("Hide on various devices (desktop, tablet, and mobile).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Popup Content: ","b-blocks")}),(0,x.__)("Show Image, Audio, Video, Block Content, Document(.pdf, .doc, .docx, .xls, .xlsx), and Iframe.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Security Features: ","b-blocks")}),(0,x.__)("Login, Password Required","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:B,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Button Alignment"),alignmentControls:[{title:(0,x.__)("Button in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Button in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Button in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},Fm=({isOpen:e,onClose:t,caption:n,children:o})=>{if(!e)return null;const i=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const n=i.current;if(n&&e){const e=document.createElement("button");e.className="popupCloseBtn",e.innerHTML="\n\t\t\t\t<svg xmlns='http://www.w3.org/2000/svg' fill='#fff' width='24px' height='24px' viewBox='0 0 32 32'>\n\t\t\t\t\t<path d='M17.769 16l9.016-9.016c0.226-0.226 0.366-0.539 0.366-0.884 0-0.691-0.56-1.251-1.251-1.251-0.346 0-0.658 0.14-0.885 0.367v0l-9.015 9.015-9.016-9.015c-0.226-0.226-0.539-0.366-0.884-0.366-0.69 0-1.25 0.56-1.25 1.25 0 0.345 0.14 0.658 0.366 0.884v0l9.015 9.016-9.015 9.015c-0.227 0.226-0.367 0.539-0.367 0.885 0 0.691 0.56 1.251 1.251 1.251 0.345 0 0.658-0.14 0.884-0.366v0l9.016-9.016 9.015 9.016c0.227 0.228 0.541 0.369 0.888 0.369 0.691 0 1.251-0.56 1.251-1.251 0-0.347-0.141-0.661-0.369-0.887l-0-0z' />\n\t\t\t\t</svg>\n\t\t\t",e.addEventListener("click",(()=>t())),n.appendChild(e)}}),[i.current,e]),(0,l.jsxs)(y.Modal,{onRequestClose:()=>t(),className:"popupContent",overlayClassName:"btnPopupWrap",shouldCloseOnClickOutside:!0,isFullScreen:!1,__experimentalHideHeader:!0,ref:i,children:[(0,l.jsx)("div",{children:o}),n&&(0,l.jsx)("p",{className:"popupCaption",dangerouslySetInnerHTML:{__html:n}})]})};Ll(lh.name)&&(0,p.registerBlockType)(lh,{icon:lr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{text:i,animationType:a,animationDuration:s,popup:r={}}=t,[c,d]=(0,m.useState)(!1),u=(0,m.useRef)(null),p=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{window.AOS?.init()}),[]),(0,m.useEffect)((()=>{const e=u.current?.classList;e.remove("aos-init"),e.remove("aos-animate"),setTimeout((()=>{e.add("aos-init"),e.add("aos-animate")}),500)}),[a,s]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dm,{attributes:t,setAttributes:n,isPremium:p,setContentPopup:d}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Nm,{attributes:t,id:`block-${o}`}),(0,l.jsx)($m,{attributes:t,security:"none",isPremium:p,Popup:Fm,popupContent:(0,l.jsx)(Mm,{popup:r,setAttributes:n}),ref:u,isBackend:!0,children:(0,l.jsx)(h.RichText,{className:"btnText",tagName:"span",value:i,onChange:e=>n({text:e}),placeholder:(0,x.__)("Button Text","b-blocks")})}),c&&(0,l.jsx)(Sm,{attributes:t,Popup:Fm,popupContent:(0,l.jsx)(Mm,{popup:r,setAttributes:n}),securityPop:!0,setSecurityPass:d})]})]})},save:()=>null})
335 -;const Hm=JSON.parse('{"apiVersion":3,"name":"b-blocks/button-group","title":"Button Group","description":"Display Dual Button.","category":"bBlocks","keywords":["buttons","multiple buttons","group of buttons"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"width":{"type":"string","default":"0px"},"layout":{"type":"string","default":"row"},"alignment":{"type":"object","default":{"desktop":{"vertical":"center","horizontal":"center"},"tablet":{"vertical":"","horizontal":""},"mobile":{"vertical":"","horizontal":""}}},"gap":{"type":"object","default":{"desktop":"","tablet":"","mobile":""}},"btnAlign":{"type":"string","default":"center"},"btnType":{"type":"string","default":"fill"},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"btnPadding":{"type":"object","default":{"vertical":"12px","horizontal":"30px"}},"btnOne":{"type":"string","selector":"a.btnOne","default":"First Button"},"btnOneLink":{"type":"string","default":"#"},"btnOneBorder":{"type":"object","default":{"radius":"50px"}},"btnOneColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"btnOneHovColors":{"type":"object","default":{"color":"#fff","bg":"#070127"}},"btnTwo":{"type":"string","selector":"a.btnTwo","default":"Second Button"},"btnTwoLink":{"type":"string","default":"#"},"btnTwoBorder":{"type":"object","default":{"radius":"50px"}},"btnTwoColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"btnTwoHovColors":{"type":"object","default":{"color":"#fff","bg":"#070127"}},"isSep":{"type":"boolean","default":true},"sepType":{"type":"string","default":"icon"},"sepText":{"type":"string","default":"or"},"sepTextTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"sepTextColor":{"type":"string","default":"#333"},"sepIcon":{"type":"object","default":{"class":"fa fa-arrows-alt-h","fontSize":20,"color":"#333"}},"sepBGColor":{"type":"string","default":"#fff"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),Wm=[{label:"Icon",value:"icon",icon:"Icon"},{label:"Text",value:"text",icon:"Text"}],Um=[{name:"btn-one",title:(0,x.__)("Button One","b-blocks")},{name:"btn-two",title:(0,x.__)("Button Two","b-blocks")}],Gm=({attributes:e,setAttributes:t,device:n,updateObj:i})=>{const{width:s,btnAlign:r,btnType:c,btnTypo:d,btnPadding:u,btnOneLink:p,btnOneBorder:g,btnOneColors:m,btnOneHovColors:b,btnTwoLink:f,btnTwoBorder:k,btnTwoColors:w,btnTwoHovColors:C,isSep:j,sepType:$,sepText:S,sepTextTypo:T,sepTextColor:N,sepIcon:M,sepBGColor:L,layout:P="row",alignment:E={},gap:A={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Settings","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Container Width:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Layout","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:P,onChange:e=>t({layout:e}),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"column"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"row"})]})]}),"column"===P&&(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.Flex,{children:(0,l.jsxs)(v,{className:"flex1",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"default",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:E?.[n]?.vertical,onChange:e=>i("alignment",e,n,"vertical"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:"editor-alignleft"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:"editor-aligncenter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:"editor-alignright"})]})]}),"row"===P&&(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.Flex,{children:(0,l.jsxs)(v,{className:"flex1",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"default",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:E?.[n]?.horizontal,onChange:e=>i("alignment",e,n,"horizontal"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:"editor-alignleft"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:"editor-aligncenter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:"editor-alignright"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:"editor-justify"})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2",children:[(0,x.__)("Gap:","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:A?.[n]||"",onChange:e=>i("gap",e,n)})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(Tn,{value:c,onChange:e=>{t({btnType:e}),"fill"===e&&t({btnOneColors:{...m,color:"#fff",bg:o,styles:`color: #fff; background: ${o};`},btnOneBorder:{...g,width:"0px",color:"#0000",styles:""},btnTwoColors:{...w,color:"#fff",bg:a,styles:`color: #fff; background: ${a};`},btnTwoBorder:{...k,width:"0px",color:"#0000",styles:""}}),"outline"===e&&t({btnOneColors:{...m,color:o,bg:"#0000",styles:`color: ${o}; background: #0000;`},btnOneBorder:{...g,width:"3px",color:o,styles:`border: 3px solid ${o};`},btnTwoColors:{...w,color:a,bg:"#0000",styles:`color: ${a}; background: #0000;`},btnTwoBorder:{...k,width:"3px",color:a,styles:`border: 3px solid ${a};`}})},options:[{label:(0,x.__)("Fill","b-blocks"),value:"fill",icon:"FILL"},{label:(0,x.__)("Outline","b-blocks"),value:"outline",icon:"OUTLINE"}]})]}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when type will be changed.","b-blocks")}),(0,l.jsx)(Oa,{value:d,onChange:e=>t({btnTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:u,onChange:e=>t({btnPadding:e}),defaults:{vertical:"12px",horizontal:"30px"}}),(0,l.jsx)(v,{children:(0,x.__)("Buttons:","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:Um,children:e=>(0,l.jsxs)(l.Fragment,{children:["btn-one"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:p,onChange:e=>t({btnOneLink:e})})]}),(0,l.jsx)(Jc,{label:(0,x.__)("Border","b-blocks"),value:g,onChange:e=>t({btnOneBorder:e}),defaults:{radius:"50px"}}),(0,l.jsx)(On,{value:m,onChange:e=>t({btnOneColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:b,onChange:e=>t({btnOneHovColors:e}),defaults:{color:"#fff",bg:a}})]}),"btn-two"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:f,onChange:e=>t({btnTwoLink:e})})]}),(0,l.jsx)(Jc,{label:(0,x.__)("Border","b-blocks"),value:k,onChange:e=>t({btnTwoBorder:e}),defaults:{radius:"50px"}}),(0,l.jsx)(On,{value:w,onChange:e=>t({btnTwoColors:e}),defaults:{color:"#fff",bg:a}}),(0,l.jsx)(On,{label:(0,
336 -x.__)("Hover Colors:","b-blocks"),value:C,onChange:e=>t({btnTwoHovColors:e}),defaults:{color:"#fff",bg:o}})]})]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:j,onChange:e=>t({isSep:e})}),j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(Tn,{value:$,onChange:e=>t({sepType:e}),options:Wm})]}),"text"===$&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Separator Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:S,onChange:e=>t({sepText:e})}),(0,l.jsx)(Oa,{label:(0,x.__)("Text Typography","b-blocks"),value:T,onChange:e=>t({sepTextTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:N,onChange:e=>t({sepTextColor:e}),defaultColor:"#333"})]}),"icon"===$&&(0,l.jsx)(Un,{value:M,onChange:e=>t({sepIcon:e}),defaults:{class:"fa fa fa-arrows-alt-h",fontSize:20,color:"#333"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:L,onChange:e=>t({sepBGColor:e}),defaultColor:"#fff"})]})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:r,onChange:e=>t({btnAlign:e}),describedBy:(0,x.__)("Button Group Align"),alignmentControls:[{title:(0,x.__)("Button Group in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Button Group in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Button Group in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},Vm="bBlocksButtonGroup",qm=({attributes:e,id:t})=>{const{width:n,btnAlign:o,btnTypo:i,btnPadding:a,btnOneBorder:s,btnOneColors:r,btnOneHovColors:c,btnTwoBorder:d,btnTwoColors:u,btnTwoHovColors:p,sepType:h,sepTextTypo:g,sepTextColor:m,sepIcon:b,sepBGColor:f,alignment:x={},layout:y="row",gap:v={}}=e,k=`#${t}`,w=`${k} .${Vm}`,_=`${w} .btnSeparator`,C=g?.fontSize?.desktop||g?.fontSize;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",i)?.googleFontLink}\n\t\t${ps("",g)?.googleFontLink}\n\t\t${ps(`${w} .bBlocksBtn a`,i)?.styles}\n\t\t${ps(`${_} span`,g)?.styles}\n\n\t\t${k}{\n\t\t\ttext-align: ${o};\n\t\t\t${"column"===y?ns("text-align",x.desktop.vertical):""}\n\t\t}\n\t\t${w}{\n\t\t\twidth: ${"0px"!==n&&"0%"!==n&&"0em"!==n?n:"auto"};\n\t\t\t${ns("gap",v?.desktop)}\n\t\t}\n\t\t${w}.layout-row{\n\t\t\t${ns("justify-content",x.desktop.horizontal)}\n\t\t}\n\t\t${w}.layout-column{\n\t\t\t${ns("justify-content",x.desktop.vertical)}\n\t\t}\n\t\t${w} .bBlocksBtn{\n\t\t\tmin-width: ${"0px"!==n&&"0%"!==n&&"0em"!==n?"50%":"auto"};\n\t\t}\n\t\t${w} .bBlocksBtn a{\n\t\t\tpadding: ${us(a)};\n\t\t}\n\n\t\t${w} .btnOne{\n\t\t\t${is(s)||"border-radius: 50px;"}\n\t\t\t${ss(r)}\n\t\t\tborder-radius: ${s?.radius||"50px"} 0 0 ${s?.radius||"50px"};\n\t\t}\n\t\t${w} .btnOne:hover{\n\t\t\t${ss(c)}\n\t\t}\n\n\t\t${w} .btnTwo{\n\t\t\t${is(d)||"border-radius: 50px;"}\n\t\t\t${ss(u)}\n\t\t\tborder-radius: 0 ${d?.radius||"50px"} ${d?.radius||"50px"} 0;\n\t\t}\n\t\t${w} .btnTwo:hover{\n\t\t\t${ss(p)}\n\t\t}\n\n\t\t${_}{\n\t\t\twidth: ${"text"===h?1.75*C+"px":1.65*b?.fontSize+"px"};\n\t\t\theight: ${"text"===h?1.75*C+"px":1.65*b?.fontSize+"px"};\n\t\t\tbackground-color: ${f};\n\t\t\t${(()=>{const e=`margin-top: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;\n\t\t\tmargin-bottom: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;`;return"row"===y?`margin-left: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;\n\t\t\tmargin-right: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;`:e})()}\n\t\t}\n\t\t${_} span{\n\t\t\tcolor: ${m};\n\t\t}\n\t\t${_} i{\n\t\t\t${rs(b)}\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},Ym=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,device:a}=e,{btnType:s,btnOne:r,btnOneLink:c,btnTwo:d,btnTwoLink:u,isSep:p,sepType:g,sepText:b,sepIcon:f,layout:y="row"}=t;(0,m.useEffect)((()=>me()),[i]);const v=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Gm,{attributes:t,setAttributes:n,device:a,updateObj:v}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(qm,{attributes:t,id:`block-${o}`}),(0,l.jsxs)("div",{className:`${Vm} layout-${y}`,children:[(0,l.jsx)("div",{className:"bBlocksBtn firstBtn",children:(0,l.jsx)(h.RichText,{className:`btnOne btn-${s}`,tagName:"a",href:$t(c),value:r,onChange:e=>n({btnOne:e}),placeholder:(0,x.__)("First Button","b-blocks"),inlineToolbar:!0})}),p&&(0,l.jsx)("div",{className:"btnSeparator",children:"text"===g?(0,l.jsx)("span",{children:b}):"icon"===g&&f?.class?(0,l.jsx)("i",{className:f?.class}):""}),(0,l.jsx)("div",{className:"bBlocksBtn secondBtn",children:(0,l.jsx)(h.RichText,{className:`btnTwo btn-${s}`,tagName:"a",href:$t(u),value:d,onChange:e=>n({btnTwo:e}),placeholder:(0,x.__)("Second Button","b-blocks"),inlineToolbar:!0})})]})]})]})}));Ll(Hm.name)&&(0,p.registerBlockType)(Hm,{icon:cr,edit:Ym,save:()=>null});const Km=JSON.parse('{"apiVersion":3,"name":"b-blocks/cards","title":"Cards","description":"Provide cards to display anything.","category":"bBlocks","keywords":["card","cards","cards section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"cards":{"type":"array","default":[{"link":"","background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{"radius":"5px"},"cat":"Category 1","catColor":"#0dcaf0","title":"Card Title 1","titleColor":"#ff7500","desc":"This content area describes card 1 descriptions or details.","descColor":"#333"},{"link":"","background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{"radius":"5px"},"cat":"Category 2","catColor":"#0dcaf0","title":"Card Title 2","titleColor":"#ff7500","desc":"This content area describes card 2 descriptions or details.","descColor":"#333"},{"link":"","background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{"radius":"5px"},"cat":"Category 3","catColor":"#0dcaf0","title":"Card Title 3","titleColor":"#ff7500","desc":"This content area describes card 3 descriptions or details.","descColor":"#333"}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"20px"},"rowGap":{"type":"string","default":"30px"},"layout":{"type":"string","default":"vertical"},"link":{"type":"object","default":{"target":"_self","element":"card"}},"textAlign":{"type":"string","default":"left"},"padding":{"type":"object","default":{"vertical":"20px","horizontal":"10px"}},"imgPos":{"type":"string","default":"top"},"imgHeight":{"type":"string","default":"250px"},"imgWidth":{"type":"string","default":"90%"},"imgAlign":{"type":"object","default":"center"},"isCat":{"type":"boolean","default":true},"catTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"catMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isTitle":{"type":"boolean","default":true},"titlePos":{"type":"string","default":"image"},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}');var Qm=Symbol.for("immer-nothing"),Zm=Symbol.for("immer-draftable"),Xm=Symbol.for("immer-state");function Jm(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var eb=Object.getPrototypeOf;function tb(e){return!!e&&!!e[Xm]}function nb(e){
337 -return!!e&&(ib(e)||Array.isArray(e)||!!e[Zm]||!!e.constructor?.[Zm]||cb(e)||db(e))}var ob=Object.prototype.constructor.toString();function ib(e){if(!e||"object"!=typeof e)return!1;const t=eb(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===ob}function ab(e,t){0===sb(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,o)=>t(o,n,e)))}function sb(e){const t=e[Xm];return t?t.type_:Array.isArray(e)?1:cb(e)?2:db(e)?3:0}function rb(e,t){return 2===sb(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lb(e,t,n){const o=sb(e);2===o?e.set(t,n):3===o?e.add(n):e[t]=n}function cb(e){return e instanceof Map}function db(e){return e instanceof Set}function ub(e){return e.copy_||e.base_}function pb(e,t){if(cb(e))return new Map(e);if(db(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=ib(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[Xm];let n=Reflect.ownKeys(t);for(let o=0;o<n.length;o++){const i=n[o],a=t[i];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(eb(e),t)}{const t=eb(e);if(null!==t&&n)return{...e};const o=Object.create(t);return Object.assign(o,e)}}function hb(e,t=!1){return mb(e)||tb(e)||!nb(e)||(sb(e)>1&&(e.set=e.add=e.clear=e.delete=gb),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>hb(t,!0)))),e}function gb(){Jm(2)}function mb(e){return Object.isFrozen(e)}var bb,fb={};function xb(e){const t=fb[e];return t||Jm(0),t}function yb(){return bb}function vb(e,t){t&&(xb("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kb(e){wb(e),e.drafts_.forEach(Cb),e.drafts_=null}function wb(e){e===bb&&(bb=e.parent_)}function _b(e){return bb={drafts_:[],parent_:bb,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Cb(e){const t=e[Xm];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function jb(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Xm].modified_&&(kb(t),Jm(4)),nb(e)&&(e=$b(t,e),t.parent_||Tb(t,e)),t.patches_&&xb("Patches").generateReplacementPatches_(n[Xm].base_,e,t.patches_,t.inversePatches_)):e=$b(t,n,[]),kb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Qm?e:void 0}function $b(e,t,n){if(mb(t))return t;const o=t[Xm];if(!o)return ab(t,((i,a)=>Sb(e,o,t,i,a,n))),t;if(o.scope_!==e)return t;if(!o.modified_)return Tb(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let i=t,a=!1;3===o.type_&&(i=new Set(t),t.clear(),a=!0),ab(i,((i,s)=>Sb(e,o,t,i,s,n,a))),Tb(e,t,!1),n&&e.patches_&&xb("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function Sb(e,t,n,o,i,a,s){if(tb(i)){const s=$b(e,i,a&&t&&3!==t.type_&&!rb(t.assigned_,o)?a.concat(o):void 0);if(lb(n,o,s),!tb(s))return;e.canAutoFreeze_=!1}else s&&n.add(i);if(nb(i)&&!mb(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;$b(e,i),t&&t.scope_.parent_||"symbol"==typeof o||!Object.prototype.propertyIsEnumerable.call(n,o)||Tb(e,i)}}function Tb(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hb(t,n)}var Nb={get(e,t){if(t===Xm)return e;const n=ub(e);if(!rb(n,t))return function(e,t,n){const o=Pb(t,n);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}(e,n,t);const o=n[t];return e.finalized_||!nb(o)?o:o===Lb(e.base_,t)?(Ab(e),e.copy_[t]=Bb(o,e)):o},has:(e,t)=>t in ub(e),ownKeys:e=>Reflect.ownKeys(ub(e)),set(e,t,n){const o=Pb(ub(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const o=Lb(ub(e),t),s=o?.[Xm];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((i=n)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)&&(void 0!==n||rb(e.base_,t)))return!0;Ab(e),Eb(e)}var i,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Lb(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Ab(e),Eb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=ub(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:o.enumerable,value:n[t]}:o},defineProperty(){Jm(11)},getPrototypeOf:e=>eb(e.base_),setPrototypeOf(){Jm(12)}},Mb={};function Lb(e,t){const n=e[Xm];return(n?ub(n):e)[t]}function Pb(e,t){if(!(t in e))return;let n=eb(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=eb(n)}}function Eb(e){e.modified_||(e.modified_=!0,e.parent_&&Eb(e.parent_))}function Ab(e){e.copy_||(e.copy_=pb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Bb(e,t){const n=cb(e)?xb("MapSet").proxyMap_(e,t):db(e)?xb("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),o={type_:n?1:0,scope_:t?t.scope_:yb(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=o,a=Nb;n&&(i=[o],a=Mb);const{revoke:s,proxy:r}=Proxy.revocable(i,a);return o.draft_=r,o.revoke_=s,r}(e,t);return(t?t.scope_:yb()).drafts_.push(n),n}function Ib(e){if(!nb(e)||mb(e))return e;const t=e[Xm];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=pb(e,t.scope_.immer_.useStrictShallowCopy_)}else n=pb(e,!0);return ab(n,((e,t)=>{lb(n,e,Ib(t))})),t&&(t.finalized_=!1),n}ab(Nb,((e,t)=>{Mb[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Mb.deleteProperty=function(e,t){return Mb.set.call(this,e,t,void 0)},Mb.set=function(e,t,n){return Nb.set.call(this,e[0],t,n,e[0])};var Ob=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const o=this;return function(e=n,...i){return o.produce(e,(e=>t.call(this,e,...i)))}}let o;if("function"!=typeof t&&Jm(6),void 0!==n&&"function"!=typeof n&&Jm(7),nb(e)){const i=_b(this),a=Bb(e,void 0);let s=!0;try{o=t(a),s=!1}finally{s?kb(i):wb(i)}return vb(i,n),jb(o,i)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===Qm&&(o=void 0),this.autoFreeze_&&hb(o,!0),n){const t=[],i=[];xb("Patches").generateReplacementPatches_(e,o,t,i),n(t,i)}return o}Jm(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,o;return[this.produce(e,t,((e,t)=>{n=e,o=t})),n,o]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;nb(e)||Jm(8),tb(e)&&(tb(t=e)||Jm(10),e=Ib(t));const n=_b(this),o=Bb(e,void 0);return o[Xm].isManual_=!0,wb(n),o}finishDraft(e,t){const n=e&&e[Xm];n&&n.isManual_||Jm(9);const{scope_:o}=n;return vb(o,t),jb(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}n>-1&&(t=t.slice(n+1));const o=xb("Patches").applyPatches_;return tb(e)?o(e,t):this.produce(e,(e=>o(e,t)))}},Rb=Ob.produce;Ob.produceWithPatches.bind(Ob),Ob.setAutoFreeze.bind(Ob),Ob.setUseStrictShallowCopy.bind(Ob),Ob.applyPatches.bind(Ob),Ob.createDraft.bind(Ob),Ob.finishDraft.bind(Ob);const zb=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Db=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",
338 -height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Fb=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Hb=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M2 12.5a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5zm0-3a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5zm0-3a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5zm0-3a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5z",clipRule:"evenodd"})}),Wb=[{label:"Left",value:"left",icon:zb},{label:"Center",value:"center",icon:Db},{label:"Right",value:"right",icon:Fb}],Ub=e=>{const{attributes:t,setAttributes:n,index:o}=e,{cards:i}=t,a=i[o],{background:s,img:r,imgBorder:c,catColor:d,titleColor:u,descColor:p,cardLink:h}=a,g=(e,t)=>{n({cards:be(i,t,o,e)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:s,onChange:e=>g("background",e)}),(0,l.jsx)(v,{children:(0,x.__)("Image:","b-blocks")}),(0,l.jsx)(ke,{value:r,onChange:e=>g("img",e),placeholder:(0,x.__)("Enter Image URL","b-blocks")}),(0,l.jsx)(Jc,{label:(0,x.__)("Image Border:","b-blocks"),value:c,onChange:e=>g("imgBorder",e),defaults:{radius:"5px"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Category Color:","b-blocks"),value:d,onChange:e=>g("catColor",e),defaultColor:"#0dcaf0"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:u,onChange:e=>g("titleColor",e),defaultColor:"#ff7500"}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:p,onChange:e=>g("descColor",e),defaultColor:"#333"}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link:","b-blocks"),value:h,onChange:e=>g("link",e)}),(0,l.jsx)("span",{children:(0,x.__)("Insert the link if you want; otherwise, leave it blank.","b-blocks")})]})},Gb=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,isPremium:i,device:a})=>{const{cards:s=[],columns:r,columnGap:c,rowGap:p,layout:g,link:b={},textAlign:f,padding:k,imgPos:w,imgHeight:C,isCat:j,catTypo:$,catMargin:S,isTitle:T,titlePos:N,titleTypo:M,titleMargin:L,isDesc:P,descTypo:E,imgWidth:A,imgAlign:B}=e,{target:I="_self",element:O="card"}=b,[R,z]=(0,m.useState)(!1),D={background:{color:"#0000"},img:{id:null,url:"",alt:"",title:""},imgBorder:{radius:"5px"},cat:`Category ${s.length+1}`,catColor:"#0dcaf0",title:`Card Title ${s.length+1}`,titleColor:"#ff7500",desc:`This content area describes card ${s.length+1} descriptions/details.`,descColor:"#333"},F={isPremium:i,setIsProModalOpen:z};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:s=>(0,l.jsxs)(l.Fragment,{children:["general"===s.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Add or Remove Cards","b-blocks"),children:[(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,arrKey:"cards",title:"title",ItemSettings:Ub,itemLabel:"Card",newItem:D,design:i?"sortable":"single"}),!i&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(Tn,{value:g,onChange:e=>t({layout:e,columns:{...r,desktop:"vertical"===e?3:2},textAlign:"vertical"===e?"center":"left",imgHeight:"vertical"===e?"250px":"200px",imgWidth:"vertical"===e?"90%":"50%"}),options:[{label:"Vertical",value:"vertical",icon:d},{label:"Horizontal",value:"horizontal",icon:u}],isIcon:!0})]}),(0,l.jsx)("small",{children:(0,x.__)("Some options will be change when you change the layout.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:r[a],onChange:e=>{t({columns:{...r,[a]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Image Position:","b-blocks")}),(0,l.jsx)(Tn,{value:w,onChange:e=>t({imgPos:e}),options:[{label:"vertical"==g?"Top":"Left",value:"top",icon:"vertical"==g?"TOP":"LEFT"},{label:"vertical"==g?"Bottom":"Right",value:"bottom",icon:"vertical"==g?"BOTTOM":"RIGHT"}]})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Category","b-blocks"),checked:j,onChange:e=>t({isCat:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Title","b-blocks"),checked:T,onChange:e=>t({isTitle:e})}),T&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title Position:","b-blocks")}),(0,l.jsx)(Tn,{value:N,onChange:e=>t({titlePos:e}),options:[{label:"Image",value:"image",icon:"IMAGE"},{label:"Content",value:"content",icon:"CONTENT"}]})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Description","b-blocks"),checked:P,onChange:e=>t({isDesc:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Link","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Open link in new tab?","b-blocks"),checked:"_blank"===I,onChange:e=>t({link:{...b,target:e?"_blank":"_self"}}),...F,Component:y.ToggleControl}),(0,l.jsx)(Za,{className:"mt20",label:(0,x.__)("Link to:","b-blocks"),labelPosition:"left",value:O,onChange:e=>t({link:{...b,element:e}}),options:[{label:"Card",value:"card"},{label:"Image",value:"image"},{label:"Title",value:"title"}],proValues:["image","title"],...F})]})]}),"style"===s.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Area","b-blocks"),children:(0,l.jsx)(id,{label:(0,x.__)("Padding:","b-blocks"),value:k,onChange:e=>t({padding:e}),defaults:{vertical:"20px",horizontal:"10px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:C,onChange:e=>t({imgHeight:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:A,onChange:e=>t({imgWidth:e}),units:[Pe(),Ee(),Ae()]}),"vertical"===g&&(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),value:B,onChange:e=>t({imgAlign:e
339 -}),options:Wb,isIcon:!0})]}),j&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Category","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:$,onChange:e=>t({catTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:S,onChange:e=>t({catMargin:e}),defaults:{side:4,bottom:"10px"}})]}),T&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:M,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18}}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:L,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),P&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Oa,{value:E,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}})})]})]})})}),(0,l.jsxs)(jn,{isProModalOpen:R,setIsProModalOpen:z,block:"Cards",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Link Target: ","b-blocks")}),(0,x.__)("Set the card link target.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Link Element: ","b-blocks")}),(0,x.__)("Choose the link element you want to link to.","b-blocks")]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Card","b-blocks"),onClick:()=>t({cards:[...s,D]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:f,onChange:e=>t({textAlign:e})})]})]})})),Vb="bBlocksCards",qb=({attributes:e,id:t})=>{const{cards:n=[],columnGap:o,rowGap:i,textAlign:a,padding:s,imgHeight:r,catTypo:c,catMargin:d,titleTypo:u,titleMargin:p,descTypo:h,imgWidth:g,imgAlign:m,layout:b}=e,f=`#${t}`,x=`${f} .${Vb} .${Vb}-card`,y=`${x} .cardDetails`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",c)?.googleFontLink}\n\t\t${ps("",u)?.googleFontLink}\n\t\t${ps("",h)?.googleFontLink}\n\t\t${ps(`${y} .${Vb}-cardCategory`,c)?.styles}\n\t\t${ps(`${x} .${Vb}-cardTitle`,u)?.styles}\n\t\t${ps(`${x} .cardDescription`,h)?.styles}\n\n\t\t${f} .${Vb}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t}\n\t\t${x} .${Vb}-cardImage{\n\t\t\t${ns("width",g?`calc( ${g} - 30px)`:"")}\n\t\t\t${ns("height",r)}\n\t\t\t${"vertical"===b?(v=m,"left"===v?"margin-inline-end: auto;":"center"===v?"margin-inline: auto;":"margin-inline-start: auto;"):""}\n\t\t}\n\t\t${y}{\n\t\t\ttext-align: ${a};\n\t\t\tpadding: ${us(s)};\n\t\t}\n\t\t${y} .${Vb}-cardCategory{\n\t\t\tmargin: ${us(d)};\n\t\t}\n\t\t${x} .${Vb}-cardTitle{\n\t\t\tmargin: ${us(p)};\n\t\t}\n\n\t\t${n.map(((e,n)=>{const{background:o,imgBorder:i,catColor:a,titleColor:s,descColor:r}=e,l=`#${t} #${Vb}-card-${n}`;return`\n\t\t\t\t${l} .${Vb}-card{\n\t\t\t\t\t${os(o)}\n\t\t\t\t}\n\t\t\t\t${l} .${Vb}-cardImage{\n\t\t\t\t\t${is(i)}\n\t\t\t\t}\n\t\t\t\t${l} .cardDetails .${Vb}-cardCategory{\n\t\t\t\t\tcolor: ${a};\n\t\t\t\t}\n\t\t\t\t${l} .${Vb}-cardTitle{\n\t\t\t\t\tcolor: ${s};\n\t\t\t\t}\n\t\t\t\t${l} .${Vb}-cardDescription{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}});var v};Ll(Km.name)&&(0,p.registerBlockType)(Km,{icon:dr,transforms:{from:[{type:"block",blocks:["crd/cards"],transform:e=>(0,p.createBlock)("b-blocks/cards",e)},{type:"prefix",prefix:"counter",transform:()=>(0,p.createBlock)("b-blocks/cards")}],to:[{type:"block",blocks:["crd/cards"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("crd/cards",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{cards:i=[],columns:a,layout:s,imgPos:r,isCat:c,isTitle:d,titlePos:u,isDesc:p}=t,[g,b]=(0,m.useState)(0),f=bBlocksPremiumChecker,v=(e,t)=>{const o=Rb(i,(n=>{n[g][e]=t}));n({cards:o})},k=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Gb,{attributes:t,setAttributes:n,activeIndex:g,setActiveIndex:b,updateCard:v,isPremium:f}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(qb,{attributes:t,id:k}),(0,l.jsx)("div",{className:`${Vb} ${s||"vertical"} columns-${a?.desktop} columns-tablet-${a?.tablet} columns-mobile-${a?.mobile}`,children:i?.map(((e,t)=>{const{img:n,cat:o,title:i,desc:a}=e,s=d&&(0,l.jsx)(h.RichText,{className:`${Vb}-cardTitle`,tagName:"h3",value:i,onChange:e=>v("title",e),placeholder:(0,x.__)("Card title","b-blocks"),inlineToolbar:!0}),m=n?.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("figure",{className:`${Vb}-cardImage`,children:[(0,l.jsx)("img",{className:`${Vb}-wp-image`,src:n.url,alt:n?.alt||n?.title}),"image"===u&&s]}),(0,ed.isBlobURL)(n.url)&&(0,l.jsx)(y.Spinner,{})]}):(0,l.jsx)(nd,{label:(0,x.__)(" Card Image:","b-blocks"),value:n,onChange:e=>v("img",e)});return(0,l.jsx)("div",{onClick:()=>b(t),className:t===g?"bPlNowEditing":"",id:`${Vb}-card-${t}`,children:(0,l.jsxs)("div",{className:`${Vb}-card ${"bottom"===r?"bottomImg":"topImg"}`,children:["top"===r&&m,(0,l.jsxs)("div",{className:"cardDetails",children:[c&&(0,l.jsx)(h.RichText,{className:`${Vb}-cardCategory`,tagName:"h6",value:o,onChange:e=>v("cat",e),placeholder:(0,x.__)("Card category","b-blocks"),inlineToolbar:!0}),"content"===u&&s,p&&(0,l.jsx)(h.RichText,{className:`${Vb}-cardDescription`,tagName:"p",value:a,onChange:e=>v("desc",e),placeholder:(0,x.__)("Description of the card","b-blocks"),inlineToolbar:!0})]}),"bottom"===r&&m]})},t)}))})]})]})},save:()=>null});const Yb=JSON.parse('{"apiVersion":3,"name":"b-blocks/chart","title":"Chart","description":"Graphical representation for data visualization.","category":"bBlocks","keywords":["charts","line charts","pie charts"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"data":{"type":"object","default":{"labels":["January","February","March","April","May","June"],"datasets":[{"label":"T-Shirts Sell 2021","data":[3,9,10,16,14,16],"backgroundColor":["#ff638433","#36a28733","#ffce5633","#4bc0c033","#9966ff33","#ff9f4033"],"borderColor":["#ff6384","#36a287","#ffce56","#4bc0c0","#9966ff","#ff9f40"],"tension":0.4,"borderWidth":2,"hoverBorderWidth":2,"pointRadius":3,"pointHoverRadius":4,"pointStyle":"triangle"},{"label":"Shoes Sell 2021","data":[5,7,12,14,13,17],"backgroundColor":["#ff638433","#36a28733","#ffce5633","#4bc0c033","#9966ff33","#ff9f4033"],"borderColor":["#ff6384","#36a287","#ffce56","#4bc0c0","#9966ff","#ff9f40"],"tension":0.4,"borderWidth":2,"hoverBorderWidth":2,"pointRadius":3,"pointHoverRadius":4,"pointStyle":"circle"}]}},"type":{"type":"string","default":"line"},"width":{"type":"string","default":"100%"},"height":{"type":"string","default":"450px"},"background":{"type":"object","default":{"color":"#0000"}},"textColor":{"type":"string","default":"#666"},"isXScale":{"type":"boolean","default":true},"isXGridLine":{"type":"boolean","default":true},"isYScale":{"type":"boolean","default":true},"isYGridLine":{"type":"boolean","default":true},"gridLineColor":{"type":"string","default":"#0000001a"},"alignment":{"type":"string","default":"center"},"isTitle":{"type":"boolean","default":true},"title":{"type":"string","default":"Chart Title"},"titleFontSize":{"type":"number","default":22},"titleColor":{"type":"string","default":"#146EF5"},"isSubtitle":{"type":"boolean","default":false},"subtitle":{"type":"string","default":"Chart Subtitle"},"subtitleFontSize":{"type":"number","default":13},"subtitleColor":{"type":"string","default":"#FF7A00"},"isDownload":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","chartJS"]}'),Kb="bBlocksChart",Qb=[{label:(0,x.__)("Line","b-blocks"),value:"line"},{label:(0,x.__)("Bar","b-blocks"),value:"bar"},{label:(0,x.__)("Pie","b-blocks"),value:"pie"},{label:(0,x.__)("Radar","b-blocks"),value:"radar"},{label:(0,
340 -x.__)("Doughnut","b-blocks"),value:"doughnut"},{label:(0,x.__)("Polar Area","b-blocks"),value:"polarArea"}],Zb=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Cross","b-blocks"),value:"cross"},{label:(0,x.__)("Cross Rot","b-blocks"),value:"crossRot"},{label:(0,x.__)("Dash","b-blocks"),value:"dash"},{label:(0,x.__)("Line","b-blocks"),value:"line"},{label:(0,x.__)("Rect","b-blocks"),value:"rect"},{label:(0,x.__)("Rect Rounded","b-blocks"),value:"rectRounded"},{label:(0,x.__)("Rect Rot","b-blocks"),value:"rectRot"},{label:(0,x.__)("Star","b-blocks"),value:"star"},{label:(0,x.__)("Triangle","b-blocks"),value:"triangle"}],Xb=({attributes:e,setAttributes:t})=>{const{data:n,type:s,background:r,textColor:c,isXScale:d,isXGridLine:u,isYScale:p,isYGridLine:g,gridLineColor:m,width:b,height:f,alignment:k,isTitle:w,title:_,titleFontSize:C,titleColor:j,isSubtitle:$,subtitle:S,subtitleFontSize:T,subtitleColor:N,isDownload:M}=e,L=()=>{let e="#";for(let t=0;t<6;t++)e+="0123456789abcdef"[Math.floor(16*Math.random())];return e},P=(e,o,i,a=!1,s=!1)=>{const r={...n};!1!==s&&a?r[e][o][a][s]=i:a?r[e][o][a]=i:r[e][o]=i,t({data:r})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:ln}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems",title:(0,x.__)("Add or Remove Datasets","b-blocks"),children:[n.labels.map(((e,o)=>(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)(`Label ${o+1}:`,"b-blocks")}),(0,l.jsx)(y.TextControl,{value:e,onChange:e=>P("labels",o,e)}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Remove this Dataset","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(y.Button,{className:"removeDataset",onClick:e=>{e.preventDefault(),(e=>{let o=[];for(let t=0;t<n.datasets.length;t++)o.push({label:n.datasets[t].label,data:[...n.datasets[t].data.slice(0,e),...n.datasets[t].data.slice(e+1)],backgroundColor:[...n.datasets[t].backgroundColor.slice(0,e),...n.datasets[t].backgroundColor.slice(e+1)],borderColor:[...n.datasets[t].borderColor.slice(0,e),...n.datasets[t].borderColor.slice(e+1)],tension:n.datasets[t].tension,borderWidth:n.datasets[t].borderWidth,hoverBorderWidth:n.datasets[t].hoverBorderWidth,pointRadius:n.datasets[t].pointRadius,pointHoverRadius:n.datasets[t].pointHoverRadius,pointStyle:n.datasets[t].pointStyle});t({data:{labels:[...n.labels.slice(0,e),...n.labels.slice(e+1)],datasets:[...o]}})})(o)},children:(0,l.jsx)(y.Dashicon,{icon:"no"})})})]},o))),(0,l.jsx)("div",{className:"addItem mt10 mb10",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Dataset","b-blocks"),onClick:()=>{let e=[];for(let t=0;t<n.datasets.length;t++)e.push({label:n.datasets[t].label,data:[...n.datasets[t].data,Math.ceil(20*Math.random())],backgroundColor:[...n.datasets[t].backgroundColor,i],borderColor:[...n.datasets[t].borderColor,o],tension:n.datasets[t].tension,borderWidth:n.datasets[t].borderWidth,hoverBorderWidth:n.datasets[t].hoverBorderWidth,pointRadius:n.datasets[t].pointRadius,pointHoverRadius:n.datasets[t].pointHoverRadius,pointStyle:n.datasets[t].pointStyle});t({data:{labels:[...n.labels,`Data ${n.labels.length+1}`],datasets:[...e]}})},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Dataset","b-blocks")]})}),n.datasets.map(((e,o)=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody editItem",title:(0,x.__)(`Dataset Value ${o+1}:`,"b-blocks"),initialOpen:0===o,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Label:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:e.label,onChange:e=>P("datasets",o,e,"label")})]}),n.labels.map(((t,n)=>(0,l.jsxs)(y.PanelRow,{className:`${Kb}DatasetEdit`,children:[(0,l.jsx)(v,{className:"",children:(0,x.__)(`${t}:`,"b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"chartDataValue",value:e.data[n],onChange:e=>P("datasets",o,parseFloat(e),"data",n)}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Dataset Background Color","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(Ue,{className:"chartBGColor",label:"",value:e.backgroundColor[n],onChange:e=>P("datasets",o,e,"backgroundColor",n)})}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Dataset Border Color","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(Ue,{label:"",value:e.borderColor[n],onChange:e=>P("datasets",o,e,"borderColor",n)})})]},n))),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt20",label:(0,x.__)("Border Width:"),labelPosition:"left",value:e.borderWidth,onChange:e=>{const i={...n};i.datasets[o].borderWidth=parseFloat(e),i.datasets[o].hoverBorderWidth=parseFloat(e),t({data:i})}}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt15",label:(0,x.__)("Point Size:"),labelPosition:"left",value:e.pointRadius,onChange:e=>P("datasets",o,parseFloat(e),"pointRadius")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt15",label:(0,x.__)("Point Hover Size:"),labelPosition:"left",value:e.pointHoverRadius,onChange:e=>P("datasets",o,parseFloat(e),"pointHoverRadius")}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Point Style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:e.pointStyle,onChange:e=>P("datasets",o,e,"pointStyle"),options:Zb})]}),(0,l.jsxs)(y.PanelRow,{className:"itemAction",children:[(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{var i;e.preventDefault(),i=o,t({data:{labels:[...n.labels],datasets:[...n.datasets.slice(0,i),...n.datasets.slice(i+1)]}})},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{var i;e.preventDefault(),i=o,t({data:{labels:[...n.labels],datasets:[...n.datasets,{...n.datasets[i]}]}})},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]},o))),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add Dataset Value","b-blocks"),onClick:()=>{let e=[],o=[],i=[];for(let t=0;t<n.labels.length;t++){const t=L();e.push(Math.ceil(20*Math.random())),o.push(`${t}33`),i.push(t)}t({data:{labels:[...n.labels],datasets:[...n.datasets,{label:`Dataset Value ${n.datasets.length+1}`,data:e,backgroundColor:o,borderColor:i,tension:.4,borderWidth:2,hoverBorderWidth:2,pointRadius:3,pointHoverRadius:4,pointStyle:"rectRounded"}]}})},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add Dataset Value","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Chart Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:s,onChange:e=>t({type:e}),options:Qb})]}),(0,l.jsx)("small",{children:(0,x.__)("Use single dataset value for 'Pie', 'Doughnut', and 'Polar Area'","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:b,onChange:e=>t({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:f,onChange:e=>t({height:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(An,{className:"mt20",label:(0,x.__)("Background:","b-blocks"),value:r,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:c,onChange:e=>t({textColor:e}),defaultColor:"#666"}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show X Scale","b-blocks"),checked:d,onChange:e=>t({isXScale:e})}),d&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show X Grid Line","b-blocks"),checked:u,onChange:e=>t({isXGridLine:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Y Scale","b-blocks"),checked:p,onChange:e=>t({isYScale:e})}),p&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Y Grid Line","b-blocks"),checked:g,onChange:e=>t({isYGridLine:e})}),(u||g)&&(0,l.jsx)(Ue,{label:(0,
341 -x.__)("Grid Line Color:","b-blocks"),value:m,onChange:e=>t({gridLineColor:e}),defaultColor:"#0000001a"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title & Subtitle Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:w,onChange:e=>t({isTitle:e})}),w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:_,onChange:e=>t({title:e})})]}),(0,l.jsx)(v,{children:(0,x.__)("Title Font Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:C,onChange:e=>t({titleFontSize:e}),min:0,max:80,step:1,allowReset:!0,resetFallbackValue:22,initialPosition:22}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:j,onChange:e=>t({titleColor:e}),defaultColor:o})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Subtitle","b-blocks"),checked:$,onChange:e=>t({isSubtitle:e})}),$&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Subtitle:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:S,onChange:e=>t({subtitle:e})})]}),(0,l.jsx)(v,{children:(0,x.__)("Subtitle Font Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:T,onChange:e=>t({subtitleFontSize:e}),min:0,max:80,step:1,allowReset:!0,resetFallbackValue:13,initialPosition:13}),(0,l.jsx)(Ue,{label:(0,x.__)("Subtitle Color:","b-blocks"),value:N,onChange:e=>t({subtitleColor:e}),defaultColor:a})]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Download Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Download Button","b-blocks"),checked:M,onChange:e=>t({isDownload:e})})})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:k,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Chart Alignment"),alignmentControls:[{title:(0,x.__)("Chart in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Chart in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Chart in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},Jb=({attributes:e,id:t})=>{const{background:n,width:o,height:i,alignment:a}=e,s=`#${t}`,r=`${s} .${Kb}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${s}{\n\t\t\ttext-align: ${a};\n\t\t}\n\t\t${r}{\n\t\t\theight: ${i};\n\t\t}\n\t\t${r},\n\t\t${s} .downloadArea{\n\t\t\twidth: ${o};\n\t\t}\n\t\t${r} canvas{\n\t\t\t${os(n)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},ef=({attributes:e,id:t,isBackend:n=!1})=>{const{data:o,type:i,textColor:a,isXScale:s,isXGridLine:r,isYScale:c,isYGridLine:d,gridLineColor:u,isTitle:p,title:h,titleFontSize:g,titleColor:b,isSubtitle:f,subtitle:x,subtitleFontSize:y,subtitleColor:v,isDownload:k}=e,w=(0,m.useRef)(null),_=(0,m.useRef)(null),C=n?[o,i,a,s,r,c,d,u,p,h,g,b,f,x,y,v,k,w.current]:[];return(0,m.useEffect)((()=>{n&&(w.current.innerHTML="",w.current.innerHTML="<canvas>Your browser does not support the canvas element.</canvas>");const o=w.current.ownerDocument,i=o.querySelector(`#${t} .${Kb} canvas`),a=i&&new Chart(i,(e=>{const{data:t,type:n,textColor:o,isXScale:i,isXGridLine:a,isYScale:s,isYGridLine:r,gridLineColor:l,isTitle:c,title:d,titleFontSize:u,titleColor:p,isSubtitle:h,subtitle:g,subtitleFontSize:m,subtitleColor:b}=e;return{type:n,data:t,options:{maintainAspectRatio:!1,plugins:{legend:{position:"top",labels:{usePointStyle:!0,color:o}},title:{display:c,text:d,color:p,font:{size:u,family:"Roboto"},padding:{bottom:10}},subtitle:{display:h,text:g,color:b,font:{size:m,family:"Roboto"},padding:{bottom:15}},tooltip:{position:"nearest",usePointStyle:!0}},scales:{x:{display:i,ticks:{color:o},grid:{display:a,color:l}},y:{display:s,beginAtZero:!0,ticks:{color:o},grid:{display:r,color:l}}}}}})(e));k&&_?.current.addEventListener("click",(()=>{const e=o.createElement("a");e.href=a.toBase64Image(),e.download="b-chart.png",e.click()}))}),C),(0,l.jsxs)(l.Fragment,{children:[k&&(0,l.jsx)("div",{className:"downloadArea",children:(0,l.jsx)("div",{className:"downloadChart",ref:_,children:"Download Chart"})}),(0,l.jsx)("div",{className:Kb,ref:w,children:(0,l.jsx)("canvas",{children:"Your browser does not support the canvas element."})})]})};Ll(Yb.name)&&(0,p.registerBlockType)(Yb,{icon:ur,transforms:{from:[{type:"block",blocks:["b-chart/chart"],transform:e=>(0,p.createBlock)("b-blocks/chart",e)},{type:"prefix",prefix:"chart",transform:()=>(0,p.createBlock)("b-blocks/chart")}],to:[{type:"block",blocks:["b-chart/chart"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("b-chart/chart",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e;(0,m.useEffect)((()=>me()),[i]);const a=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Xb,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Jb,{attributes:t,id:a}),(0,l.jsx)(ef,{attributes:t,id:a,isBackend:!0})]})]})},save:()=>null})
342 -;const tf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/content-ticker","version":"1.0.0","title":"Content Ticker","category":"bBlocks","description":"Content Ticker will let you showcase your trending news.","keywords":["content","ticker","content-ticker"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"badge":{"type":"object","default":{"text":"Trending Now","desktop":{"width":"130px","height":"","padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"bRadius":{}},"tablet":{"width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"bRadius":{}},"mobile":{"width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"bRadius":{}},"color":{"bg":{"color":"#595959"},"text":""},"typography":{"fontSize":{"desktop":"16px"},"fontWeight":400},"border":{}}},"content":{"type":"array","default":[{"text":"Ticker custom content","link":"#","toggle":false}]},"style":{"type":"object","default":{"bg":"","color":{"normal":"#222222","hover":"#2D82C9"},"typography":{"fontSize":{"desktop":"16px"},"fontWeight":400},"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}},"bRadius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"options":{"type":"object","default":{"effect":"slide","sliderSpeed":2000,"isAutoplay":true,"autoPlaySpeed":2000,"isPauseOnHover":true,"isLoop":true,"isGrabCursor":true,"isArrows":true,"direction":"right","easing":""}},"arrows":{"type":"object","default":{"left":{"url":""},"right":{"url":""},"icon":"style1","desktop":{"size":22,"alignLeft":25,"alignRight":5,"padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":22,"alignLeft":25,"alignRight":5,"padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":22,"alignLeft":25,"alignRight":5,"padding":{"top":"","right":"","bottom":"","left":""}},"normal":{"bg":"","color":"","border":{},"borderRadius":{}},"hover":{"bg":"","color":"","border":{},"borderRadius":{}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),nf={style1:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5303 18.5303C14.2374 18.8232 13.7626 18.8232 13.4697 18.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697L13.4697 5.46967C13.7626 5.17678 14.2374 5.17678 14.5303 5.46967C14.8232 5.76256 14.8232 6.23744 14.5303 6.53033L9.06066 12L14.5303 17.4697C14.8232 17.7626 14.8232 18.2374 14.5303 18.5303Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.46967 5.46967C9.76256 5.17678 10.2374 5.17678 10.5303 5.46967L16.5303 11.4697C16.8232 11.7626 16.8232 12.2374 16.5303 12.5303L10.5303 18.5303C10.2374 18.8232 9.76256 18.8232 9.46967 18.5303C9.17678 18.2374 9.17678 17.7626 9.46967 17.4697L14.9393 12L9.46967 6.53033C9.17678 6.23744 9.17678 5.76256 9.46967 5.46967Z"})})},style2:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4939 20.5644C11.1821 20.8372 10.7083 20.8056 10.4356 20.4939L3.43557 12.4939C3.18814 12.2111 3.18814 11.7889 3.43557 11.5061L10.4356 3.50613C10.7083 3.1944 11.1822 3.16281 11.4939 3.43557C11.8056 3.70834 11.8372 4.18216 11.5644 4.49388L5.65283 11.25L20 11.25C20.4142 11.25 20.75 11.5858 20.75 12C20.75 12.4142 20.4142 12.75 20 12.75L5.65283 12.75L11.5644 19.5061C11.8372 19.8179 11.8056 20.2917 11.4939 20.5644Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5061 3.43557C12.8178 3.16281 13.2917 3.19439 13.5644 3.50612L20.5644 11.5061C20.8119 11.7889 20.8119 12.2111 20.5644 12.4939L13.5644 20.4939C13.2917 20.8056 12.8178 20.8372 12.5061 20.5644C12.1944 20.2917 12.1628 19.8178 12.4356 19.5061L18.3472 12.75H4C3.58579 12.75 3.25 12.4142 3.25 12C3.25 11.5858 3.58579 11.25 4 11.25H18.3472L12.4356 4.49388C12.1628 4.18215 12.1944 3.70833 12.5061 3.43557Z"})})},style3:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{
343 -d:"M11 20.74C10.9012 20.7423 10.803 20.7238 10.7118 20.686C10.6205 20.6481 10.5382 20.5916 10.47 20.52L2.47 12.52C2.32955 12.3794 2.25066 12.1888 2.25066 11.99C2.25066 11.7913 2.32955 11.6007 2.47 11.46L10.47 3.46003C10.576 3.35806 10.7096 3.2895 10.8542 3.26288C10.9989 3.23626 11.1481 3.25274 11.2835 3.31029C11.4188 3.36783 11.5342 3.4639 11.6154 3.58653C11.6966 3.70917 11.7399 3.85296 11.74 4.00003V7.30003H21C21.1981 7.30262 21.3874 7.38247 21.5275 7.52256C21.6676 7.66265 21.7474 7.85192 21.75 8.05003V16.05C21.7474 16.2481 21.6676 16.4374 21.5275 16.5775C21.3874 16.7176 21.1981 16.7974 21 16.8H11.74V19.99C11.7402 20.139 11.6954 20.2845 11.6116 20.4076C11.5277 20.5307 11.4087 20.6257 11.27 20.68C11.1848 20.7175 11.0931 20.7379 11 20.74ZM4.07 12L10.25 18.18V16.05C10.25 15.8511 10.329 15.6603 10.4697 15.5197C10.6103 15.379 10.8011 15.3 11 15.3H20.25V8.80003H11C10.8019 8.79744 10.6126 8.71759 10.4725 8.57749C10.3324 8.4374 10.2526 8.24813 10.25 8.05003V5.82003L4.07 12Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M13 20.74C12.9039 20.7541 12.8062 20.7541 12.71 20.74C12.5724 20.6823 12.4551 20.5849 12.3732 20.4602C12.2912 20.3355 12.2484 20.1892 12.25 20.04V16.7H3.00001C2.81189 16.6956 2.63208 16.6216 2.49538 16.4923C2.35868 16.363 2.27481 16.1876 2.26001 16V8.00002C2.25463 7.89856 2.26965 7.79706 2.30417 7.7015C2.3387 7.60595 2.39204 7.51829 2.46103 7.44371C2.53002 7.36913 2.61326 7.30913 2.70584 7.26727C2.79841 7.22542 2.89844 7.20255 3.00001 7.20002H12.25V4.01002C12.2498 3.86106 12.2946 3.71551 12.3784 3.59241C12.4623 3.4693 12.5813 3.37436 12.72 3.32002C12.8551 3.26039 13.0053 3.24376 13.1502 3.27238C13.2951 3.301 13.4277 3.37349 13.53 3.48002L21.53 11.48C21.6705 11.6206 21.7493 11.8113 21.7493 12.01C21.7493 12.2088 21.6705 12.3994 21.53 12.54L13.53 20.54C13.4601 20.6079 13.377 20.6608 13.2858 20.6952C13.1946 20.7296 13.0973 20.7448 13 20.74ZM3.76001 15.2H13C13.1981 15.2026 13.3874 15.2825 13.5275 15.4226C13.6676 15.5626 13.7474 15.7519 13.75 15.95V18.18L19.93 12L13.75 5.83002V8.00002C13.7477 8.19843 13.6689 8.3883 13.53 8.53002C13.3817 8.65257 13.1919 8.71343 13 8.70002H3.76001V15.2Z"})})},style4:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:"",d:"M1.02698 11.9929L5.26242 16.2426L6.67902 14.8308L4.85766 13.0033L22.9731 13.0012L22.9728 11.0012L4.85309 11.0033L6.6886 9.17398L5.27677 7.75739L1.02698 11.9929Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:"",d:"M23.0677 11.9929L18.818 7.75739L17.4061 9.17398L19.2415 11.0032L0.932469 11.0012L0.932251 13.0012L19.2369 13.0032L17.4155 14.8308L18.8321 16.2426L23.0677 11.9929Z"})})},style5:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:"",d:"m4.431 12.822 13 9A1 1 0 0 0 19 21V3a1 1 0 0 0-1.569-.823l-13 9a1.003 1.003 0 0 0 0 1.645z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{transform:"",d:"M5.536 21.886a1.004 1.004 0 0 0 1.033-.064l13-9a1 1 0 0 0 0-1.644l-13-9A1 1 0 0 0 5 3v18a1 1 0 0 0 .536.886z"})})},style6:{left:(0,l.jsxs)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M16.5 8L13 11.5L16.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M10.5 8L7 11.5L10.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),right:(0,l.jsxs)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M7 8L10.5 11.5L7 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M13 8L16.5 11.5L13 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},of=nf;function af(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function sf(e,t){void 0===e&&(e={}),void 0===t&&(t={});const n=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>n.indexOf(e)<0)).forEach((n=>{void 0===e[n]?e[n]=t[n]:af(t[n])&&af(e[n])&&Object.keys(t[n]).length>0&&sf(e[n],t[n])}))}const rf={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function lf(){const e="undefined"!=typeof document?document:{};return sf(e,rf),e}const cf={document:rf,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function df(){const e="undefined"!=typeof window?window:{};return sf(e,cf),e}function uf(e){return void 0===e&&(e=""),e.trim().split(" ").filter((e=>!!e.trim()))}function pf(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function hf(){return Date.now()}function gf(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function mf(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let o=1;o<arguments.length;o+=1){const i=o<0||arguments.length<=o?void 0:arguments[o];if(null!=i&&(n=i,!("undefined"!=typeof window&&void 0!==window.HTMLElement?n instanceof HTMLElement:n&&(1===n.nodeType||11===n.nodeType)))){const n=Object.keys(Object(i)).filter((e=>t.indexOf(e)<0));for(let t=0,o=n.length;t<o;t+=1){const o=n[t],a=Object.getOwnPropertyDescriptor(i,o);void 0!==a&&a.enumerable&&(gf(e[o])&&gf(i[o])?i[o].__swiper__?e[o]=i[o]:mf(e[o],i[o]):!gf(e[o])&&gf(i[o])?(e[o]={},i[o].__swiper__?e[o]=i[o]:mf(e[o],i[o])):e[o]=i[o])}}}var n;return e}function bf(e,t,n){e.style.setProperty(t,n)}function ff(e){let{swiper:t,targetPosition:n,side:o}=e;const i=df(),a=-t.translate;let s,r=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const c=n>a?"next":"prev",d=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{s=(new Date).getTime(),null===r&&(r=s);const e=Math.max(Math.min((s-r)/l,1),0),c=.5-Math.cos(e*Math.PI)/2;let p=a+c*(n-a);if(d(p,n)&&(p=n),t.wrapperEl.scrollTo({[o]:p}),d(p,n))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[o]:p})})),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(u)};u()}function xf(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function yf(e,t){void 0===t&&(t="")
344 -;const n=df(),o=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&o.push(...e.assignedElements()),t?o.filter((e=>e.matches(t))):o}function vf(e){try{return void console.warn(e)}catch(e){}}function kf(e,t){void 0===t&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:uf(t)),n}function wf(e,t){return df().getComputedStyle(e,null).getPropertyValue(t)}function _f(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function Cf(e,t){const n=[];let o=e.parentElement;for(;o;)t?o.matches(t)&&n.push(o):n.push(o),o=o.parentElement;return n}function jf(e,t,n){const o=df();return n?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(o.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(o.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}function $f(e){return(Array.isArray(e)?e:[e]).filter((e=>!!e))}function Sf(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}function Tf(e,t){void 0===t&&(t=""),"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}function Nf(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const a=df();let s;n({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let r,l=hf();const c=[];function d(){t.enabled&&(t.mouseEntered=!0)}function u(){t.enabled&&(t.mouseEntered=!1)}function p(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta||t.params.mousewheel.thresholdTime&&hf()-l<t.params.mousewheel.thresholdTime||!(e.delta>=6&&hf()-l<60)&&(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),i("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),i("scroll",e.raw)),l=(new a.Date).getTime(),1))}function h(e){let n=e,o=!0;if(!t.enabled)return;if(e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`))return;const a=t.params.mousewheel;t.params.cssMode&&n.preventDefault();let l=t.el;"container"!==t.params.mousewheel.eventsTarget&&(l=document.querySelector(t.params.mousewheel.eventsTarget));const d=l&&l.contains(n.target);if(!t.mouseEntered&&!d&&!a.releaseOnEdges)return!0;n.originalEvent&&(n=n.originalEvent);let u=0;const h=t.rtlTranslate?-1:1,g=function(e){let t=0,n=0,o=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(o=e.deltaX),e.shiftKey&&!o&&(o=i,i=0),(o||i)&&e.deltaMode&&(1===e.deltaMode?(o*=40,i*=40):(o*=800,i*=800)),o&&!t&&(t=o<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:i}}(n);if(a.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(g.pixelX)>Math.abs(g.pixelY)))return!0;u=-g.pixelX*h}else{if(!(Math.abs(g.pixelY)>Math.abs(g.pixelX)))return!0;u=-g.pixelY}else u=Math.abs(g.pixelX)>Math.abs(g.pixelY)?-g.pixelX*h:-g.pixelY;if(0===u)return!0;a.invert&&(u=-u);let m=t.getTranslate()+u*a.sensitivity;if(m>=t.minTranslate()&&(m=t.minTranslate()),m<=t.maxTranslate()&&(m=t.maxTranslate()),o=!!t.params.loop||!(m===t.minTranslate()||m===t.maxTranslate()),o&&t.params.nested&&n.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:hf(),delta:Math.abs(u),direction:Math.sign(u)},o=r&&e.time<r.time+500&&e.delta<=r.delta&&e.direction===r.direction;if(!o){r=void 0;let l=t.getTranslate()+u*a.sensitivity;const d=t.isBeginning,p=t.isEnd;if(l>=t.minTranslate()&&(l=t.minTranslate()),l<=t.maxTranslate()&&(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!d&&t.isBeginning||!p&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(s),s=void 0,c.length>=15&&c.shift();const n=c.length?c[c.length-1]:void 0,o=c[0];if(c.push(e),n&&(e.delta>n.delta||e.direction!==n.direction))c.splice(0);else if(c.length>=15&&e.time-o.time<500&&o.delta-e.delta>=1&&e.delta<=6){const n=u>0?.8:.2;r=e,c.splice(0),s=pf((()=>{!t.destroyed&&t.params&&t.slideToClosest(t.params.speed,!0,void 0,n)}),0)}s||(s=pf((()=>{!t.destroyed&&t.params&&(r=e,c.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5))}),500))}if(o||i("scroll",n),t.params.autoplay&&t.params.autoplay.disableOnInteraction&&t.autoplay.stop(),a.releaseOnEdges&&(l===t.minTranslate()||l===t.maxTranslate()))return!0}}else{const n={time:hf(),delta:Math.abs(u),direction:Math.sign(u),raw:e};c.length>=2&&c.shift();const o=c.length?c[c.length-1]:void 0;if(c.push(n),o?(n.direction!==o.direction||n.delta>o.delta||n.time>o.time+150)&&p(n):p(n),function(e){const n=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&n.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&n.releaseOnEdges)return!0;return!1}(n))return!0}return n.preventDefault?n.preventDefault():n.returnValue=!1,!1}function g(e){let n=t.el;"container"!==t.params.mousewheel.eventsTarget&&(n=document.querySelector(t.params.mousewheel.eventsTarget)),n[e]("mouseenter",d),n[e]("mouseleave",u),n[e]("wheel",h)}function m(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",h),!0):!t.mousewheel.enabled&&(g("addEventListener"),t.mousewheel.enabled=!0,!0)}function b(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,h),!0):!!t.mousewheel.enabled&&(g("removeEventListener"),t.mousewheel.enabled=!1,!0)}o("init",(()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&b(),t.params.mousewheel.enabled&&m()})),o("destroy",(()=>{t.params.cssMode&&m(),t.mousewheel.enabled&&b()})),Object.assign(t.mousewheel,{enable:m,disable:b})}function Mf(e,t,n,o){return e.params.createElements&&Object.keys(o).forEach((i=>{if(!n[i]&&!0===n.auto){let a=yf(e.el,`.${o[i]}`)[0];a||(a=kf("div",o[i]),a.className=o[i],e.el.append(a)),n[i]=a,t[i]=a}})),n}function Lf(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;function a(e){let n;return e&&"string"==typeof e&&t.isElement&&(n=t.el.querySelector(e)||t.hostEl.querySelector(e),n)?n:(e&&("string"==typeof e&&(n=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&n&&n.length>1&&1===t.el.querySelectorAll(e).length?n=t.el.querySelector(e):n&&1===n.length&&(n=n[0])),e&&!n?e:n)}function s(e,n){const o=t.params.navigation;(e=$f(e)).forEach((e=>{e&&(e.classList[n?"add":"remove"](...o.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=n),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](o.lockClass))}))}function r(){const{nextEl:e,prevEl:n}=t.navigation;if(t.params.loop)return s(n,!1),void s(e,!1);s(n,t.isBeginning&&!t.params.rewind),s(e,t.isEnd&&!t.params.rewind)}function l(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function c(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function d(){const e=t.params.navigation;if(t.params.navigation=Mf(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let n=a(e.nextEl),o=a(e.prevEl);Object.assign(t.navigation,{nextEl:n,prevEl:o}),n=$f(n),o=$f(o);const i=(n,o)=>{n&&n.addEventListener("click","next"===o?c:l),!t.enabled&&n&&n.classList.add(...e.lockClass.split(" "))};n.forEach((e=>i(e,"next"))),o.forEach((e=>i(e,"prev")))}function u(){let{nextEl:e,prevEl:n}=t.navigation;e=$f(e),n=$f(n);const o=(e,n)=>{e.removeEventListener("click","next"===n?c:l),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>o(e,"next"))),n.forEach((e=>o(e,"prev")))}n({navigation:{nextEl:null,
345 -prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},o("init",(()=>{!1===t.params.navigation.enabled?p():(d(),r())})),o("toEdge fromEdge lock unlock",(()=>{r()})),o("destroy",(()=>{u()})),o("enable disable",(()=>{let{nextEl:e,prevEl:n}=t.navigation;e=$f(e),n=$f(n),t.enabled?r():[...e,...n].filter((e=>!!e)).forEach((e=>e.classList.add(t.params.navigation.lockClass)))})),o("click",((e,n)=>{let{nextEl:o,prevEl:a}=t.navigation;o=$f(o),a=$f(a);const s=n.target;let r=a.includes(s)||o.includes(s);if(t.isElement&&!r){const e=n.path||n.composedPath&&n.composedPath();e&&(r=e.find((e=>o.includes(e)||a.includes(e))))}if(t.params.navigation.hideOnClick&&!r){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===s||t.pagination.el.contains(s)))return;let e;o.length?e=o[0].classList.contains(t.params.navigation.hiddenClass):a.length&&(e=a[0].classList.contains(t.params.navigation.hiddenClass)),i(!0===e?"navigationShow":"navigationHide"),[...o,...a].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const p=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),d(),r()},disable:p,update:r,init:d,destroy:u})}function Pf(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/()[\]])/g,"\\$1").replace(/ /g,".")}`}function Ef(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const a="swiper-pagination";let s;n({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`,paginationDisabledClass:`${a}-disabled`}}),t.pagination={el:null,bullets:[]};let r=0;function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function c(e,n){const{bulletActiveClass:o}=t.params.pagination;e&&(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${o}-${n}`),(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&e.classList.add(`${o}-${n}-${n}`))}function d(e){const n=e.target.closest(Pf(t.params.pagination.bulletClass));if(!n)return;e.preventDefault();const o=_f(n)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===o)return;const e=(i=t.realIndex,a=o,(a%=s=t.slides.length)==1+(i%=s)?"next":a===i-1?"previous":void 0);"next"===e?t.slideNext():"previous"===e?t.slidePrev():t.slideToLoop(o)}else t.slideTo(o);var i,a,s}function u(){const e=t.rtl,n=t.params.pagination;if(l())return;let o,a,d=t.pagination.el;d=$f(d);const u=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,p=t.params.loop?Math.ceil(u/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(a=t.previousRealIndex||0,o=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(o=t.snapIndex,a=t.previousSnapIndex):(a=t.previousIndex||0,o=t.activeIndex||0),"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const i=t.pagination.bullets;let l,u,p;if(n.dynamicBullets&&(s=jf(i[0],t.isHorizontal()?"width":"height",!0),d.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=s*(n.dynamicMainBullets+4)+"px"})),n.dynamicMainBullets>1&&void 0!==a&&(r+=o-(a||0),r>n.dynamicMainBullets-1?r=n.dynamicMainBullets-1:r<0&&(r=0)),l=Math.max(o-r,0),u=l+(Math.min(i.length,n.dynamicMainBullets)-1),p=(u+l)/2),i.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${n.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),d.length>1)i.forEach((e=>{const i=_f(e);i===o?e.classList.add(...n.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),n.dynamicBullets&&(i>=l&&i<=u&&e.classList.add(...`${n.bulletActiveClass}-main`.split(" ")),i===l&&c(e,"prev"),i===u&&c(e,"next"))}));else{const e=i[o];if(e&&e.classList.add(...n.bulletActiveClass.split(" ")),t.isElement&&i.forEach(((e,t)=>{e.setAttribute("part",t===o?"bullet-active":"bullet")})),n.dynamicBullets){const e=i[l],t=i[u];for(let e=l;e<=u;e+=1)i[e]&&i[e].classList.add(...`${n.bulletActiveClass}-main`.split(" "));c(e,"prev"),c(t,"next")}}if(n.dynamicBullets){const o=Math.min(i.length,n.dynamicMainBullets+4),a=(s*o-s)/2-p*s,r=e?"right":"left";i.forEach((e=>{e.style[t.isHorizontal()?r:"top"]=`${a}px`}))}}d.forEach(((e,a)=>{if("fraction"===n.type&&(e.querySelectorAll(Pf(n.currentClass)).forEach((e=>{e.textContent=n.formatFractionCurrent(o+1)})),e.querySelectorAll(Pf(n.totalClass)).forEach((e=>{e.textContent=n.formatFractionTotal(p)}))),"progressbar"===n.type){let i;i=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const a=(o+1)/p;let s=1,r=1;"horizontal"===i?s=a:r=a,e.querySelectorAll(Pf(n.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${s}) scaleY(${r})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===n.type&&n.renderCustom?(Tf(e,n.renderCustom(t,o+1,p)),0===a&&i("paginationRender",e)):(0===a&&i("paginationRender",e),i("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](n.lockClass)}))}function p(){const e=t.params.pagination;if(l())return;const n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let o=t.pagination.el;o=$f(o);let a="";if("bullets"===e.type){let o=t.params.loop?Math.ceil(n/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&o>n&&(o=n);for(let n=0;n<o;n+=1)e.renderBullet?a+=e.renderBullet.call(t,n,e.bulletClass):a+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(a=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(a=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],o.forEach((n=>{"custom"!==e.type&&Tf(n,a||""),"bullets"===e.type&&t.pagination.bullets.push(...n.querySelectorAll(Pf(e.bulletClass)))})),"custom"!==e.type&&i("paginationRender",o[0])}function h(){t.params.pagination=Mf(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let n;"string"==typeof e.el&&t.isElement&&(n=t.el.querySelector(e.el)),n||"string"!=typeof e.el||(n=[...document.querySelectorAll(e.el)]),n||(n=e.el),n&&0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(n)&&n.length>1&&(n=[...t.el.querySelectorAll(e.el)],n.length>1&&(n=n.find((e=>Cf(e,".swiper")[0]===t.el)))),Array.isArray(n)&&1===n.length&&(n=n[0]),Object.assign(t.pagination,{el:n}),n=$f(n),n.forEach((n=>{"bullets"===e.type&&e.clickable&&n.classList.add(...(e.clickableClass||"").split(" ")),n.classList.add(e.modifierClass+e.type),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(n.classList.add(`${e.modifierClass}${e.type}-dynamic`),r=0,
346 -e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.classList.add(e.progressbarOppositeClass),e.clickable&&n.addEventListener("click",d),t.enabled||n.classList.add(e.lockClass)})))}function g(){const e=t.params.pagination;if(l())return;let n=t.pagination.el;n&&(n=$f(n),n.forEach((n=>{n.classList.remove(e.hiddenClass),n.classList.remove(e.modifierClass+e.type),n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(n.classList.remove(...(e.clickableClass||"").split(" ")),n.removeEventListener("click",d))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}o("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:n}=t.pagination;n=$f(n),n.forEach((n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),o("init",(()=>{!1===t.params.pagination.enabled?m():(h(),p(),u())})),o("activeIndexChange",(()=>{void 0===t.snapIndex&&u()})),o("snapIndexChange",(()=>{u()})),o("snapGridLengthChange",(()=>{p(),u()})),o("destroy",(()=>{g()})),o("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=$f(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),o("lock unlock",(()=>{u()})),o("click",((e,n)=>{const o=n.target,a=$f(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&a&&a.length>0&&!o.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&o===t.navigation.nextEl||t.navigation.prevEl&&o===t.navigation.prevEl))return;const e=a[0].classList.contains(t.params.pagination.hiddenClass);i(!0===e?"paginationShow":"paginationHide"),a.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const m=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=$f(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),g()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=$f(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),h(),p(),u()},disable:m,render:p,update:u,init:h,destroy:g})}function Af(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const a=lf();let s,r,l,c,d=!1,u=null,p=null;function h(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:n}=t,{dragEl:o,el:i}=e,a=t.params.scrollbar,s=t.params.loop?t.progressLoop:t.progress;let c=r,d=(l-r)*s;n?(d=-d,d>0?(c=r-d,d=0):-d+r>l&&(c=l+d)):d<0?(c=r+d,d=0):d+r>l&&(c=l-d),t.isHorizontal()?(o.style.transform=`translate3d(${d}px, 0, 0)`,o.style.width=`${c}px`):(o.style.transform=`translate3d(0px, ${d}px, 0)`,o.style.height=`${c}px`),a.hide&&(clearTimeout(u),i.style.opacity=1,u=setTimeout((()=>{i.style.opacity=0,i.style.transitionDuration="400ms"}),1e3))}function g(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{dragEl:n,el:o}=e;n.style.width="",n.style.height="",l=t.isHorizontal()?o.offsetWidth:o.offsetHeight,c=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),r="auto"===t.params.scrollbar.dragSize?l*c:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?n.style.width=`${r}px`:n.style.height=`${r}px`,o.style.display=c>=1?"none":"",t.params.scrollbar.hide&&(o.style.opacity=0),t.params.watchOverflow&&t.enabled&&e.el.classList[t.isLocked?"add":"remove"](t.params.scrollbar.lockClass)}function m(e){return t.isHorizontal()?e.clientX:e.clientY}function b(e){const{scrollbar:n,rtlTranslate:o}=t,{el:i}=n;let a;a=(m(e)-function(e){const t=df(),n=lf(),o=e.getBoundingClientRect(),i=n.body,a=e.clientTop||i.clientTop||0,s=e.clientLeft||i.clientLeft||0,r=e===t?t.scrollY:e.scrollTop,l=e===t?t.scrollX:e.scrollLeft;return{top:o.top+r-a,left:o.left+l-s}}(i)[t.isHorizontal()?"left":"top"]-(null!==s?s:r/2))/(l-r),a=Math.max(Math.min(a,1),0),o&&(a=1-a);const c=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*a;t.updateProgress(c),t.setTranslate(c),t.updateActiveIndex(),t.updateSlidesClasses()}function f(e){const n=t.params.scrollbar,{scrollbar:o,wrapperEl:a}=t,{el:r,dragEl:l}=o;d=!0,s=e.target===l?m(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),a.style.transitionDuration="100ms",l.style.transitionDuration="100ms",b(e),clearTimeout(p),r.style.transitionDuration="0ms",n.hide&&(r.style.opacity=1),t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="none"),i("scrollbarDragStart",e)}function x(e){const{scrollbar:n,wrapperEl:o}=t,{el:a,dragEl:s}=n;d&&(e.preventDefault&&e.cancelable?e.preventDefault():e.returnValue=!1,b(e),o.style.transitionDuration="0ms",a.style.transitionDuration="0ms",s.style.transitionDuration="0ms",i("scrollbarDragMove",e))}function y(e){const n=t.params.scrollbar,{scrollbar:o,wrapperEl:a}=t,{el:s}=o;d&&(d=!1,t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="",a.style.transitionDuration=""),n.hide&&(clearTimeout(p),p=pf((()=>{s.style.opacity=0,s.style.transitionDuration="400ms"}),1e3)),i("scrollbarDragEnd",e),n.snapOnRelease&&t.slideToClosest())}function v(e){const{scrollbar:n,params:o}=t,i=n.el;if(!i)return;const s=i,r=!!o.passiveListeners&&{passive:!1,capture:!1},l=!!o.passiveListeners&&{passive:!0,capture:!1};if(!s)return;const c="on"===e?"addEventListener":"removeEventListener";s[c]("pointerdown",f,r),a[c]("pointermove",x,r),a[c]("pointerup",y,l)}function k(){const{scrollbar:e,el:n}=t;t.params.scrollbar=Mf(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const o=t.params.scrollbar;if(!o.el)return;let i,s;if("string"==typeof o.el&&t.isElement&&(i=t.el.querySelector(o.el)),i||"string"!=typeof o.el)i||(i=o.el);else if(i=a.querySelectorAll(o.el),!i.length)return;t.params.uniqueNavElements&&"string"==typeof o.el&&i.length>1&&1===n.querySelectorAll(o.el).length&&(i=n.querySelector(o.el)),i.length>0&&(i=i[0]),i.classList.add(t.isHorizontal()?o.horizontalClass:o.verticalClass),i&&(s=i.querySelector(Pf(t.params.scrollbar.dragClass)),s||(s=kf("div",t.params.scrollbar.dragClass),i.append(s))),Object.assign(e,{el:i,dragEl:s}),o.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&v("on"),i&&i.classList[t.enabled?"remove":"add"](...uf(t.params.scrollbar.lockClass))}function w(){const e=t.params.scrollbar,n=t.scrollbar.el;n&&n.classList.remove(...uf(t.isHorizontal()?e.horizontalClass:e.verticalClass)),t.params.scrollbar.el&&t.scrollbar.el&&v("off")}n({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null},o("changeDirection",(()=>{if(!t.scrollbar||!t.scrollbar.el)return;const e=t.params.scrollbar;let{el:n}=t.scrollbar;n=$f(n),n.forEach((n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),o("init",(()=>{!1===t.params.scrollbar.enabled?_():(k(),g(),h())})),o("update resize observerUpdate lock unlock changeDirection",(()=>{g()})),o("setTranslate",(()=>{h()})),o("setTransition",((e,n)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&(t.scrollbar.dragEl.style.transitionDuration=`${e}ms`)}(n)})),o("enable disable",(()=>{const{el:e}=t.scrollbar;e&&e.classList[t.enabled?"remove":"add"](...uf(t.params.scrollbar.lockClass))})),o("destroy",(()=>{w()}));const _=()=>{t.el.classList.add(...uf(t.params.scrollbar.scrollbarDisabledClass)),t.scrollbar.el&&t.scrollbar.el.classList.add(...uf(t.params.scrollbar.scrollbarDisabledClass)),w()};Object.assign(t.scrollbar,{enable:()=>{t.el.classList.remove(...uf(t.params.scrollbar.scrollbarDisabledClass)),
347 -t.scrollbar.el&&t.scrollbar.el.classList.remove(...uf(t.params.scrollbar.scrollbarDisabledClass)),k(),g(),h()},disable:_,updateSize:g,setTranslate:h,init:k,destroy:w})}function Bf(e){let{swiper:t,extendParams:n,on:o}=e;n({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,containerRole:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null,scrollOnFocus:!0}}),t.a11y={clicked:!1};let i,a,s=null,r=(new Date).getTime();function l(e){const t=s;0!==t.length&&Tf(t,e)}function c(e){(e=$f(e)).forEach((e=>{e.setAttribute("tabIndex","0")}))}function d(e){(e=$f(e)).forEach((e=>{e.setAttribute("tabIndex","-1")}))}function u(e,t){(e=$f(e)).forEach((e=>{e.setAttribute("role",t)}))}function p(e,t){(e=$f(e)).forEach((e=>{e.setAttribute("aria-roledescription",t)}))}function h(e,t){(e=$f(e)).forEach((e=>{e.setAttribute("aria-label",t)}))}function g(e){(e=$f(e)).forEach((e=>{e.setAttribute("aria-disabled",!0)}))}function m(e){(e=$f(e)).forEach((e=>{e.setAttribute("aria-disabled",!1)}))}function b(e){if(13!==e.keyCode&&32!==e.keyCode)return;const n=t.params.a11y,o=e.target;if(!t.pagination||!t.pagination.el||o!==t.pagination.el&&!t.pagination.el.contains(e.target)||e.target.matches(Pf(t.params.pagination.bulletClass))){if(t.navigation&&t.navigation.prevEl&&t.navigation.nextEl){const e=$f(t.navigation.prevEl);$f(t.navigation.nextEl).includes(o)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?l(n.lastSlideMessage):l(n.nextSlideMessage)),e.includes(o)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?l(n.firstSlideMessage):l(n.prevSlideMessage))}t.pagination&&o.matches(Pf(t.params.pagination.bulletClass))&&o.click()}}function f(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function x(){return f()&&t.params.pagination.clickable}const y=(e,t,n)=>{c(e),"BUTTON"!==e.tagName&&(u(e,"button"),e.addEventListener("keydown",b)),h(e,n),function(e,t){(e=$f(e)).forEach((e=>{e.setAttribute("aria-controls",t)}))}(e,t)},v=e=>{a&&a!==e.target&&!a.contains(e.target)&&(i=!0),t.a11y.clicked=!0},k=()=>{i=!1,requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.destroyed||(t.a11y.clicked=!1)}))}))},w=e=>{r=(new Date).getTime()},_=e=>{if(t.a11y.clicked||!t.params.a11y.scrollOnFocus)return;if((new Date).getTime()-r<100)return;const n=e.target.closest(`.${t.params.slideClass}, swiper-slide`);if(!n||!t.slides.includes(n))return;a=n;const o=t.slides.indexOf(n)===t.activeIndex,s=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(n);o||s||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,requestAnimationFrame((()=>{i||(t.params.loop?t.slideToLoop(t.getSlideIndexWhenGrid(parseInt(n.getAttribute("data-swiper-slide-index"))),0):t.slideTo(t.getSlideIndexWhenGrid(t.slides.indexOf(n)),0),i=!1)})))},C=()=>{const e=t.params.a11y;e.itemRoleDescriptionMessage&&p(t.slides,e.itemRoleDescriptionMessage),e.slideRole&&u(t.slides,e.slideRole);const n=t.slides.length;e.slideLabelMessage&&t.slides.forEach(((o,i)=>{const a=t.params.loop?parseInt(o.getAttribute("data-swiper-slide-index"),10):i;h(o,e.slideLabelMessage.replace(/\{\{index\}\}/,a+1).replace(/\{\{slidesLength\}\}/,n))}))};o("beforeInit",(()=>{s=kf("span",t.params.a11y.notificationClass),s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true")})),o("afterInit",(()=>{t.params.a11y.enabled&&(()=>{const e=t.params.a11y;t.el.append(s);const n=t.el;e.containerRoleDescriptionMessage&&p(n,e.containerRoleDescriptionMessage),e.containerMessage&&h(n,e.containerMessage),e.containerRole&&u(n,e.containerRole);const o=t.wrapperEl,i=e.id||o.getAttribute("id")||`swiper-wrapper-${a=16,void 0===a&&(a=16),"x".repeat(a).replace(/x/g,(()=>Math.round(16*Math.random()).toString(16)))}`;var a;const r=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var l;l=i,$f(o).forEach((e=>{e.setAttribute("id",l)})),function(e,t){(e=$f(e)).forEach((e=>{e.setAttribute("aria-live",t)}))}(o,r),C();let{nextEl:c,prevEl:d}=t.navigation?t.navigation:{};c=$f(c),d=$f(d),c&&c.forEach((t=>y(t,i,e.nextSlideMessage))),d&&d.forEach((t=>y(t,i,e.prevSlideMessage))),x()&&$f(t.pagination.el).forEach((e=>{e.addEventListener("keydown",b)})),lf().addEventListener("visibilitychange",w),t.el.addEventListener("focus",_,!0),t.el.addEventListener("focus",_,!0),t.el.addEventListener("pointerdown",v,!0),t.el.addEventListener("pointerup",k,!0)})()})),o("slidesLengthChange snapGridLengthChange slidesGridLengthChange",(()=>{t.params.a11y.enabled&&C()})),o("fromEdge toEdge afterInit lock unlock",(()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{nextEl:e,prevEl:n}=t.navigation;n&&(t.isBeginning?(g(n),d(n)):(m(n),c(n))),e&&(t.isEnd?(g(e),d(e)):(m(e),c(e)))}()})),o("paginationUpdate",(()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;f()&&t.pagination.bullets.forEach((n=>{t.params.pagination.clickable&&(c(n),t.params.pagination.renderBullet||(u(n,"button"),h(n,e.paginationBulletMessage.replace(/\{\{index\}\}/,_f(n)+1)))),n.matches(Pf(t.params.pagination.bulletActiveClass))?n.setAttribute("aria-current","true"):n.removeAttribute("aria-current")}))}()})),o("destroy",(()=>{t.params.a11y.enabled&&function(){s&&s.remove();let{nextEl:e,prevEl:n}=t.navigation?t.navigation:{};e=$f(e),n=$f(n),e&&e.forEach((e=>e.removeEventListener("keydown",b))),n&&n.forEach((e=>e.removeEventListener("keydown",b))),x()&&$f(t.pagination.el).forEach((e=>{e.removeEventListener("keydown",b)})),lf().removeEventListener("visibilitychange",w),t.el&&"string"!=typeof t.el&&(t.el.removeEventListener("focus",_,!0),t.el.removeEventListener("pointerdown",v,!0),t.el.removeEventListener("pointerup",k,!0))}()}))}function If(e){let t,n,{swiper:o,extendParams:i,on:a,emit:s,params:r}=e;o.autoplay={running:!1,paused:!1,timeLeft:0},i({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,c,d,u,p,h,g,m,b=r&&r.autoplay?r.autoplay.delay:3e3,f=r&&r.autoplay?r.autoplay.delay:3e3,x=(new Date).getTime();function y(e){o&&!o.destroyed&&o.wrapperEl&&e.target===o.wrapperEl&&(o.wrapperEl.removeEventListener("transitionend",y),m||e.detail&&e.detail.bySwiperTouchMove||j())}const v=()=>{if(o.destroyed||!o.autoplay.running)return;o.autoplay.paused?c=!0:c&&(f=l,c=!1);const e=o.autoplay.paused?l:x+f-(new Date).getTime();o.autoplay.timeLeft=e,s("autoplayTimeLeft",e,e/b),n=requestAnimationFrame((()=>{v()}))},k=e=>{if(o.destroyed||!o.autoplay.running)return;cancelAnimationFrame(n),v();let i=void 0===e?o.params.autoplay.delay:e;b=o.params.autoplay.delay,f=o.params.autoplay.delay;const a=(()=>{let e;if(e=o.virtual&&o.params.virtual.enabled?o.slides.find((e=>e.classList.contains("swiper-slide-active"))):o.slides[o.activeIndex],e)return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(a)&&a>0&&void 0===e&&(i=a,b=a,f=a),l=i;const r=o.params.speed,c=()=>{o&&!o.destroyed&&(o.params.autoplay.reverseDirection?!o.isBeginning||o.params.loop||o.params.rewind?(o.slidePrev(r,!0,!0),s("autoplay")):o.params.autoplay.stopOnLastSlide||(o.slideTo(o.slides.length-1,r,!0,!0),s("autoplay")):!o.isEnd||o.params.loop||o.params.rewind?(o.slideNext(r,!0,!0),s("autoplay")):o.params.autoplay.stopOnLastSlide||(o.slideTo(0,r,!0,!0),s("autoplay")),o.params.cssMode&&(x=(new Date).getTime(),requestAnimationFrame((()=>{k()}))))};return i>0?(clearTimeout(t),t=setTimeout((()=>{c()}),i)):requestAnimationFrame((()=>{c()})),i},w=()=>{x=(new Date).getTime(),o.autoplay.running=!0,k(),s("autoplayStart")},_=()=>{o.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(n),s("autoplayStop")
348 -},C=(e,n)=>{if(o.destroyed||!o.autoplay.running)return;clearTimeout(t),e||(g=!0);const i=()=>{s("autoplayPause"),o.params.autoplay.waitForTransition?o.wrapperEl.addEventListener("transitionend",y):j()};if(o.autoplay.paused=!0,n)return h&&(l=o.params.autoplay.delay),h=!1,void i();const a=l||o.params.autoplay.delay;l=a-((new Date).getTime()-x),o.isEnd&&l<0&&!o.params.loop||(l<0&&(l=0),i())},j=()=>{o.isEnd&&l<0&&!o.params.loop||o.destroyed||!o.autoplay.running||(x=(new Date).getTime(),g?(g=!1,k(l)):k(),o.autoplay.paused=!1,s("autoplayResume"))},$=()=>{if(o.destroyed||!o.autoplay.running)return;const e=lf();"hidden"===e.visibilityState&&(g=!0,C(!0)),"visible"===e.visibilityState&&j()},S=e=>{"mouse"===e.pointerType&&(g=!0,m=!0,o.animating||o.autoplay.paused||C(!0))},T=e=>{"mouse"===e.pointerType&&(m=!1,o.autoplay.paused&&j())};a("init",(()=>{o.params.autoplay.enabled&&(o.params.autoplay.pauseOnMouseEnter&&(o.el.addEventListener("pointerenter",S),o.el.addEventListener("pointerleave",T)),lf().addEventListener("visibilitychange",$),w())})),a("destroy",(()=>{o.el&&"string"!=typeof o.el&&(o.el.removeEventListener("pointerenter",S),o.el.removeEventListener("pointerleave",T)),lf().removeEventListener("visibilitychange",$),o.autoplay.running&&_()})),a("_freeModeStaticRelease",(()=>{(u||g)&&j()})),a("_freeModeNoMomentumRelease",(()=>{o.params.autoplay.disableOnInteraction?_():C(!0,!0)})),a("beforeTransitionStart",((e,t,n)=>{!o.destroyed&&o.autoplay.running&&(n||!o.params.autoplay.disableOnInteraction?C(!0,!0):_())})),a("sliderFirstMove",(()=>{!o.destroyed&&o.autoplay.running&&(o.params.autoplay.disableOnInteraction?_():(d=!0,u=!1,g=!1,p=setTimeout((()=>{g=!0,u=!0,C(!0)}),200)))})),a("touchEnd",(()=>{if(!o.destroyed&&o.autoplay.running&&d){if(clearTimeout(p),clearTimeout(t),o.params.autoplay.disableOnInteraction)return u=!1,void(d=!1);u&&o.params.cssMode&&j(),u=!1,d=!1}})),a("slideChange",(()=>{!o.destroyed&&o.autoplay.running&&(h=!0)})),Object.assign(o.autoplay,{start:w,stop:_,pause:C,resume:j})}function Of(e){const{effect:t,swiper:n,on:o,setTranslate:i,setTransition:a,overwriteParams:s,perspective:r,recreateShadows:l,getEffectParams:c}=e;let d;o("beforeInit",(()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),r&&r()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const e=s?s():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)})),o("setTranslate _virtualUpdated",(()=>{n.params.effect===t&&i()})),o("setTransition",((e,o)=>{n.params.effect===t&&a(o)})),o("transitionEnd",(()=>{if(n.params.effect===t&&l){if(!c||!c().slideShadows)return;n.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),l()}})),o("virtualUpdate",(()=>{n.params.effect===t&&(n.slides.length||(d=!0),requestAnimationFrame((()=>{d&&n.slides&&n.slides.length&&(i(),d=!1)})))}))}function Rf(e,t){const n=xf(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function zf(e){let{swiper:t,duration:n,transformElements:o,allSlides:i}=e;const{activeIndex:a}=t;if(t.params.virtualTranslate&&0!==n){let e,n=!1;e=i?o:o.filter((e=>{const n=e.classList.contains("swiper-slide-transform")?(e=>e.parentElement?e.parentElement:t.slides.find((t=>t.shadowRoot&&t.shadowRoot===e.parentNode)))(e):e;return t.getSlideIndex(n)===a})),e.forEach((e=>{!function(e,t){t&&e.addEventListener("transitionend",(function n(o){o.target===e&&(t.call(e,o),e.removeEventListener("transitionend",n))}))}(e,(()=>{if(n)return;if(!t||t.destroyed)return;n=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)}))}))}}function Df(e){let{swiper:t,extendParams:n,on:o}=e;n({fadeEffect:{crossFade:!1}}),Of({effect:"fade",swiper:t,on:o,setTranslate:()=>{const{slides:e}=t;t.params.fadeEffect;for(let n=0;n<e.length;n+=1){const e=t.slides[n];let o=-e.swiperSlideOffset;t.params.virtualTranslate||(o-=t.translate);let i=0;t.isHorizontal()||(i=o,o=0);const a=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e.progress),0):1+Math.min(Math.max(e.progress,-1),0),s=Rf(0,e);s.style.opacity=a,s.style.transform=`translate3d(${o}px, ${i}px, 0px)`}},setTransition:e=>{const n=t.slides.map((e=>xf(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`})),zf({swiper:t,duration:e,transformElements:n,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}function Ff(e){let{swiper:t,extendParams:n,on:o}=e;n({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(e,t,n)=>{let o=n?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=n?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");o||(o=kf("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(n?"left":"top")).split(" ")),e.append(o)),i||(i=kf("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(n?"right":"bottom")).split(" ")),e.append(i)),o&&(o.style.opacity=Math.max(-t,0)),i&&(i.style.opacity=Math.max(t,0))};Of({effect:"cube",swiper:t,on:o,setTranslate:()=>{const{el:e,wrapperEl:n,slides:o,width:a,height:s,rtlTranslate:r,size:l,browser:c}=t,d=Sf(t),u=t.params.cubeEffect,p=t.isHorizontal(),h=t.virtual&&t.params.virtual.enabled;let g,m=0;u.shadow&&(p?(g=t.wrapperEl.querySelector(".swiper-cube-shadow"),g||(g=kf("div","swiper-cube-shadow"),t.wrapperEl.append(g)),g.style.height=`${a}px`):(g=e.querySelector(".swiper-cube-shadow"),g||(g=kf("div","swiper-cube-shadow"),e.append(g))));for(let e=0;e<o.length;e+=1){const t=o[e];let n=e;h&&(n=parseInt(t.getAttribute("data-swiper-slide-index"),10));let a=90*n,s=Math.floor(a/360);r&&(a=-a,s=Math.floor(-a/360));const c=Math.max(Math.min(t.progress,1),-1);let g=0,b=0,f=0;n%4==0?(g=4*-s*l,f=0):(n-1)%4==0?(g=0,f=4*-s*l):(n-2)%4==0?(g=l+4*s*l,f=l):(n-3)%4==0&&(g=-l,f=3*l+4*l*s),r&&(g=-g),p||(b=g,g=0);const x=`rotateX(${d(p?0:-a)}deg) rotateY(${d(p?a:0)}deg) translate3d(${g}px, ${b}px, ${f}px)`;c<=1&&c>-1&&(m=90*n+90*c,r&&(m=90*-n-90*c)),t.style.transform=x,u.slideShadows&&i(t,c,p)}if(n.style.transformOrigin=`50% 50% -${l/2}px`,n.style["-webkit-transform-origin"]=`50% 50% -${l/2}px`,u.shadow)if(p)g.style.transform=`translate3d(0px, ${a/2+u.shadowOffset}px, ${-a/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${u.shadowScale})`;else{const e=Math.abs(m)-90*Math.floor(Math.abs(m)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),n=u.shadowScale,o=u.shadowScale/t,i=u.shadowOffset;g.style.transform=`scale3d(${n}, 1, ${o}) translate3d(0px, ${s/2+i}px, ${-s/2/o}px) rotateX(-89.99deg)`}const b=(c.isSafari||c.isWebView)&&c.needPerspectiveFix?-l/2:0;n.style.transform=`translate3d(0px,0,${b}px) rotateX(${d(t.isHorizontal()?0:m)}deg) rotateY(${d(t.isHorizontal()?-m:0)}deg)`,n.style.setProperty("--swiper-cube-translate-z",`${b}px`)},setTransition:e=>{const{el:n,slides:o}=t;if(o.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),t.params.cubeEffect.shadow&&!t.isHorizontal()){const t=n.querySelector(".swiper-cube-shadow");t&&(t.style.transitionDuration=`${e}ms`)}},recreateShadows:()=>{const e=t.isHorizontal();t.slides.forEach((t=>{const n=Math.max(Math.min(t.progress,1),-1);i(t,n,e)}))},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}function Hf(e,t,n){const o=`swiper-slide-shadow${n?`-${n}`:""}${e?` swiper-slide-shadow-${e}`:""}`,i=xf(t);let a=i.querySelector(`.${o.split(" ").join(".")}`);return a||(a=kf("div",o.split(" ")),i.append(a)),a}
349 -function Wf(e){let{swiper:t,extendParams:n,on:o}=e;n({flipEffect:{slideShadows:!0,limitRotation:!0}});const i=(e,n)=>{let o=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");o||(o=Hf("flip",e,t.isHorizontal()?"left":"top")),i||(i=Hf("flip",e,t.isHorizontal()?"right":"bottom")),o&&(o.style.opacity=Math.max(-n,0)),i&&(i.style.opacity=Math.max(n,0))};Of({effect:"flip",swiper:t,on:o,setTranslate:()=>{const{slides:e,rtlTranslate:n}=t,o=t.params.flipEffect,a=Sf(t);for(let s=0;s<e.length;s+=1){const r=e[s];let l=r.progress;t.params.flipEffect.limitRotation&&(l=Math.max(Math.min(r.progress,1),-1));const c=r.swiperSlideOffset;let d=-180*l,u=0,p=t.params.cssMode?-c-t.translate:-c,h=0;t.isHorizontal()?n&&(d=-d):(h=p,p=0,u=-d,d=0),r.style.zIndex=-Math.abs(Math.round(l))+e.length,o.slideShadows&&i(r,l);const g=`translate3d(${p}px, ${h}px, 0px) rotateX(${a(u)}deg) rotateY(${a(d)}deg)`;Rf(0,r).style.transform=g}},setTransition:e=>{const n=t.slides.map((e=>xf(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),zf({swiper:t,duration:e,transformElements:n})},recreateShadows:()=>{t.params.flipEffect,t.slides.forEach((e=>{let n=e.progress;t.params.flipEffect.limitRotation&&(n=Math.max(Math.min(e.progress,1),-1)),i(e,n)}))},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}function Uf(e){let{swiper:t,extendParams:n,on:o}=e;n({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),Of({effect:"coverflow",swiper:t,on:o,setTranslate:()=>{const{width:e,height:n,slides:o,slidesSizesGrid:i}=t,a=t.params.coverflowEffect,s=t.isHorizontal(),r=t.translate,l=s?e/2-r:n/2-r,c=s?a.rotate:-a.rotate,d=a.depth,u=Sf(t);for(let e=0,t=o.length;e<t;e+=1){const t=o[e],n=i[e],r=(l-t.swiperSlideOffset-n/2)/n,p="function"==typeof a.modifier?a.modifier(r):r*a.modifier;let h=s?c*p:0,g=s?0:c*p,m=-d*Math.abs(p),b=a.stretch;"string"==typeof b&&-1!==b.indexOf("%")&&(b=parseFloat(a.stretch)/100*n);let f=s?0:b*p,x=s?b*p:0,y=1-(1-a.scale)*Math.abs(p);Math.abs(x)<.001&&(x=0),Math.abs(f)<.001&&(f=0),Math.abs(m)<.001&&(m=0),Math.abs(h)<.001&&(h=0),Math.abs(g)<.001&&(g=0),Math.abs(y)<.001&&(y=0);const v=`translate3d(${x}px,${f}px,${m}px) rotateX(${u(g)}deg) rotateY(${u(h)}deg) scale(${y})`;if(Rf(0,t).style.transform=v,t.style.zIndex=1-Math.abs(Math.round(p)),a.slideShadows){let e=s?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),n=s?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=Hf("coverflow",t,s?"left":"top")),n||(n=Hf("coverflow",t,s?"right":"bottom")),e&&(e.style.opacity=p>0?p:0),n&&(n.style.opacity=-p>0?-p:0)}}},setTransition:e=>{t.slides.map((e=>xf(e))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}function Gf(e){let{swiper:t,extendParams:n,on:o}=e;n({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const i=e=>"string"==typeof e?e:`${e}px`;Of({effect:"creative",swiper:t,on:o,setTranslate:()=>{const{slides:e,wrapperEl:n,slidesSizesGrid:o}=t,a=t.params.creativeEffect,{progressMultiplier:s}=a,r=t.params.centeredSlides,l=Sf(t);if(r){const e=o[0]/2-t.params.slidesOffsetBefore||0;n.style.transform=`translateX(calc(50% - ${e}px))`}for(let n=0;n<e.length;n+=1){const o=e[n],c=o.progress,d=Math.min(Math.max(o.progress,-a.limitProgress),a.limitProgress);let u=d;r||(u=Math.min(Math.max(o.originalProgress,-a.limitProgress),a.limitProgress));const p=o.swiperSlideOffset,h=[t.params.cssMode?-p-t.translate:-p,0,0],g=[0,0,0];let m=!1;t.isHorizontal()||(h[1]=h[0],h[0]=0);let b={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};d<0?(b=a.next,m=!0):d>0&&(b=a.prev,m=!0),h.forEach(((e,t)=>{h[t]=`calc(${e}px + (${i(b.translate[t])} * ${Math.abs(d*s)}))`})),g.forEach(((e,t)=>{let n=b.rotate[t]*Math.abs(d*s);g[t]=n})),o.style.zIndex=-Math.abs(Math.round(c))+e.length;const f=h.join(", "),x=`rotateX(${l(g[0])}deg) rotateY(${l(g[1])}deg) rotateZ(${l(g[2])}deg)`,y=u<0?`scale(${1+(1-b.scale)*u*s})`:`scale(${1-(1-b.scale)*u*s})`,v=u<0?1+(1-b.opacity)*u*s:1-(1-b.opacity)*u*s,k=`translate3d(${f}) ${x} ${y}`;if(m&&b.shadow||!m){let e=o.querySelector(".swiper-slide-shadow");if(!e&&b.shadow&&(e=Hf("creative",o)),e){const t=a.shadowPerProgress?d*(1/a.limitProgress):d;e.style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const w=Rf(0,o);w.style.transform=k,w.style.opacity=v,b.origin&&(w.style.transformOrigin=b.origin)}},setTransition:e=>{const n=t.slides.map((e=>xf(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),zf({swiper:t,duration:e,transformElements:n,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}function Vf(e){let{swiper:t,extendParams:n,on:o}=e;n({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),Of({effect:"cards",swiper:t,on:o,setTranslate:()=>{const{slides:e,activeIndex:n,rtlTranslate:o}=t,i=t.params.cardsEffect,{startTranslate:a,isTouched:s}=t.touchEventsData,r=o?-t.translate:t.translate;for(let l=0;l<e.length;l+=1){const c=e[l],d=c.progress,u=Math.min(Math.max(d,-4),4);let p=c.swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&(t.wrapperEl.style.transform=`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(p-=e[0].swiperSlideOffset);let h=t.params.cssMode?-p-t.translate:-p,g=0;const m=-100*Math.abs(u);let b=1,f=-i.perSlideRotate*u,x=i.perSlideOffset-.75*Math.abs(u);const y=t.virtual&&t.params.virtual.enabled?t.virtual.from+l:l,v=(y===n||y===n-1)&&u>0&&u<1&&(s||t.params.cssMode)&&r<a,k=(y===n||y===n+1)&&u<0&&u>-1&&(s||t.params.cssMode)&&r>a;if(v||k){const e=(1-Math.abs((Math.abs(u)-.5)/.5))**.5;f+=-28*u*e,b+=-.5*e,x+=96*e,g=-25*e*Math.abs(u)+"%"}if(h=u<0?`calc(${h}px ${o?"-":"+"} (${x*Math.abs(u)}%))`:u>0?`calc(${h}px ${o?"-":"+"} (-${x*Math.abs(u)}%))`:`${h}px`,!t.isHorizontal()){const e=g;g=h,h=e}const w=u<0?""+(1+(1-b)*u):""+(1-(1-b)*u),_=`\n translate3d(${h}, ${g}, ${m}px)\n rotateZ(${i.rotate?o?-f:f:0}deg)\n scale(${w})\n `;if(i.slideShadows){let e=c.querySelector(".swiper-slide-shadow");e||(e=Hf("cards",c)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(u)-.5)/.5,0),1))}c.style.zIndex=-Math.abs(Math.round(d))+e.length,Rf(0,c).style.transform=_}},setTransition:e=>{const n=t.slides.map((e=>xf(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),zf({swiper:t,duration:e,transformElements:n})},perspective:()=>!0,overwriteParams:()=>({_loopSwapReset:!1,watchSlidesProgress:!0,loopAdditionalSlides:t.params.cardsEffect.rotate?3:2,centeredSlides:!0,virtualTranslate:!t.params.cssMode})})}let qf,Yf,Kf;function Qf(){return qf||(qf=function(){const e=df(),t=lf();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),qf}function Zf(e){return void 0===e&&(e={}),Yf||(Yf=function(e){
350 -let{userAgent:t}=void 0===e?{}:e;const n=Qf(),o=df(),i=o.navigator.platform,a=t||o.navigator.userAgent,s={ios:!1,android:!1},r=o.screen.width,l=o.screen.height,c=a.match(/(Android);?[\s\/]+([\d.]+)?/);let d=a.match(/(iPad).*OS\s([\d_]+)/);const u=a.match(/(iPod)(.*OS\s([\d_]+))?/),p=!d&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i;let g="MacIntel"===i;return!d&&g&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${r}x${l}`)>=0&&(d=a.match(/(Version)\/([\d.]+)/),d||(d=[0,1,"13_0_0"]),g=!1),c&&!h&&(s.os="android",s.android=!0),(d||p||u)&&(s.os="ios",s.ios=!0),s}(e)),Yf}function Xf(){return Kf||(Kf=function(){const e=df(),t=Zf();let n=!1;function o(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(o()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,o]=t.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));n=e<16||16===e&&o<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),a=o();return{isSafari:n||a,needPerspectiveFix:n,need3dFix:a||i&&t.ios,isWebView:i}}()),Kf}var Jf={on(e,t,n){const o=this;if(!o.eventsListeners||o.destroyed)return o;if("function"!=typeof t)return o;const i=n?"unshift":"push";return e.split(" ").forEach((e=>{o.eventsListeners[e]||(o.eventsListeners[e]=[]),o.eventsListeners[e][i](t)})),o},once(e,t,n){const o=this;if(!o.eventsListeners||o.destroyed)return o;if("function"!=typeof t)return o;function i(){o.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];t.apply(o,a)}return i.__emitterProxy=t,o.on(e,i,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const o=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[o](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach(((o,i)=>{(o===t||o.__emitterProxy&&o.__emitterProxy===t)&&n.eventsListeners[e].splice(i,1)}))})),n):n},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,n,o;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return"string"==typeof a[0]||Array.isArray(a[0])?(t=a[0],n=a.slice(1,a.length),o=e):(t=a[0].events,n=a[0].data,o=a[0].context||e),n.unshift(o),(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(o,[t,...n])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(o,n)}))})),e}};const ex=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)},tx=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)},nx=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},ox=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},ix=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const o="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=i,a=[n-t];return a.push(...Array.from({length:t}).map(((e,t)=>n+o+t))),void e.slides.forEach(((t,n)=>{a.includes(t.column)&&ox(e,n)}))}const a=i+o-1;if(e.params.rewind||e.params.loop)for(let o=i-t;o<=a+t;o+=1){const t=(o%n+n)%n;(t<i||t>a)&&ox(e,t)}else for(let o=Math.max(i-t,0);o<=Math.min(a+t,n-1);o+=1)o!==i&&(o>a||o<i)&&ox(e,o)};var ax={updateSize:function(){const e=this;let t,n;const o=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:o.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:o.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(wf(o,"padding-left")||0,10)-parseInt(wf(o,"padding-right")||0,10),n=n-parseInt(wf(o,"padding-top")||0,10)-parseInt(wf(o,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}const n=e.params,{wrapperEl:o,slidesEl:i,size:a,rtlTranslate:s,wrongRTL:r}=e,l=e.virtual&&n.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,d=yf(i,`.${e.params.slideClass}, swiper-slide`),u=l?e.virtual.slides.length:d.length;let p=[];const h=[],g=[];let m=n.slidesOffsetBefore;"function"==typeof m&&(m=n.slidesOffsetBefore.call(e));let b=n.slidesOffsetAfter;"function"==typeof b&&(b=n.slidesOffsetAfter.call(e));const f=e.snapGrid.length,x=e.slidesGrid.length;let y=n.spaceBetween,v=-m,k=0,w=0;if(void 0===a)return;"string"==typeof y&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*a:"string"==typeof y&&(y=parseFloat(y)),e.virtualSize=-y,d.forEach((e=>{s?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),n.centeredSlides&&n.cssMode&&(bf(o,"--swiper-centered-offset-before",""),bf(o,"--swiper-centered-offset-after",""));const _=n.grid&&n.grid.rows>1&&e.grid;let C;_?e.grid.initSlides(d):e.grid&&e.grid.unsetSlides();const j="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter((e=>void 0!==n.breakpoints[e].slidesPerView)).length>0;for(let o=0;o<u;o+=1){let i;if(C=0,d[o]&&(i=d[o]),_&&e.grid.updateSlide(o,i,d),!d[o]||"none"!==wf(i,"display")){if("auto"===n.slidesPerView){j&&(d[o].style[e.getDirectionLabel("width")]="");const a=getComputedStyle(i),s=i.style.transform,r=i.style.webkitTransform;if(s&&(i.style.transform="none"),r&&(i.style.webkitTransform="none"),n.roundLengths)C=e.isHorizontal()?jf(i,"width",!0):jf(i,"height",!0);else{const e=t(a,"width"),n=t(a,"padding-left"),o=t(a,"padding-right"),s=t(a,"margin-left"),r=t(a,"margin-right"),l=a.getPropertyValue("box-sizing");if(l&&"border-box"===l)C=e+s+r;else{const{clientWidth:t,offsetWidth:a}=i;C=e+n+o+s+r+(a-t)}}s&&(i.style.transform=s),r&&(i.style.webkitTransform=r),n.roundLengths&&(C=Math.floor(C))}else C=(a-(n.slidesPerView-1)*y)/n.slidesPerView,n.roundLengths&&(C=Math.floor(C)),d[o]&&(d[o].style[e.getDirectionLabel("width")]=`${C}px`);d[o]&&(d[o].swiperSlideSize=C),g.push(C),n.centeredSlides?(v=v+C/2+k/2+y,0===k&&0!==o&&(v=v-a/2-y),0===o&&(v=v-a/2-y),Math.abs(v)<.001&&(v=0),n.roundLengths&&(v=Math.floor(v)),w%n.slidesPerGroup==0&&p.push(v),h.push(v)):(n.roundLengths&&(v=Math.floor(v)),(w-Math.min(e.params.slidesPerGroupSkip,w))%e.params.slidesPerGroup==0&&p.push(v),h.push(v),v=v+C+y),e.virtualSize+=C+y,k=C,w+=1}}if(e.virtualSize=Math.max(e.virtualSize,a)+b,s&&r&&("slide"===n.effect||"coverflow"===n.effect)&&(o.style.width=`${e.virtualSize+y}px`),n.setWrapperSize&&(o.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),_&&e.grid.updateWrapperSize(C,p),!n.centeredSlides){const t=[];for(let o=0;o<p.length;o+=1){let i=p[o];n.roundLengths&&(i=Math.floor(i)),p[o]<=e.virtualSize-a&&t.push(i)}p=t,Math.floor(e.virtualSize-a)-Math.floor(p[p.length-1])>1&&p.push(e.virtualSize-a)}if(l&&n.loop){const t=g[0]+y
351 -;if(n.slidesPerGroup>1){const o=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),i=t*n.slidesPerGroup;for(let e=0;e<o;e+=1)p.push(p[p.length-1]+i)}for(let o=0;o<e.virtual.slidesBefore+e.virtual.slidesAfter;o+=1)1===n.slidesPerGroup&&p.push(p[p.length-1]+t),h.push(h[h.length-1]+t),e.virtualSize+=t}if(0===p.length&&(p=[0]),0!==y){const t=e.isHorizontal()&&s?"marginLeft":e.getDirectionLabel("marginRight");d.filter(((e,t)=>!(n.cssMode&&!n.loop)||t!==d.length-1)).forEach((e=>{e.style[t]=`${y}px`}))}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;g.forEach((t=>{e+=t+(y||0)})),e-=y;const t=e>a?e-a:0;p=p.map((e=>e<=0?-m:e>t?t+b:e))}if(n.centerInsufficientSlides){let e=0;g.forEach((t=>{e+=t+(y||0)})),e-=y;const t=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(e+t<a){const n=(a-e-t)/2;p.forEach(((e,t)=>{p[t]=e-n})),h.forEach(((e,t)=>{h[t]=e+n}))}}if(Object.assign(e,{slides:d,snapGrid:p,slidesGrid:h,slidesSizesGrid:g}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){bf(o,"--swiper-centered-offset-before",-p[0]+"px"),bf(o,"--swiper-centered-offset-after",e.size/2-g[g.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+n))}if(u!==c&&e.emit("slidesLengthChange"),p.length!==f&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==x&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,o=e.el.classList.contains(t);u<=n.maxBackfaceHiddenSlides?o||e.el.classList.add(t):o&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],o=t.virtual&&t.params.virtual.enabled;let i,a=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const s=e=>o?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{n.push(e)}));else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e>t.slides.length&&!o)break;n.push(s(e))}else n.push(s(t.activeIndex));for(i=0;i<n.length;i+=1)if(void 0!==n[i]){const e=n[i].offsetHeight;a=e>a?e:a}(a||0===a)&&(t.wrapperEl.style.height=`${a}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let o=0;o<t.length;o+=1)t[o].swiperSlideOffset=(e.isHorizontal()?t[o].offsetLeft:t[o].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:o,rtlTranslate:i,snapGrid:a}=t;if(0===o.length)return;void 0===o[0].swiperSlideOffset&&t.updateSlidesOffset();let s=-e;i&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let r=n.spaceBetween;"string"==typeof r&&r.indexOf("%")>=0?r=parseFloat(r.replace("%",""))/100*t.size:"string"==typeof r&&(r=parseFloat(r));for(let e=0;e<o.length;e+=1){const l=o[e];let c=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(c-=o[0].swiperSlideOffset);const d=(s+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+r),u=(s-a[0]+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+r),p=-(s-c),h=p+t.slidesSizesGrid[e],g=p>=0&&p<=t.size-t.slidesSizesGrid[e],m=p>=0&&p<t.size-1||h>1&&h<=t.size||p<=0&&h>=t.size;m&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),ex(l,m,n.slideVisibleClass),ex(l,g,n.slideFullyVisibleClass),l.progress=i?-d:d,l.originalProgress=i?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,o=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:a,isEnd:s,progressLoop:r}=t;const l=a,c=s;if(0===o)i=0,a=!0,s=!0;else{i=(e-t.minTranslate())/o;const n=Math.abs(e-t.minTranslate())<1,r=Math.abs(e-t.maxTranslate())<1;a=n||i<=0,s=r||i>=1,n&&(i=0),r&&(i=1)}if(n.loop){const n=t.getSlideIndexByData(0),o=t.getSlideIndexByData(t.slides.length-1),i=t.slidesGrid[n],a=t.slidesGrid[o],s=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);r=l>=i?(l-i)/s:(l+s-a)/s,r>1&&(r-=1)}Object.assign(t,{progress:i,progressLoop:r,isBeginning:a,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),a&&!l&&t.emit("reachBeginning toEdge"),s&&!c&&t.emit("reachEnd toEdge"),(l&&!a||c&&!s)&&t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:o,activeIndex:i}=e,a=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,r=e=>yf(o,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let l,c,d;if(a)if(n.loop){let t=i-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=r(`[data-swiper-slide-index="${t}"]`)}else l=r(`[data-swiper-slide-index="${i}"]`);else s?(l=t.find((e=>e.column===i)),d=t.find((e=>e.column===i+1)),c=t.find((e=>e.column===i-1))):l=t[i];l&&(s||(d=function(e,t){const n=[];for(;e.nextElementSibling;){const o=e.nextElementSibling;t?o.matches(t)&&n.push(o):n.push(o),e=o}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!d&&(d=t[0]),c=function(e,t){const n=[];for(;e.previousElementSibling;){const o=e.previousElementSibling;t?o.matches(t)&&n.push(o):n.push(o),e=o}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&0===!c&&(c=t[t.length-1]))),t.forEach((e=>{tx(e,e===l,n.slideActiveClass),tx(e,e===d,n.slideNextClass),tx(e,e===c,n.slidePrevClass)})),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:o,params:i,activeIndex:a,realIndex:s,snapIndex:r}=t;let l,c=e;const d=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:n}=e,o=e.rtlTranslate?e.translate:-e.translate;let i;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?o>=t[e]&&o<t[e+1]-(t[e+1]-t[e])/2?i=e:o>=t[e]&&o<t[e+1]&&(i=e+1):o>=t[e]&&(i=e);return n.normalizeSlideIndex&&(i<0||void 0===i)&&(i=0),i}(t)),o.indexOf(n)>=0)l=o.indexOf(n);else{const e=Math.min(i.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/i.slidesPerGroup)}if(l>=o.length&&(l=o.length-1),c===a&&!t.params.loop)return void(l!==r&&(t.snapIndex=l,t.emit("snapIndexChange")));if(c===a&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=d(c));const u=t.grid&&i.grid&&i.grid.rows>1;let p;if(t.virtual&&i.virtual.enabled&&i.loop)p=d(c);else if(u){const e=t.slides.find((e=>e.column===c));let n=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(n)&&(n=Math.max(t.slides.indexOf(e),0)),p=Math.floor(n/i.grid.rows)}else if(t.slides[c]){const e=t.slides[c].getAttribute("data-swiper-slide-index");p=e?parseInt(e,10):c}else p=c;Object.assign(t,{previousSnapIndex:r,snapIndex:l,previousRealIndex:s,realIndex:p,previousIndex:a,activeIndex:c}),t.initialized&&ix(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==p&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,o=n.params;let i=e.closest(`.${o.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!i&&e.matches&&e.matches(`.${o.slideClass}, swiper-slide`)&&(i=e)}));let a,s=!1;if(i)for(let e=0;e<n.slides.length;e+=1)if(n.slides[e]===i){s=!0,a=e;break}if(!i||!s)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=i,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(i.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=a,o.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}},sx={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y")
352 -;const{params:t,rtlTranslate:n,translate:o,wrapperEl:i}=this;if(t.virtualTranslate)return n?-o:o;if(t.cssMode)return o;let a=function(e,t){void 0===t&&(t="x");const n=df();let o,i,a;const s=function(e){const t=df();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map((e=>e.replace(",","."))).join(", ")),a=new n.WebKitCSSMatrix("none"===i?"":i)):(a=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),o=a.toString().split(",")),"x"===t&&(i=n.WebKitCSSMatrix?a.m41:16===o.length?parseFloat(o[12]):parseFloat(o[4])),"y"===t&&(i=n.WebKitCSSMatrix?a.m42:16===o.length?parseFloat(o[13]):parseFloat(o[5])),i||0}(i,e);return a+=this.cssOverflowAdjustment(),n&&(a=-a),a||0},setTranslate:function(e,t){const n=this,{rtlTranslate:o,params:i,wrapperEl:a,progress:s}=n;let r,l=0,c=0;n.isHorizontal()?l=o?-e:e:c=e,i.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:c,i.cssMode?a[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-c:i.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():c-=n.cssOverflowAdjustment(),a.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const d=n.maxTranslate()-n.minTranslate();r=0===d?0:(e-n.minTranslate())/d,r!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,o,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===o&&(o=!0);const a=this,{params:s,wrapperEl:r}=a;if(a.animating&&s.preventInteractionOnTransition)return!1;const l=a.minTranslate(),c=a.maxTranslate();let d;if(d=o&&e>l?l:o&&e<c?c:e,a.updateProgress(d),s.cssMode){const e=a.isHorizontal();if(0===t)r[e?"scrollLeft":"scrollTop"]=-d;else{if(!a.support.smoothScroll)return ff({swiper:a,targetPosition:-d,side:e?"left":"top"}),!0;r.scrollTo({[e?"left":"top"]:-d,behavior:"smooth"})}return!0}return 0===t?(a.setTransition(0),a.setTranslate(d),n&&(a.emit("beforeTransitionStart",t,i),a.emit("transitionEnd"))):(a.setTransition(t),a.setTranslate(d),n&&(a.emit("beforeTransitionStart",t,i),a.emit("transitionStart")),a.animating||(a.animating=!0,a.onTranslateToWrapperTransitionEnd||(a.onTranslateToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.wrapperEl.removeEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.onTranslateToWrapperTransitionEnd=null,delete a.onTranslateToWrapperTransitionEnd,a.animating=!1,n&&a.emit("transitionEnd"))}),a.wrapperEl.addEventListener("transitionend",a.onTranslateToWrapperTransitionEnd))),!0}};function rx(e){let{swiper:t,runCallbacks:n,direction:o,step:i}=e;const{activeIndex:a,previousIndex:s}=t;let r=o;r||(r=a>s?"next":a<s?"prev":"reset"),t.emit(`transition${i}`),n&&"reset"===r?t.emit(`slideResetTransition${i}`):n&&a!==s&&(t.emit(`slideChangeTransition${i}`),"next"===r?t.emit(`slideNextTransition${i}`):t.emit(`slidePrevTransition${i}`))}var lx={slideTo:function(e,t,n,o,i){void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const a=this;let s=e;s<0&&(s=0);const{params:r,snapGrid:l,slidesGrid:c,previousIndex:d,activeIndex:u,rtlTranslate:p,wrapperEl:h,enabled:g}=a;if(!g&&!o&&!i||a.destroyed||a.animating&&r.preventInteractionOnTransition)return!1;void 0===t&&(t=a.params.speed);const m=Math.min(a.params.slidesPerGroupSkip,s);let b=m+Math.floor((s-m)/a.params.slidesPerGroup);b>=l.length&&(b=l.length-1);const f=-l[b];if(r.normalizeSlideIndex)for(let e=0;e<c.length;e+=1){const t=-Math.floor(100*f),n=Math.floor(100*c[e]),o=Math.floor(100*c[e+1]);void 0!==c[e+1]?t>=n&&t<o-(o-n)/2?s=e:t>=n&&t<o&&(s=e+1):t>=n&&(s=e)}if(a.initialized&&s!==u){if(!a.allowSlideNext&&(p?f>a.translate&&f>a.minTranslate():f<a.translate&&f<a.minTranslate()))return!1;if(!a.allowSlidePrev&&f>a.translate&&f>a.maxTranslate()&&(u||0)!==s)return!1}let x;s!==(d||0)&&n&&a.emit("beforeSlideChangeStart"),a.updateProgress(f),x=s>u?"next":s<u?"prev":"reset";const y=a.virtual&&a.params.virtual.enabled;if((!y||!i)&&(p&&-f===a.translate||!p&&f===a.translate))return a.updateActiveIndex(s),r.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),"slide"!==r.effect&&a.setTranslate(f),"reset"!==x&&(a.transitionStart(n,x),a.transitionEnd(n,x)),!1;if(r.cssMode){const e=a.isHorizontal(),n=p?f:-f;if(0===t)y&&(a.wrapperEl.style.scrollSnapType="none",a._immediateVirtual=!0),y&&!a._cssModeVirtualInitialSet&&a.params.initialSlide>0?(a._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{h[e?"scrollLeft":"scrollTop"]=n}))):h[e?"scrollLeft":"scrollTop"]=n,y&&requestAnimationFrame((()=>{a.wrapperEl.style.scrollSnapType="",a._immediateVirtual=!1}));else{if(!a.support.smoothScroll)return ff({swiper:a,targetPosition:n,side:e?"left":"top"}),!0;h.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}const v=Xf().isSafari;return y&&!i&&v&&a.isElement&&a.virtual.update(!1,!1,s),a.setTransition(t),a.setTranslate(f),a.updateActiveIndex(s),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,o),a.transitionStart(n,x),0===t?a.transitionEnd(n,x):a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.wrapperEl.removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(n,x))}),a.wrapperEl.addEventListener("transitionend",a.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,n,o){void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;void 0===t&&(t=i.params.speed);const a=i.grid&&i.params.grid&&i.params.grid.rows>1;let s=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)s+=i.virtual.slidesBefore;else{let e;if(a){const t=s*i.params.grid.rows;e=i.slides.find((e=>1*e.getAttribute("data-swiper-slide-index")===t)).column}else e=i.getSlideIndexByData(s);const t=a?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:n}=i.params;let r=i.params.slidesPerView;"auto"===r?r=i.slidesPerViewDynamic():(r=Math.ceil(parseFloat(i.params.slidesPerView,10)),n&&r%2==0&&(r+=1));let l=t-e<r;if(n&&(l=l||e<Math.ceil(r/2)),o&&n&&"auto"!==i.params.slidesPerView&&!a&&(l=!1),l){const o=n?e<i.activeIndex?"prev":"next":e-i.activeIndex-1<i.params.slidesPerView?"next":"prev";i.loopFix({direction:o,slideTo:!0,activeSlideIndex:"next"===o?e+1:e-t+1,slideRealIndex:"next"===o?i.realIndex:void 0})}if(a){const e=s*i.params.grid.rows;s=i.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)).column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame((()=>{i.slideTo(s,t,n,o)})),i},slideNext:function(e,t,n){void 0===t&&(t=!0);const o=this,{enabled:i,params:a,animating:s}=o;if(!i||o.destroyed)return o;void 0===e&&(e=o.params.speed);let r=a.slidesPerGroup;"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(r=Math.max(o.slidesPerViewDynamic("current",!0),1));const l=o.activeIndex<a.slidesPerGroupSkip?1:r,c=o.virtual&&a.virtual.enabled;if(a.loop){if(s&&!c&&a.loopPreventsSliding)return!1;if(o.loopFix({direction:"next"}),o._clientLeft=o.wrapperEl.clientLeft,o.activeIndex===o.slides.length-1&&a.cssMode)return requestAnimationFrame((()=>{o.slideTo(o.activeIndex+l,e,t,n)})),!0}return a.rewind&&o.isEnd?o.slideTo(0,e,t,n):o.slideTo(o.activeIndex+l,e,t,n)},slidePrev:function(e,t,n){void 0===t&&(t=!0);const o=this,{params:i,snapGrid:a,slidesGrid:s,rtlTranslate:r,enabled:l,animating:c}=o;if(!l||o.destroyed)return o;void 0===e&&(e=o.params.speed);const d=o.virtual&&i.virtual.enabled;if(i.loop){if(c&&!d&&i.loopPreventsSliding)return!1;o.loopFix({direction:"prev"}),
353 -o._clientLeft=o.wrapperEl.clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const p=u(r?o.translate:-o.translate),h=a.map((e=>u(e))),g=i.freeMode&&i.freeMode.enabled;let m=a[h.indexOf(p)-1];if(void 0===m&&(i.cssMode||g)){let e;a.forEach(((t,n)=>{p>=t&&(e=n)})),void 0!==e&&(m=g?a[e]:a[e>0?e-1:e])}let b=0;if(void 0!==m&&(b=s.indexOf(m),b<0&&(b=o.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(b=b-o.slidesPerViewDynamic("previous",!0)+1,b=Math.max(b,0))),i.rewind&&o.isBeginning){const i=o.params.virtual&&o.params.virtual.enabled&&o.virtual?o.virtual.slides.length-1:o.slides.length-1;return o.slideTo(i,e,t,n)}return i.loop&&0===o.activeIndex&&i.cssMode?(requestAnimationFrame((()=>{o.slideTo(b,e,t,n)})),!0):o.slideTo(b,e,t,n)},slideReset:function(e,t,n){void 0===t&&(t=!0);const o=this;if(!o.destroyed)return void 0===e&&(e=o.params.speed),o.slideTo(o.activeIndex,e,t,n)},slideToClosest:function(e,t,n,o){void 0===t&&(t=!0),void 0===o&&(o=.5);const i=this;if(i.destroyed)return;void 0===e&&(e=i.params.speed);let a=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,a),r=s+Math.floor((a-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[r]){const e=i.snapGrid[r];l-e>(i.snapGrid[r+1]-e)*o&&(a+=i.params.slidesPerGroup)}else{const e=i.snapGrid[r-1];l-e<=(i.snapGrid[r]-e)*o&&(a-=i.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,i.slidesGrid.length-1),i.slideTo(a,e,t,n)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,o="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,a=e.getSlideIndexWhenGrid(e.clickedIndex);const s=e.isElement?"swiper-slide":`.${t.slideClass}`,r=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(i):a>(r?(e.slides.length-o)/2-(e.params.grid.rows-1):e.slides.length-o)?(e.loopFix(),a=e.getSlideIndex(yf(n,`${s}[data-swiper-slide-index="${i}"]`)[0]),pf((()=>{e.slideTo(a)}))):e.slideTo(a)}else e.slideTo(a)}},cx={loopCreate:function(e,t){const n=this,{params:o,slidesEl:i}=n;if(!o.loop||n.virtual&&n.params.virtual.enabled)return;const a=()=>{yf(i,`.${o.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)}))},s=n.grid&&o.grid&&o.grid.rows>1;o.loopAddBlankSlides&&(o.slidesPerGroup>1||s)&&(()=>{const e=yf(i,`.${o.slideBlankClass}`);e.forEach((e=>{e.remove()})),e.length>0&&(n.recalcSlides(),n.updateSlides())})();const r=o.slidesPerGroup*(s?o.grid.rows:1),l=n.slides.length%r!=0,c=s&&n.slides.length%o.grid.rows!=0,d=e=>{for(let t=0;t<e;t+=1){const e=n.isElement?kf("swiper-slide",[o.slideBlankClass]):kf("div",[o.slideClass,o.slideBlankClass]);n.slidesEl.append(e)}};l?(o.loopAddBlankSlides?(d(r-n.slides.length%r),n.recalcSlides(),n.updateSlides()):vf("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),a()):c?(o.loopAddBlankSlides?(d(o.grid.rows-n.slides.length%o.grid.rows),n.recalcSlides(),n.updateSlides()):vf("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),a()):a(),n.loopFix({slideRealIndex:e,direction:o.centeredSlides?void 0:"next",initial:t})},loopFix:function(e){let{slideRealIndex:t,slideTo:n=!0,direction:o,setTranslate:i,activeSlideIndex:a,initial:s,byController:r,byMousewheel:l}=void 0===e?{}:e;const c=this;if(!c.params.loop)return;c.emit("beforeLoopFix");const{slides:d,allowSlidePrev:u,allowSlideNext:p,slidesEl:h,params:g}=c,{centeredSlides:m,initialSlide:b}=g;if(c.allowSlidePrev=!0,c.allowSlideNext=!0,c.virtual&&g.virtual.enabled)return n&&(g.centeredSlides||0!==c.snapIndex?g.centeredSlides&&c.snapIndex<g.slidesPerView?c.slideTo(c.virtual.slides.length+c.snapIndex,0,!1,!0):c.snapIndex===c.snapGrid.length-1&&c.slideTo(c.virtual.slidesBefore,0,!1,!0):c.slideTo(c.virtual.slides.length,0,!1,!0)),c.allowSlidePrev=u,c.allowSlideNext=p,void c.emit("loopFix");let f=g.slidesPerView;"auto"===f?f=c.slidesPerViewDynamic():(f=Math.ceil(parseFloat(g.slidesPerView,10)),m&&f%2==0&&(f+=1));const x=g.slidesPerGroupAuto?f:g.slidesPerGroup;let y=m?Math.max(x,Math.ceil(f/2)):x;y%x!=0&&(y+=x-y%x),y+=g.loopAdditionalSlides,c.loopedSlides=y;const v=c.grid&&g.grid&&g.grid.rows>1;d.length<f+y||"cards"===c.params.effect&&d.length<f+2*y?vf("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):v&&"row"===g.grid.fill&&vf("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const k=[],w=[],_=v?Math.ceil(d.length/g.grid.rows):d.length,C=s&&_-b<f&&!m;let j=C?b:c.activeIndex;void 0===a?a=c.getSlideIndex(d.find((e=>e.classList.contains(g.slideActiveClass)))):j=a;const $="next"===o||!o,S="prev"===o||!o;let T=0,N=0;const M=(v?d[a].column:a)+(m&&void 0===i?-f/2+.5:0);if(M<y){T=Math.max(y-M,x);for(let e=0;e<y-M;e+=1){const t=e-Math.floor(e/_)*_;if(v){const e=_-t-1;for(let t=d.length-1;t>=0;t-=1)d[t].column===e&&k.push(t)}else k.push(_-t-1)}}else if(M+f>_-y){N=Math.max(M-(_-2*y),x),C&&(N=Math.max(N,f-_+b+1));for(let e=0;e<N;e+=1){const t=e-Math.floor(e/_)*_;v?d.forEach(((e,n)=>{e.column===t&&w.push(n)})):w.push(t)}}if(c.__preventObserver__=!0,requestAnimationFrame((()=>{c.__preventObserver__=!1})),"cards"===c.params.effect&&d.length<f+2*y&&(w.includes(a)&&w.splice(w.indexOf(a),1),k.includes(a)&&k.splice(k.indexOf(a),1)),S&&k.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.prepend(d[e]),d[e].swiperLoopMoveDOM=!1})),$&&w.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.append(d[e]),d[e].swiperLoopMoveDOM=!1})),c.recalcSlides(),"auto"===g.slidesPerView?c.updateSlides():v&&(k.length>0&&S||w.length>0&&$)&&c.slides.forEach(((e,t)=>{c.grid.updateSlide(t,e,c.slides)})),g.watchSlidesProgress&&c.updateSlidesOffset(),n)if(k.length>0&&S){if(void 0===t){const e=c.slidesGrid[j],t=c.slidesGrid[j+T]-e;l?c.setTranslate(c.translate-t):(c.slideTo(j+Math.ceil(T),0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else if(i){const e=v?k.length/g.grid.rows:k.length;c.slideTo(c.activeIndex+e,0,!1,!0),c.touchEventsData.currentTranslate=c.translate}}else if(w.length>0&&$)if(void 0===t){const e=c.slidesGrid[j],t=c.slidesGrid[j-N]-e;l?c.setTranslate(c.translate-t):(c.slideTo(j-N,0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else{const e=v?w.length/g.grid.rows:w.length;c.slideTo(c.activeIndex-e,0,!1,!0)}if(c.allowSlidePrev=u,c.allowSlideNext=p,c.controller&&c.controller.control&&!r){const e={slideRealIndex:t,direction:o,setTranslate:i,activeSlideIndex:a,byController:!0};Array.isArray(c.controller.control)?c.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===g.slidesPerView&&n})})):c.controller.control instanceof c.constructor&&c.controller.control.params.loop&&c.controller.control.loopFix({...e,slideTo:c.controller.control.params.slidesPerView===g.slidesPerView&&n})}c.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const o=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;o[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),o.forEach((e=>{n.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function dx(e,t,n){
354 -const o=df(),{params:i}=e,a=i.edgeSwipeDetection,s=i.edgeSwipeThreshold;return!a||!(n<=s||n>=o.innerWidth-s)||"prevent"===a&&(t.preventDefault(),!0)}function ux(e){const t=this,n=lf();let o=e;o.originalEvent&&(o=o.originalEvent);const i=t.touchEventsData;if("pointerdown"===o.type){if(null!==i.pointerId&&i.pointerId!==o.pointerId)return;i.pointerId=o.pointerId}else"touchstart"===o.type&&1===o.targetTouches.length&&(i.touchId=o.targetTouches[0].identifier);if("touchstart"===o.type)return void dx(t,o,o.targetTouches[0].pageX);const{params:a,touches:s,enabled:r}=t;if(!r)return;if(!a.simulateTouch&&"mouse"===o.pointerType)return;if(t.animating&&a.preventInteractionOnTransition)return;!t.animating&&a.cssMode&&a.loop&&t.loopFix();let l=o.target;if("wrapper"===a.touchEventsTarget&&!function(e,t){const n=df();let o=t.contains(e);return!o&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(o=[...t.assignedElements()].includes(e),o||(o=function(e,t){const n=[t];for(;n.length>0;){const t=n.shift();if(e===t)return!0;n.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}}(e,t))),o}(l,t.wrapperEl))return;if("which"in o&&3===o.which)return;if("button"in o&&o.button>0)return;if(i.isTouched&&i.isMoved)return;const c=!!a.noSwipingClass&&""!==a.noSwipingClass,d=o.composedPath?o.composedPath():o.path;c&&o.target&&o.target.shadowRoot&&d&&(l=d[0]);const u=a.noSwipingSelector?a.noSwipingSelector:`.${a.noSwipingClass}`,p=!(!o.target||!o.target.shadowRoot);if(a.noSwiping&&(p?function(e,t){return void 0===t&&(t=this),function t(n){if(!n||n===lf()||n===df())return null;n.assignedSlot&&(n=n.assignedSlot);const o=n.closest(e);return o||n.getRootNode?o||t(n.getRootNode().host):null}(t)}(u,l):l.closest(u)))return void(t.allowClick=!0);if(a.swipeHandler&&!l.closest(a.swipeHandler))return;s.currentX=o.pageX,s.currentY=o.pageY;const h=s.currentX,g=s.currentY;if(!dx(t,o,h))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=h,s.startY=g,i.touchStartTime=hf(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,a.threshold>0&&(i.allowThresholdMove=!1);let m=!0;l.matches(i.focusableElements)&&(m=!1,"SELECT"===l.nodeName&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&("mouse"===o.pointerType||"mouse"!==o.pointerType&&!l.matches(i.focusableElements))&&n.activeElement.blur();const b=m&&t.allowTouchMove&&a.touchStartPreventDefault;!a.touchStartForcePreventDefault&&!b||l.isContentEditable||o.preventDefault(),a.freeMode&&a.freeMode.enabled&&t.freeMode&&t.animating&&!a.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",o)}function px(e){const t=lf(),n=this,o=n.touchEventsData,{params:i,touches:a,rtlTranslate:s,enabled:r}=n;if(!r)return;if(!i.simulateTouch&&"mouse"===e.pointerType)return;let l,c=e;if(c.originalEvent&&(c=c.originalEvent),"pointermove"===c.type){if(null!==o.touchId)return;if(c.pointerId!==o.pointerId)return}if("touchmove"===c.type){if(l=[...c.changedTouches].find((e=>e.identifier===o.touchId)),!l||l.identifier!==o.touchId)return}else l=c;if(!o.isTouched)return void(o.startMoving&&o.isScrolling&&n.emit("touchMoveOpposite",c));const d=l.pageX,u=l.pageY;if(c.preventedByNestedSwiper)return a.startX=d,void(a.startY=u);if(!n.allowTouchMove)return c.target.matches(o.focusableElements)||(n.allowClick=!1),void(o.isTouched&&(Object.assign(a,{startX:d,startY:u,currentX:d,currentY:u}),o.touchStartTime=hf()));if(i.touchReleaseOnEdges&&!i.loop)if(n.isVertical()){if(u<a.startY&&n.translate<=n.maxTranslate()||u>a.startY&&n.translate>=n.minTranslate())return o.isTouched=!1,void(o.isMoved=!1)}else{if(s&&(d>a.startX&&-n.translate<=n.maxTranslate()||d<a.startX&&-n.translate>=n.minTranslate()))return;if(!s&&(d<a.startX&&n.translate<=n.maxTranslate()||d>a.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(o.focusableElements)&&t.activeElement!==c.target&&"mouse"!==c.pointerType&&t.activeElement.blur(),t.activeElement&&c.target===t.activeElement&&c.target.matches(o.focusableElements))return o.isMoved=!0,void(n.allowClick=!1);o.allowTouchCallbacks&&n.emit("touchMove",c),a.previousX=a.currentX,a.previousY=a.currentY,a.currentX=d,a.currentY=u;const p=a.currentX-a.startX,h=a.currentY-a.startY;if(n.params.threshold&&Math.sqrt(p**2+h**2)<n.params.threshold)return;if(void 0===o.isScrolling){let e;n.isHorizontal()&&a.currentY===a.startY||n.isVertical()&&a.currentX===a.startX?o.isScrolling=!1:p*p+h*h>=25&&(e=180*Math.atan2(Math.abs(h),Math.abs(p))/Math.PI,o.isScrolling=n.isHorizontal()?e>i.touchAngle:90-e>i.touchAngle)}if(o.isScrolling&&n.emit("touchMoveOpposite",c),void 0===o.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(o.startMoving=!0)),o.isScrolling||"touchmove"===c.type&&o.preventTouchMoveFromPointerMove)return void(o.isTouched=!1);if(!o.startMoving)return;n.allowClick=!1,!i.cssMode&&c.cancelable&&c.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&c.stopPropagation();let g=n.isHorizontal()?p:h,m=n.isHorizontal()?a.currentX-a.previousX:a.currentY-a.previousY;i.oneWayMovement&&(g=Math.abs(g)*(s?1:-1),m=Math.abs(m)*(s?1:-1)),a.diff=g,g*=i.touchRatio,s&&(g=-g,m=-m);const b=n.touchesDirection;n.swipeDirection=g>0?"prev":"next",n.touchesDirection=m>0?"prev":"next";const f=n.params.loop&&!i.cssMode,x="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!o.isMoved){if(f&&x&&n.loopFix({direction:n.swipeDirection}),o.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(e)}o.allowMomentumBounce=!1,!i.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",c)}if((new Date).getTime(),!1!==i._loopSwapReset&&o.isMoved&&o.allowThresholdMove&&b!==n.touchesDirection&&f&&x&&Math.abs(g)>=1)return Object.assign(a,{startX:d,startY:u,currentX:d,currentY:u,startTranslate:o.currentTranslate}),o.loopSwapReset=!0,void(o.startTranslate=o.currentTranslate);n.emit("sliderMove",c),o.isMoved=!0,o.currentTranslate=g+o.startTranslate;let y=!0,v=i.resistanceRatio;if(i.touchReleaseOnEdges&&(v=0),g>0?(f&&x&&o.allowThresholdMove&&o.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==i.slidesPerView&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),o.currentTranslate>n.minTranslate()&&(y=!1,i.resistance&&(o.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+o.startTranslate+g)**v))):g<0&&(f&&x&&o.allowThresholdMove&&o.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==i.slidesPerView&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===i.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),o.currentTranslate<n.maxTranslate()&&(y=!1,i.resistance&&(o.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-o.startTranslate-g)**v))),y&&(c.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&o.currentTranslate<o.startTranslate&&(o.currentTranslate=o.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&o.currentTranslate>o.startTranslate&&(o.currentTranslate=o.startTranslate),n.allowSlidePrev||n.allowSlideNext||(o.currentTranslate=o.startTranslate),i.threshold>0){if(!(Math.abs(g)>i.threshold||o.allowThresholdMove))return void(o.currentTranslate=o.startTranslate);if(!o.allowThresholdMove)return o.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,
355 -o.currentTranslate=o.startTranslate,void(a.diff=n.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}i.followFinger&&!i.cssMode&&((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(o.currentTranslate),n.setTranslate(o.currentTranslate))}function hx(e){const t=this,n=t.touchEventsData;let o,i=e;if(i.originalEvent&&(i=i.originalEvent),"touchend"===i.type||"touchcancel"===i.type){if(o=[...i.changedTouches].find((e=>e.identifier===n.touchId)),!o||o.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(i.pointerId!==n.pointerId)return;o=i}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(i.type)&&(!["pointercancel","contextmenu"].includes(i.type)||!t.browser.isSafari&&!t.browser.isWebView))return;n.pointerId=null,n.touchId=null;const{params:a,touches:s,rtlTranslate:r,slidesGrid:l,enabled:c}=t;if(!c)return;if(!a.simulateTouch&&"mouse"===i.pointerType)return;if(n.allowTouchCallbacks&&t.emit("touchEnd",i),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&a.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);a.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const d=hf(),u=d-n.touchStartTime;if(t.allowClick){const e=i.path||i.composedPath&&i.composedPath();t.updateClickedSlide(e&&e[0]||i.target,e),t.emit("tap click",i),u<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",i)}if(n.lastClickTime=hf(),pf((()=>{t.destroyed||(t.allowClick=!0)})),!n.isTouched||!n.isMoved||!t.swipeDirection||0===s.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let p;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,p=a.followFinger?r?t.translate:-t.translate:-n.currentTranslate,a.cssMode)return;if(a.freeMode&&a.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:p});const h=p>=-t.maxTranslate()&&!t.params.loop;let g=0,m=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<a.slidesPerGroupSkip?1:a.slidesPerGroup){const t=e<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;void 0!==l[e+t]?(h||p>=l[e]&&p<l[e+t])&&(g=e,m=l[e+t]-l[e]):(h||p>=l[e])&&(g=e,m=l[l.length-1]-l[l.length-2])}let b=null,f=null;a.rewind&&(t.isBeginning?f=a.virtual&&a.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const x=(p-l[g])/m,y=g<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(u>a.longSwipesMs){if(!a.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(x>=a.longSwipesRatio?t.slideTo(a.rewind&&t.isEnd?b:g+y):t.slideTo(g)),"prev"===t.swipeDirection&&(x>1-a.longSwipesRatio?t.slideTo(g+y):null!==f&&x<0&&Math.abs(x)>a.longSwipesRatio?t.slideTo(f):t.slideTo(g))}else{if(!a.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||i.target!==t.navigation.nextEl&&i.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(null!==b?b:g+y),"prev"===t.swipeDirection&&t.slideTo(null!==f?f:g)):i.target===t.navigation.nextEl?t.slideTo(g+y):t.slideTo(g)}}function gx(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:o,allowSlidePrev:i,snapGrid:a}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const r=s&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||r?e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=i,e.allowSlideNext=o,e.params.watchOverflow&&a!==e.snapGrid&&e.checkOverflow()}function mx(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function bx(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:o}=e;if(!o)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const a=e.maxTranslate()-e.minTranslate();i=0===a?0:(e.translate-e.minTranslate())/a,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function fx(e){const t=this;nx(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function xx(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const yx=(e,t)=>{const n=lf(),{params:o,el:i,wrapperEl:a,device:s}=e,r=!!o.nested,l="on"===t?"addEventListener":"removeEventListener",c=t;i&&"string"!=typeof i&&(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:r}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:r}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:r}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(o.preventClicks||o.preventClicksPropagation)&&i[l]("click",e.onClick,!0),o.cssMode&&a[l]("scroll",e.onScroll),o.updateOnWindowResize?e[c](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",gx,!0):e[c]("observerUpdate",gx,!0),i[l]("load",e.onLoad,{capture:!0}))},vx=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var kx={addClasses:function(){const e=this,{classNames:t,params:n,rtl:o,el:i,device:a}=e,s=function(e,t){const n=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((o=>{e[o]&&n.push(t+o)})):"string"==typeof e&&n.push(t+e)})),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:o},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:a.android},{ios:a.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),i.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}},wx={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,
356 -watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function Cx(e,t){return function(n){void 0===n&&(n={});const o=Object.keys(n)[0],i=n[o];"object"==typeof i&&null!==i?(!0===e[o]&&(e[o]={enabled:!0}),"navigation"===o&&e[o]&&e[o].enabled&&!e[o].prevEl&&!e[o].nextEl&&(e[o].auto=!0),["pagination","scrollbar"].indexOf(o)>=0&&e[o]&&e[o].enabled&&!e[o].el&&(e[o].auto=!0),o in e&&"enabled"in i?("object"!=typeof e[o]||"enabled"in e[o]||(e[o].enabled=!0),e[o]||(e[o]={enabled:!1}),mf(t,n)):mf(t,n)):mf(t,n)}}const jx={eventsEmitter:Jf,update:ax,translate:sx,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const n=this,{params:o}=n;o.cssMode||(o.autoHeight&&n.updateAutoHeight(),rx({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const n=this,{params:o}=n;n.animating=!1,o.cssMode||(n.setTransition(0),rx({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:lx,loop:cx,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=ux.bind(e),e.onTouchMove=px.bind(e),e.onTouchEnd=hx.bind(e),e.onDocumentTouchStart=xx.bind(e),t.cssMode&&(e.onScroll=bx.bind(e)),e.onClick=mx.bind(e),e.onLoad=fx.bind(e),yx(e,"on")},detachEvents:function(){yx(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:o,el:i}=e,a=o.breakpoints;if(!a||a&&0===Object.keys(a).length)return;const s=lf(),r="window"!==o.breakpointsBase&&o.breakpointsBase?"container":o.breakpointsBase,l=["window","container"].includes(o.breakpointsBase)||!o.breakpointsBase?e.el:s.querySelector(o.breakpointsBase),c=e.getBreakpoint(a,r,l);if(!c||e.currentBreakpoint===c)return;const d=(c in a?a[c]:void 0)||e.originalParams,u=vx(e,o),p=vx(e,d),h=e.params.grabCursor,g=d.grabCursor,m=o.enabled;u&&!p?(i.classList.remove(`${o.containerModifierClass}grid`,`${o.containerModifierClass}grid-column`),e.emitContainerClasses()):!u&&p&&(i.classList.add(`${o.containerModifierClass}grid`),(d.grid.fill&&"column"===d.grid.fill||!d.grid.fill&&"column"===o.grid.fill)&&i.classList.add(`${o.containerModifierClass}grid-column`),e.emitContainerClasses()),h&&!g?e.unsetGrabCursor():!h&&g&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===d[t])return;const n=o[t]&&o[t].enabled,i=d[t]&&d[t].enabled;n&&!i&&e[t].disable(),!n&&i&&e[t].enable()}));const b=d.direction&&d.direction!==o.direction,f=o.loop&&(d.slidesPerView!==o.slidesPerView||b),x=o.loop;b&&n&&e.changeDirection(),mf(e.params,d);const y=e.params.enabled,v=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!y?e.disable():!m&&y&&e.enable(),e.currentBreakpoint=c,e.emit("_beforeBreakpoint",d),n&&(f?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!x&&v?(e.loopCreate(t),e.updateSlides()):x&&!v&&e.loopDestroy()),e.emit("breakpoint",d)},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),!e||"container"===t&&!n)return;let o=!1;const i=df(),a="window"===t?i.innerHeight:n.clientHeight,s=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:a*t,point:e}}return{value:e,point:e}}));s.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<s.length;e+=1){const{point:a,value:r}=s[e];"window"===t?i.matchMedia(`(min-width: ${r}px)`).matches&&(o=a):r<=n.clientWidth&&(o=a)}return o||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:o}=n;if(o){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*o;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:kx},$x={};class Sx{constructor(){let e,t;for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];1===o.length&&o[0].constructor&&"Object"===Object.prototype.toString.call(o[0]).slice(8,-1)?t=o[0]:[e,t]=o,t||(t={}),t=mf({},t),e&&!t.el&&(t.el=e);const a=lf();if(t.el&&"string"==typeof t.el&&a.querySelectorAll(t.el).length>1){const e=[];return a.querySelectorAll(t.el).forEach((n=>{const o=mf({},t,{el:n});e.push(new Sx(o))})),e}const s=this;s.__swiper__=!0,s.support=Qf(),s.device=Zf({userAgent:t.userAgent}),s.browser=Xf(),s.eventsListeners={},s.eventsAnyListeners=[],s.modules=[...s.__modules__],t.modules&&Array.isArray(t.modules)&&s.modules.push(...t.modules);const r={};s.modules.forEach((e=>{e({params:t,swiper:s,extendParams:Cx(t,r),on:s.on.bind(s),once:s.once.bind(s),off:s.off.bind(s),emit:s.emit.bind(s)})}));const l=mf({},wx,r);return s.params=mf({},l,$x,t),s.originalParams=mf({},s.params),s.passedParams=mf({},t),s.params&&s.params.on&&Object.keys(s.params.on).forEach((e=>{s.on(e,s.params.on[e])})),s.params&&s.params.onAny&&s.onAny(s.params.onAny),Object.assign(s,{enabled:s.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===s.params.direction,isVertical:()=>"vertical"===s.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:s.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.emit("_swiper"),s.params.init&&s.init(),s}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,o=_f(yf(t,`.${n.slideClass}, swiper-slide`)[0]);return _f(e)-o}getSlideIndexByData(e){
357 -return this.getSlideIndex(this.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=yf(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const o=n.minTranslate(),i=(n.maxTranslate()-o)*e+o;n.translateTo(i,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((n=>{const o=e.getSlideClasses(n);t.push({slideEl:n,classNames:o}),e.emit("_slideClass",n,o)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:n,slides:o,slidesGrid:i,slidesSizesGrid:a,size:s,activeIndex:r}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=o[r]?Math.ceil(o[r].swiperSlideSize):0;for(let n=r+1;n<o.length;n+=1)o[n]&&!e&&(t+=Math.ceil(o[n].swiperSlideSize),l+=1,t>s&&(e=!0));for(let n=r-1;n>=0;n-=1)o[n]&&!e&&(t+=o[n].swiperSlideSize,l+=1,t>s&&(e=!0))}else if("current"===e)for(let e=r+1;e<o.length;e+=1)(t?i[e]+a[e]-i[r]<s:i[e]-i[r]<s)&&(l+=1);else for(let e=r-1;e>=0;e-=1)i[r]-i[e]<s&&(l+=1);return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function o(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let i;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&nx(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)o(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;i=e.slideTo(t.length-1,0,!1,!0)}else i=e.slideTo(e.activeIndex,0,!1,!0);i||o()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const n=this,o=n.params.direction;return e||(e="horizontal"===o?"vertical":"horizontal"),e===o||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${o}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const o=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(o()):yf(n,o())[0];return!i&&t.params.createElements&&(i=kf("div",t.params.wrapperClass),n.append(i),yf(n,`.${t.params.slideClass}`).forEach((e=>{i.append(e)}))),Object.assign(t,{el:n,wrapperEl:i,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:i,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===wf(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===wf(n,"direction")),wrongRTL:"-webkit-box"===wf(i,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach((e=>{e.complete?nx(t,e):e.addEventListener("load",(e=>{nx(t,e.target)}))})),ix(t),t.initialized=!0,ix(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const n=this,{params:o,el:i,wrapperEl:a,slides:s}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),o.loop&&n.loopDestroy(),t&&(n.removeClasses(),i&&"string"!=typeof i&&i.removeAttribute("style"),a&&a.removeAttribute("style"),s&&s.length&&s.forEach((e=>{e.classList.remove(o.slideVisibleClass,o.slideFullyVisibleClass,o.slideActiveClass,o.slideNextClass,o.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((e=>{n.off(e)})),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(n)),n.destroyed=!0),null}static extendDefaults(e){mf($x,e)}static get extendedDefaults(){return $x}static get defaults(){return wx}static installModule(e){Sx.prototype.__modules__||(Sx.prototype.__modules__=[]);const t=Sx.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>Sx.installModule(e))),Sx):(Sx.installModule(e),Sx)}}Object.keys(jx).forEach((e=>{Object.keys(jx[e]).forEach((t=>{Sx.prototype[t]=jx[e][t]}))})),Sx.use([function(e){let{swiper:t,on:n,emit:o}=e;const i=df();let a=null,s=null;const r=()=>{t&&!t.destroyed&&t.initialized&&(o("beforeResize"),o("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&o("orientationchange")};n("init",(()=>{t.params.resizeObserver&&void 0!==i.ResizeObserver?t&&!t.destroyed&&t.initialized&&(a=new ResizeObserver((e=>{s=i.requestAnimationFrame((()=>{const{width:n,height:o}=t;let i=n,a=o;e.forEach((e=>{let{contentBoxSize:n,contentRect:o,target:s}=e;s&&s!==t.el||(i=o?o.width:(n[0]||n).inlineSize,a=o?o.height:(n[0]||n).blockSize)})),i===n&&a===o||r()}))})),a.observe(t.el)):(i.addEventListener("resize",r),i.addEventListener("orientationchange",l))})),n("destroy",(()=>{s&&i.cancelAnimationFrame(s),a&&a.unobserve&&t.el&&(a.unobserve(t.el),a=null),i.removeEventListener("resize",r),i.removeEventListener("orientationchange",l)}))},function(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const a=[],s=df(),r=function(e,n){void 0===n&&(n={});const o=new(s.MutationObserver||s.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void i("observerUpdate",e[0]);const n=function(){i("observerUpdate",e[0])};s.requestAnimationFrame?s.requestAnimationFrame(n):s.setTimeout(n,0)}));o.observe(e,{
358 -attributes:void 0===n.attributes||n.attributes,childList:t.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),a.push(o)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),o("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=Cf(t.hostEl);for(let t=0;t<e.length;t+=1)r(e[t])}r(t.hostEl,{childList:t.params.observeSlideChildren}),r(t.wrapperEl,{attributes:!1})}})),o("destroy",(()=>{a.forEach((e=>{e.disconnect()})),a.splice(0,a.length)}))}]);const Tx=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Nx(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!e.__swiper__}function Mx(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>n.indexOf(e)<0)).forEach((n=>{void 0===e[n]?e[n]=t[n]:Nx(t[n])&&Nx(e[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?e[n]=t[n]:Mx(e[n],t[n]):e[n]=t[n]}))}function Lx(e){return void 0===e&&(e={}),e.navigation&&void 0===e.navigation.nextEl&&void 0===e.navigation.prevEl}function Px(e){return void 0===e&&(e={}),e.pagination&&void 0===e.pagination.el}function Ex(e){return void 0===e&&(e={}),e.scrollbar&&void 0===e.scrollbar.el}function Ax(e){void 0===e&&(e="");const t=e.split(" ").map((e=>e.trim())).filter((e=>!!e)),n=[];return t.forEach((e=>{n.indexOf(e)<0&&n.push(e)})),n.join(" ")}function Bx(e){return void 0===e&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Ix(){return Ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ix.apply(this,arguments)}function Ox(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function Rx(e){const t=[];return m.Children.toArray(e).forEach((e=>{Ox(e)?t.push(e):e.props&&e.props.children&&Rx(e.props.children).forEach((e=>t.push(e)))})),t}function zx(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return m.Children.toArray(e).forEach((e=>{if(Ox(e))t.push(e);else if(e.props&&e.props.slot&&n[e.props.slot])n[e.props.slot].push(e);else if(e.props&&e.props.children){const o=Rx(e.props.children);o.length>0?o.forEach((e=>t.push(e))):n["container-end"].push(e)}else n["container-end"].push(e)})),{slides:t,slots:n}}function Dx(e,t){return"undefined"==typeof window?(0,m.useEffect)(e,t):(0,m.useLayoutEffect)(e,t)}const Fx=(0,m.createContext)(null),Hx=(0,m.createContext)(null),Wx=(0,m.forwardRef)((function(e,t){let{className:n,tag:o="div",wrapperTag:i="div",children:a,onSwiper:s,...r}=void 0===e?{}:e,l=!1;const[c,d]=(0,m.useState)("swiper"),[u,p]=(0,m.useState)(null),[h,g]=(0,m.useState)(!1),b=(0,m.useRef)(!1),f=(0,m.useRef)(null),x=(0,m.useRef)(null),y=(0,m.useRef)(null),v=(0,m.useRef)(null),k=(0,m.useRef)(null),w=(0,m.useRef)(null),_=(0,m.useRef)(null),C=(0,m.useRef)(null),{params:j,passedParams:$,rest:S,events:T}=function(e,t){void 0===e&&(e={}),void 0===t&&(t=!0);const n={on:{}},o={},i={};Mx(n,wx),n._emitClasses=!0,n.init=!1;const a={},s=Tx.map((e=>e.replace(/_/,""))),r=Object.assign({},e);return Object.keys(r).forEach((r=>{void 0!==e[r]&&(s.indexOf(r)>=0?Nx(e[r])?(n[r]={},i[r]={},Mx(n[r],e[r]),Mx(i[r],e[r])):(n[r]=e[r],i[r]=e[r]):0===r.search(/on[A-Z]/)&&"function"==typeof e[r]?t?o[`${r[2].toLowerCase()}${r.substr(3)}`]=e[r]:n.on[`${r[2].toLowerCase()}${r.substr(3)}`]=e[r]:a[r]=e[r])})),["navigation","pagination","scrollbar"].forEach((e=>{!0===n[e]&&(n[e]={}),!1===n[e]&&delete n[e]})),{params:n,passedParams:i,rest:a,events:o}}(r),{slides:N,slots:M}=zx(a),L=()=>{g(!h)};Object.assign(j.on,{_containerClasses(e,t){d(t)}});const P=()=>{Object.assign(j.on,T),l=!0;const e={...j};if(delete e.wrapperClass,x.current=new Sx(e),x.current.virtual&&x.current.params.virtual.enabled){x.current.virtual.slides=N;const e={cache:!1,slides:N,renderExternal:p,renderExternalUpdate:!1};Mx(x.current.params.virtual,e),Mx(x.current.originalParams.virtual,e)}};return f.current||P(),x.current&&x.current.on("_beforeBreakpoint",L),(0,m.useEffect)((()=>()=>{x.current&&x.current.off("_beforeBreakpoint",L)})),(0,m.useEffect)((()=>{!b.current&&x.current&&(x.current.emitSlidesClasses(),b.current=!0)})),Dx((()=>{if(t&&(t.current=f.current),f.current)return x.current.destroyed&&P(),function(e,t){let{el:n,nextEl:o,prevEl:i,paginationEl:a,scrollbarEl:s,swiper:r}=e;Lx(t)&&o&&i&&(r.params.navigation.nextEl=o,r.originalParams.navigation.nextEl=o,r.params.navigation.prevEl=i,r.originalParams.navigation.prevEl=i),Px(t)&&a&&(r.params.pagination.el=a,r.originalParams.pagination.el=a),Ex(t)&&s&&(r.params.scrollbar.el=s,r.originalParams.scrollbar.el=s),r.init(n)}({el:f.current,nextEl:k.current,prevEl:w.current,paginationEl:_.current,scrollbarEl:C.current,swiper:x.current},j),s&&!x.current.destroyed&&s(x.current),()=>{x.current&&!x.current.destroyed&&x.current.destroy(!0,!1)}}),[]),Dx((()=>{!l&&T&&x.current&&Object.keys(T).forEach((e=>{x.current.on(e,T[e])}));const e=function(e,t,n,o,i){const a=[];if(!t)return a;const s=e=>{a.indexOf(e)<0&&a.push(e)};if(n&&o){const e=o.map(i),t=n.map(i);e.join("")!==t.join("")&&s("children"),o.length!==n.length&&s("children")}return Tx.filter((e=>"_"===e[0])).map((e=>e.replace(/_/,""))).forEach((n=>{if(n in e&&n in t)if(Nx(e[n])&&Nx(t[n])){const o=Object.keys(e[n]),i=Object.keys(t[n]);o.length!==i.length?s(n):(o.forEach((o=>{e[n][o]!==t[n][o]&&s(n)})),i.forEach((o=>{e[n][o]!==t[n][o]&&s(n)})))}else e[n]!==t[n]&&s(n)})),a}($,y.current,N,v.current,(e=>e.key));return y.current=$,v.current=N,e.length&&x.current&&!x.current.destroyed&&function(e){let{swiper:t,slides:n,passedParams:o,changedParams:i,nextEl:a,prevEl:s,scrollbarEl:r,paginationEl:l}=e;const c=i.filter((e=>"children"!==e&&"direction"!==e&&"wrapperClass"!==e)),{params:d,pagination:u,navigation:p,scrollbar:h,virtual:g,thumbs:m}=t;let b,f,x,y,v,k,w,_;i.includes("thumbs")&&o.thumbs&&o.thumbs.swiper&&!o.thumbs.swiper.destroyed&&d.thumbs&&(!d.thumbs.swiper||d.thumbs.swiper.destroyed)&&(b=!0),
359 -i.includes("controller")&&o.controller&&o.controller.control&&d.controller&&!d.controller.control&&(f=!0),i.includes("pagination")&&o.pagination&&(o.pagination.el||l)&&(d.pagination||!1===d.pagination)&&u&&!u.el&&(x=!0),i.includes("scrollbar")&&o.scrollbar&&(o.scrollbar.el||r)&&(d.scrollbar||!1===d.scrollbar)&&h&&!h.el&&(y=!0),i.includes("navigation")&&o.navigation&&(o.navigation.prevEl||s)&&(o.navigation.nextEl||a)&&(d.navigation||!1===d.navigation)&&p&&!p.prevEl&&!p.nextEl&&(v=!0);const C=e=>{t[e]&&(t[e].destroy(),"navigation"===e?(t.isElement&&(t[e].prevEl.remove(),t[e].nextEl.remove()),d[e].prevEl=void 0,d[e].nextEl=void 0,t[e].prevEl=void 0,t[e].nextEl=void 0):(t.isElement&&t[e].el.remove(),d[e].el=void 0,t[e].el=void 0))};i.includes("loop")&&t.isElement&&(d.loop&&!o.loop?k=!0:!d.loop&&o.loop?w=!0:_=!0),c.forEach((e=>{if(Nx(d[e])&&Nx(o[e]))Object.assign(d[e],o[e]),"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e||!("enabled"in o[e])||o[e].enabled||C(e);else{const t=o[e];!0!==t&&!1!==t||"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e?d[e]=o[e]:!1===t&&C(e)}})),c.includes("controller")&&!f&&t.controller&&t.controller.control&&d.controller&&d.controller.control&&(t.controller.control=d.controller.control),i.includes("children")&&n&&g&&d.virtual.enabled?(g.slides=n,g.update(!0)):i.includes("virtual")&&g&&d.virtual.enabled&&(n&&(g.slides=n),g.update(!0)),i.includes("children")&&n&&d.loop&&(_=!0),b&&m.init()&&m.update(!0),f&&(t.controller.control=d.controller.control),x&&(!t.isElement||l&&"string"!=typeof l||(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(d.pagination.el=l),u.init(),u.render(),u.update()),y&&(!t.isElement||r&&"string"!=typeof r||(r=document.createElement("div"),r.classList.add("swiper-scrollbar"),r.part.add("scrollbar"),t.el.appendChild(r)),r&&(d.scrollbar.el=r),h.init(),h.updateSize(),h.setTranslate()),v&&(t.isElement&&(a&&"string"!=typeof a||(a=document.createElement("div"),a.classList.add("swiper-button-next"),Tf(a,t.hostEl.constructor.nextButtonSvg),a.part.add("button-next"),t.el.appendChild(a)),s&&"string"!=typeof s||(s=document.createElement("div"),s.classList.add("swiper-button-prev"),Tf(s,t.hostEl.constructor.prevButtonSvg),s.part.add("button-prev"),t.el.appendChild(s))),a&&(d.navigation.nextEl=a),s&&(d.navigation.prevEl=s),p.init(),p.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=o.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=o.allowSlidePrev),i.includes("direction")&&t.changeDirection(o.direction,!1),(k||_)&&t.loopDestroy(),(w||_)&&t.loopCreate(),t.update()}({swiper:x.current,slides:N,passedParams:$,changedParams:e,nextEl:k.current,prevEl:w.current,scrollbarEl:C.current,paginationEl:_.current}),()=>{T&&x.current&&Object.keys(T).forEach((e=>{x.current.off(e,T[e])}))}})),Dx((()=>{var e;!(e=x.current)||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())}),[u]),m.createElement(o,Ix({ref:f,className:Ax(`${c}${n?` ${n}`:""}`)},S),m.createElement(Hx.Provider,{value:x.current},M["container-start"],m.createElement(i,{className:Bx(j.wrapperClass)},M["wrapper-start"],j.virtual?function(e,t,n){if(!n)return null;const o=e=>{let n=e;return e<0?n=t.length+e:n>=t.length&&(n-=t.length),n},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:a,to:s}=n,r=e.params.loop?-t.length:0,l=e.params.loop?2*t.length:t.length,c=[];for(let e=r;e<l;e+=1)e>=a&&e<=s&&c.push(t[o(e)]);return c.map(((t,n)=>m.cloneElement(t,{swiper:e,style:i,key:t.props.virtualIndex||t.key||`slide-${n}`})))}(x.current,N,u):N.map(((e,t)=>m.cloneElement(e,{swiper:x.current,swiperSlideIndex:t}))),M["wrapper-end"]),Lx(j)&&m.createElement(m.Fragment,null,m.createElement("div",{ref:w,className:"swiper-button-prev"}),m.createElement("div",{ref:k,className:"swiper-button-next"})),Ex(j)&&m.createElement("div",{ref:C,className:"swiper-scrollbar"}),Px(j)&&m.createElement("div",{ref:_,className:"swiper-pagination"}),M["container-end"]))}));Wx.displayName="Swiper";const Ux=(0,m.forwardRef)((function(e,t){let{tag:n="div",children:o,className:i="",swiper:a,zoom:s,lazy:r,virtualIndex:l,swiperSlideIndex:c,...d}=void 0===e?{}:e;const u=(0,m.useRef)(null),[p,h]=(0,m.useState)("swiper-slide"),[g,b]=(0,m.useState)(!1);function f(e,t,n){t===u.current&&h(n)}Dx((()=>{if(void 0!==c&&(u.current.swiperSlideIndex=c),t&&(t.current=u.current),u.current&&a){if(!a.destroyed)return a.on("_slideClass",f),()=>{a&&a.off("_slideClass",f)};"swiper-slide"!==p&&h("swiper-slide")}})),Dx((()=>{a&&u.current&&!a.destroyed&&h(a.getSlideClasses(u.current))}),[a]);const x={isActive:p.indexOf("swiper-slide-active")>=0,isVisible:p.indexOf("swiper-slide-visible")>=0,isPrev:p.indexOf("swiper-slide-prev")>=0,isNext:p.indexOf("swiper-slide-next")>=0},y=()=>"function"==typeof o?o(x):o;return m.createElement(n,Ix({ref:u,className:Ax(`${p}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:()=>{b(!0)}},d),s&&m.createElement(Fx.Provider,{value:x},m.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof s?s:void 0},y(),r&&!g&&m.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&m.createElement(Fx.Provider,{value:x},y(),r&&!g&&m.createElement("div",{className:"swiper-lazy-preloader"})))}));Ux.displayName="SwiperSlide";const Gx=({attributes:e})=>{const{content:t,options:n}=e,o={"--swiper-wrapper-transition-timing-function":n?.easing},i=()=>(0,l.jsxs)(Wx,{style:o,modules:[Lf,Ef,Af,Bf,If,Df],slidesPerView:1,loop:n.isLoop,loopAddBlankSlides:!0,autoplay:!!n.isAutoplay&&{delay:n.autoPlaySpeed,reverseDirection:"slide"!==n.effect||"right"!==n.direction,pauseOnMouseEnter:n.isPauseOnHover},..."fade"===n.effect?{effect:"fade"}:{},speed:n.sliderSpeed,grabCursor:n.isGrabCursor,navigation:!!n.isArrows&&{prevEl:".custom-prev-btn",nextEl:".custom-next-btn"},className:"cttk-ticker-content-wrapper",children:[t?.map(((e,t)=>(0,l.jsx)(Ux,{children:(0,l.jsx)("a",{className:"cttk-ticker-link",...e.link.length>2?{href:e.link}:{},...e.link.length>2?{target:"_blank"}:{},children:e.text})},t))),!(t.length>1)&&(0,l.jsx)(Ux,{})]});return(0,l.jsx)(i,{})},Vx=({attributes:e})=>{const{options:t,arrows:n,badge:o}=e;return(0,l.jsx)("div",{className:"cttk-ticker-wrapper",children:(0,l.jsxs)("div",{className:"cttk-ticker-swiper-wrapper",children:[(0,l.jsx)("div",{className:"cttk-ticker-badge",children:o.text}),(0,l.jsx)(Gx,{attributes:e}),t.isArrows&&(0,l.jsxs)(l.Fragment,{children:[nf[n.icon].left,nf[n.icon].right]})]})})},qx=e=>{const{top:t,right:n,bottom:o,left:i}=e;return`${t?"border-top-left-radius:"+t+";":""}\n\t${n?"border-top-right-radius:"+n+";":""}\n\t${o?"border-bottom-right-radius:"+o+";":""}\n\t${i?"border-bottom-left-radius:"+i+";":""}\n\t`.replace(/\s+/g," ").trim()},Yx=({attributes:e,id:t})=>{const{badge:n,style:o,arrows:i,advanced:a}=e,s=`#${t} .cttk-ticker-wrapper .cttk-ticker-swiper-wrapper`,r=`${s} .cttk-ticker-badge`,c=`${s} .cttk-ticker-content-wrapper`,d=`${s} #cttk-nextBtn`,u=`${s} #cttk-prevBtn`,p=e=>`\n\t\t${ns("height",jt(i[e].size)?i[e].size+"px":"")}\n\t\t${ns("width",jt(i[e].size)?i[e].size+"px":"")}\n\t\t${ns("font-size",jt(i[e].size)?i[e].size+"px":"")}\n\t\t${ns("padding",hs(i[e].padding))}\n\t\t${ns("color",i.normal.color)}\n\t\t${ns("fill",i.normal.color)}\n\t\t${ns("background",i.normal.bg)}\n\t\t${as(i.normal.border)}\n\t\t${qx(i.normal.borderRadius)}\n`,h=`\n\t\t${ns("color",i.hover.color)}\n\t\t${ns("fill",i.hover.color)}\n\t\t${ns("background",i.hover.bg)}\n\t\t${as(i.hover.border)}\n\t\t${qx(i.hover.borderRadius)}\n`;return(0,l.jsx)("style",{
360 -children:`\n\t\t${Cs(t,a)}\n\t\t${ps(r,n.typography)?.googleFontLink}\n\t\t${ps(`${c} a.cttk-ticker-link`,o.typography)?.googleFontLink}\n\t\t${ps(r,n.typography)?.styles}\n\t\t${r}{\n\t\t\t${ns("width",n.desktop.width)}\n\t\t\t${ns("height",n.desktop.height)}\n\t\t\t${ns("color",n.color.text)}\n\t\t\t${ns("padding",hs(n.desktop.padding))}\n\t\t\t${ns("margin",hs(n.desktop.margin))}\n\t\t\t${as(n.border)}\n\t\t\t${ns("border-radius",hs(n.desktop.bRadius))}\n\t\t\t${os(n.color.bg)}\n\t\t}\n\t\t${c}{\n\t\t\t${ns("background-color",o.bg)}\n\t\t\t${ns("padding",hs(o.padding.desktop))}\n\t\t\t${qx(o.bRadius)}\n\t\t\twidth:calc(100% - ${jt(n.desktop.width)?n.desktop.width:"0px"});\n\t\t}\n\t\t${c} a.cttk-ticker-link{\n\t\t\t${ns("color",o.color.normal)}\n\t\t\ttransition:all 0.2s ease-in-out;\n\t\t}\n\t\t${c} a.cttk-ticker-link:hover{\n\t\t\t${ns("color",o.color.hover)}\n\t\t}\n\t\t${d}{\n\t\t\t${p("desktop")}\n\t\t\tright:${i.desktop.alignLeft}px;\n\t\t}\n\t\t${d}:hover{\n\t\t\t${h}\n\t\t}\n\t\t${u}{\n\t\t\t${p("desktop")}\n\t\t\tright:${i.desktop.alignRight}px;\n\t\t}\n\t\t${u}:hover{\n\t\t\t${h}\n\t\t}\n\n\t\t${ps(`${c} .cttk-ticker-link`,o.typography)?.styles}\n\n\t\t@media only screen and (min-width:641px) and (max-width: 1024px){\n\t\t\t${r}{\n\t\t\t\t${ns("width",n.tablet.width)}\n\t\t\t\t${ns("height",n.tablet.height)}\n\t\t\t\t${ns("padding",hs(n.tablet.padding))}\n\t\t\t\t${ns("margin",hs(n.tablet.margin))}\n\t\t\t\t${qx(n.tablet.bRadius)}\n\t\t\t}\n\t\t\t${c}{\n\t\t\t\t${ns("padding",hs(o.padding.tablet))}\n\t\t\t\twidth:calc(100% - ${jt(n.tablet.width)?n.tablet.width:"0px"});\n\t\t\t}\n\t\t\t${d}{\n\t\t\t\t${p("tablet")}\n\t\t\t\tright:${i.tablet.alignLeft}px;\n\t\t\t}\n\t\t\t${u}{\n\t\t\t\t${p("tablet")}\n\t\t\t\tright:${i.tablet.alignRight}px;\n\t\t\t}\n\t\t}\n\n\t\t@media only screen and (max-width: 640px){\n\t\t\t${r}{\n\t\t\t\t${ns("width",n.mobile.width)}\n\t\t\t\t${ns("height",n.mobile.height)}\n\t\t\t\t${ns("padding",hs(n.mobile.padding))}\n\t\t\t\t${ns("margin",hs(n.mobile.margin))}\n\t\t\t\t${qx(n.mobile.bRadius)}\n\t\t\t}\n\t\t\t${c}{\n\t\t\t\t${ns("padding",hs(o.padding.mobile))}\n\t\t\t\twidth:calc(100% - ${jt(n.mobile.width)?n.mobile.width:"0px"});\n\t\t\t}\n\t\t\t${d}{\n\t\t\t${p("mobile")}\n\t\t\t\tright:${i.mobile.alignLeft}px;\n\t\t\t}\n\t\t\t${u}{\n\t\t\t${p("mobile")}\n\t\t\t\tright:${i.mobile.alignRight}px;\n\t\t\t}\n\t\t}\n\t`})},Kx=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Qx=[{label:(0,x.__)("Style 1","b-blocks"),value:"style1",icon:of.style1.right},{label:(0,x.__)("Style 2","b-blocks"),value:"style2",icon:of.style2.right},{label:(0,x.__)("Style 3","b-blocks"),value:"style3",icon:of.style3.right},{label:(0,x.__)("Style 4","b-blocks"),value:"style4",icon:of.style4.right},{label:(0,x.__)("Style 5","b-blocks"),value:"style5",icon:of.style5.right},{label:(0,x.__)("Style 6","b-blocks"),value:"style6",icon:of.style6.right}],Zx=[{value:"slide",label:"Slide"},{value:"fade",label:"Fade"}],Xx=[{value:"left",label:"Left"},{value:"right",label:"Right"}],Jx=[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Step Start","b-blocks"),value:"step-start"},{label:(0,x.__)("Step End","b-blocks"),value:"step-end"}],ey=({options:e,value:t,tooltipPosition:n="top",label:o,onChange:i,...a})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:o}),(0,l.jsx)(y.ButtonGroup,{className:"bPlBtnGroup",children:Object.values(e).map((e=>(0,l.jsx)(y.Tooltip,{text:e.label,position:n,children:(0,l.jsx)(y.Button,{icon:e?.icon,isPrimary:t===e.value,"aria-pressed":t===e.value,isMedium:!0,onClick:()=>i(e.value),...a})},e.value)))})]}),ty=({attributes:e,setAttributes:t,index:n})=>{const{content:o}=e,i=o[n];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalInputControl,{label:(0,x.__)("Content","b-blocks"),className:"mt5",value:i.text,onChange:e=>t({content:be(o,e,n,"text")})}),(0,l.jsx)(y.__experimentalInputControl,{label:(0,x.__)("Link","b-blocks"),className:"mt10",value:i.link,onChange:e=>t({content:be(o,e,n,"link")})})]})},ny=({attributes:e,updateObj:t})=>{const{options:n}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Ticker Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{className:"mb10",label:(0,x.__)("Effect","b-blocks"),labelPosition:"edge",value:n.effect,options:Zx,onChange:e=>t("options",e,"effect")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Slider Speed(ms)","b-blocks"),value:n.sliderSpeed,onChange:e=>t("options",e,"sliderSpeed"),min:0,max:1e4}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Autoplay","b-blocks"),checked:n.isAutoplay,value:n.isAutoplay,onChange:e=>t("options",e,"isAutoplay")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:n.easing,options:Jx,onChange:e=>t("options",e,"easing")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Autoplay Speed(ms)","b-blocks"),value:n.autoPlaySpeed,onChange:e=>t("options",e,"autoPlaySpeed"),min:0,max:1e4}),n.isAutoplay&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pause On Hover","b-blocks"),checked:n.isPauseOnHover,value:n.isPauseOnHover,onChange:e=>t("options",e,"isPauseOnHover")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Infinite Loop","b-blocks"),checked:n.isLoop,value:n.isLoop,onChange:e=>t("options",e,"isLoop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Grab Cursor","b-blocks"),checked:n.isGrabCursor,value:n.isGrabCursor,onChange:e=>t("options",e,"isGrabCursor")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Navigation Arrows","b-blocks"),checked:n.isArrows,value:n.isArrows,onChange:e=>t("options",e,"isArrows")}),"slide"===n.effect&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",value:n.direction,options:Xx,onChange:e=>t("options",e,"direction")})]})})},oy=({attributes:e,setAttributes:t,updateObj:n})=>{const{badge:o,content:i,arrows:a}=e,s={text:`Ticker custom content ${i.length+1}`,link:"#",toggle:!1};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalInputControl,{label:(0,x.__)("Badge Text","b-blocks"),className:"mt5",value:o.text,onChange:e=>n("badge",e,"text")}),(0,l.jsx)(_a,{attributes:e,setAttributes:t,newItem:s,design:"sortable",itemLabel:"Item",arrKey:"content",title:"text",ItemSettings:ty})]}),(0,l.jsx)(ny,{attributes:e,updateObj:n}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Arrows","b-blocks"),initialOpen:!1,children:(0,l.jsx)(ey,{label:(0,x.__)("Arrow Style:","slider"),value:a.icon,onChange:e=>n("arrows",e,"icon"),options:Qx})})]})},iy=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{arrows:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Arrows","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Arrows Size","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o[t].size,onChange:e=>n("arrows",e,t,"size")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Align Left Arrow","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o[t].alignLeft,onChange:e=>n("arrows",e,t,"alignLeft"),min:-50,max:200}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Align Right Arrow","b-blocks")," ",(0,l.jsx)(_,{})]}),
361 -value:o[t].alignRight,onChange:e=>n("arrows",e,t,"alignRight"),min:-50,max:200}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[t].padding,onChange:e=>n("arrows",e,"padding",t)}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:o[e.name].bg,onChange:t=>n("arrows",t,e.name,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o[e.name].color,onChange:t=>n("arrows",t,e.name,"color")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e.name].border,onChange:t=>n("arrows",t,e.name,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:o[e.name].borderRadius,onChange:t=>n("arrows",t,e.name,"borderRadius")})]})})]})})),ay=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{badge:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",value:o[n].width,onChange:e=>t("badge",e,n,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o[n].height,labelPosition:"edge",onChange:e=>t("badge",e,n,"height")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:o.color.bg,onChange:e=>t("badge",e,"color","bg"),defaults:{color:"#0e0e0e"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color.text,onChange:e=>t("badge",e,"color","text"),default:"#00F"}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("badge",e,"typography")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[n].padding,onChange:e=>t("badge",e,n,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[n].margin,onChange:e=>t("badge",e,n,"margin")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("badge",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[n].bRadius,onChange:e=>t("badge",e,n,"bRadius")})]})})),sy=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{style:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Style","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.padding[n],resetValues:{top:"0px",right:"0px",bottom:"0px",left:"0px"},onChange:e=>t("style",e,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:o.bRadius,resetValues:{top:"0px",right:"0px",bottom:"0px",left:"0px"},onChange:e=>t("style",e,"bRadius")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:o.bg,onChange:e=>t("style",e,"bg")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("style",e,"typography")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt10",activeClass:"activeTab",tabs:en,onSelect:me,children:e=>(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:o.color[e.name],onChange:n=>t("style",n,"color",e.name)})})]})})),ry=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ay,{...e}),(0,l.jsx)(sy,{...e}),(0,l.jsx)(iy,{...e})]}),ly=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,a=fe(t,n);return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡"," ",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:"bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Kx,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(oy,{...e,updateObj:a}),"style"===t.name&&(0,l.jsx)(ry,{...e,updateObj:a}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},cy=(0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,selectBlock:i}=e,a=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ly,{attributes:t,setAttributes:n,isPremium:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),onClick:()=>i(o),children:[(0,l.jsx)(Yx,{attributes:t,id:`block-${o}`}),(0,l.jsx)(Vx,{attributes:t})]})]})}));Ll(tf.name)&&(0,p.registerBlockType)(tf,{icon:pr,edit:cy})
362 -;const dy=JSON.parse('{"apiVersion":3,"name":"b-blocks/countdown","title":"Countdown","description":"Display events date into a timer.","category":"bBlocks","keywords":["countdown timer","countdown events","set timer"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"destDate":{"type":"string","default":""},"layout":{"type":"string","default":"default"},"isResponsive":{"type":"boolean","default":true},"boxIsInline":{"type":"boolean","default":false},"boxPosition":{"type":"string","default":"center"},"isLabels":{"type":"boolean","default":true},"isDays":{"type":"boolean","default":true},"daysLabel":{"type":"string","default":"Days"},"isHours":{"type":"boolean","default":true},"hoursLabel":{"type":"string","default":"Hours"},"isMinutes":{"type":"boolean","default":true},"minutesLabel":{"type":"string","default":"Minutes"},"isSeconds":{"type":"boolean","default":true},"secondsLabel":{"type":"string","default":"Seconds"},"isExpired":{"type":"boolean","default":false},"hideOn0":{"type":"boolean","default":false},"hideOnMobile":{"type":"boolean","default":false},"hideOnTablet":{"type":"boolean","default":false},"prefixSuffixDirection":{"type":"string","default":"row"},"prefixText":{"type":"string","default":""},"suffixButtonText":{"type":"string","default":""},"suffixButtonUrl":{"type":"string","default":"#"},"addID":{"type":"string","default":""},"addClass":{"type":"string","default":""},"addCSS":{"type":"string","default":""},"width":{"type":"string","default":"0px"},"background":{"type":"object","default":{"color":"#0000"}},"padding":{"type":"object","default":{"vertical":"10px","horizontal":"15px"}},"shadow":{"type":"object","default":{}},"alignment":{"type":"string","default":"center"},"boxBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"boxWidth":{"type":"string","default":"170px"},"boxHeight":{"type":"string","default":"120px"},"boxSpace":{"type":"string","default":"30px"},"boxBorder":{"type":"object","default":{"radius":"5%"}},"boxShadow":{"type":"object","default":{}},"digitTypo":{"type":"object","default":{"fontSize":{"desktop":"48px","tablet":"40px","mobile":"32px"}}},"digitColor":{"type":"string","default":"#fff"},"labelTypo":{"type":"object","default":{"fontSize":{"desktop":"18px","tablet":"17px","mobile":"16px"}}},"labelColor":{"type":"string","default":"#fff"},"isDaysSingleStyle":{"type":"boolean","default":false},"daysBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"daysDigitColor":{"type":"string","default":"#fff"},"daysLabelColor":{"type":"string","default":"#fff"},"isHoursSingleStyle":{"type":"boolean","default":false},"hoursBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"hoursDigitColor":{"type":"string","default":"#fff"},"hoursLabelColor":{"type":"string","default":"#fff"},"isMinutesSingleStyle":{"type":"boolean","default":false},"minutesBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"minutesDigitColor":{"type":"string","default":"#fff"},"minutesLabelColor":{"type":"string","default":"#fff"},"isSecondsSingleStyle":{"type":"boolean","default":false},"secondsBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"secondsDigitColor":{"type":"string","default":"#fff"},"secondsLabelColor":{"type":"string","default":"#fff"},"isSep":{"type":"boolean","default":false},"sepType":{"type":"string","default":":"},"sepSize":{"type":"number","default":52},"sepColor":{"type":"string","default":"#146EF5"},"prefixTextTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"prefixTextColor":{"type":"string","default":"#222"},"suffixButtonTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"suffixButtonColors":{"type":"object","default":{"color":"#fff","bg":"#222"}},"suffixButtonPadding":{"type":"object","default":{"vertical":"14px","horizontal":"28px"}},"isDismiss":{"type":"boolean","default":false},"dismissColor":{"type":"string","default":"#333"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"boxWidth":"120px","boxHeight":"100px","boxSpace":"15px","destDate":""}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),uy=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Layout 1","b-blocks"),value:"layout1"},{label:(0,x.__)("Layout 2","b-blocks"),value:"layout2"},{label:(0,x.__)("Layout 3","b-blocks"),value:"layout3"}],py=[{label:(0,x.__)("Dotted","b-blocks"),value:":"},{label:(0,x.__)("Dashed","b-blocks"),value:"-"},{label:(0,x.__)("Solid","b-blocks"),value:"|"}],hy=[{label:(0,x.__)("Row","b-blocks"),value:"row"},{label:(0,x.__)("Column","b-blocks"),value:"column"}],gy=({attributes:e,setAttributes:t,isPremium:n})=>{const{destDate:i,layout:a,isResponsive:s,boxIsInline:c,boxPosition:d,isLabels:u,isDays:p,isHours:g,isMinutes:b,isSeconds:f,isExpired:k=!1,hideOn0:w=!1,hideOnMobile:_=!1,hideOnTablet:C=!1,prefixSuffixDirection:j="row",prefixText:$="",suffixButtonText:S="",suffixButtonUrl:T="#",addID:N="",addClass:M="",addCSS:L="",width:P,background:E,padding:A,shadow:B,alignment:I,boxBG:O,boxWidth:R,boxHeight:z,boxSpace:D,boxBorder:F,boxShadow:H,digitTypo:W,digitColor:U,labelTypo:G,labelColor:V,isDaysSingleStyle:q=!1,daysBG:Y={type:"gradient",gradient:r},daysDigitColor:K="#fff",daysLabelColor:Q="#fff",isHoursSingleStyle:Z=!1,hoursBG:X={type:"gradient",gradient:r},hoursDigitColor:J="#fff",hoursLabelColor:ee="#fff",isMinutesSingleStyle:te=!1,minutesBG:ne={type:"gradient",gradient:r},minutesDigitColor:oe="#fff",minutesLabelColor:ie="#fff",isSecondsSingleStyle:ae=!1,secondsBG:se={type:"gradient",gradient:r},secondsDigitColor:re="#fff",secondsLabelColor:le="#fff",isSep:ce,sepType:de,sepSize:ue,sepColor:pe,prefixTextTypo:he={fontSize:{desktop:15}},prefixTextColor:ge="#222",suffixButtonTypo:be={fontSize:{desktop:16}},suffixButtonColors:fe={color:"#fff",bg:"#222"},suffixButtonPadding:xe={vertical:"14px",horizontal:"28px"},isDismiss:ye=!1,dismissColor:ve="#333"}=e,[ke,we]=(0,m.useState)(!1),_e={isPremium:n,setIsProModalOpen:we};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:()=>me(),children:e=>(0,l.jsxs)(l.Fragment,{children:["general"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:cn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Countdown Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Destination Date:","b-blocks")}),(0,l.jsx)(y.DateTimePicker,{currentDate:i,onChange:e=>t({destDate:e}),is12Hour:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:a,onChange:e=>{t({layout:e}),"default"===e&&t({boxIsInline:!1,background:{type:"solid",color:"#0000"},shadow:{hOffset:"0px",vOffset:"0px",color:"#0000"},boxBG:{type:"gradient",color:o,gradient:r},boxSpace:"30px",boxBorder:{width:"0px",type:"solid",color:"#0000",radius:"5%"},digitColor:"#fff",labelColor:"#fff",isSep:!1,sepColor:o}),"layout1"===e&&t({boxIsInline:!1,background:{type:"gradient",gradient:r},shadow:{hOffset:"5px",vOffset:"5px",color:o},boxBG:{type:"solid",color:"#0000"},boxSpace:"0px",boxBorder:{width:"0px",type:"solid",color:"#0000",radius:"5%"},digitColor:"#fff",labelColor:"#fff",isSep:!0,sepColor:"#fff"}),"layout2"===e&&t({boxIsInline:!1,background:{type:"solid",color:"#0000"},shadow:{hOffset:"0px",vOffset:"0px",color:"#0000"},boxBG:{type:"solid",
363 -color:"#0000"},boxSpace:"30px",boxBorder:{width:"2px",type:"solid",color:o,radius:"5%"},digitColor:o,labelColor:o,isSep:!0,sepColor:o}),"layout3"===e&&t({boxIsInline:!0,background:{type:"solid",color:"#0000"},shadow:{hOffset:"0px",vOffset:"8px",blur:"15px",color:o},boxBG:{type:"solid",color:"#0000"},boxSpace:"30px",boxBorder:{width:"0px",type:"solid",color:"#0000",radius:"5%"},digitColor:o,labelColor:o,isSep:!0,sepColor:o})},options:uy})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Responsive on Mobile","b-blocks"),checked:s,onChange:e=>t({isResponsive:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Box Inline?","b-blocks"),checked:c,onChange:e=>t({boxIsInline:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Labels","b-blocks"),checked:u,onChange:e=>t({isLabels:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Days","b-blocks"),checked:p,onChange:e=>t({isDays:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Hours","b-blocks"),checked:g,onChange:e=>t({isHours:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Minutes","b-blocks"),checked:b,onChange:e=>t({isMinutes:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Seconds","b-blocks"),checked:f,onChange:e=>t({isSeconds:e})}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show expired content on expire","b-blocks"),checked:k,onChange:e=>t({isExpired:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Hide box if value is 0","b-blocks"),checked:w,onChange:e=>t({hideOn0:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Hide Countdown on Mobile","b-blocks"),checked:_,onChange:e=>t({hideOnMobile:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Hide Countdown on Tablet","b-blocks"),checked:C,onChange:e=>t({hideOnTablet:e}),..._e,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix & Suffix","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Prefix Suffix Direction:","b-blocks"),labelPosition:"left",value:j,onChange:e=>t({prefixSuffixDirection:e}),options:hy,..._e,Component:y.SelectControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Prefix Text:","b-blocks"),value:$,onChange:e=>t({prefixText:e}),placeholder:(0,x.__)("Prefix/Before Text","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter prefix text to show a message before countdown","b-blocks")}),(0,l.jsx)("hr",{}),(0,l.jsx)(Ya,{label:(0,x.__)("Suffix Button Text:","b-blocks"),value:S,onChange:e=>t({suffixButtonText:e}),placeholder:(0,x.__)("Suffix/After Button Text","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter suffix button text to display a button after countdown","b-blocks")}),S&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Suffix Button Url:","b-blocks"),value:T,onChange:e=>t({suffixButtonUrl:e}),placeholder:(0,x.__)("Button url","b-blocks"),..._e,Component:y.TextControl})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Additional","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("ID:","b-blocks"),value:N,onChange:e=>t({addID:e}),placeholder:(0,x.__)("Enter additional ID","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Class:","b-blocks"),value:M,onChange:e=>t({addClass:e}),placeholder:(0,x.__)("Enter additional Class","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("CSS:","b-blocks"),value:L,onChange:e=>t({addCSS:e}),placeholder:(0,x.__)("Enter additional CSS","b-blocks"),..._e,Component:y.TextareaControl})]})]}),"style"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Countdown","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:P,onChange:e=>t({width:e}),units:[Pe(900),Ee(100),Ae(56)],isResetValueOnUnitChange:!0}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:E,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:A,onChange:e=>t({padding:e}),defaults:{vertical:"10px",horizontal:"15px"}}),(0,l.jsx)(od,{label:(0,x.__)("Shadow:","b-blocks"),value:B,onChange:e=>t({shadow:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Boxes","b-blocks"),initialOpen:!1,children:[["0px","0%","0em"].includes(P)?"":(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Box Position:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:d,onChange:e=>t({boxPosition:e}),options:tn})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:O,onChange:e=>t({boxBG:e}),defaults:{type:"gradient",color:o,gradient:r}}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:R,onChange:e=>t({boxWidth:e}),units:[Pe(170),Ae(10.5),Be(10.5)],isResetValueOnUnitChange:!0}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:z,onChange:e=>t({boxHeight:e}),units:[Pe(120),Ae(7.5),Be(7.5)],isResetValueOnUnitChange:!0}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Space Between Boxes:","b-blocks"),labelPosition:"left",value:D,onChange:e=>t({boxSpace:e}),units:[Pe(30),Ae(2),Be(2)],isResetValueOnUnitChange:!0}),(0,l.jsx)(Jc,{label:(0,x.__)("Border","b-blocks"),value:F,onChange:e=>t({boxBorder:e}),defaults:{radius:"5%"}}),(0,l.jsx)(od,{label:(0,x.__)("Shadow:","b-blocks"),value:H,onChange:e=>t({boxShadow:e})})]}),p||g||b||f?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Digit Typography:","b-blocks"),value:W,onChange:e=>t({digitTypo:e}),defaults:{fontSize:{desktop:48,tablet:40,mobile:32}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Digit Color:","b-blocks"),value:U,onChange:e=>t({digitColor:e}),defaultColor:"#fff"}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Oa,{className:"mt20",label:(0,x.__)("Label Typography:","b-blocks"),value:G,onChange:e=>t({labelTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Label Color:","b-blocks"),value:V,onChange:e=>t({labelColor:e}),defaultColor:"#fff"})]})]}):null,p&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Days Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:q,onChange:e=>t({isDaysSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({daysBG:O,daysDigitColor:U,daysLabelColor:V}),..._e,Component:y.Button})]}),q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Box Background:","b-blocks"),value:Y,onChange:e=>t({daysBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ya,{label:(0,x.__)("Digit Color:","b-blocks"),value:K,onChange:e=>t({daysDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ya,{label:(0,x.__)("Label Color:","b-blocks"),value:Q,onChange:e=>t({daysLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),g&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hours Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:Z,onChange:e=>t({isHoursSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"bPlResetVal",
364 -icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({hoursBG:O,hoursDigitColor:U,hoursLabelColor:V}),..._e,Component:y.Button})]}),Z&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Box Background:","b-blocks"),value:X,onChange:e=>t({hoursBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ya,{label:(0,x.__)("Digit Color:","b-blocks"),value:J,onChange:e=>t({hoursDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ya,{label:(0,x.__)("Label Color:","b-blocks"),value:ee,onChange:e=>t({hoursLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),b&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Minutes Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:te,onChange:e=>t({isMinutesSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({minutesBG:O,minutesDigitColor:U,minutesLabelColor:V}),..._e,Component:y.Button})]}),te&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Box Background:","b-blocks"),value:ne,onChange:e=>t({minutesBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ya,{label:(0,x.__)("Digit Color:","b-blocks"),value:oe,onChange:e=>t({minutesDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ya,{label:(0,x.__)("Label Color:","b-blocks"),value:ie,onChange:e=>t({minutesLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),f&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Seconds Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:ae,onChange:e=>t({isSecondsSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({secondsBG:O,secondsDigitColor:U,secondsLabelColor:V}),..._e,Component:y.Button})]}),ae&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Box Background:","b-blocks"),value:se,onChange:e=>t({secondsBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ya,{label:(0,x.__)("Digit Color:","b-blocks"),value:re,onChange:e=>t({secondsDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ya,{label:(0,x.__)("Label Color:","b-blocks"),value:le,onChange:e=>t({secondsLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:ce,onChange:e=>t({isSep:e})}),ce&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:de,onChange:e=>t({sepType:e}),options:py})]}),(0,l.jsx)(v,{children:(0,x.__)("Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:ue,onChange:e=>t({sepSize:e}),min:0,max:160,step:1,allowReset:!0,resetFallbackValue:48,initialPosition:48}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:pe,onChange:e=>t({sepColor:e}),defaultColor:o})]})]}),$&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix Text","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Typography:","b-blocks"),value:he,onChange:e=>t({prefixTextTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}},..._e,Component:Oa}),(0,l.jsx)(Ya,{label:(0,x.__)("Color:","b-blocks"),value:ge,onChange:e=>t({prefixTextColor:e}),defaultColor:"#222",..._e,Component:Ue})]}),S&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Suffix Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Typography:","b-blocks"),value:be,onChange:e=>t({suffixButtonTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}},..._e,Component:Oa}),(0,l.jsx)(Ya,{value:fe,onChange:e=>t({suffixButtonColors:e}),defaults:{color:"#fff",bg:"#222"},..._e,Component:On}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:xe,onChange:e=>t({suffixButtonPadding:e}),defaults:{vertical:"14px",horizontal:"28px"},..._e,Component:id})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Dismiss Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Countdown Dismissible?","b-blocks"),checked:ye,onChange:e=>t({isDismiss:e}),..._e,Component:y.ToggleControl}),ye&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{label:(0,x.__)("Color:","b-blocks"),value:ve,onChange:e=>t({dismissColor:e}),defaultColor:"#333",..._e,Component:Ue})})]})]})]})})}),(0,l.jsxs)(jn,{isProModalOpen:ke,setIsProModalOpen:we,block:"Countdown",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Expired Display: ","b-blocks")}),(0,x.__)("Show content that has expired after the countdown timer has elapsed.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Hide at Zero: ","b-blocks")}),(0,x.__)("Conceal the box when the countdown timer reaches 0.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Mobile Visibility: ","b-blocks")}),(0,x.__)("Toggle visibility of the countdown timer on mobile devices.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Tablet Visibility: ","b-blocks")}),(0,x.__)("Toggle visibility of the countdown timer on tablet devices.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Prefix Text: ","b-blocks")}),(0,x.__)("Display text before the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Prefix Style: ","b-blocks")}),(0,x.__)("Implement typography settings and adjust the color for the prefix text.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Suffix Button: ","b-blocks")}),(0,x.__)("Show a button after the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Suffix Button Style: ","b-blocks")}),(0,x.__)("Apply typography, colors(text and background) and padding for the suffix button.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Prefix Suffix Direction: ","b-blocks")}),(0,x.__)("Direction of the content displayed before and after the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Single Style: ","b-blocks")}),(0,x.__)("Apply different styles to each box, including variations in background, digit color, and label color.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Dismiss Button: ","b-blocks")}),(0,x.__)("Provide a button to dismiss/hide the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Patterns: ","b-blocks")}),(0,x.__)("Additional patterns for expanding the variety of countdown styles.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Shortcode Integration: ","b-blocks")}),(0,x.__)("Shortcode for flexible use across various locations.","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:I,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Countdown Alignment"),alignmentControls:[{title:(0,x.__)("Countdown in left","b-blocks"),align:"flex-start",icon:"align-left"},{title:(0,x.__)("Countdown in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Countdown in right","b-blocks"),align:"flex-end",icon:"align-right"}]})})]})
365 -},my="bBlocksCountdown",by=({attributes:e,id:t})=>{const{boxPosition:n,prefixSuffixDirection:o="row",prefixText:i="",suffixButtonText:a="",addCSS:s="",width:c,background:d,padding:u,shadow:p,alignment:h,boxBG:g,boxWidth:m,boxHeight:b,boxSpace:f,boxBorder:x,boxShadow:y,digitTypo:v,digitColor:k,labelTypo:w,labelColor:_,isDaysSingleStyle:C=!1,daysBG:j={type:"gradient",gradient:r},daysDigitColor:$="#fff",daysLabelColor:S="#fff",isHoursSingleStyle:T=!1,hoursBG:N={type:"gradient",gradient:r},hoursDigitColor:M="#fff",hoursLabelColor:L="#fff",isMinutesSingleStyle:P=!1,minutesBG:E={type:"gradient",gradient:r},minutesDigitColor:A="#fff",minutesLabelColor:B="#fff",isSecondsSingleStyle:I=!1,secondsBG:O={type:"gradient",gradient:r},secondsDigitColor:R="#fff",secondsLabelColor:z="#fff",sepType:D,sepSize:F,sepColor:H,prefixTextTypo:W={fontSize:{desktop:15}},prefixTextColor:U="#222",suffixButtonTypo:G={fontSize:{desktop:16}},suffixButtonColors:V={color:"#fff",bg:"#222"},suffixButtonPadding:q={vertical:"14px",horizontal:"28px"},dismissColor:Y="#333"}=e,K=`#${t}`,Q=`${K} .countdownItems`,Z=`${Q} .countdownItem`,X=`${K} .${my}`,J=(e,t,n,o,i)=>e?`${Q} .${t}{\n\t\t${os(n)}\n\t}\n\t${Q} .${t} .digit{\n\t\tcolor: ${o};\n\t}\n\t${Q} .${t} .label{\n\t\tcolor: ${i};\n\t}`:"";return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",v)?.googleFontLink}\n\t\t${ps("",w)?.googleFontLink}\n\t\t${ps("",W)?.googleFontLink}\n\t\t${ps("",G)?.googleFontLink}\n\t\t${ps(`${Z} .digit`,v)?.styles}\n\t\t${ps(`${Z} .label`,w)?.styles}\n\t\t${ps(`${X} .prefixText`,W)?.styles}\n\t\t${ps(`${X} .suffixButton`,G)?.styles}\n\n\t\t${K}{\n\t\t\talign-items: ${h};\n\t\t\tjustify-content: ${h};\n\t\t}\n\t\t${X}{\n\t\t\tflex-direction: ${o};\n\t\t\tjustify-content: ${i||a?"space-between":"center"};\n\t\t\twidth: ${["0px","0%","0em"].includes(c)?"auto":c};\n\t\t\t${os(d)}\n\t\t\tpadding: ${us(u)};\n\t\t\tbox-shadow: ${ds(p)};\n\t\t}\n\t\t${Q}{\n\t\t\tjustify-content: ${n};\n\t\t\tgap: ${f};\n\t\t\tmargin: ${i||a?"column"===o?"20px 0":"0 20px":"0"}\n\t\t}\n\t\t${Z}{\n\t\t\t${os(g)}\n\t\t\twidth: ${m};\n\t\t\theight: ${b};\n\t\t\t${is(x)}\n\t\t\tbox-shadow: ${ds(y)};\n\t\t}\n\t\t${Z} .digit{\n\t\t\tcolor: ${k};\n\t\t}\n\t\t${Z} .label{\n\t\t\tcolor: ${_};\n\t\t}\n\t\t${J(C,"countdownDays",j,$,S)}\n\t\t${J(T,"countdownHours",N,M,L)}\n\t\t${J(P,"countdownMinutes",E,A,B)}\n\t\t${J(I,"countdownSeconds",O,R,z)}\n\n\t\t${Q} .separator::before{\n\t\t\tcontent: '${D}';\n\t\t\tfont-size: ${F}px;\n\t\t\tcolor: ${H};\n\t\t}\n\t\t${X} .prefixText{\n\t\t\tcolor: ${U};\n\t\t}\n\t\t${X} .suffixButton{\n\t\t\t${ss(V)}\n\t\t\tpadding: ${us(q)};\n\t\t}\n\t\t${X} .countdownClose{\n\t\t\tfill: ${Y};\n\t\t}\n\t\t${s}\n\t\t`.replace(/\s+/g," ")}})},fy=e=>e>(new Date).getTime()?(e-(new Date).getTime())/1e3:0,xy=e=>Math.floor(e%86400/3600),yy=e=>Math.floor(e%3600/60),vy=e=>Math.floor(e%60),ky=e=>e<10?("0"+e).slice(-2):e,wy=(window.matchMedia("(max-width: 640px)"),window.matchMedia("(max-width: 1024px)"),(e,t=!0,n=!0,o=!0)=>{const i=(a=e,Math.floor(a/86400));var a;const s=t?xy(e):24*i+xy(e),r=n?yy(e):60*s+yy(e),l=o?vy(e):60*r+vy(e);return{days:i,hours:s,minutes:r,seconds:l,expired:!(i+s+r+l>0)}}),_y=(e,t=!0,n=!0,o=!0)=>{const[i,a]=(0,m.useState)(fy(e));return(0,m.useEffect)((()=>{const t=setInterval((()=>{a(fy(e))}),1e3);return()=>clearInterval(t)}),[e]),wy(i,t,n,o)},Cy=({attributes:e,Box:t,isBackend:n=!1,custom:o={}})=>{const{destDate:i,boxIsInline:a,isLabels:s,isDays:r,daysLabel:c,isHours:d,hoursLabel:u,isMinutes:p,minutesLabel:h,isSeconds:g,secondsLabel:m,hideOn0:b,isSep:f}=e,x=new Date(i).getTime(),{days:y,hours:v,minutes:k,seconds:w}=_y(x,r,d,p),_=a?"inline":"",C=b&&0===y,j=b&&0===y+v,$=b&&0===y+v+k,S=b&&0===y+v+k+w;return(0,l.jsxs)(l.Fragment,{children:[!C&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t,{is:r,boxClass:`countdownDays ${_}`,digit:ky(y),isLabels:s,label:c,onChange:e=>n&&o.setAttributes({daysLabel:e})}),f&&r&&(d||p||g)&&(0,l.jsx)("span",{className:"separator"})]}),!j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t,{is:d,boxClass:`countdownHours ${_}`,digit:ky(v),isLabels:s,label:u,onChange:e=>n&&o.setAttributes({hoursLabel:e})}),f&&d&&(p||g)&&(0,l.jsx)("span",{className:"separator"})]}),!$&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t,{is:p,boxClass:`countdownMinutes ${_}`,digit:ky(k),isLabels:s,label:h,onChange:e=>n&&o.setAttributes({minutesLabel:e})}),f&&p&&g&&(0,l.jsx)("span",{className:"separator"})]}),!S&&(0,l.jsx)(t,{is:g,boxClass:`countdownSeconds ${_}`,digit:ky(w),isLabels:s,label:m,onChange:e=>n&&o.setAttributes({secondsLabel:e})})]})},jy=({attributes:e,Box:t,closeEl:n,isBackend:o=!1,custom:i={},children:a})=>{const{destDate:s,isResponsive:r,isExpired:c,prefixText:d,suffixButtonText:u,suffixButtonUrl:p,addID:h,addClass:g,isDismiss:m}=e,b=new Date(s).getTime(),{expired:f}=_y(b);return(0,l.jsxs)("div",{className:`${my} ${g}`,id:h,children:[c&&f?a:(0,l.jsxs)(l.Fragment,{children:[d&&(0,l.jsx)("p",{className:"prefixText",dangerouslySetInnerHTML:{__html:St(d)}}),(0,l.jsx)("div",{className:"countdownItems "+(r?`${my}Responsive`:""),children:(0,l.jsx)(Cy,{attributes:e,Box:t,isBackend:o,custom:i})}),u&&(0,l.jsx)("a",{className:"suffixButton",href:$t(p),children:u})]}),m&&n]})},$y=(0,l.jsx)("svg",{className:"countdownClose",xmlns:"http://www.w3.org/2000/svg",width:22,height:22,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M256,31C131.7,31,31,131.7,31,256s100.7,225,225,225s225-100.7,225-225S380.3,31,256,31z M366.3,315.1 c4.3,4.3,4.3,11.2,0,15.4l-35.9,35.8c-4.3,4.3-11.2,4.3-15.4,0l-59-59.5l-59.1,59.5c-4.3,4.3-11.2,4.3-15.4,0l-35.8-35.9 c-4.3-4.3-4.3-11.2,0-15.4l59.5-59l-59.5-59.1c-4.3-4.3-4.3-11.2,0-15.4l35.9-35.9c4.3-4.3,11.2-4.3,15.4,0l59,59.6l59.1-59.5 c4.3-4.3,11.2-4.3,15.4,0l35.9,35.9c4.3,4.3,4.3,11.2,0,15.4l-59.6,59L366.3,315.1z"})}),Sy=e=>{const{is:t,boxClass:n,digit:o,isLabels:i,label:a,onChange:s}=e;return t&&(0,l.jsxs)("div",{className:`countdownItem ${n}`,children:[(0,l.jsx)("span",{className:"digit",children:o}),i&&(0,l.jsx)(h.RichText,{className:"label",tagName:"span",value:a,onChange:e=>s(e),placeholder:(0,x.__)("Label","countdown-time")})]})};Ll(dy.name)&&(0,p.registerBlockType)(dy,{icon:hr,transforms:{from:[{type:"block",blocks:["ctb/countdown-time"],transform:e=>(0,p.createBlock)("b-blocks/countdown",e)},{type:"prefix",prefix:"count",transform:()=>(0,p.createBlock)("b-blocks/countdown")}],to:[{type:"block",blocks:["ctb/countdown-time"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("ctb/countdown-time",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{destDate:i}=t,a=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{""===i&&n({destDate:new Date((new Date).setDate((new Date).getDate()+2))})}),[i]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(gy,{attributes:t,setAttributes:n,isPremium:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(by,{attributes:t,id:`block-${o}`}),(0,l.jsx)(jy,{attributes:t,Box:Sy,closeEl:(0,l.jsx)(y.Tooltip,{text:"Hide will only work in frontend",placement:"top",position:"top",children:$y}),isBackend:!0,custom:{setAttributes:n},children:(0,l.jsx)("div",{className:"countdownExpired",children:(0,l.jsx)(h.InnerBlocks,{template:[["core/heading",{content:"Oops! the offers just expired!",textAlign:"center",level:3,style:{color:{text:"#dc3545"}}}],["core/paragraph",{content:"But don't worry! we will announce next offer as soon as possible. Stay with us.",style:{color:{text:"#222"}}}]]})})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})})
366 -;const Ty=JSON.parse('{"apiVersion":3,"name":"b-blocks/counters","title":"Counters","description":"Display Number as animated counter.","category":"bBlocks","keywords":["counter","number counter","at a glance"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"counters":{"type":"array","default":[{"background":{"color":"#146EF5"},"icon":{"class":"fa fa-puzzle-piece","fontSize":50,"color":"#fff"},"number":{"start":0,"end":30,"prefix":"","suffix":"+","color":"#fff"},"label":{"text":"Products","color":"#fff"}},{"background":{"color":"#146EF5"},"icon":{"class":"fa fa-thumbs-up","fontSize":50,"color":"#fff"},"number":{"start":0,"end":380,"prefix":"","suffix":"K+","color":"#fff"},"label":{"text":"Customers","color":"#fff"}},{"background":{"color":"#146EF5"},"icon":{"class":"fa fa-award","fontSize":50,"color":"#fff"},"number":{"start":0,"end":90,"prefix":"","suffix":"","color":"#fff"},"label":{"text":"Awards","color":"#fff"}}]},"theme":{"type":"string","default":"default"},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"20px"},"rowGap":{"type":"string","default":"30px"},"duration":{"type":"number","default":2000},"separator":{"type":"object","default":{"char":""}},"background":{"type":"object","default":{"color":"#0000"}},"padding":{"type":"object","default":{"vertical":"20px","horizontal":"0px"}},"textAlign":{"type":"string","default":"center"},"counterWidth":{"type":"string","default":"250px"},"counterHeight":{"type":"string","default":"250px"},"isIcon":{"type":"boolean","default":true},"iconSize":{"type":"number","default":50},"iconPosition":{"type":"string","default":"top"},"numberTypo":{"type":"object","default":{"fontSize":{"desktop":"48px","tablet":"40px","mobile":"32px"}}},"isLabel":{"type":"boolean","default":true},"labelTypo":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"}}},"counterPadding":{"type":"object","default":{"vertical":"20px","horizontal":"20px"}},"counterBorder":{"type":"object","default":{"radius":"50%"}},"counterShadow":{"type":"object","default":{}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),Ny=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Theme 1","b-blocks"),value:"theme1"},{label:(0,x.__)("Theme 2","b-blocks"),value:"theme2"},{label:(0,x.__)("Theme 3","b-blocks"),value:"theme3"}],My=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Label","b-blocks"),value:"label"}],Ly=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Coma (1,000)","b-blocks"),value:","},{label:(0,x.__)("Space (1 000)","b-blocks"),value:" "}],Py=e=>{const{attributes:t,setAttributes:n,index:o}=e,{counters:i}=t,a=i[o],{background:s,icon:r,number:c,label:d}=a,u=(e,t,...a)=>{n({counters:be(i,t,o,e,...a)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:s,onChange:e=>u("background",e),defaults:{color:"#0000"}}),(0,l.jsx)(Un,{label:(0,x.__)("Icon:","b-blocks"),value:r,onChange:e=>u("icon",e),defaults:{class:"fa fa-award",fontSize:50,color:"#fff"},isSize:!1}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Start Number:","b-blocks"),labelPosition:"left",className:"mt20",value:c.start,onChange:e=>u("number",parseFloat(e),"start")}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("End Number:","b-blocks"),labelPosition:"left",className:"mt20",value:c.end,onChange:e=>u("number",parseFloat(e),"end")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Prefix:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:c.prefix,onChange:e=>u("number",e,"prefix")})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Suffix:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:c.suffix,onChange:e=>u("number",e,"suffix")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Number Color:","b-blocks"),value:c.color,onChange:e=>u("number",e,"color"),defaultColor:"#fff"}),(0,l.jsx)(Ue,{label:(0,x.__)("Label Color:","b-blocks"),value:d.color,onChange:e=>u("label",e,"color"),defaultColor:"#fff"})]})},Ey=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:i,isPremium:a,device:s})=>{const{counters:r=[],theme:c,columns:d,columnGap:u,rowGap:p,duration:g,separator:m,background:b,padding:f,counterWidth:k,counterHeight:w,textAlign:C,isIcon:j,iconSize:$,iconPosition:S,numberTypo:T,isLabel:N,labelTypo:M,counterPadding:L,counterBorder:P,counterShadow:E}=e,A={background:{color:o},icon:{class:"fa fa-award",fontSize:50,color:"#fff"},number:{start:0,end:300,prefix:"",suffix:"",color:"#fff"},label:{text:"Awards",color:"#fff"}},B=e=>{const n=Rb(r,(t=>{t.map(((n,o)=>{for(const n of e){const e=n[0],i=n[1];t[o][e]=i}}))}));t({counters:n})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:h=>(0,l.jsxs)(l.Fragment,{children:["general"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:dn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove counters","b-blocks"),children:[(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:i,arrKey:"counters",ItemSettings:Py,itemLabel:"Counter",newItem:A,design:a?"sortable":"single"}),!a&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>{t({theme:e}),"default"===e&&t({background:{...b,type:"solid",color:"#0000"},padding:{...f,vertical:"20px",horizontal:"0px"},counterHeight:"250px",counterBorder:{...P,width:"0px",color:"#0000",radius:"50%"},iconPosition:"top",iconSize:50}),"theme1"===e&&t({background:{...b,type:"solid",color:"#0000"},padding:{...f,vertical:"20px",horizontal:"0px"},counterHeight:"175px",counterBorder:{...P,width:"0px",color:"#0000",radius:"5px"},iconPosition:"label",iconSize:M?.fontSize}),"theme2"===e&&t({background:{...b,type:"solid",color:"#0000"},padding:{...f,vertical:"20px",horizontal:"0px"},counterHeight:"175px",counterBorder:{...P,width:"2px",color:o,radius:"5px"},iconPosition:"label",iconSize:M?.fontSize}),"theme3"===e&&t({background:{...b,type:"image",image:{url:"https://i.imgur.com/n8bbzIE.jpeg"},overlayColor:"#000000b3"},padding:{...f,vertical:"140px",horizontal:"0px"},counterHeight:"250px",counterBorder:{...P,width:"0px",color:"#0000",radius:"50%"},iconPosition:"top",iconSize:50}),r?.map((t=>{const{background:n,icon:i,number:a,label:s}=t,r=[["background",{...n,type:"solid",color:o}],["icon",{...i,color:"#fff"}],["number",{...a,color:"#fff"}],["label",{...s,color:"#fff"}]],l=[["background",{...n,type:"solid",color:o}],["icon",{...i,color:"#fff"}],["number",{...a,color:"#fff"}],["label",{...s,color:"#fff"}]],c=[["background",{...n,type:"solid",color:"#0000"}],["icon",{...i,color:o}],["number",{...a,color:o}],["label",{...s,color:o}]],d=[["background",{...n,type:"solid",color:"#0000"}],["icon",{...i,color:"#fff"}],["number",{...a,color:"#fff"}],["label",{...s,color:"#fff"}]];"default"===e&&B(r),"theme1"===e&&B(l),"theme2"===e&&B(c),"theme3"===e&&B(d)}))},options:Ny})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:d[s],onChange:e=>{t({columns:{
367 -...d,[s]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Counters Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Duration:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({duration:parseFloat(e)})}),(0,l.jsx)("small",{children:(0,x.__)("Duration in milliseconds:","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Separator","b-blocks"),labelPosition:"left",value:m.char,onChange:e=>t({separator:{...m,char:e}}),options:Ly})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Counter Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:j,onChange:e=>t({isIcon:e})}),(0,l.jsx)(v,{children:(0,x.__)("Icon Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:$,onChange:e=>t({iconSize:e}),min:0,max:400,step:1,allowReset:!0,resetFallbackValue:50,initialPosition:50}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Icon Position:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:S,onChange:e=>{t({iconPosition:e}),"top"===e&&t({iconSize:50}),"label"===e&&t({iconSize:M?.fontSize})},options:My})]}),(0,l.jsx)(Oa,{className:"mt20",label:(0,x.__)("Number Typography:","b-blocks"),value:T,onChange:e=>t({numberTypo:e}),defaults:{fontSize:{desktop:48,tablet:40,mobile:32}}}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Label","b-blocks"),checked:N,onChange:e=>t({isLabel:e})}),N&&(0,l.jsx)(Oa,{label:(0,x.__)("Label Typography:","b-blocks"),value:M,onChange:e=>t({labelTypo:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18}}})]})]}),"style"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Counters","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:b,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:f,onChange:e=>t({padding:e}),defaults:{vertical:"20px",horizontal:"0px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Single Counter","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:k,onChange:e=>t({counterWidth:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:w,onChange:e=>t({counterHeight:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:L,onChange:e=>t({counterPadding:e}),defaults:{vertical:"20px",horizontal:"20px"}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:P,onChange:e=>t({counterBorder:e}),defaults:{radius:"50%"}}),(0,l.jsx)(od,{label:(0,x.__)("Shadow:","b-blocks"),value:E,onChange:e=>t({counterShadow:e})})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Counter","b-blocks"),onClick:()=>t({counters:[...r,A]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:C,onChange:e=>t({textAlign:e})})]})]})})),Ay="bBlocksCounters",By=({attributes:e,id:t})=>{const{counters:n=[],columnGap:o,rowGap:i,background:a,padding:s,textAlign:r,counterWidth:c,counterHeight:d,iconSize:u,numberTypo:p,labelTypo:h,counterPadding:g,counterBorder:m,counterShadow:b}=e,f=`#${t}`,x=`${f} .${Ay}`,y=`${x} .counter`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",p)?.googleFontLink}\n\t\t${ps("",h)?.googleFontLink}\n\t\t${ps(`${y} .counterNumber`,p)?.styles}\n\t\t${ps(`${y} .counterLabel`,h)?.styles}\n\t\t\n\t\t${x}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t\t${os(a)}\n\t\t\tpadding: ${us(s)};\n\t\t}\n\t\t${y}{\n\t\t\ttext-align: ${r};\n\t\t\twidth: ${"0px"===c||"0%"===c||"0em"===c?"250px":c};\n\t\t\theight: ${"0px"===d||"0%"===d||"0em"===d?"250px":d};\n\t\t\tpadding: ${us(g)};\n\t\t\t${is(m)}\n\t\t\tbox-shadow: ${ds(b)};\n\t\t}\n\t\t${y} .counterIcon,\n\t\t${y} .counterIconLabel{\n\t\t\tfont-size: ${u||50}px;\n\t\t}\n\n\t\t${n?.map(((e,t)=>{const{background:n,icon:o,number:i,label:a}=e,s=`${f} #counter-${t}`;return`\n\t\t\t\t${s} .counter{\n\t\t\t\t\t${os(n)}\n\t\t\t\t}\n\t\t\t\t${s} .counterIcon i,\n\t\t\t\t${s} .counterIconLabel i{\n\t\t\t\t\t${rs(o)}\n\t\t\t\t\tfont-size: inherit;\n\t\t\t\t}\n\t\t\t\t${s} .counterNumber{\n\t\t\t\t\tcolor: ${i.color};\n\t\t\t\t}\n\t\t\t\t${s} .counterLabel{\n\t\t\t\t\tcolor: ${a.color};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},Iy=({attributes:e,counter:t,index:n,labelEl:o,isBackend:i=!1,custom:a={}})=>{const{isIcon:s,iconPosition:r}=e,{icon:c,number:d}=t,{start:u,end:p,prefix:h,suffix:g}=d,m=c?.class&&(0,l.jsx)("i",{className:c.class});return(0,l.jsx)("div",{onClick:()=>i?a.setActiveIndex(n):null,className:i&&n===a.activeIndex?"bPlNowEditing":"",id:`counter-${n}`,children:(0,l.jsxs)("div",{className:"counter",children:[s&&"top"===r&&(0,l.jsx)("div",{className:"counterIcon",children:m}),(0,l.jsxs)("div",{className:"counterNumber",children:[(0,l.jsx)("span",{className:"prefix",children:h}),(0,l.jsx)("span",{className:"number","data-count-start":u,"data-count-end":p,children:u}),(0,l.jsx)("span",{className:"suffix",children:g})]}),"label"===r?(0,l.jsxs)("div",{className:"counterIconLabel",children:[m,o]}):o]})})},Oy=(e,t)=>{const{char:n=""}=t;return n?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,n):e};Ll(Ty.name)&&(0,p.registerBlockType)(Ty,{icon:gr,transforms:{from:[{type:"block",blocks:["ctrb/counters"],transform:e=>(0,p.createBlock)("b-blocks/counters",e)},{type:"prefix",prefix:"counter",transform:()=>(0,p.createBlock)("b-blocks/counters")}],to:[{type:"block",blocks:["ctrb/counters"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("ctrb/counters",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{counters:i=[],columns:a,duration:s,separator:r={},isLabel:c}=t,d=(0,m.useRef)(),[u,p]=(0,m.useState)(0),g=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{d.current&&((e,t,n={})=>{e?.forEach((e=>{const o=parseInt(e.dataset.countStart),i=parseInt(e.dataset.countEnd),a=Date.now(),s=setInterval((()=>{const r=Date.now()-a;r>=t?clearInterval(s):e.innerText=Oy(parseInt(r/(t/(i-o))+o),n)}),20);setTimeout((()=>{e.innerText=Oy(i,n)}),t)}))})(d.current.ownerDocument.querySelectorAll(`.${Ay} .counterNumber .number`),s,r)}),[i,s,r,d]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ey,{attributes:t,setAttributes:n,activeIndex:u,setActiveIndex:p,isPremium:g}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:d}),children:[(0,l.jsx)(By,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:`${Ay} columns-${a.desktop} columns-tablet-${a.tablet} columns-mobile-${a.mobile}`,children:i?.map(((e,o)=>{const{text:a}=e.label,s=c&&(0,l.jsx)(h.RichText,{className:"counterLabel",tagName:"p",value:a,onChange:e=>((e,t,o=!1)=>{const a=Rb(i,(n=>{o?n[u][e][o]=t:n[u][e]=t}));n({counters:a})})("label",e,"text"),placeholder:(0,x.__)("Label","b-blocks"),inlineToolbar:!0});return(0,l.jsx)(Iy,{attributes:t,counter:e,index:o,labelEl:s,isBackend:!0,custom:{activeIndex:u,setActiveIndex:p}},o)}))})]})]})},save:()=>null})
368 -;const Ry=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/carousel","title":"Carousel","category":"bBlocks","description":"Modern carousel for showcasing content. Supports unlimited slides with complete block flexibility inside.","keywords":["carousel","slider","swiper","slide","carousel-block","slider","slideshow","gallery","carousel","slide","rotator"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"clientId":{"type":"string","default":""},"pagination":{"type":"object","default":{"pagination":true,"showOnTablet":true,"showOnMobile":true,"type":"bullets","clickable":true,"hideOnClick":false,"dynamicPagination":false,"dynamicBullets":false,"dynamicMainBullets":1}},"navigation":{"type":"object","default":{"navigation":true,"iconType":"library","nextIcon":{"library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'chevron-right\'><path fill-rule=\'evenodd\' d=\'M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708\'/></svg>","upload":""},"prevIcon":{"library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'chevron-left\'><path fill-rule=\'evenodd\' d=\'M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0\'/></svg>","upload":""}}},"autoplay":{"type":"object","default":{"autoplay":true,"direction":"right","delay":1.5,"isPauseOnHover":false,"easing":""}},"layout":{"type":"object","default":{"slideView":{"desktop":3,"tablet":2,"mobile":1},"space":{"desktop":30,"tablet":25,"mobile":15},"direction":"horizontal"}},"options":{"type":"object","default":{"speed":1,"loop":true,"touchMove":true,"autoHeight":false}},"styles":{"type":"object","default":{"pagination":{"desktop":{"positionY":"","positionX":""},"tablet":{"positionY":"","positionX":""},"mobile":{"positionY":"","positionX":""},"normal":{"color":"","width":"","height":"","border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"active":{"color":"","width":"","height":"","border":{},"radius":{"top":"","right":"","bottom":"","left":""},"transition":0.2}},"navigation":{"desktop":{"arrow":{"size":"","positionX":{"prev":"","next":""},"positionY":{"prev":"","next":""}},"padding":{"top":"6px","right":"6px","bottom":"6px","left":"6px"}},"tablet":{"arrow":{"size":"","positionX":{"prev":"","next":""},"positionY":{"prev":"","next":""}},"padding":{"top":"","bottom":"","left":"","right":""}},"mobile":{"arrow":{"size":"","positionX":{"prev":"","next":""},"positionY":{"prev":"","next":""}},"padding":{"top":"","bottom":"","left":"","right":""}},"normal":{"bg":{},"color":"rgba(140, 140, 140, 1)","border":{"color":"#8c8c8c","style":"solid","width":"2px"},"desktop":{"radius":{"top":"50%","right":"50%","bottom":"50%","left":"50%"}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{},"color":"","border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"container":{"desktop":{"height":"","width":"","alignItems":"center"},"tablet":{"height":"","width":"","alignItems":""},"mobile":{"height":"","width":"","alignItems":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"bottom":"","top":"","right":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"x":"","y":"","z":""},"tablet":{"x":"","y":"","z":""},"mobile":{"x":"","y":"","z":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b0","isInset":false}],"border":{"width":"","style":"none"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"visibility":{"zIndex":{"desktop":""},"overflow":""},"responsive":{"desktop":false,"tablet":false,"mobile":false}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","swiper"],"script":"swiper","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),zy=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Dy=[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Step Start","b-blocks"),value:"step-start"},{label:(0,x.__)("Step End","b-blocks"),value:"step-end"}],Fy=({attributes:e,updateObj:t})=>{const{autoplay:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Autoplay","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Autoplay","b-blocks"),value:n.autoplay,checked:n.autoplay,onChange:e=>t("autoplay",e,"autoplay")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",value:n.direction,onChange:e=>t("autoplay",e,"direction"),options:[{label:(0,x.__)("Left To Right","b-blocks"),value:"left"},{label:(0,x.__)("Right To Left","b-blocks"),value:"right"}]}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Delay (s)","b-blocks"),value:n.delay,onChange:e=>t("autoplay",e,"delay"),min:0,step:.01,max:10}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pause On Hover","b-blocks"),value:n.isPauseOnHover,checked:n.isPauseOnHover,onChange:e=>t("autoplay",e,"isPauseOnHover")})]})},Hy=({attributes:e,updateObj:t})=>{const{options:n,autoplay:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Basic Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Direction","b-blocks"),value:n?.direction,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],labelPosition:"edge",onChange:e=>t("options",e,"direction")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:o.easing,options:Dy,
369 -onChange:e=>t("autoplay",e,"easing")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Loop","b-blocks"),value:n.loop,checked:n.loop,onChange:e=>t("options",e,"loop"),help:"This feature will work on frontend only."}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Touch Move","b-blocks"),value:n.touchMove,checked:n.touchMove,onChange:e=>t("options",e,"touchMove"),help:"This feature will work on frontend only."}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Speed (s)","b-blocks"),value:n.speed,onChange:e=>t("options",e,"speed"),min:0,step:.01,max:10}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Auto Height","b-blocks"),value:n.autoHeight,checked:n.autoHeight,onChange:e=>t("options",e,"autoHeight")})]})},Wy=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),Uy=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),Gy=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),Vy=({attributes:e,updateObj:t,device:n})=>{const{layout:o,styles:i}=e,{container:a}=i,{direction:s="horizontal"}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s,onChange:e=>t("layout",e,"direction"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"horizontal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"vertical"})]})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Slide View","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o.slideView[n],onChange:e=>t("layout",e,"slideView",n),beforeIcon:"grid-view",min:1,max:12}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Slide Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o.space[n],onChange:e=>t("layout",e,"space",n),min:0,max:250}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Width","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:a[n].width,onChange:e=>t("styles",e,"container",n,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Height","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:a[n].height,onChange:e=>t("styles",e,"container",n,"height")})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Align Items ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[n]?.alignItems,onChange:e=>t("styles",e,"container",n,"alignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Wy,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Uy,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Gy,{})})]})]})]})},qy=({attributes:e,updateObj:t,device:n})=>{const{navigation:o,styles:i}=e,{navigation:a}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Navigation","b-blocks"),value:o.navigation,checked:o.navigation,onChange:e=>t("navigation",e,"navigation")}),o.navigation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Prev Icon","b-blocks"),value:o.prevIcon.library,onChange:e=>t("navigation",e,"prevIcon","library")}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Next Icon","b-blocks"),value:o.nextIcon.library,onChange:e=>t("navigation",e,"nextIcon","library")}),(0,l.jsx)("br",{}),(0,l.jsx)("b",{children:"Position X"}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Prev Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].arrow.positionX.prev,onChange:e=>t("styles",e,"navigation",n,"arrow","positionX","prev")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Next Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].arrow.positionX.next,onChange:e=>t("styles",e,"navigation",n,"arrow","positionX","next")})]}),(0,l.jsx)("b",{children:"Position Y"}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Prev Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].arrow.positionY.prev,onChange:e=>t("styles",e,"navigation",n,"arrow","positionY","prev")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Next Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].arrow.positionY.next,onChange:e=>t("styles",e,"navigation",n,"arrow","positionY","next")})]})]})]})},Yy=({attributes:e,updateObj:t,device:n})=>{const{pagination:o,styles:i}=e,{pagination:a}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Pagination","b-blocks"),value:o.pagination,checked:o.pagination,onChange:e=>t("pagination",e,"pagination")}),o.pagination&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Clickable","b-blocks"),value:o.clickable,checked:o.clickable,onChange:e=>t("pagination",e,"clickable")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Position X","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].positionX,min:-50,max:150,onChange:e=>t("styles",e,"pagination",n,"positionX")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Position Y","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].positionY,min:-50,max:150,onChange:e=>t("styles",e,"pagination",n,"positionY")})]})]})]})},Ky=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vy,{...e}),(0,l.jsx)(Hy,{...e}),(0,l.jsx)(Fy,{...e}),(0,l.jsx)(qy,{...e}),(0,l.jsx)(Yy,{...e})]}),Qy=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{navigation:i}=o,[a,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex3",
370 -children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i[n].arrow.size,onChange:e=>t("styles",e,"navigation",n,"arrow","size")})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[n].padding,onChange:e=>t("styles",e,"navigation",n,"padding")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a,onChange:s,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i[a].color,onChange:e=>t("styles",e,"navigation",a,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[a].bg,onChange:e=>t("styles",e,"navigation",a,"bg"),isImage:!1}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i[a].border,onChange:e=>t("styles",e,"navigation",a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:i[a][n].radius,onChange:e=>t("styles",e,"navigation",a,n,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:i.hover.transition,onChange:e=>t("styles",e,"navigation","hover","transition"),min:0,max:10,step:.01})]})},Zy=({attributes:e,updateObj:t})=>{const{styles:n}=e,{pagination:o}=n,[i,a]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i,onChange:a,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o[i].color,onChange:e=>t("styles",e,"pagination",i,"color")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex3",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o[i].width,onChange:e=>t("styles",e,"pagination",i,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex3",children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o[i].height,onChange:e=>t("styles",e,"pagination",i,"height")})]}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o[i].border,onChange:e=>t("styles",e,"pagination",i,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),value:o[i].radius,onChange:e=>t("styles",e,"pagination",i,"radius")}),"active"===i&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:o.active.transition,onChange:e=>t("styles",e,"pagination","active","transition"),min:0,max:10,step:.01})]})},Xy=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Qy,{...e}),(0,l.jsx)(Zy,{...e})]}),Jy=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:zy,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ky,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Xy,{...e})}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})})},ev=({attributes:e,id:t,isBackend:n=!1})=>{const{styles:o,advanced:i,layout:a}=e,{container:s,navigation:r,pagination:c}=o,d="vertical"===a?.direction,u=`${t} .bBlock-carousel-main-wrapper`,p=`#${t} .bBlocks-carousel-wrapper`,h=`${p} .swiper`,g=`${h} .swiper-wrapper`,m=`${p} .swiper-button-prev`,b=`${p} .swiper-button-next`,f=`${p} .swiper-pagination`,x=`${f} .swiper-pagination-bullet`,y=`${f} .swiper-pagination-bullet-active`,v=(e="normal")=>`\n\t\t${os(r[e].bg)}\n\t\t${as(r[e].border)}\n\t\t${"normal"===e?ns("transition",jt(r.hover.transition)?`all ${r.hover.transition}s ease-in-out`:""):""}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${h}{\n\t\t\t\t${ns("height",s.desktop.height)}\n\t\t\t\t${ns("width",s.desktop.width)}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${ns("align-items",s.desktop.alignItems)}\n\t\t\t}\n\t\t\t${d?`${g} .swiper-slide{\n\t\t\t\theight: auto;\n\t\t\t}`:""}\n\t\t\t${m}{\n\t\t\t${ns("height","unset")}\n\t\t\t\t${ns("left",r.desktop.arrow.positionX.prev)}\n\t\t\t\t${ns("top",r.desktop.arrow.positionY.prev)}\n\t\t\t\t${ns("padding",hs(r.desktop.padding))}\n\t\t\t\t${ns("color",r.normal.color)}\n\t\t\t\t${ns("border-radius",hs(r.normal.desktop.radius))}\n\t\t\t\t${v("normal")}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t${ns("height","unset")}\n\t\t\t\t${ns("right",r.desktop.arrow.positionX.next)}\n\t\t\t\t${ns("top",r.desktop.arrow.positionY.next)}\n\t\t\t\t${ns("padding",hs(r.desktop.padding))}\n\t\t\t\t${ns("color",r.normal.color)}\n\t\t\t\t${ns("border-radius",hs(r.normal.desktop.radius))}\n\t\t\t\t${v("normal")}\n\t\t\t}\n\t\t\t${m}:hover{\n\t\t\t\t${ns("color",r.hover.color)}\n\t\t\t\t${ns("border-radius",hs(r.hover.desktop.radius))}\n\t\t\t\t${v("hover")}\n\t\t\t}\n\t\t\t${b}:hover{\n\t\t\t\t${ns("color",r.hover.color)}\n\t\t\t\t${ns("border-radius",hs(r.hover.desktop.radius))}\n\t\t\t\t${v("hover")}\n\t\t\t}\n\t\t\t${m}:hover>svg{\n\t\t\t\t${ns("color",r.hover.color)}\n\t\t\t\t${ns("fill",r.hover.color)}\n\t\t\t}\n\t\t\t${b}:hover>svg{\n\t\t\t\t${ns("color",r.hover.color)}\n\t\t\t\t${ns("fill",r.hover.color)}\n\t\t\t}\n\t\t\t${m}>svg{\n\t\t\t\t${ns("height",r.desktop.arrow.size)}\n\t\t\t\t${ns("width",r.desktop.arrow.size)}\n\t\t\t\t${ns("color",r.normal.color)}\n\t\t\t\t${ns("fill",r.normal.color)}\n\t\t\t\t${ns("transition",jt(r.hover.transition)?`all ${r.hover.transition}s ease-in-out`:"")}\n\t\t\t}\n\n\t\t\t${b}>svg{\n\t\t\t\t${ns("height",r.desktop.arrow.size)}\n\t\t\t\t${ns("width",r.desktop.arrow.size)}\n\t\t\t\t${ns("color",r.normal.color)}\n\t\t\t\t${ns("fill",r.normal.color)}\n\t\t\t\t${ns("transition",jt(r.hover.transition)?`all ${r.hover.transition}s ease-in-out`:"")}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${ns("bottom",c.desktop.positionY)}\n\t\t\t\t${ns("left",c.desktop.positionX)}\n\t\t\t}\n\t\t\t\n\t\t\t${x}{\n\t\t\t\t${ns("background-color",c.normal.color)}\n\t\t\t\t${ns("width",c.normal.width)}\n\t\t\t\t${ns("height",c.normal.height)}\n\t\t\t\t${as(c.normal.border)}\n\t\t\t\t${ns("border-radius",hs(c.normal.radius))}\n\t\t\t\t${ns("transition",jt(c.active.transition)?`all ${c.active.transition}s ease-in-out`:"")}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${ns("background-color",c.active.color)}\n\t\t\t\t${ns("width",c.active.width)}\n\t\t\t\t${ns("height",c.active.height)}\n\t\t\t\t${as(c.active.border)}\n\t\t\t\t${ns("border-radius",hs(c.active.radius))}\n\t\t\t}\n\n\t\t\t${Cs(n?u:t,i,n,!1)}\n\n\t`}})},tv=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{innerBlocks:o(t),device:n()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{navigation:a,layout:s,options:r,autoplay:c,pagination:d,styles:u}=t,g="vertical"===s?.direction,b=u?.container?.desktop?.height,x=["desktop","tablet","mobile"].includes(i)?i:"desktop",v=s?.slideView?.[x]??s?.slideView?.desktop??1,k=s?.space?.[x]??s?.space?.desktop??0,w=(0,m.useRef)(null),_=(0,m.useRef)(null),C=(0,m.useRef)(null),j="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,$="b-blocks/carousel-slide",S=[[$,{}],[$,{}],[$,{}]],T=(0,
371 -h.useInnerBlocksProps)({className:"swiper-wrapper"},{template:S,templateLock:!1,renderAppender:!1}),{insertBlock:N,selectBlock:M}=(0,f.useDispatch)("core/block-editor"),L=(0,f.useSelect)((e=>e("core/block-editor").getBlockOrder(o)?.length||0),[o]);(0,m.useLayoutEffect)((()=>{const e=w.current,t=C.current;if(!e||!t)return;const n=e.querySelector(".swiper-wrapper"),o=n?.querySelectorAll(".swiper-slide");if(n&&o&&0!==o.length){if(_.current&&(_.current.destroy(!0,!0),_.current=null),g&&!b){const t=((e,t,n)=>{const o=Array.from(e.querySelectorAll(".swiper-slide"));if(!o.length)return 0;o.forEach((e=>{e.style.height=""}));const i=Math.max(1,Math.min(Math.round(t)||1,o.length)),a=Number(n)||0,s=o.slice(0,i).reduce(((e,t)=>e+t.getBoundingClientRect().height),0);return Math.round(s+a*(i-1))})(e,v,k);e.style.height=t?`${t}px`:""}else e.style.height="";return _.current=new Sx(e,{modules:[Bf,If,Lf,Ef],slidesPerView:g?"auto":v,spaceBetween:k,loop:!1,speed:1e3*r.speed,autoHeight:!g&&r.autoHeight,direction:g?"vertical":"horizontal",autoplay:!1,navigation:{nextEl:t.querySelector(".swiper-button-next"),prevEl:t.querySelector(".swiper-button-prev")},pagination:!!d.pagination&&{el:t.querySelector(".swiper-pagination"),clickable:d.clickable,dynamicBullets:d.dynamicPagination},scrollbar:{el:e.querySelector(".swiper-scrollbar"),draggable:!1},allowTouchMove:!1,simulateTouch:!1,preventClicks:!0,preventClicksPropagation:!1,touchStartPreventDefault:!1,touchStartForcePreventDefault:!1}),_.current.navigation?.init(),_.current.navigation?.update(),()=>{_.current&&(_.current.destroy(!0,!0),_.current=null)}}}),[o,L,v,k,JSON.stringify(r),JSON.stringify(c),JSON.stringify(d),g,b,s?.direction,s?.slideView[i],_?.current]),(0,m.useEffect)((()=>{n({clientId:o})}),[]);const P=fe(t,n),E={"--swiper-wrapper-transition-timing-function":c?.easing};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Jy,{attributes:t,setAttributes:n,updateObj:P,device:i,isPremium:j}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(ev,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:"swiper-editor__controls",style:{marginBottom:10},children:(0,l.jsx)(y.Button,{variant:"primary",onClick:()=>{const e=(0,p.createBlock)($,{className:"swiper-slide"});N(e,L,o),M(o)},children:"+ Add Slide"})}),(0,l.jsx)("div",{className:"bBlock-carousel-main-wrapper",children:(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"bBlocks-carousel-wrapper",style:E,ref:C,children:[(0,l.jsx)("div",{className:"swiper",ref:w,children:(0,l.jsx)("div",{...T})}),a.navigation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"swiper-button-prev",dangerouslySetInnerHTML:{__html:a.prevIcon.library}}),(0,l.jsx)("div",{className:"swiper-button-next",dangerouslySetInnerHTML:{__html:a.nextIcon.library}})]}),d.pagination&&(0,l.jsx)("div",{className:"swiper-pagination swiper-pagination-horizontal"})]})})})]})]})}));Ll(Ry.name)&&(0,p.registerBlockType)(Ry,{icon:ll,edit:tv,save:h.InnerBlocks.Content});const nv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/carousel-slide","title":"Carousel Slide","category":"bBlocks","description":"Individual slide for a carousel. Add images, text, buttons, videos — anything you need.","keywords":["slide","carousel-slide","slide-block","carousel-item"],"parent":["b-blocks/carousel"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"type":"flex","padding":{},"desktop":{"direction":"column","justify":"","alignItems":"","wrap":"wrap","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"tablet":{"direction":"","justify":"","alignItems":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"mobile":{"direction":"","justify":"","alignItems":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),ov=()=>(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n\t"}}),iv=(0,w.compose)((0,f.withSelect)(((e,{clientId:t})=>{const{getBlocks:n}=e("core/block-editor");return{innerBlocks:n(t)}})),(0,f.withDispatch)((e=>{const{removeBlock:t}=e("core/block-editor");return{removeBlock:t}})))((e=>{const{attributes:t,clientId:n,innerBlocks:o,removeBlock:i}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{...(0,h.useBlockProps)({className:"swiper-slide"}),children:[(0,l.jsx)(ov,{attributes:t,id:`block-${n}`}),(0,l.jsx)("div",{className:"bBlocksRemoveSlideWrapper",onClick:()=>i(n),children:(0,l.jsx)(y.Dashicon,{icon:"no-alt"})}),(0,l.jsx)(h.InnerBlocks,{renderAppender:()=>o?.length?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{})})]})})}));Ll("b-blocks/carousel")&&(0,p.registerBlockType)(nv,{icon:ll,edit:iv,save:h.InnerBlocks.Content})
372 -;const av=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/code-highlight","title":"Code Highlight","category":"bBlocks","description":"Show a syntax-highlighted code snippet with themes, line numbers and a copy button.","keywords":["code","snippet","syntax","highlight","prism","pre"],"textdomain":"b-blocks","supports":{"html":false,"align":["wide","full"]},"attributes":{"blockId":{"type":"string","default":""},"align":{"type":"string","default":""},"content":{"type":"object","default":{"code":"function greet(name) {\\n\\tconsole.log(`Hello, ${name}!`);\\n}\\n\\ngreet(\'World\');","language":"javascript","filename":"example.js","caption":""}},"options":{"type":"object","default":{"header":true,"showLanguage":false,"windowDots":false,"lineNumbers":true,"startLine":1,"highlightLines":"","wordWrap":false,"tabSize":2,"maxLines":0,"collapsible":false,"expandLabel":"Show all","collapseLabel":"Show less","copyButton":true,"copyPosition":"header","copyLabel":"Copy","copiedLabel":"Copied!","captionPosition":"bottom"}},"theme":{"type":"string","default":"porple"},"box":{"type":"object","default":{"desktop":{"align":"center","width":"100%","height":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"align":"","width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"align":"","width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"background":{},"border":{},"shadow":{"normal":[],"hover":[]}}},"codeTypo":{"type":"object","default":{"fontSize":{"desktop":15,"tablet":14,"mobile":13}}},"headerStyle":{"type":"object","default":{"background":{},"filenameColor":"","filenameTypo":{"fontSize":{"desktop":12,"tablet":"","mobile":""}},"badgeColor":"","badgeBackground":{}}},"lineNumber":{"type":"object","default":{"color":"","background":{},"borderColor":""}},"highlight":{"type":"object","default":{"background":{},"borderColor":""}},"copyBtn":{"type":"object","default":{"normal":{"color":"","background":{},"border":{}},"hover":{"color":"","background":{},"border":{}},"copied":{"color":"","background":{},"border":{}},"typo":{"fontSize":{"desktop":12,"tablet":"","mobile":""}},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"buttonIcon":{"type":"object","default":{"enable":true,"icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\' fill=\'none\' stroke=\'currentColor\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'><rect x=\'9\' y=\'9\' width=\'13\' height=\'13\' rx=\'2\'></rect><path d=\'M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\'></path></svg>","position":"left","size":"13px","spacing":"6px","desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"normal":{"color":"","background":{},"border":{},"rotate":"0deg"},"hover":{"color":"","background":{},"border":{},"rotate":"0deg"}}},"caption":{"type":"object","default":{"color":"","typo":{"fontSize":{"desktop":13,"tablet":"","mobile":""}},"align":"center"}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),sv="b-blocks-code-highlight",rv=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],lv=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")}],cv=[...lv,{name:"copied",title:(0,x.__)("Copied","b-blocks")}],dv=[{label:(0,x.__)("Plain Text","b-blocks"),value:"none"},{label:"Bash / Shell",value:"bash"},{label:"C",value:"c"},{label:"C++",value:"cpp"},{label:"C#",value:"csharp"},{label:"CSS",value:"css"},{label:"Dart",value:"dart"},{label:"Diff",value:"diff"},{label:"Go",value:"go"},{label:"GraphQL",value:"graphql"},{label:"Haskell",value:"haskell"},{label:"HTML / XML",value:"markup"},{label:"Java",value:"java"},{label:"JavaScript",value:"javascript"},{label:"JSON",value:"json"},{label:"JSX",value:"jsx"},{label:"Julia",value:"julia"},{label:"Kotlin",value:"kotlin"},{label:"Less",value:"less"},{label:"Markdown",value:"markdown"},{label:"Perl",value:"perl"},{label:"PHP",value:"php"},{label:"Python",value:"python"},{label:"Ruby",value:"ruby"},{label:"Rust",value:"rust"},{label:"SCSS",value:"scss"},{label:"SQL",value:"sql"},{label:"Swift",value:"swift"},{label:"TypeScript",value:"typescript"},{label:"TSX",value:"tsx"},{label:"YAML",value:"yaml"}],uv=[{label:(0,x.__)("Solid","b-blocks"),value:"default"},{label:(0,x.__)("Dark","b-blocks"),value:"dark"},{label:(0,x.__)("Tomorrow","b-blocks"),value:"tomorrow"},{label:(0,x.__)("Solarized Light","b-blocks"),value:"solarized-light"},{label:(0,x.__)("Twilight","b-blocks"),value:"twilight"},{label:(0,x.__)("Porple","b-blocks"),value:"porple"},{label:"Dracula",value:"dracula"},{label:"One Dark",value:"one-dark"},{label:"One Light",value:"one-light"},{label:"Nord",value:"nord"},{label:"Night Owl",value:"night-owl"},{label:"Material Oceanic",value:"material-oceanic"},{label:"VS Code Dark+",value:"vsc-dark-plus"},{label:"Gruvbox Dark",value:"gruvbox-dark"},{label:"Atom Dark",value:"atom-dark"},{label:"Solarized Dark",value:"solarized-dark-atom"},{label:"GitHub Light",value:"ghcolors"},{label:"Coldark Cold",
373 -value:"coldark-cold"},{label:"Shades of Purple",value:"shades-of-purple"},{label:"Laserwave",value:"laserwave"}],pv=[{label:(0,x.__)("In Header","b-blocks"),value:"header"},{label:(0,x.__)("Top Right","b-blocks"),value:"top-right"},{label:(0,x.__)("Bottom Right","b-blocks"),value:"bottom-right"}],hv=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],gv=(e=0)=>({value:"deg",label:"deg",default:e}),mv=[{label:(0,x.__)("Above","b-blocks"),value:"top"},{label:(0,x.__)("Below","b-blocks"),value:"bottom"}],bv=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],fv=uv.map((({value:e})=>e)),xv=dv.map((({value:e})=>e)),yv=(e={},t,n,o="")=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},a=i("desktop")??o;if("desktop"===t)return a;const s=i("tablet")??a;return"tablet"===t?s:i("mobile")??s},vv=(e,t="")=>{if(null==e||""===e)return t;const n=parseFloat(e);return isNaN(n)?t:/[a-z%]$/i.test(String(e).trim())?String(e).trim():`${n}px`},kv=(e,t)=>"normal"===e?t:`${e.charAt(0).toUpperCase()}${e.slice(1)} ${t.charAt(0).toLowerCase()}${t.slice(1)}`,wv=e=>{const{theme:t,options:n={}}=e,o=0<(parseInt(n.maxLines,10)||0);return[sv,`${sv}-theme-${i=t,fv.includes(i)?i:"porple"}`,n.wordWrap?`${sv}-is-wrapped`:"",n.lineNumbers?`${sv}-has-line-numbers`:"",n.header?`${sv}-has-header`:"",o?`${sv}-is-capped`:"",o&&n.collapsible?`${sv}-is-collapsible`:"",n.copyButton?`${sv}-copy-at-${n.copyPosition||"header"}`:""].filter(Boolean).join(" ");var i},_v=(e="")=>String(e).replace(/\n$/,"").split("\n"),Cv=(e="")=>{const t=new Set;return String(e).split(",").forEach((e=>{const n=e.trim();if(!n)return;const[o,i]=n.split("-"),a=parseInt(o,10),s=void 0===i?a:parseInt(i,10);if(!isNaN(a)&&!isNaN(s))for(let e=Math.min(a,s);e<=Math.max(a,s);e++)0<e&&t.add(e)})),[...t].sort(((e,t)=>e-t))},jv=e=>{const{options:t={},content:n={}}=e;if(t.wordWrap||!t.highlightLines)return[];const o=_v(n.code).length,i=parseInt(t.startLine,10)||1;return Cv(t.highlightLines).map((e=>e-i)).filter((e=>0<=e&&e<o))};var $v=s(1983),Sv=s.n($v);s(5624),s(4312),s(1113),s(5723),s(9587),s(5903),s(2769),s(2514),s(7022),s(271),s(2415),s(5651),s(869),s(7839),s(6378),s(4619),s(554),s(6976),s(463),s(9913),s(8713),s(5545),s(2821),s(9700),s(3554),s(2342),s(1648),s(5342),s(4604),s(6966),s(4793),s(83);const Tv=({attributes:e})=>{const{content:t={},options:n={},buttonIcon:o={}}=e,{code:i="",filename:a="",caption:s=""}=t,r=(c=t.language,xv.includes(c)?c:"none");var c;const d=_v(i),u=parseInt(n.startLine,10)||1,p=jv(e),h=n.copyButton&&"header"===(n.copyPosition||"header"),g=dv.find((({value:e})=>e===r))?.label,b=0<(parseInt(n.maxLines,10)||0),f=(0,m.useRef)(null),[x,y]=(0,m.useState)(!1),[v,k]=(0,m.useState)(!1);(0,m.useEffect)((()=>{f.current&&((e,t)=>{e&&t&&"none"!==t&&Sv().languages[t]&&Sv().highlightElement(e)})(f.current,r)}),[i,r]),(0,m.useEffect)((()=>{if(!x)return;const e=setTimeout((()=>y(!1)),2e3);return()=>clearTimeout(e)}),[x]);const w=async()=>{try{await navigator.clipboard.writeText(i)}catch(e){const t=document.createElement("textarea");t.value=i,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}y(!0)},_=o.enable&&o.icon,C=e=>(0,l.jsxs)("button",{type:"button",className:["b-blocks-code-highlight-copy",e?"b-blocks-code-highlight-copy-floating":"",_?"b-blocks-code-highlight-has-icon b-blocks-code-highlight-icon-"+("right"===o.position?"right":"left"):"",x?"is-copied":""].filter(Boolean).join(" "),onClick:w,children:[_&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-btn-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:o.icon}}),(0,l.jsx)("span",{className:"b-blocks-code-highlight-copy-text",children:x?n.copiedLabel||"Copied!":n.copyLabel||"Copy"})]}),j=s?(0,l.jsx)("figcaption",{className:"b-blocks-code-highlight-caption",children:s}):null;return(0,l.jsx)("div",{children:(0,l.jsxs)("figure",{className:`${wv(e)}${v?" is-expanded":""}`,children:["top"===n.captionPosition&&j,n.header&&(0,l.jsxs)("div",{className:"b-blocks-code-highlight-header",children:[n.windowDots&&(0,l.jsxs)("span",{className:"b-blocks-code-highlight-dots","aria-hidden":"true",children:[(0,l.jsx)("i",{}),(0,l.jsx)("i",{}),(0,l.jsx)("i",{})]}),(0,l.jsx)("span",{className:"b-blocks-code-highlight-filename",children:a}),n.showLanguage&&"none"!==r&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-badge",children:g}),h&&C(!1)]}),(0,l.jsxs)("div",{className:"b-blocks-code-highlight-body",children:[(0,l.jsxs)("pre",{className:"b-blocks-code-highlight-pre",tabIndex:0,children:[0<p.length&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-marks","aria-hidden":"true",children:p.map((e=>(0,l.jsx)("span",{style:{"--bbChMark":e}},e)))}),n.lineNumbers&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-gutter","aria-hidden":"true",children:d.map(((e,t)=>(0,l.jsx)("span",{children:u+t},t)))}),(0,l.jsx)("code",{ref:f,className:`b-blocks-code-highlight-code language-${r}`,children:i})]}),n.copyButton&&!h&&C(!0)]}),b&&n.collapsible&&(0,l.jsx)("button",{type:"button",className:"b-blocks-code-highlight-toggle",onClick:()=>k((e=>!e)),"aria-expanded":v,children:v?n.collapseLabel||"Show less":n.expandLabel||"Show all"}),"top"!==n.captionPosition&&j]})})},Nv=({attributes:e,id:o,isBackend:i=!1})=>{const{options:a={},box:s={},codeTypo:r={},headerStyle:c={},copyBtn:d={},buttonIcon:u={},lineNumber:p={},highlight:h={},caption:g={},advanced:b={}}=e,f=`#${o} .${sv}`,x=`${f} .${sv}-header`,y=`${f} .${sv}-filename`,v=`${f} .${sv}-copy`,k=`${f} .${sv}-pre`,w=`${f} .${sv}-code`,_=`${f} .${sv}-gutter`,C=`${f} .${sv}-badge`,j=`${f} .${sv}-marks span`,$=`${f} .${sv}-caption`,S=`${f} .${sv}-btn-icon`,T=`${f} .${sv}-toggle`,N=(e,...t)=>{const n=t.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return n?`${e}{ ${n} }`:""},M=e=>Object.keys(e||{}).length?as(e):"",L=(e,t)=>N(e,ns("color",t?.color),os(t?.background),M(t?.border),ns("rotate",t?.rotate)),P=(e,t)=>N(e,ns("color",t?.color),os(t?.background),M(t?.border)),E={left:"margin-left: 0; margin-right: auto;",right:"margin-left: auto; margin-right: 0;",center:"margin-left: auto; margin-right: auto;"},A=e=>`\n\t\t${N(f,E[yv(s,e,"align","center")]||E.center,ns("width",vv(yv(s,e,"width","100%"),"100%")),ns("height",vv(yv(s,e,"height"))),ns("padding",hs(s?.[e]?.padding)),ns("border-radius",hs(s?.[e]?.radius)))}\n\t\t${N(S,ns("padding",hs(u?.[e]?.padding)),ns("margin",hs(u?.[e]?.margin)),ns("border-radius",hs(u?.[e]?.radius)))}`,B=(0,
374 -m.useMemo)((()=>`\n\t\t${ps("",r)?.googleFontLink}\n\t\t${ps("",c.filenameTypo)?.googleFontLink}\n\t\t${ps("",d.typo)?.googleFontLink}\n\t\t${ps("",g.typo)?.googleFontLink}\n\t\t${ps(`${k}, ${w}, ${_}`,r)?.styles}\n\t\t${ps(y,c.filenameTypo)?.styles}\n\t\t${ps(v,d.typo)?.styles}\n\t\t${ps($,g.typo)?.styles}\n\n\t\t${N(f,os(s.background),M(s.border),ns("box-shadow",ls(s.shadow?.normal)))}\n\t\t${N(`${f}:hover`,ns("box-shadow",ls(s.shadow?.hover)))}\n\n\t\t${N(k,ns("max-height",0<(parseInt(a.maxLines,10)||0)?`calc(${parseInt(a.maxLines,10)} * var(--bbCodeLine, 1.6em) + 2 * var(--bbChPreY, 14px))`:""))}\n\t\t${0<(parseInt(a.maxLines,10)||0)?N(`${f}.is-expanded .${sv}-pre`,"max-height: none;"):""}\n\t\t${N(w,ns("tab-size",parseInt(a.tabSize,10)||""))}\n\n\t\t${N(x,os(c.background))}\n\t\t${N(y,ns("color",c.filenameColor))}\n\t\t${N(C,ns("color",c.badgeColor),os(c.badgeBackground))}\n\n\t\t${N(j,os(h.background))}\n\t\t${N(`${j}::after`,ns("background",h.borderColor))}\n\n\t\t${N($,ns("color",g.color),ns("text-align",g.align))}\n\t\t${N(T,ns("color",d.normal?.color))}\n\n\t\t${N(_,ns("color",p.color),os(p.background),ns("border-right-color",p.borderColor))}\n\n\t\t${N(v,ns("padding",hs(d.padding)),ns("border-radius",hs(d.radius)))}\n\t\t${P(v,d.normal)}\n\t\t${P(`${v}:hover`,d.hover)}\n\t\t${P(`${v}:focus-visible`,d.hover)}\n\t\t${P(`${v}.is-copied`,d.copied)}\n\n\t\t${N(v,ns("gap",vv(u.spacing,"")))}\n\t\t${L(S,u.normal)}\n\t\t${L(`${v}:hover .${sv}-btn-icon`,u.hover)}\n\t\t${N(`${S} svg, ${S} img`,ns("width",vv(u.size,"")),ns("height",vv(u.size,"")))}\n\n\t\t${A("desktop")}\n\n\t\t${t}{\n\t\t\t${A("tablet")}\n\t\t}\n\n\t\t${n}{\n\t\t\t${A("mobile")}\n\t\t}\n\n\t\t${_s(o,b,i,!1)}\n\t\t`),[e,o,i]);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:B}})},Mv=({attributes:e,updateObj:t})=>{const{buttonIcon:n={},options:o={}}=e;return o.copyButton?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:n.enable,onChange:e=>t("buttonIcon",e,"enable"),__nextHasNoMarginBottom:!0}),n.enable&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{className:"mt10",value:n.icon,onChange:e=>t("buttonIcon",e,"icon")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.position||"left",onChange:e=>t("buttonIcon",e,"position"),children:hv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]}),(0,l.jsx)("small",{children:(0,x.__)("Which side of the label the icon sits on.","b-blocks")})]})]}):null},Lv=({attributes:e,updateObj:t})=>{const{content:n={},options:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Caption","b-blocks"),value:n.caption||"",onChange:e=>t("content",e,"caption"),help:(0,x.__)("A short line describing the snippet. Left empty, nothing is rendered.","b-blocks"),__nextHasNoMarginBottom:!0}),n.caption&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.captionPosition||"bottom",onChange:e=>t("options",e,"captionPosition"),children:mv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]})]})},Pv=({attributes:e,updateObj:t})=>{const{content:n={},options:o={},theme:i}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Code","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Snippet","b-blocks"),value:n.code||"",rows:6,onChange:e=>t("content",e,"code"),help:(0,x.__)("Pasted exactly as typed — indentation and blank lines are kept.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Language","b-blocks"),labelPosition:"edge",value:n.language||"none",options:dv,onChange:e=>t("content",e,"language"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Theme","b-blocks"),labelPosition:"edge",value:i||"porple",options:uv,onChange:e=>t("theme",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Word Wrap","b-blocks"),checked:o.wordWrap,onChange:e=>t("options",e,"wordWrap"),help:(0,x.__)("Off, a long line scrolls sideways. On, it folds onto the next line.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Tab Size","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",labelPosition:"edge",min:1,max:8,value:o.tabSize||2,onChange:e=>t("options",parseInt(e,10)||2,"tabSize")})]})]})},Ev=({attributes:e,updateObj:t})=>{const{options:n={}}=e,o=(e,n)=>t("options",e,n);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Copy Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Copy Button","b-blocks"),checked:n.copyButton,onChange:e=>o(e,"copyButton"),__nextHasNoMarginBottom:!0}),n.copyButton&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Position","b-blocks"),labelPosition:"edge",value:n.copyPosition||"header",options:pv,onChange:e=>o(e,"copyPosition"),__nextHasNoMarginBottom:!0}),"header"===(n.copyPosition||"header")&&!n.header&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("The header is switched off, so the button has no bar to sit in. Pick a floating position, or switch the header back on.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Copy Label","b-blocks"),value:n.copyLabel||"",onChange:e=>o(e,"copyLabel"),placeholder:"Copy",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Copied Label","b-blocks"),value:n.copiedLabel||"",onChange:e=>o(e,"copiedLabel"),placeholder:"Copied!",__nextHasNoMarginBottom:!0})]})]})},Av=({attributes:e,updateObj:t})=>{const{content:n={},options:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Header","b-blocks"),checked:o.header,onChange:e=>t("options",e,"header"),__nextHasNoMarginBottom:!0}),o.header?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Filename","b-blocks"),value:n.filename||"",onChange:e=>t("content",e,"filename"),placeholder:"example.js",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Language Badge","b-blocks"),checked:o.showLanguage,onChange:e=>t("options",e,"showLanguage"),help:(0,x.__)("Shows the language name on the right of the bar.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Window Dots","b-blocks"),checked:o.windowDots,onChange:e=>t("options",e,"windowDots"),help:(0,x.__)("The three traffic-light dots of a desktop window.","b-blocks"),__nextHasNoMarginBottom:!0})]}):(0,l.jsx)("small",{children:(0,x.__)("With the header off, the filename, badge and dots have nowhere to sit.","b-blocks")})]})},Bv=({attributes:e,updateObj:t})=>{const{options:n={}}=e,o=Cv(n.highlightLines).length,i=jv(e).length;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line Numbers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Line Numbers","b-blocks"),checked:n.lineNumbers,onChange:e=>t("options",e,"lineNumbers"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{
375 -className:"mb0 flex2",children:(0,x.__)("Start At","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",labelPosition:"edge",min:1,value:n.startLine||1,onChange:e=>t("options",parseInt(e,10)||1,"startLine")})]}),(0,l.jsx)("small",{children:(0,x.__)("Numbering starts here — useful when the snippet is an extract.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Highlight Lines","b-blocks"),value:n.highlightLines||"",onChange:e=>t("options",e,"highlightLines"),placeholder:"2, 5-7",help:(0,x.__)("Single lines and ranges, separated by commas. Counted from Start At.","b-blocks"),__nextHasNoMarginBottom:!0}),n.wordWrap&&0<o&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("Word Wrap is on, so highlighting is switched off — a wrapped line changes the height of every row beneath it and the marks would drift.","b-blocks")}),!n.wordWrap&&o>i&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("Some of those lines fall outside the snippet and are ignored.","b-blocks")})]})},Iv=({attributes:e,updateObj:t})=>{const{options:n={},content:o={}}=e,i=parseInt(n.maxLines,10)||0,a=_v(o.code).length;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Overflow","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Max Lines","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",labelPosition:"edge",min:0,value:i,onChange:e=>t("options",parseInt(e,10)||0,"maxLines")})]}),(0,l.jsx)("small",{children:(0,x.__)("Zero shows the whole snippet. Any other number caps the height.","b-blocks")}),0<i&&i>=a&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("This snippet is shorter than the cap, so nothing is hidden yet.","b-blocks")}),0<i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Expandable","b-blocks"),checked:n.collapsible,onChange:e=>t("options",e,"collapsible"),help:(0,x.__)("Adds a button that opens the snippet to its full height. Off, the rest simply scrolls.","b-blocks"),__nextHasNoMarginBottom:!0}),n.collapsible&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Expand Label","b-blocks"),value:n.expandLabel||"",onChange:e=>t("options",e,"expandLabel"),placeholder:"Show all",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Collapse Label","b-blocks"),value:n.collapseLabel||"",onChange:e=>t("options",e,"collapseLabel"),placeholder:"Show less",__nextHasNoMarginBottom:!0})]})]})]})},Ov=({attributes:e,updateObj:t,device:n="desktop"})=>{const{box:o={}}=e,i=(e,i,a)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.[i]||"",onChange:e=>t("box",e,n,i),units:a})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Box","b-blocks"),initialOpen:!0,children:[i((0,x.__)("Width","b-blocks"),"width",[Pe(),Ee(),Oe()]),i((0,x.__)("Height","b-blocks"),"height",[Pe(),Ee(),Oe()]),(0,l.jsx)("small",{children:(0,x.__)("Leave Height empty to let the snippet set it.","b-blocks")}),(0,l.jsxs)(v,{className:"mb0 mt10 flex1",children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o?.[n]?.align||"",onChange:e=>t("box",e,n,"align"),children:bv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("box",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("box",e,n,"radius")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.background,onChange:e=>t("box",e,"background")}),(0,l.jsx)("small",{children:(0,x.__)("Left empty, the theme paints the background.","b-blocks")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("box",e,"border")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:o.shadow,onChange:e=>t("box",e,"shadow")})]})},Rv=({attributes:e,updateObj:t,device:n="desktop"})=>{const{buttonIcon:o={},options:i={}}=e;if(!i.copyButton||!o.enable)return null;const a=(e,n,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:e}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o[n]||"",onChange:e=>t("buttonIcon",e,n),units:i})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Icon","b-blocks"),initialOpen:!1,children:[a((0,x.__)("Size","b-blocks"),"size",[Pe(),Ae(),Be()]),a((0,x.__)("Spacing","b-blocks"),"spacing",[Pe(),Ae()]),(0,l.jsx)("small",{children:(0,x.__)("The gap between the icon and the label.","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:lv,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:kv(e.name,(0,x.__)("Color","b-blocks")),value:o?.[e.name]?.color,onChange:n=>t("buttonIcon",n,e.name,"color")}),(0,l.jsx)(An,{className:"mt10",label:kv(e.name,(0,x.__)("Background","b-blocks")),value:o?.[e.name]?.background,onChange:n=>t("buttonIcon",n,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:kv(e.name,(0,x.__)("Border","b-blocks")),value:o?.[e.name]?.border,onChange:n=>t("buttonIcon",n,e.name,"border")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:kv(e.name,(0,x.__)("Rotate","b-blocks"))}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[e.name]?.rotate||"",onChange:n=>t("buttonIcon",n,e.name,"rotate"),units:[gv()]})]}),"hover"===e.name&&(0,l.jsx)("small",{children:(0,x.__)("A different angle here turns the icon when the pointer is over the button.","b-blocks")})]})}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("buttonIcon",e,n,"radius")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("buttonIcon",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.margin||{},onChange:e=>t("buttonIcon",e,n,"margin")})]})},zv=({attributes:e,updateObj:t})=>{const{caption:n={},content:o={}}=e;return o.caption?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("caption",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("caption",e,"typo"),defaults:{fontSize:{desktop:13}}}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:10,children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.align||"center",onChange:e=>t("caption",e,"align"),children:bv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{style:{padding:"0px 10px"},label:e,value:t},t)))})]})]}):null},Dv=({attributes:e,updateObj:t})=>{const{copyBtn:n={},options:o={}}=e;return o.copyButton?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Copy Button","b-blocks"),initialOpen:!1,
376 -children:[(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:cv,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:kv(e.name,(0,x.__)("Color","b-blocks")),value:n?.[e.name]?.color,onChange:n=>t("copyBtn",n,e.name,"color")}),(0,l.jsx)(An,{className:"mt10",label:kv(e.name,(0,x.__)("Background","b-blocks")),value:n?.[e.name]?.background,onChange:n=>t("copyBtn",n,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:kv(e.name,(0,x.__)("Border","b-blocks")),value:n?.[e.name]?.border,onChange:n=>t("copyBtn",n,e.name,"border")}),"copied"===e.name&&(0,l.jsx)("small",{children:(0,x.__)("Shown for two seconds after the button is clicked. Left empty, it keeps the Normal styling.","b-blocks")})]})}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("copyBtn",e,"typo"),defaults:{fontSize:{desktop:12}}}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:n.padding||{},onChange:e=>t("copyBtn",e,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:n.radius||{},onChange:e=>t("copyBtn",e,"radius")})]}):null},Fv=({attributes:e,updateObj:t})=>{const{headerStyle:n={},options:o={}}=e;return o.header?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.background,onChange:e=>t("headerStyle",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Filename Color","b-blocks"),value:n.filenameColor,onChange:e=>t("headerStyle",e,"filenameColor")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Filename Typography","b-blocks"),value:n.filenameTypo,onChange:e=>t("headerStyle",e,"filenameTypo"),defaults:{fontSize:{desktop:12}}}),o.showLanguage&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Badge Color","b-blocks"),value:n.badgeColor,onChange:e=>t("headerStyle",e,"badgeColor")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Badge Background","b-blocks"),value:n.badgeBackground,onChange:e=>t("headerStyle",e,"badgeBackground")})]})]}):null},Hv=({attributes:e,updateObj:t})=>{const{highlight:n={}}=e;return jv(e).length?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Highlighted Lines","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.background,onChange:e=>t("highlight",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Edge Color","b-blocks"),value:n.borderColor,onChange:e=>t("highlight",e,"borderColor"),help:(0,x.__)("The bar down the left of each highlighted line.","b-blocks")})]}):null},Wv=({attributes:e,updateObj:t})=>{const{lineNumber:n={},options:o={}}=e;return o.lineNumbers?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line Numbers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Number Color","b-blocks"),value:n.color,onChange:e=>t("lineNumber",e,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Gutter Background","b-blocks"),value:n.background,onChange:e=>t("lineNumber",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Divider Color","b-blocks"),value:n.borderColor,onChange:e=>t("lineNumber",e,"borderColor")})]}):null},Uv=({attributes:e,updateObj:t})=>{const{codeTypo:n={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Code Text","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:n,onChange:e=>t("codeTypo",e),defaults:{fontSize:{desktop:15,tablet:14,mobile:13}}})})},Gv=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ov,{...e}),(0,l.jsx)(Fv,{...e}),(0,l.jsx)(Wv,{...e}),(0,l.jsx)(Uv,{...e}),(0,l.jsx)(Hv,{...e}),(0,l.jsx)(Dv,{...e}),(0,l.jsx)(Rv,{...e}),(0,l.jsx)(zv,{...e})]}),Vv=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:rv,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Pv,{...e}),(0,l.jsx)(Av,{...e}),(0,l.jsx)(Bv,{...e}),(0,l.jsx)(Ev,{...e}),(0,l.jsx)(Mv,{...e}),(0,l.jsx)(Iv,{...e}),(0,l.jsx)(Lv,{...e})]}),"style"===t.name&&(0,l.jsx)(Gv,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},qv=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i}=t,a="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,s=fe(t,n),r=o.slice(0,12);(0,m.useEffect)((()=>{i!==r&&n({blockId:r})}),[r]);const c=`block-${o}`,d=(0,h.useBlockProps)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vv,{...e,updateObj:s,isPremium:a}),(0,l.jsxs)("div",{...d,children:[(0,l.jsx)(Nv,{attributes:t,id:c,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(Tv,{attributes:t})})]})]})}));Ll(av.name)&&(0,p.registerBlockType)(av,{icon:gl,edit:qv,save:()=>null})
377 -;const Yv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/comparison-table","title":"Comparison Table","category":"bBlocks","description":"Compare plans side by side with check, cross, or text cells and a highlighted featured column.","keywords":["comparison","compare","table","feature matrix","pricing","plan","versus"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"content":{"type":"object","default":{"caption":"Feature comparison across plans","captionPosition":"hidden","captionColor":"","captionTypo":{},"featuredLabel":"Most Popular"}},"table":{"type":"object","default":{"theme":"default","alignment":"center","cellBorderType":"collapse","stackOnMobile":false,"stickyHeader":false,"stickyFirstColumn":true,"showRowStripes":true,"desktop":{"width":"900px","radius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"iconPosition":"top"},"tablet":{"width":"","radius":{},"iconPosition":""},"mobile":{"width":"","radius":{},"iconPosition":""},"borderColor":"#e2e8f0","border":{},"shadow":[],"bg":{}}},"header":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#1e293b"},"color":"#ffffff"},"hover":{"bg":{},"color":""},"typo":{}}},"body":{"type":"object","default":{"bg":{"type":"solid","color":"#ffffff"},"color":"#1f2937","typo":{},"desktop":{"padding":{"top":"12px","right":"16px","bottom":"12px","left":"16px"}},"tablet":{"padding":{}},"mobile":{"padding":{}}}},"rowLabel":{"type":"object","default":{"bg":{"type":"solid","color":"transparent"},"color":"","typo":{}}},"rowColors":{"type":"object","default":{"odd":{"color":"","bg":""},"even":{"color":"","bg":""},"hover":{"color":"","bg":""},"stripe":{"type":"solid","color":"#f8fafc"},"transition":0.2}},"featured":{"type":"object","default":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","columnBg":{"type":"solid","color":"#eff6ff"},"labelBg":{"type":"solid","color":"#f59e0b"},"labelColor":"#ffffff"}},"icons":{"type":"object","default":{"check":"check","cross":"times","checkSvg":"","crossSvg":"","checkColor":"#16a34a","crossColor":"#dc2626","desktop":{"size":"18px","headerSize":"32px"},"tablet":{"size":"","headerSize":""},"mobile":{"size":"","headerSize":""}}},"tooltip":{"type":"object","default":{"bg":{},"color":"","typo":{},"arrow":true,"underline":true,"shadow":[],"desktop":{"width":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"width":"","padding":{},"radius":{}},"mobile":{"width":"","padding":{},"radius":{}}}},"columns":{"type":"array","default":[{"_key":"col-feature","isFeatureColumn":true,"label":"Features","iconSize":{"desktop":"","tablet":"","mobile":""},"cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}}},{"_key":"col-default-1","label":"Basic","isFeatured":false,"icon":"","iconColor":"","cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}},{"_key":"col-default-2","label":"Pro","isFeatured":true,"icon":"","iconColor":"","cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}},{"_key":"col-default-3","label":"Enterprise","isFeatured":false,"icon":"","iconColor":"","cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}}]},"rows":{"type":"array","default":[{"_key":"row-default-1","label":"Feature One","cells":[{"value":true,"type":"icon","text":""},{"value":true,"type":"icon","text":""},{"value":true,"type":"icon","text":""}]},{"_key":"row-default-2","label":"Feature Two","cells":[{"value":false,"type":"icon","text":""},{"value":true,"type":"icon","text":""},{"value":true,"type":"icon","text":""}]},{"_key":"row-default-3","label":"Feature Three","cells":[{"value":false,"type":"icon","text":""},{"value":false,"type":"icon","text":""},{"value":true,"type":"icon","text":""}]}]},"cta":{"type":"object","default":{"position":"top","normal":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff"},"hover":{"bg":{},"color":""},"typo":{},"border":{},"desktop":{"padding":{"top":"8px","right":"18px","bottom":"8px","left":"18px"},"radius":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"alignment":"center","margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{},"radius":{},"alignment":"","margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{},"radius":{},"alignment":"","margin":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"linear","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"angel":90},"img":{"url":""}}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true,"className":true},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),Kv="b-blocks-comparison-table",Qv=["default","cards","ribbon","stacked"],Zv=["left","center","right"],Xv=(e="ct")=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,Jv=e=>Zv.includes(e)?e:"center",ek=(e,t="")=>{if(!e)return t;if("string"==typeof e)return e||t;const{type:n="solid",color:o="",gradient:i="",image:a={}}=e;return"gradient"===n?i||t:"image"===n?a?.url?`url('${a.url}') center center / cover no-repeat`:t:o||t},tk=(e,t)=>void 0!==e&&""!==e&&null!==e?e:t,nk=e=>e?{type:"solid",color:e}:void 0,ok=(e,t)=>e||t?{top:e,right:t,bottom:e,left:t}:void 0,ik=e=>e||0===e?`${parseInt(e,10)}px`:"",ak=(e={})=>{const t=e;if(!["headerBg","cellPaddingV","tooltipColor","tableMaxWidth","theme"].some((e=>void 0!==t[e]&&""!==t[e]&&null!==t[e])))return t;const n=t.table||{},o=t.header||{},i=t.body||{};return{...t,columns:rk(t.columns),content:{...t.content||{},caption:tk(t.content?.caption,t.caption),captionPosition:tk(t.content?.captionPosition,t.captionPosition),captionColor:tk(t.content?.captionColor,t.captionColor),captionTypo:t.content?.captionTypo||t.captionTypo,featuredLabel:tk(t.content?.featuredLabel,t.featuredLabel)},table:{...n,theme:tk(n.theme,t.theme),alignment:tk(n.alignment,t.tableAlignment),cellBorderType:tk(n.cellBorderType,t.cellBorderType),stackOnMobile:tk(n.stackOnMobile,t.stackOnMobile),stickyHeader:tk(n.stickyHeader,t.stickyHeader),stickyFirstColumn:tk(n.stickyFirstColumn,t.stickyFirstColumn),showRowStripes:tk(n.showRowStripes,t.showRowStripes),borderColor:tk(n.borderColor,t.borderColor),border:n.border||t.tableBorder,shadow:n.shadow?.length?n.shadow:t.tableShadow,bg:n.bg||t.tableBg,desktop:{...n.desktop||{},iconPosition:tk(n.desktop?.iconPosition,{
378 -above:"top",inline:"left",hidden:"hidden"}[t.headerIconPosition]),width:tk(n.desktop?.width,t.tableWidth?.desktop||ik(t.tableMaxWidth)),radius:n.desktop?.radius?.top?n.desktop.radius:t.tableRadius?.desktop||ok(ik(t.borderRadius),ik(t.borderRadius))}},header:{...o,normal:{bg:o.normal?.bg||t.headerBackground||nk(t.headerBg),color:tk(o.normal?.color,t.headerTextColor)},hover:{bg:o.hover?.bg||nk(t.headerHoverBg),color:tk(o.hover?.color,t.headerHoverColor)},typo:o.typo||t.headerTypo},body:{...i,bg:i.bg||t.bodyBackground||nk(t.bodyBg),color:tk(i.color,t.bodyTextColor),typo:i.typo||t.bodyTypo,desktop:{padding:i.desktop?.padding?.top?i.desktop.padding:t.cellPadding?.desktop||ok(ik(t.cellPaddingV),ik(t.cellPaddingH))}},rowLabel:{...t.rowLabel||{},bg:t.rowLabel?.bg||t.rowLabelBackground||nk(t.rowLabelBg),color:tk(t.rowLabel?.color,t.rowLabelColor),typo:t.rowLabel?.typo||t.rowLabelTypo},rowColors:{...t.rowColors||{},odd:t.rowColors?.odd||t.rowOdd,even:t.rowColors?.even||t.rowEven,hover:t.rowColors?.hover||t.rowHover,stripe:t.rowColors?.stripe||t.rowStripeBackground||nk(t.rowStripeBg),transition:tk(t.rowColors?.transition,t.transition)},featured:{...t.featured||{},bg:t.featured?.bg||t.featuredBackground||nk(t.featuredBg),color:tk(t.featured?.color,t.featuredTextColor),columnBg:t.featured?.columnBg||t.featuredColBackground||nk(t.featuredColBg),labelBg:t.featured?.labelBg||t.featuredLabelBackground||nk(t.featuredLabelBg),labelColor:tk(t.featured?.labelColor,t.featuredLabelColor)},icons:{...t.icons||{},check:tk(t.icons?.check,t.checkIcon),cross:tk(t.icons?.cross,t.crossIcon),checkSvg:tk(t.icons?.checkSvg,t.checkIconSvg),crossSvg:tk(t.icons?.crossSvg,t.crossIconSvg),checkColor:tk(t.icons?.checkColor,t.checkColor),crossColor:tk(t.icons?.crossColor,t.crossColor),desktop:{size:tk(t.icons?.desktop?.size,t.iconSizes?.desktop||ik(t.iconSize))}},tooltip:{...t.tooltip||{},bg:t.tooltip?.bg||t.tooltipBackground,color:tk(t.tooltip?.color,t.tooltipColor),typo:t.tooltip?.typo||t.tooltipTypo,arrow:tk(t.tooltip?.arrow,t.tooltipArrow),underline:tk(t.tooltip?.underline,t.tooltipUnderline),shadow:t.tooltip?.shadow?.length?t.tooltip.shadow:t.tooltipShadow,desktop:{width:tk(t.tooltip?.desktop?.width,t.tooltipWidth?.desktop),padding:t.tooltip?.desktop?.padding?.top?t.tooltip.desktop.padding:t.tooltipPadding?.desktop,radius:t.tooltip?.desktop?.radius?.top?t.tooltip.desktop.radius:t.tooltipRadius?.desktop}}}},sk=(e=[])=>({feature:e.find((e=>e?.isFeatureColumn))||null,plans:e.filter((e=>!e?.isFeatureColumn))}),rk=(e=[],t="Features")=>e.some((e=>e?.isFeatureColumn))?e:[{_key:"col-feature",isFeatureColumn:!0,label:t||"Features"},...e],lk=(e={})=>{const t=ak(e).table||{};return[`${Kv}-block`,`${Kv}-theme--${n=t.theme,Qv.includes(n)?n:"default"}`,`${Kv}-align--${Jv(t.alignment)}`,t.showRowStripes?"has-row-stripes":"",t.stickyHeader?"has-sticky-header":"",!1===t.stickyFirstColumn?"":"has-sticky-first-col",t.stackOnMobile?"is-stacked-mobile":""].filter(Boolean).join(" ");var n},ck=({attributes:e,id:o,isBackend:i=!1})=>{const a=ak(e),{feature:s,plans:r}=sk(a.columns||[]),c=[...s?[{column:s,key:"feature"}]:[],...r.map(((e,t)=>({column:e,key:t})))],{advanced:d,content:u={},table:p={},header:h={},body:g={},rowLabel:m={},rowColors:b={},featured:f={},icons:x={},tooltip:y={},cta:v={}}=a,k=p.cellBorderType||"collapse",w=p.border||{},_=p.shadow||[],C=p.bg||{},j=h.typo||{},$=ek(h.hover?.bg),S=h.hover?.color||"",T=g.typo||{},N=b.odd||{},M=b.even||{},L=b.hover||{},P=b.transition??.2,E=u.captionPosition||"hidden",A=u.captionTypo||{},B=u.captionColor||"",I=y.bg||{},O=y.color||"",R=y.typo||{},z=y.shadow||[],D=y.arrow,F=y.underline,H=m.typo||{},W={top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"},U=`#${o}`,G=`${U} .${Kv}-scroll`,V=`${U} .${Kv}-table`,q=`${V} thead th`,Y=`${V} tbody td, ${V} tbody th, ${V} tfoot td, ${V} tfoot th`,K=`${V} tbody tr`,Q=`${V} caption`,Z=`${V} tbody th.${Kv}-row-label`,X=`${U} .${Kv}-col__cta`,J={left:"margin-left: 0; margin-right: auto;",center:"margin-left: auto; margin-right: auto;",right:"margin-left: auto; margin-right: 0;"},ee=`${U} .${Kv}-tooltip`,te=`${U} .${Kv}-tooltip-bubble`,ne=`${U} .${Kv}-tooltip-arrow`,oe={headerBg:ek(h.normal?.bg),headerText:h.normal?.color,featuredBg:ek(f.bg),featuredText:f.color,featuredColBg:ek(f.columnBg),labelBg:ek(f.labelBg),labelText:f.labelColor,rowLabelBg:ek(m.bg),rowLabelText:m.color,stripeBg:ek(b.stripe),bodyBg:ek(g.bg),bodyText:g.color,checkColor:x.checkColor,crossColor:x.crossColor,borderColor:p.borderColor},ie=`${U}.${Kv}-theme--${p.theme||"default"}`,ae=oe.borderColor||"#e2e8f0",se=oe.featuredBg||"#2563eb",re=(e,t)=>`color-mix(in srgb, ${e} ${t}%, transparent)`,le=({cards:()=>`\n\t\t\t${ie} ${V} tbody td,\n\t\t\t${ie} ${V} tbody th{\n\t\t\t\tborder-bottom: 1px solid ${ae} !important;\n\t\t\t\tborder-bottom-color: ${re(ae,70)} !important;\n\t\t\t\tbox-shadow: 0 0 0 1px ${ae};\n\t\t\t\tbox-shadow: 0 0 0 1px ${re(ae,45)};\n\t\t\t}\n\t\t\t${ie} ${V} thead th.is-featured{ box-shadow: 0 10px 26px ${re(se,24)} !important; }\n\t\t\t${ie} ${V} td.is-featured{\n\t\t\t\tbox-shadow: 0 0 0 1px ${se} !important;\n\t\t\t\tbox-shadow: 0 0 0 1px ${re(se,35)} !important;\n\t\t\t}`}[p.theme]||(()=>""))(),ce=c.map((({column:e,key:t})=>{const n=e?.cta;if(!n)return"";const o=`${U} [data-col="${t}"] .${Kv}-col__cta`,i=n.transition,a=[ns("background",ek(n.normal?.bg||n.bg)),ns("color",n.normal?.color||n.color),as(n.border),ns("padding",hs(n.padding)),ns("border-radius",hs(n.radius)),""===i||null==i?"":`transition: background ${i}s ease, color ${i}s ease, border-color ${i}s ease;`].filter(Boolean).join(""),s=[ns("background",ek(n.hover?.bg)),ns("color",n.hover?.color)].filter(Boolean).join("");return`${a?`${o}{ ${a} }`:""}${s?`${o}:hover, ${o}:focus-visible{ ${s} }`:""}${Object.keys(n.typo||{}).length?ps(o,n.typo).styles:""}`})).join(""),de=c.map((({column:e,key:t})=>e?.iconColor?`${U} [data-col="${t}"] .${Kv}-col__icon{ color: ${e.iconColor}; }`:"")).join(""),ue=e=>`\n\t\t${G}{\n\t\t\t${ns("max-width",p?.[e]?.width)}\n\t\t\t${ns("border-radius",hs(p?.[e]?.radius))}\n\t\t}\n\n\t\t${q}, ${Y}{ ${ns("padding",hs(g?.[e]?.padding))} }\n\n\t\t${U} .${Kv}-cell-icon{\n\t\t\t${ns("width",x?.[e]?.size)}\n\t\t\t${ns("height",x?.[e]?.size)}\n\t\t}\n\n\t\t${U} .${Kv}-col__icon{\n\t\t\t${ns("width",x?.[e]?.headerSize)}\n\t\t\t${ns("height",x?.[e]?.headerSize)}\n\t\t\t${"hidden"===p?.[e]?.iconPosition?"display: none;":""}\n\t\t}\n\n\t\t${c.map((({column:t,key:n})=>t?.iconSize?.[e]?`${U} [data-col="${n}"] .${Kv}-col__icon{ width: ${t.iconSize[e]}; height: ${t.iconSize[e]}; }`:"")).join("")}\n\n\t\t${X}{\n\t\t\t${ns("padding",hs(v?.[e]?.padding))}\n\t\t\t${ns("border-radius",hs(v?.[e]?.radius))}\n\t\t\t${ns("margin",hs(v?.[e]?.margin))}\n\t\t\t\n\t\t\t${J[v?.[e]?.alignment]||""}\n\t\t}\n\n\t\t${c.map((({column:t,key:n})=>J[t?.cta?.alignment?.[e]]?`${U} [data-col="${n}"] .${Kv}-col__cta{ ${J[t.cta.alignment[e]]} }`:"")).join("")}\n\n\t\t${U} .${Kv}-col__head{\n\t\t\t${ns("flex-direction",W[p?.[e]?.iconPosition])}\n\t\t}\n\n\t\t${te}{\n\t\t\t${ns("padding",hs(y?.[e]?.padding))}\n\t\t\t${ns("border-radius",hs(y?.[e]?.radius))}\n\t\t\t${ns("max-width",y?.[e]?.width)}\n\t\t}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
379 -__html:`\n\t\t\t${ps("",j).googleFontLink}\n\t\t\t${ps("",T).googleFontLink}\n\t\t\t${ps("",A).googleFontLink}\n\t\t\t${ps("",R).googleFontLink}\n\t\t\t${ps("",H).googleFontLink}\n\t\t\t${ps("",v.typo).googleFontLink}\n\n\t\t\t${G}{\n\t\t\t\t${ns("border-color",oe.borderColor)}\n\t\t\t\t${ns("background",oe.bodyBg)}\n\t\t\t}\n\n\t\t\t${V}{\n\t\t\t\t${ns("color",oe.bodyText)}\n\t\t\t\t${ns("background",oe.bodyBg)}\n\t\t\t}\n\n\t\t\t${q}{\n\t\t\t\t${ns("background",oe.headerBg)}\n\t\t\t\t${ns("color",oe.headerText)}\n\t\t\t}\n\n\t\t\t${q}.is-featured{\n\t\t\t\t${ns("background",oe.featuredBg)}\n\t\t\t\t${ns("color",oe.featuredText)}\n\t\t\t}\n\n\t\t\t${U} .${Kv}-col__featured-badge{\n\t\t\t\t${ns("background",oe.labelBg)}\n\t\t\t\t${ns("color",oe.labelText)}\n\t\t\t}\n\n\t\t\t${Y}{\n\t\t\t\t${ns("border-color",oe.borderColor)}\n\t\t\t}\n\n\t\t\t${V} tbody td.is-featured{ ${ns("background",oe.featuredColBg)} }\n\n\t\t\t${Z}{\n\t\t\t\t${ns("background",oe.rowLabelBg)}\n\t\t\t\t${ns("color",oe.rowLabelText)}\n\t\t\t}\n\t\t\t${ps(Z,H).styles}\n\n\t\t\t${X}{\n\t\t\t\t${ns("background",ek(v.normal?.bg))}\n\t\t\t\t${ns("color",v.normal?.color)}\n\t\t\t\t${as(v.border)}\n\t\t\t\t${ns("transition",`background ${v.transition??.2}s ease, color ${v.transition??.2}s ease, border-color ${v.transition??.2}s ease`)}\n\t\t\t}\n\t\t\t${ps(X,v.typo).styles}\n\n\t\t\t${X}:hover, ${X}:focus-visible{\n\t\t\t\t${ns("background",ek(v.hover?.bg))}\n\t\t\t\t${ns("color",v.hover?.color)}\n\t\t\t}\n\n\t\t\t${U}.has-sticky-first-col ${V} tbody th.${Kv}-row-label{ ${ns("background",oe.bodyBg)} }\n\t\t\t${U}.has-sticky-first-col ${V} thead th:first-child{ ${ns("background",oe.headerBg)} }\n\n\t\t\t${U}.has-row-stripes ${V} tbody tr:nth-child(even) td,\n\t\t\t${U}.has-row-stripes ${V} tbody tr:nth-child(even) th{ ${ns("background",oe.stripeBg)} }\n\n\t\t\t${U} .${Kv}-cell-icon.is-yes svg{ ${ns("color",oe.checkColor)} }\n\t\t\t${U} .${Kv}-cell-icon.is-no svg{ ${ns("color",oe.crossColor)} }\n\n\t\t\t${V}{\n\t\t\t\t${ns("border-collapse","separate"===k?"separate":"collapse")}\n\t\t\t}\n\n\t\t\t${le}\n\t\t\t${ce}\n\t\t\t${de}\n\n\t\t\t${G}{\n\t\t\t\t${as(w)}\n\t\t\t\t${ns("box-shadow",ls(_))}\n\t\t\t\t${os(C)}\n\t\t\t}\n\n\t\t\t${ps(q,j).styles}\n\t\t\t${ps(Y,T).styles}\n\n\t\t\t${q}:hover{\n\t\t\t\t${ns("background",$)}\n\t\t\t\t${ns("color",S)}\n\t\t\t}\n\n\t\t\t${K}:nth-child(odd) td, ${K}:nth-child(odd) th{\n\t\t\t\t${ns("background",ek(N?.bg))}\n\t\t\t\t${ns("color",N?.color)}\n\t\t\t}\n\n\t\t\t${K}:nth-child(even) td, ${K}:nth-child(even) th{\n\t\t\t\t${ns("background",ek(M?.bg))}\n\t\t\t\t${ns("color",M?.color)}\n\t\t\t}\n\n\t\t\t${ek(L?.bg)||L?.color?`${K}:hover td, ${K}:hover th{\n\t\t\t\t${ns("background",ek(L?.bg))}\n\t\t\t\t${ns("color",L?.color)}\n\t\t\t}`:""}\n\n\t\t\t${q}, ${Y}{\n\t\t\t\t${ns("transition",`background ${P}s, color ${P}s`)}\n\t\t\t}\n\t\t\t${te}{\n\t\t\t\t${ns("background",ek(I))}\n\t\t\t\t${ns("color",O)}\n\t\t\t\t${ns("box-shadow",ls(z))}\n\t\t\t}\n\t\t\t${ps(te,R).styles}\n\n\t\t\t${ne}{\n\t\t\t\t${ns("background",ek(I))}\n\t\t\t\t${!1===D?"display: none;":""}\n\t\t\t}\n\n\t\t\t${!1===F?`${ee}{ text-decoration: none; }`:""}\n\n\t\t\t${"hidden"!==E?`${Q}{\n\t\t\t\tposition: static;\n\t\t\t\twidth: auto;\n\t\t\t\theight: auto;\n\t\t\t\tmargin: 0;\n\t\t\t\tclip: auto;\n\t\t\t\tclip-path: none;\n\t\t\t\toverflow: visible;\n\t\t\t\tcaption-side: ${"top"===E?"top":"bottom"};\n\t\t\t\tpadding: 8px 0;\n\t\t\t\t${ns("color",B)}\n\t\t\t}`:""}\n\t\t\t${ps(Q,A).styles}\n\n\t\t\t${ue("desktop")}\n\t\t\t${t}{ ${ue("tablet")} }\n\t\t\t${n}{ ${ue("mobile")} }\n\n\t\t\t${_s(o,d,i,!1)}\n\t\t\t`}})},dk={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"},uk={check:(0,l.jsx)("svg",{...dk,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})}),"check-circle":(0,l.jsx)("svg",{...dk,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm141.6 192.2L235.7 360.6c-3.1 3.1-8.2 3.1-11.3 0L150.4 287c-3.1-3.1-3.1-8.2 0-11.3l24.5-24.5c3.1-3.1 8.2-3.1 11.3 0l43.5 43.5 132.2-131.3c3.1-3.1 8.2-3.1 11.3 0l24.5 24.5c3 3.1 3 8.2-.1 11.3z"})})},pk={times:(0,l.jsx)("svg",{...dk,viewBox:"0 0 352 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})}),"times-circle":(0,l.jsx)("svg",{...dk,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"})})},hk={stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},gk=e=>(0,l.jsxs)("svg",{...hk,...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),mk=e=>(0,l.jsxs)("svg",{...hk,...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),bk=e=>(0,l.jsxs)("svg",{...hk,...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),fk=({attributes:e,isBackend:t=!1})=>{const{content:n={},icons:o={},cta:i={},columns:a=[],rows:s=[]}=ak(e),{feature:r,plans:c}=sk(a),d=i.position||"top",u=e=>e?.ctaLabel?t||!e.ctaUrl?(0,l.jsx)("span",{className:`${Kv}-col__cta`,"aria-hidden":t?"true":void 0,children:e.ctaLabel}):(0,l.jsx)("a",{className:`${Kv}-col__cta`,href:e.ctaUrl,rel:"noopener",children:e.ctaLabel}):null,p=n.caption,h=n.featuredLabel,g=o.check||"check",b=o.cross||"times",f=o.checkSvg||"",x=o.crossSvg||"",y=e=>{const t=e?f:x;return t?(0,l.jsx)("span",{className:`${Kv}-cell-glyph`,dangerouslySetInnerHTML:{__html:t}}):e?((e="check")=>uk[e]||uk.check)(g):((e="times")=>pk[e]||pk.times)(b)},[v,k]=(0,m.useState)(null),w=(0,m.useCallback)(((e,t)=>{const n=e.currentTarget.getBoundingClientRect(),o=window.innerHeight-n.bottom>140;k({text:t,x:n.left+n.width/2,y:o?n.bottom+8:n.top-8,flipped:!o})}),[]),_=(0,m.useCallback)((()=>k(null)),[]),C=(e,t)=>(0,l.jsxs)(l.Fragment,{children:[t&&(e?.badge||h)?(0,l.jsx)("span",{className:`${Kv}-col__featured-badge`,"aria-hidden":"true",children:e?.badge||h}):null,e?.icon||e?.label?(0,l.jsxs)("span",{className:`${Kv}-col__head`,children:[e?.icon?(0,l.jsx)("span",{className:`${Kv}-col__icon`,dangerouslySetInnerHTML:{__html:e.icon}}):null,e?.label?(0,l.jsx)("span",{className:`${Kv}-col__label`,children:e.label}):null]}):null,e?.subtitle?(0,l.jsx)("span",{className:`${Kv}-col__subtitle`,children:e.subtitle}):null,"top"===d?u(e):null]}),j=c.findIndex((e=>e?.isFeatured)),$=p||"Feature comparison across plans";if(!(c.length>0&&s.length>0))return(0,l.jsx)("p",{className:`${Kv}-empty`,children:"No comparison data to display. Add columns and rows in the block sidebar."});const S=v?(0,l.jsxs)("div",{className:`${Kv}-tooltip-bubble${v.flipped?" is-flipped":""}`,style:{left:`${v.x}px`,top:`${v.y}px`},role:"tooltip",
380 -children:[v.text,(0,l.jsx)("span",{className:`${Kv}-tooltip-arrow`,"aria-hidden":"true"})]}):null;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:`${Kv}-scroll`,role:"region","aria-label":`${$}. Scroll horizontally to see all columns.`,tabIndex:0,children:(0,l.jsxs)("table",{className:`${Kv}-table`,children:[(0,l.jsx)("caption",{className:`${Kv}-caption screen-reader-text`,children:$}),(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{scope:"col","data-col":"feature",className:`${Kv}-feature-col`,children:r?.label||r?.icon?C(r,!!r?.isFeatured):(0,l.jsx)("span",{className:"screen-reader-text",children:"Feature"})}),c.map(((e,t)=>{const n=!!e?.isFeatured;return(0,l.jsx)("th",{scope:"col","data-col":t,className:`${Kv}-col${n?" is-featured":""}`,children:C(e,n)},e?._key||`col-${t}`)}))]})}),(0,l.jsx)("tbody",{children:s.map(((e,t)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{scope:"row",className:`${Kv}-row-label`,children:e?.tooltip?(0,l.jsxs)("span",{className:`${Kv}-tooltip`,tabIndex:0,onMouseEnter:t=>w(t,e.tooltip),onMouseLeave:_,onFocus:t=>w(t,e.tooltip),onBlur:_,children:[e?.label||(0,l.jsx)("span",{className:"screen-reader-text",children:"Feature"}),(0,l.jsx)("span",{className:"screen-reader-text",children:e.tooltip})]}):e?.label||(0,l.jsx)("span",{className:"screen-reader-text",children:"Feature"})}),c.map(((t,n)=>{const o=e?.cells?.[n]||{type:"icon",value:!1,text:""},i=`${Kv}-cell${n===j?" is-featured":""}`;return"text"===o.type?(0,l.jsx)("td",{"data-col":n,"data-label":c[n]?.label||"",className:i,children:o.text||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{"aria-hidden":"true",children:"—"}),(0,l.jsx)("span",{className:"screen-reader-text",children:"Not specified"})]})},n):(0,l.jsx)("td",{"data-col":n,"data-label":c[n]?.label||"",className:i,children:(0,l.jsxs)("span",{className:`${Kv}-cell-icon ${o.value?"is-yes":"is-no"}`,children:[y(!!o.value),(0,l.jsx)("span",{className:"screen-reader-text",children:o.value?"Yes":"No"})]})},n)}))]},e?._key||`row-${t}`)))}),"bottom"===d&&c.some((e=>e?.ctaLabel))?(0,l.jsx)("tfoot",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{scope:"row","data-col":"feature",className:`${Kv}-row-label`,children:u(r)}),c.map(((e,t)=>(0,l.jsx)("td",{"data-col":t,className:`${Kv}-cell ${Kv}-cta-cell${t===j?" is-featured":""}`,children:u(e)},e?._key||`cta-${t}`)))]})}):null]})}),S]})},xk=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],yk=[{label:(0,x.__)("Default — classic grid","b-blocks"),value:"default"},{label:(0,x.__)("Cards — columns as cards","b-blocks"),value:"cards"},{label:(0,x.__)("Ribbon — tabbed headers on a panel","b-blocks"),value:"ribbon"},{label:(0,x.__)("Stacked — elevated coloured cards","b-blocks"),value:"stacked"}],vk=((0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),(0,x.__)("Check","b-blocks"),(0,x.__)("Check in circle","b-blocks"),(0,x.__)("Cross","b-blocks"),(0,x.__)("Cross in circle","b-blocks"),(0,x.__)("Icon","b-blocks"),(0,x.__)("Text","b-blocks"),[{label:(0,x.__)("Icon (yes/no)","b-blocks"),value:"icon"},{label:(0,x.__)("Text","b-blocks"),value:"text"}]),kk=e=>({_key:e("col"),label:(0,x.__)("New Plan","b-blocks"),subtitle:"",badge:"",isFeatured:!1,icon:"",iconColor:"",iconSize:{desktop:"",tablet:"",mobile:""},ctaUrl:"",ctaLabel:"",cta:{normal:{bg:{},color:""},hover:{bg:{},color:""},typo:{},border:{},transition:"",alignment:{desktop:"",tablet:"",mobile:""},padding:{top:"",right:"",bottom:"",left:""},radius:{top:"",right:"",bottom:"",left:""}}}),wk=(e,t=0)=>({_key:e("row"),label:(0,x.__)("New feature","b-blocks"),tooltip:"",cells:Array.from({length:t},(()=>({type:"icon",value:!0,text:""})))}),_k={top:"",right:"",bottom:"",left:""},Ck=e=>({type:"solid",color:e}),jk=e=>({desktop:{top:e,right:e,bottom:e,left:e},tablet:{},mobile:{}}),$k=(e,t)=>({desktop:{top:e,right:t,bottom:e,left:t},tablet:{},mobile:{}}),Sk={default:{header:{normal:{bg:Ck("#1e293b"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:Ck("#ffffff"),color:"#1f2937"},featured:{bg:Ck("#2563eb"),color:"#ffffff",columnBg:Ck("#eff6ff"),labelBg:Ck("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:Ck("transparent"),color:""},rowColorsPart:{odd:{color:"",bg:""},even:{color:"",bg:""}},tablePart:{borderColor:"#e2e8f0"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},radiusPart:jk("8px"),paddingPart:$k("12px","16px"),shadowPart:[]},cards:{header:{normal:{bg:Ck("#1e293b"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:Ck("#ffffff"),color:"#1f2937"},featured:{bg:Ck("#2563eb"),color:"#ffffff",columnBg:Ck("#eff6ff"),labelBg:Ck("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:Ck("transparent"),color:"#0f172a"},rowColorsPart:{odd:{color:"",bg:""},even:{color:"",bg:""}},tablePart:{borderColor:"#e2e8f0"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},tableRadius:jk("8px"),cellPadding:$k("14px","16px"),tableShadow:[{hOffset:"0px",vOffset:"4px",blur:"18px",spreed:"0px",color:"#0f172a1f",isInset:!1}]},ribbon:{header:{normal:{bg:Ck("#2563eb"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:Ck(""),color:"#0f172a"},featured:{bg:Ck("#e0574f"),color:"#ffffff",columnBg:Ck("#ffffff"),labelBg:Ck("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:Ck("transparent"),color:"#0f172a"},rowColorsPart:{odd:{color:"",bg:"#ffffff"},even:{color:"",bg:"#f1f5f9"}},tablePart:{borderColor:"transparent"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},radiusPart:jk("8px"),paddingPart:$k("12px","16px"),shadowPart:[]},stacked:{header:{normal:{bg:Ck("#1e293b"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:Ck(""),color:"#1f2937"},featured:{bg:Ck("#e0574f"),color:"#ffffff",columnBg:Ck("#ffffff"),labelBg:Ck("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:Ck("transparent"),color:"#0f172a"},rowColorsPart:{odd:{color:"",bg:"#ffffff"},even:{color:"",bg:"#f3f4f6"}},tablePart:{borderColor:"transparent"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},radiusPart:jk("8px"),paddingPart:$k("14px","16px"),shadowPart:[]}},Tk={cards:"separate",ribbon:"separate",stacked:"separate"},Nk=["cards","ribbon","stacked"],Mk=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{table:i={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Visual theme","b-blocks"),value:i.theme||"default",options:yk,onChange:n=>t(((e,t={})=>{const n=Sk[e]||{};return{table:{...t.table||{},theme:e,borderColor:n.tablePart?.borderColor,shadow:n.shadowPart||[],desktop:{...t.table?.desktop||{},radius:n.radiusPart?.desktop}},header:n.header,body:{...t.body||{},...n.body||{},desktop:{...t.body?.desktop||{},padding:n.paddingPart?.desktop}},rowLabel:n.rowLabel,rowColors:{...t.rowColors||{},...n.rowColorsPart||{}},featured:n.featured,icons:{...t.icons||{},...n.icons||{}}}})(n,e)),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Table alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.alignment||"center",onChange:e=>n("table",e||"center","alignment"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(gk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:(0,l.jsx)(mk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(bk,{style:{rotate:"-90deg"}})})]})]}),(0,l.jsx)(v,{className:"mt10 mb5",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Header icon position","b-blocks")," ",(0,l.jsx)(_,{})]})
381 -}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i?.[o]?.iconPosition,onChange:e=>n("table",e,o,"iconPosition"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Top","b-blocks"),value:"top"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Left","b-blocks"),value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Right","b-blocks"),value:"right"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hide","b-blocks"),value:"hidden"})]}),(0,l.jsx)("small",{className:"mb10",style:{display:"block",opacity:.7},children:(0,x.__)("Set each column’s icon under Columns (Plans). Leave tablet and mobile unset to inherit.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Row stripes","b-blocks"),checked:!!i.showRowStripes,onChange:e=>n("table",e,"showRowStripes")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Sticky header row","b-blocks"),checked:!!i.stickyHeader,onChange:e=>n("table",e,"stickyHeader"),help:(0,x.__)("Pin the header row while the user scrolls vertically.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Sticky first column","b-blocks"),checked:!1!==i.stickyFirstColumn,onChange:e=>n("table",e,"stickyFirstColumn"),help:(0,x.__)("Pin the feature-name column while the user scrolls horizontally.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Stack columns on mobile","b-blocks"),checked:!!i.stackOnMobile,onChange:e=>n("table",e,"stackOnMobile"),help:(0,x.__)("Below 640px each row becomes a card and every value is labelled with its plan name, instead of scrolling sideways.","b-blocks"),__nextHasNoMarginBottom:!0})]})},Lk=({attributes:e,updateObj:t})=>{const{content:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Accessible caption","b-blocks"),value:n.caption||"",onChange:e=>t("content",e,"caption"),help:(0,x.__)("Visually hidden but read by screen readers. Describe what is being compared.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Featured badge text","b-blocks"),value:n.featuredLabel||"",onChange:e=>t("content",e,"featuredLabel"),placeholder:(0,x.__)("e.g. Most Popular","b-blocks"),__nextHasNoMarginBottom:!0})]})},Pk=({value:e=[],onChange:t,index:n,featuredLabel:o="",device:i="desktop"})=>{const[a,s]=(0,m.useState)("normal"),r=e[n];if(!r)return null;const c=(o,i,a)=>t(e.map(((e,t)=>t===n?{...e||{},cta:{...e?.cta||{},[o]:{...e?.cta?.[o]||{},[i]:a}}}:e))),d=(o,i)=>t(e.map(((e,t)=>t===n?{...e||{},cta:{...e?.cta||{},[o]:i}}:e))),u=(o,i)=>{let a=e.map(((e,t)=>t===n?{...e||{},[o]:i}:e));"isFeatured"===o&&!0===i&&(a=a.map(((e,t)=>t===n?e:{...e||{},isFeatured:!1}))),t(a)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Column label","b-blocks"),value:r.label||"",onChange:e=>u("label",e),placeholder:(0,x.__)("e.g. Pro","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Subtitle (optional)","b-blocks"),value:r.subtitle||"",onChange:e=>u("subtitle",e),placeholder:(0,x.__)("e.g. $19/mo","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Header Icon","b-blocks"),value:r.icon,onChange:e=>u("icon",e)}),r.icon?(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Icon Color:","b-blocks"),value:r.iconColor,onChange:e=>u("iconColor",e)}):null,r.icon?(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.iconSize?.[i],onChange:e=>u("iconSize",{...r.iconSize||{},[i]:e}),__next40pxDefaultSize:!0})]}):null,(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("CTA URL (optional)","b-blocks"),value:r.ctaUrl||"",onChange:e=>u("ctaUrl",e),placeholder:"https://",type:"url",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("CTA button label","b-blocks"),value:r.ctaLabel||"",onChange:e=>u("ctaLabel",e),placeholder:(0,x.__)("e.g. Choose Plan","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Featured column (highlight)","b-blocks"),checked:!!r.isFeatured,onChange:e=>u("isFeatured",e),help:(0,x.__)("Only one column can be featured at a time.","b-blocks"),__nextHasNoMarginBottom:!0}),!!r.isFeatured&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Badge text","b-blocks"),value:r.badge||"",onChange:e=>u("badge",e),placeholder:o||(0,x.__)("Most Popular","b-blocks"),help:(0,x.__)("Leave empty to use the Featured Label from the Content panel.","b-blocks"),__nextHasNoMarginBottom:!0}),r.ctaLabel?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{}),(0,l.jsx)(v,{children:(0,x.__)("CTA overrides for this column","b-blocks")}),(0,l.jsx)("small",{style:{display:"block",opacity:.7,marginBottom:8},children:(0,x.__)("Anything left empty inherits Style → CTA Button.","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:s,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:r.cta?.[a]?.bg||{},onChange:e=>c(a,"bg",e)}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:r.cta?.[a]?.color,onChange:e=>c(a,"color",e)}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.cta?.typo||{},onChange:e=>d("typo",e)}),(0,l.jsx)(v,{className:"mt10 mb5",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:r.cta?.alignment?.[i],onChange:e=>d("alignment",{...r.cta?.alignment||{},[i]:e}),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(gk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:(0,l.jsx)(mk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(bk,{style:{rotate:"-90deg"}})})]}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:r.cta?.border||{},onChange:e=>d("border",e)}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:r.cta?.padding,onChange:e=>d("padding",e)}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:r.cta?.radius,onChange:e=>d("radius",e)}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:""===r.cta?.transition||void 0===r.cta?.transition?"":r.cta.transition,min:0,max:2,step:.05,allowReset:!0,onChange:e=>d("transition",void 0===e?"":e),help:(0,x.__)("Leave unset to inherit Style → CTA Button.","b-blocks"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}):null]})},Ek=({attributes:e,setAttributes:t,device:n="desktop"})=>{const o=rk(e.columns||[]),{plans:i}=sk(o),a=e=>e-(o.findIndex((e=>e?.isFeatureColumn))<e?1:0),s=e.rows||[],r=e=>s.map((t=>({...t||{},
382 -cells:e(Array.isArray(t?.cells)?t.cells:[])}))),c=(0,m.useCallback)((e=>{i.length>=6||t({columns:e,rows:r((e=>[...e,{type:"icon",value:!1,text:""}]))})}),[JSON.stringify(o),JSON.stringify(s)]),d=(0,m.useCallback)((e=>{if(o[e]?.isFeatureColumn||i.length>=6)return;const n={...o[e]||{},_key:Xv("col"),isFeatured:!1};t({columns:[...o.slice(0,e+1),n,...o.slice(e+1)],rows:r((t=>{const n=a(e),o=t.slice();return o.splice(n+1,0,{...t[n]||{type:"icon",value:!1,text:""}}),o}))})}),[JSON.stringify(o),JSON.stringify(s)]),u=(0,m.useCallback)((e=>{o[e]?.isFeatureColumn||i.length<=2||t({columns:o.filter(((t,n)=>n!==e)),rows:r((t=>t.filter(((t,n)=>n!==a(e)))))})}),[JSON.stringify(o),JSON.stringify(s)]),p=(0,m.useCallback)((t=>(0,l.jsx)(Pk,{...t,featuredLabel:e.content?.featuredLabel,device:n})),[e.content?.featuredLabel,n]);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Columns (Plans)","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(_a,{value:o,onChange:e=>{const n=o.map((e=>e?._key)),a=e.map((e=>e?._key));if(n.length===a.length&&a.every((e=>n.includes(e)))&&a.join("|")!==n.join("|")){if(0!==e.findIndex((e=>e?.isFeatureColumn)))return void t({columns:o});const n=i.map((e=>e?._key)),a=e.filter((e=>!e?.isFeatureColumn)).map((e=>e?._key)).map((e=>n.indexOf(e)));t({columns:e,rows:r((e=>a.map((t=>e[t]||{type:"icon",value:!1,text:""}))))})}else t({columns:e})},arrKey:"columns",itemLabel:"Column",title:"label",design:"sortable",minItem:3,ItemSettings:p,newItem:kk(Xv),handleAdd:c,handleCopy:d,handleDelete:u}),i.length>=6&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Maximum of 6 columns reached.","b-blocks")})]})},Ak=({value:e=[],onChange:t,index:n,columns:o=[]})=>{const i=e[n];if(!i)return null;const a=(o,i)=>t(e.map(((e,t)=>t===n?{...e||{},[o]:i}:e))),s=(i,a,s)=>t(e.map(((e,t)=>{if(t!==n)return e;const r=Array.isArray(e?.cells)?e.cells.slice():[];for(;r.length<o.length;)r.push({type:"icon",value:!1,text:""});return r[i]={...r[i]||{type:"icon",value:!1,text:""},[a]:s},{...e||{},cells:r}}))),r=Array.isArray(i.cells)?i.cells:[];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Feature name","b-blocks"),value:i.label||"",onChange:e=>a("label",e),placeholder:(0,x.__)("e.g. Unlimited storage","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Tooltip (optional)","b-blocks"),value:i.tooltip||"",onChange:e=>a("tooltip",e),placeholder:(0,x.__)("Extra explanation shown on hover/focus","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.BaseControl,{className:"mt10",label:(0,x.__)("Cells","b-blocks"),__nextHasNoMarginBottom:!0,children:[!o.length&&(0,l.jsx)("p",{style:{marginTop:4,fontSize:12,opacity:.7},children:(0,x.__)("Add at least one column to edit cells.","b-blocks")}),o.map(((e,t)=>{const n=r[t]||{type:"icon",value:!1,text:""};return(0,l.jsxs)("div",{className:"b-blocks-comparison-table-cell-editor",children:[(0,l.jsxs)("div",{className:"b-blocks-comparison-table-cell-editor__head",children:[(0,l.jsx)("span",{children:e?.label||(0,x.__)("Column","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:"text"===n.type?"text":"icon",options:vk,onChange:e=>s(t,"type",e),__nextHasNoMarginBottom:!0})]}),"text"===n.type?(0,l.jsx)(y.TextControl,{label:(0,x.__)("Text value","b-blocks"),hideLabelFromVision:!0,value:n.text||"",onChange:e=>s(t,"text",e),placeholder:(0,x.__)("e.g. 10 GB, Unlimited, $9/mo","b-blocks"),__nextHasNoMarginBottom:!0}):(0,l.jsx)(y.ToggleControl,{className:"mt10",label:n.value?(0,x.__)("Yes (green check)","b-blocks"):(0,x.__)("No (red X)","b-blocks"),checked:!!n.value,onChange:e=>s(t,"value",e),__nextHasNoMarginBottom:!0})]},e?._key||t)}))]})]})},Bk=({attributes:e,setAttributes:t})=>{const n=e.columns||[],o=e.rows||[],i=(0,m.useCallback)((e=>{o.length>=30||t({rows:e})}),[JSON.stringify(o)]),a=(0,m.useCallback)((e=>{if(o.length>=30)return;const n=o[e]||{},i={...n,_key:Xv("row"),cells:(n.cells||[]).map((e=>({...e})))};t({rows:[...o.slice(0,e+1),i,...o.slice(e+1)]})}),[JSON.stringify(o)]),s=(0,m.useCallback)((e=>(0,l.jsx)(Ak,{...e,columns:n})),[JSON.stringify(n)]);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Feature Rows","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(_a,{value:o,onChange:e=>t({rows:e}),arrKey:"rows",itemLabel:"Row",title:"label",design:"sortable",minItem:0,ItemSettings:s,newItem:wk(Xv,n.length),handleAdd:i,handleCopy:a}),o.length>=30&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Maximum of 30 rows reached.","b-blocks")})]})},Ik=({attributes:e,updateObj:t})=>{const{icons:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Positive (yes) icon","b-blocks"),value:n.check||"check",options:[{label:(0,x.__)("Check mark","b-blocks"),value:"check"},{label:(0,x.__)("Check inside circle","b-blocks"),value:"check-circle"}],onChange:e=>t("icons",e,"check"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Negative (no) icon","b-blocks"),value:n.cross||"times",options:[{label:(0,x.__)("Cross / X","b-blocks"),value:"times"},{label:(0,x.__)("X inside circle","b-blocks"),value:"times-circle"}],onChange:e=>t("icons",e,"cross"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("hr",{}),(0,l.jsx)(Zn,{label:(0,x.__)("Custom “Yes” Icon","b-blocks"),value:n.checkSvg,onChange:e=>t("icons",e,"checkSvg")}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Custom “No” Icon","b-blocks"),value:n.crossSvg,onChange:e=>t("icons",e,"crossSvg")}),(n.checkSvg||n.crossSvg)&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("A library icon overrides the built-in shape above. Clear it to go back.","b-blocks")})]})},Ok=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Mk,{...e}),(0,l.jsx)(Lk,{...e}),(0,l.jsx)(Ek,{...e}),(0,l.jsx)(Bk,{...e}),(0,l.jsx)(Ik,{...e})]}),Rk=({attributes:e,updateObj:t})=>{const{body:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Body","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.bg||{},onChange:e=>t("body",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:n.color,onChange:e=>t("body",e,"color")})]})},zk=({attributes:e,updateObj:t})=>{const{content:n={}}=e,o=n.captionPosition||"hidden";return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Position","b-blocks"),value:o,options:[{label:(0,x.__)("Screen readers only","b-blocks"),value:"hidden"},{label:(0,x.__)("Above the table","b-blocks"),value:"top"},{label:(0,x.__)("Below the table","b-blocks"),value:"bottom"}],onChange:e=>t("content",e,"captionPosition"),__nextHasNoMarginBottom:!0}),"hidden"===o&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("The caption is still read by screen readers — set a position to show it on the page too.","b-blocks")}),"hidden"!==o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color:","b-blocks"),value:n.captionColor,onChange:e=>t("content",e,"captionColor")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.captionTypo||{},onChange:e=>t("content",e,"captionTypo")})]})]})},Dk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{body:o={},rowColors:i={}}=e,[a,s]=(0,m.useState)("normal"),r="hover"===a;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Cells","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding,resetValues:_k,onChange:e=>t("body",e,n,"padding")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typo||{},onChange:e=>t("body",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",
383 -__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:s,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Row Text Color:","b-blocks"),value:i.hover?.color,onChange:e=>t("rowColors",e,"hover","color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Row Background","b-blocks"),value:i.hover?.bg,onChange:e=>t("rowColors",e,"hover","bg")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:i.transition??.2,min:0,max:5,step:.05,onChange:e=>t("rowColors",e,"transition"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Odd Row Text:","b-blocks"),value:i.odd?.color,onChange:e=>t("rowColors",e,"odd","color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Odd Row Background","b-blocks"),value:i.odd?.bg,onChange:e=>t("rowColors",e,"odd","bg")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Stripe Background","b-blocks"),value:i.stripe||{},onChange:e=>t("rowColors",e,"stripe")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Even Row Text:","b-blocks"),value:i.even?.color,onChange:e=>t("rowColors",e,"even","color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Even Row Background","b-blocks"),value:i.even?.bg,onChange:e=>t("rowColors",e,"even","bg")})]})]})},Fk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{cta:o={},columns:i=[]}=e,[a,s]=(0,m.useState)("normal"),r=i.some((e=>e?.ctaLabel));return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA Button","b-blocks"),initialOpen:!1,children:[!r&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("No column has a CTA yet — add a button label under Columns (Plans) to see these styles.","b-blocks")}),(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.position||"top",onChange:e=>t("cta",e||"top","position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("In header","b-blocks"),value:"top"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Column bottom","b-blocks"),value:"bottom"})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:o?.[n]?.alignment,onChange:e=>t("cta",e,n,"alignment"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(gk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:(0,l.jsx)(mk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(bk,{style:{rotate:"-90deg"}})})]})]}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typo||{},onChange:e=>t("cta",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:s,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o?.[a]?.bg||{},onChange:e=>t("cta",e,a,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:o?.[a]?.color,onChange:e=>t("cta",e,a,"color")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border||{},onChange:e=>t("cta",e,"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.margin,resetValues:_k,onChange:e=>t("cta",e,n,"margin")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding,resetValues:_k,onChange:e=>t("cta",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius,resetValues:_k,onChange:e=>t("cta",e,n,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:o.transition??.2,min:0,max:2,step:.05,onChange:e=>t("cta",e,"transition"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})},Hk=({attributes:e,updateObj:t})=>{const{featured:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Featured Column","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Header Background","b-blocks"),value:n.bg||{},onChange:e=>t("featured",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Header Text:","b-blocks"),value:n.color,onChange:e=>t("featured",e,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Column Background","b-blocks"),value:n.columnBg||{},onChange:e=>t("featured",e,"columnBg")}),(0,l.jsx)("hr",{}),(0,l.jsx)(An,{label:(0,x.__)("Badge Background","b-blocks"),value:n.labelBg||{},onChange:e=>t("featured",e,"labelBg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Badge Text:","b-blocks"),value:n.labelColor,onChange:e=>t("featured",e,"labelColor")})]})},Wk=({attributes:e,updateObj:t})=>{const{header:n={}}=e,[o,i]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:n.typo||{},onChange:e=>t("header",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:i,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:n[o]?.color,onChange:e=>t("header",e,o,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:n[o]?.bg||{},onChange:e=>t("header",e,o,"bg")})]})},Uk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{icons:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("“Yes” Color:","b-blocks"),value:o.checkColor,onChange:e=>t("icons",e,"checkColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("“No” Color:","b-blocks"),value:o.crossColor,onChange:e=>t("icons",e,"crossColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o?.[n]?.size,onChange:e=>t("icons",e,n,"size"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Header Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o?.[n]?.headerSize,
384 -onChange:e=>t("icons",e,n,"headerSize"),__next40pxDefaultSize:!0})]})]})},Gk=({attributes:e,updateObj:t})=>{const{rowLabel:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Row Labels","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.bg||{},onChange:e=>t("rowLabel",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:n.color,onChange:e=>t("rowLabel",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo||{},onChange:e=>t("rowLabel",e,"typo")})]})},Vk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{table:o={}}=e,i=Tk[o.theme],a=Nk.includes(o.theme);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table Style","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o?.[n]?.width,onChange:e=>t("table",e,n,"width"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Cell Border Type","b-blocks"),value:i||o.cellBorderType||"collapse",labelPosition:"edge",disabled:!!i,options:[{label:(0,x.__)("Collapse","b-blocks"),value:"collapse"},{label:(0,x.__)("Separate","b-blocks"),value:"separate"}],onChange:e=>t("table",e,"cellBorderType"),__nextHasNoMarginBottom:!0}),i&&(0,l.jsxs)(ja,{status:"info",isIcon:!0,children:[(0,x.__)("The selected theme needs this set to","b-blocks")," ",(0,l.jsx)("b",{children:i})," ",(0,x.__)("for its layout, so this control is inactive. Switch to Default or Striped to change it.","b-blocks")]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Grid Line Color:","b-blocks"),value:o.borderColor,onChange:e=>t("table",e,"borderColor")}),a&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("This theme removes the outer frame so its cards stand free, so the border below has no effect. Grid Line Color still applies to the cells.","b-blocks")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border||{},onChange:e=>t("table",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius,resetValues:_k,onChange:e=>t("table",e,n,"radius")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.bg||{},onChange:e=>t("table",e,"bg")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:o.shadow||[],onChange:e=>t("table",e,"shadow")})]})},qk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{rows:o=[],tooltip:i={}}=e,a=o.some((e=>e?.tooltip));return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tooltip","b-blocks"),initialOpen:!1,children:[!a&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("No row has a tooltip yet — add one under General → Feature Rows to see these styles.","b-blocks")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:i.bg||{},onChange:e=>t("tooltip",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:i.color,onChange:e=>t("tooltip",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typo||{},onChange:e=>t("tooltip",e,"typo")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i?.[n]?.width,onChange:e=>t("tooltip",e,n,"width"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:void 0,values:i?.[n]?.padding,resetValues:_k,onChange:e=>t("tooltip",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i?.[n]?.radius,resetValues:_k,onChange:e=>t("tooltip",e,n,"radius")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:i.shadow||[],onChange:e=>t("tooltip",e,"shadow")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show arrow","b-blocks"),checked:!1!==i.arrow,onChange:e=>t("tooltip",!!e,"arrow"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Underline the label","b-blocks"),checked:!1!==i.underline,onChange:e=>t("tooltip",!!e,"underline"),help:(0,x.__)("The dotted underline is the only cue that a tooltip exists.","b-blocks"),__nextHasNoMarginBottom:!0})]})},Yk=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vk,{...e}),(0,l.jsx)(Wk,{...e}),(0,l.jsx)(Rk,{...e}),(0,l.jsx)(Dk,{...e}),(0,l.jsx)(Gk,{...e}),(0,l.jsx)(Hk,{...e}),(0,l.jsx)(Fk,{...e}),(0,l.jsx)(Uk,{...e}),(0,l.jsx)(qk,{...e}),(0,l.jsx)(zk,{...e})]}),Kk=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:xk,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(Ok,{...e}),"style"===t.name&&(0,l.jsx)(Yk,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},Qk=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,a=fe(t,n),s=(0,h.useBlockProps)({id:`block-${o}`,className:lk(t)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Kk,{...e,updateObj:a,isPremium:i}),(0,l.jsxs)("div",{...s,children:[(0,l.jsx)(ck,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(fk,{attributes:t,isBackend:!0})})]})]})}));Ll(Yv.name)&&(0,p.registerBlockType)(Yv,{icon:xl,edit:Qk})
385 -;const Zk=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table","version":"1.0.0","title":"Table","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","keywords":["table","b-blocks","b-table"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"content":{"type":"object","default":{"cellBorderType":"collapse"}},"options":{"type":"object","default":{"isEnableHeader":true,"isEnableFooter":true,"isEnableCaption":true,"isStickyHeader":false}},"styles":{"type":"object","default":{"content":{"width":{"desktop":"","tablet":"","mobile":""},"align":{"desktop":"","tablet":"","mobile":""},"normal":{"border":{"color":"#acacac","style":"solid","width":"1px"},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2},"hover":{"border":{},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"header":{"typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"normal":{"color":"","bg":{"color":"#d4d4d4"},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2},"hover":{"color":"","bg":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"body":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"normal":{"bg":{},"oddBg":{},"evenBg":{},"transition":0.2},"hover":{"bg":{},"oddBg":{},"evenBg":{}}},"column":[{"type":"","color":"","bg":{}}],"cells":{"typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}},"oddCell":{"normal":{"color":"","bg":{},"transition":0.2},"hover":{"color":"","bg":{}}},"evenCell":{"normal":{"color":"","bg":{},"transition":0.2},"hover":{"color":"","bg":{}}}},"footer":{"typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"normal":{"bg":{"color":"#d4d4d4"},"color":"","transition":0.2},"hover":{"bg":{},"color":""}},"caption":{"position":"bottom","typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"color":"","bg":{},"border":{},"desktop":{"alignment":"right","radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"alignment":"right","radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"alignment":"right","radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}}}},"datatables":{"type":"object","default":{"enabled":false,"paging":{"enabled":true,"pageLength":10,"pagingType":"simple_numbers"},"searching":{"enabled":true,"smart":true,"regex":false,"caseInsensitive":true},"ordering":{"enabled":true,"multiColumn":false},"info":true,"layout":{"topStart":"pageLength","topEnd":"search","bottomStart":"info","bottomEnd":"paging"},"stateSave":false,"autoWidth":true,"searchDelay":400,"responsive":true,"fixedHeader":false,"select":{"enabled":false,"style":"single"},"buttons":{"enabled":false,"copy":false,"csv":false,"excel":false,"pdf":false,"print":false,"colvis":false},"serverSide":{"enabled":false,"endpoint":""},"language":{"search":"Search:","lengthMenu":"Show _MENU_ entries","info":"Showing _START_ to _END_ of _TOTAL_ entries","emptyTable":"No data available in table","zeroRecords":"No matching records found","paginate":{"first":"First","last":"Last","next":"Next","previous":"Previous"}}}},"datatableStyles":{"type":"object","default":{"search":{"label":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"color":"","bg":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"input":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"normal":{"color":"","bg":{},"transition":0.2,"border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"hover":{"color":"","bg":{},"transition":0.2,"border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"focus":{"color":"","bg":{},"transition":0.2,"border":{},"radius":{"top":"","right":"","bottom":"","left":""}}}},"recordInfo":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"color":"","bg":{},"desktop":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"tablet":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"mobile":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}}},"pageLength":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"color":"","bg":{},"desktop":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"tablet":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"mobile":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}}},"column":[{"typo":"","color":"","bg":{}}],"pagination":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""}},"normal":{"color":"","bg":{},"border":{},"radius":{"top":"","right":"","bottom":"","left":""},"transition":0.2},"hover":{"color":"","bg":{},"border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"active":{"color":"","bg":{},"border":{},"radius":{"top":"","right":"","bottom":"","left":""}}},"buttons":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"desktop":{"padding":{"top":"","left":"","bottom":"","right":""}},"tablet":{"padding":{"top":"","left":"","bottom":"","right":""}},"mobile":{"padding":{"top":"","left":"","bottom":"","right":""}},"normal":{"bg":{},"color":"","border":{},"radius":{},"transition":0.2},"hover":{"bg":{},"color":"","border":{},"radius":{}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Xk=window.wp.primitives
386 -;var Jk=(0,l.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Xk.Path,{d:"M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z"})}),ew=(0,l.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Xk.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z"})}),tw=(0,l.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Xk.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z"})}),nw=(0,l.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Xk.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z"})}),ow=(0,l.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Xk.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})}),iw=(0,l.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Xk.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})});const aw=[{value:"none",label:(0,x.__)("None","b-blocks")},{value:"pageLength",label:(0,x.__)("Page Length","b-blocks")},{value:"search",label:(0,x.__)("Search","b-blocks")},{value:"info",label:(0,x.__)("Info","b-blocks")},{value:"paging",label:(0,x.__)("Paging","b-blocks")}],sw=[{value:"simple",label:"Simple"},{value:"simple_numbers",label:"Simple Numbers"},{value:"full",label:"Full"},{value:"full_numbers",label:"Full Numbers"},{value:"first_last_numbers",label:"First Last Numbers"}],rw=[{value:"single",label:(0,x.__)("Single row","b-blocks")},{value:"multi",label:(0,x.__)("Multi row","b-blocks")},{value:"os",label:(0,x.__)("OS-style (Ctrl/Shift)","b-blocks")}],lw=({attributes:e,setAttributes:t})=>{const{datatables:n}=e,o=e=>t({datatables:{...n,...e}}),i=e=>o({paging:{...n.paging,...e}}),a=e=>o({searching:{...n.searching,...e}}),s=e=>o({ordering:{...n.ordering,...e}}),r=e=>o({layout:{...n.layout,...e}}),c=e=>o({buttons:{...n.buttons,...e}}),d=e=>o({select:{...n.select,...e}}),u=e=>o({serverSide:{...n.serverSide,...e}}),p=e=>o({language:{...n.language,...e}}),h=e=>p({paginate:{...n.language.paginate,...e}}),g=n.buttons.copy||n.buttons.csv||n.buttons.excel||n.buttons.pdf||n.buttons.print||n.buttons.colvis;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("DataTables","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable DataTables","b-blocks"),checked:n.enabled,onChange:e=>o({enabled:e}),help:(0,x.__)("Turn this on to enable DataTables library features for the table.","b-blocks")}),n.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"mt10",title:(0,x.__)("Core Features","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pagination","b-blocks"),checked:n.paging.enabled,onChange:e=>i({enabled:e})}),n.paging.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Default Page Length","b-blocks"),value:n.paging.pageLength,onChange:e=>i({pageLength:Math.max(1,Number(e)||10)}),min:1,max:500}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Pagination Style","b-blocks"),value:n.paging.pagingType,onChange:e=>i({pagingType:e}),options:sw})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Search","b-blocks"),checked:n.searching.enabled,onChange:e=>a({enabled:e})}),n.searching.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Smart Search","b-blocks"),checked:n.searching.smart,onChange:e=>a({smart:e}),help:(0,x.__)("Matches keywords in any order across the row.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Case Insensitive","b-blocks"),checked:n.searching.caseInsensitive,onChange:e=>a({caseInsensitive:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Regex Search","b-blocks"),checked:n.searching.regex,onChange:e=>a({regex:e}),help:(0,x.__)("Let visitors enter regular expressions in the search box.","b-blocks")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Column Sorting","b-blocks"),checked:n.ordering.enabled,onChange:e=>s({enabled:e})}),n.ordering.enabled&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Multi-Column Sort","b-blocks"),checked:n.ordering.multiColumn,onChange:e=>s({multiColumn:e}),help:(0,x.__)("Shift+click column headers to sort by multiple columns simultaneously.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Record Info","b-blocks"),checked:n.info,onChange:e=>o({info:e}),help:(0,x.__)('Shows "Showing X to Y of Z entries" text.',"b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Layout & Toolbar","b-blocks"),initialOpen:!1,children:[(0,l.jsx)("p",{style:{fontSize:11,color:"#757575",marginBottom:8},children:(0,x.__)("Choose which control appears in each toolbar position.","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Top Left","b-blocks"),value:n.layout.topStart,onChange:e=>r({topStart:e}),options:aw}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Top Right","b-blocks"),value:n.layout.topEnd,onChange:e=>r({topEnd:e}),options:aw}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Bottom Left","b-blocks"),value:n.layout.bottomStart,
387 -onChange:e=>r({bottomStart:e}),options:aw}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Bottom Right","b-blocks"),value:n.layout.bottomEnd,onChange:e=>r({bottomEnd:e}),options:aw}),n.buttons.enabled&&g&&(0,l.jsx)(y.Notice,{status:"info",isDismissible:!1,style:{marginTop:8},children:(0,x.__)("Export buttons are placed in an additional row above the toolbar automatically.","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Extensions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Responsive","b-blocks"),checked:n.responsive,onChange:e=>o({responsive:e}),help:(0,x.__)("Collapses overflow columns on small screens with expandable child rows.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fixed Header","b-blocks"),checked:n.fixedHeader,onChange:e=>o({fixedHeader:e}),help:(0,x.__)("Keeps the header row visible when the user scrolls down.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Row Selection","b-blocks"),checked:n.select.enabled,onChange:e=>d({enabled:e})}),n.select.enabled&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Selection Style","b-blocks"),value:n.select.style,onChange:e=>d({style:e}),options:rw}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Export Buttons","b-blocks"),checked:n.buttons.enabled,onChange:e=>c({enabled:e})}),n.buttons.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{style:{fontSize:11,color:"#757575",margin:"4px 0 6px"},children:(0,x.__)("Select which export actions to display:","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Copy","b-blocks"),checked:n.buttons.copy,onChange:e=>c({copy:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("CSV","b-blocks"),checked:n.buttons.csv,onChange:e=>c({csv:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Excel","b-blocks"),checked:n.buttons.excel,onChange:e=>c({excel:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("PDF","b-blocks"),checked:n.buttons.pdf,onChange:e=>c({pdf:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Print","b-blocks"),checked:n.buttons.print,onChange:e=>c({print:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Column Visibility","b-blocks"),checked:n.buttons.colvis,onChange:e=>c({colvis:e})})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Performance","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Save Table State","b-blocks"),checked:n.stateSave,onChange:e=>o({stateSave:e}),help:(0,x.__)("Persists the user's search, sort, and page in localStorage between visits.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Auto Column Width","b-blocks"),checked:n.autoWidth,onChange:e=>o({autoWidth:e})}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Search Delay (ms)","b-blocks"),value:n.searchDelay,onChange:e=>o({searchDelay:Math.max(0,Number(e)||400)}),min:0,max:2e3,help:(0,x.__)("Milliseconds to wait after the user types before triggering a search redraw.","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Server-Side Processing","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Server-Side Processing","b-blocks"),checked:n.serverSide.enabled,onChange:e=>u({enabled:e}),help:(0,x.__)("Sends search, sort, and page requests to a server endpoint. Required for very large datasets.","b-blocks")}),n.serverSide.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("API Endpoint URL","b-blocks"),value:n.serverSide.endpoint,onChange:e=>u({endpoint:e}),placeholder:"https://your-site.com/wp-json/b-blocks/v1/table-data",help:(0,x.__)("Must return the DataTables server-side JSON contract: draw, recordsTotal, recordsFiltered, data.","b-blocks")}),(0,l.jsx)(y.Notice,{status:"warning",isDismissible:!1,children:(0,x.__)("When server-side mode is active, the table's HTML content is ignored — data comes entirely from the endpoint.","b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Language / Labels","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Search Label","b-blocks"),value:n.language.search,onChange:e=>p({search:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Length Menu Label","b-blocks"),value:n.language.lengthMenu,onChange:e=>p({lengthMenu:e}),help:(0,x.__)("Use _MENU_ as placeholder for the page-size dropdown.","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Info Label","b-blocks"),value:n.language.info,onChange:e=>p({info:e}),help:(0,x.__)("Placeholders: _START_, _END_, _TOTAL_","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Empty Table","b-blocks"),value:n.language.emptyTable,onChange:e=>p({emptyTable:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("No Results","b-blocks"),value:n.language.zeroRecords,onChange:e=>p({zeroRecords:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Previous Button","b-blocks"),value:n.language.paginate.previous,onChange:e=>h({previous:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Next Button","b-blocks"),value:n.language.paginate.next,onChange:e=>h({next:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("First Button","b-blocks"),value:n.language.paginate.first,onChange:e=>h({first:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Last Button","b-blocks"),value:n.language.paginate.last,onChange:e=>h({last:e})})]})]})]})},cw=e=>{const{attributes:t,setAttributes:n,updateObj:o,handleToggleHeader:i,handleToggleFooter:a}=e,{content:s,options:r}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table","b-blocks"),children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Cell Border Type","b-blocks"),labelPosition:"edge",value:s?.cellBorderType,onChange:e=>o("content",e,"cellBorderType"),options:[{label:(0,x.__)("Collapse","b-blocks"),value:"collapse"},{label:(0,x.__)("Separate","b-blocks"),value:"separate"}]})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Header","b-blocks"),checked:r?.isEnableHeader,onChange:i}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Footer","b-blocks"),checked:r?.isEnableFooter,onChange:a})]}),(0,l.jsx)(lw,{attributes:t,setAttributes:n})]})},dw=({attributes:e,updateObj:t})=>{const[n,o]=(0,m.useState)("normal"),{styles:i}=e,{body:a}=i;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Body","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n,onChange:e=>{o(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a[n].bg,onChange:e=>t("styles",e,"body",n,"bg")}),"hover"===n&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:a.normal.transition,onChange:e=>t("styles",e,"body","normal","transition"),step:.05,min:0,max:5})]})})},uw=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),{styles:a}=e,{cells:s}=a;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Cells","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:s[n].padding,onChange:e=>t("styles",e,"cells",n,"padding")}),(0,l.jsx)(Oa,{value:s.typography,onChange:e=>t("styles",e,"cells","typography")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),onChange:e=>t("styles",e,"cells","border"),values:s.border}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,
388 -x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:s[n].radius,onChange:e=>t("styles",e,"cells",n,"radius")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Odd Row Text Color","b-blocks"),value:s.oddCell[o].color,onChange:e=>t("styles",e,"cells","oddCell",o,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Odd Row Background","b-blocks"),value:s.oddCell[o].bg,onChange:e=>t("styles",e,"cells","oddCell",o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Even Row Text Color","b-blocks"),value:s.evenCell[o].color,onChange:e=>t("styles",e,"cells","evenCell",o,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Even Row Background","b-blocks"),value:s.evenCell[o].bg,onChange:e=>t("styles",e,"cells","evenCell",o,"bg")}),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:s.oddCell.normal.transition,step:.05,min:0,max:5,onChange:e=>t("styles",e,"cells","oddCell","normal","transition")})]})},pw=({value:e,index:t,updateObj:n})=>{const o=e[t];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color,onChange:e=>n("datatableStyles",e,"column",t,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:o.bg,onChange:e=>n("datatableStyles",e,"column",t,"bg")})]})},hw=({attributes:e,setAttributes:t,updateObj:n,device:o})=>{const[i,a]=(0,m.useState)("normal"),[s,r]=(0,m.useState)("normal"),[c,d]=(0,m.useState)("normal"),{datatableStyles:u}=e,{search:p,recordInfo:h,pageLength:g,pagination:b,buttons:f,column:v}=u,w={typo:"",color:"",bg:{}};return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Data Table Styles","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Column Styles","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{value:u.column,handleAdd:()=>{t({datatableStyles:{...u,column:[...v,w]}})},handleDelete:e=>{t({datatableStyles:{...u,column:v.filter(((t,n)=>n!==e))}})},newItem:w,design:"sortable",itemLabel:"Column",arrKey:"column",title:"title",ItemSettings:pw,handleCopy:e=>{t({datatableStyles:{...u,column:[...v,v[e]]}})},minItem:0,updateObj:n})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Search","b-blocks"),initialOpen:!1,children:[(0,l.jsx)("b",{className:"mt10 mb10",children:(0,x.__)("Label","b-blocks")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.label[o].padding,onChange:e=>n("datatableStyles",e,"search","label",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.label[o].margin,onChange:e=>n("datatableStyles",e,"search","label",o,"margin")}),(0,l.jsx)(Oa,{value:p.label.typo,onChange:e=>n("datatableStyles",e,"search","label","typo")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:p.label.color,onChange:e=>n("datatableStyles",e,"search","label","color")}),(0,l.jsx)(An,{className:"mt10",value:p.label.bg,onChange:e=>n("datatableStyles",e,"search","label","bg")}),(0,l.jsx)("b",{className:"mt10 mb10",children:(0,x.__)("Input Field","b-blocks")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.input[o].padding,onChange:e=>n("datatableStyles",e,"search","input",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.input[o].margin,onChange:e=>n("datatableStyles",e,"search","input",o,"margin")}),(0,l.jsx)(Oa,{value:p.input.typo,onChange:e=>n("datatableStyles",e,"search","input","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>{a(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Focus",value:"focus"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:p.input[i].color,onChange:e=>n("datatableStyles",e,"search","input",i,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:p.input[i].bg,onChange:e=>n("datatableStyles",e,"search","input",i,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:p.input[i].border,onChange:e=>n("datatableStyles",e,"search","input",i,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:p.input[i].radius,onChange:e=>n("datatableStyles",e,"search","input",i,"radius")}),"hover"===i&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:p.input.normal.transition,onChange:e=>n("datatableStyles",e,"search","input","normal","transition")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Record Info","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:h[o].padding,onChange:e=>n("datatableStyles",e,"recordInfo",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:h[o].margin,onChange:e=>n("datatableStyles",e,"recordInfo",o,"margin")}),(0,l.jsx)(Oa,{value:h.typo,onChange:e=>n("datatableStyles",e,"recordInfo","typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:h.color,onChange:e=>n("datatableStyles",e,"recordInfo","color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:h.bg,onChange:e=>n("datatableStyles",e,"recordInfo","bg")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Page Length","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:g[o].padding,onChange:e=>n("datatableStyles",e,"pageLength",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:g[o].margin,onChange:e=>n("datatableStyles",e,"pageLength",o,"margin")}),(0,l.jsx)(Oa,{value:g.typo,onChange:e=>n("datatableStyles",e,"pageLength","typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:g.color,onChange:e=>n("datatableStyles",e,"pageLength","color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:g.bg,onChange:e=>n("datatableStyles",e,"pageLength","bg")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:b[o].padding,onChange:e=>n("datatableStyles",e,"pagination",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:b[o].margin,onChange:e=>n("datatableStyles",e,"pagination",o,"margin")}),(0,l.jsx)(Oa,{value:b.typo,onChange:e=>n("datatableStyles",e,"pagination","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:c,onChange:e=>{d(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]
389 -}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:b[c].color,onChange:e=>n("datatableStyles",e,"pagination",c,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:b[c].bg,onChange:e=>n("datatableStyles",e,"pagination",c,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:b[c].border,onChange:e=>n("datatableStyles",e,"pagination",c,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:b[c].radius,onChange:e=>n("datatableStyles",e,"pagination",c,"radius")}),"hover"===c&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:b.normal.transition,onChange:e=>n("datatableStyles",e,"pagination","normal","transition")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Export Buttons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:f[o].padding,onChange:e=>n("datatableStyles",e,"buttons",o,"padding")}),(0,l.jsx)(Oa,{value:f.typo,onChange:e=>n("datatableStyles",e,"buttons","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>{r(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:f[s].color,onChange:e=>n("datatableStyles",e,"buttons",s,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:f[s].bg,onChange:e=>n("datatableStyles",e,"buttons",s,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:f[s].border,onChange:e=>n("datatableStyles",e,"buttons",s,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:f[s].radius,onChange:e=>n("datatableStyles",e,"buttons",s,"radius")}),"hover"===s&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:f.normal.transition,onChange:e=>n("datatableStyles",e,"buttons","normal","transition")})]})]})})},gw=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),{styles:a}=e,{footer:s}=a;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Footer","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:s.typography,onChange:e=>t("styles",e,"footer","typography")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),value:s.padding[n],onChange:e=>t("styles",e,"footer","padding",n)}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:s[o].color,onChange:e=>t("styles",e,"footer",o,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:s[o].bg,onChange:e=>t("styles",e,"footer",o,"bg")}),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:s.normal.transition,step:.05,min:0,max:5,onChange:e=>t("styles",e,"footer","normal","transition")})]})},mw=e=>{const{attributes:t,device:n,updateObj:o}=e,[i,a]=(0,m.useState)("normal"),{styles:s}=t,{header:r}=s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:r.typography,onChange:e=>o("styles",e,"header","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>{a(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r[i].color,onChange:e=>o("styles",e,"header",i,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:r[i].bg,onChange:e=>o("styles",e,"header",i,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[i].padding[n],onChange:e=>o("styles",e,"header",i,"padding",n)}),"hover"===i&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:r.normal.transition,step:.05,min:0,max:5,onChange:e=>o("styles",e,"header","transition")})]})},bw=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),fw=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),xw=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),yw=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",children:(0,l.jsx)("path",{d:"M20 3H4C2.9 3 2 3.9 2 5v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H4V5h16zM8 19H4v-3h4v3zm0-5H4v-3h4v3zm6 5h-4v-3h4v3zm0-5h-4v-3h4v3zm6 5h-4v-3h4v3zm0-5h-4v-3h4v3z"})}),vw=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i,device:a}=e,{styles:s}=o,{content:r}=s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table Style","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.width[a],onChange:e=>i("styles",e,"content","width",a)})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Alignment ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:r.align[a],onChange:e=>i("styles",e,"content","align",a),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(bw,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(fw,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(xw,{style:{rotate:"-90deg"}})})]})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","border"),value:r[t].border,onChange:e=>i("styles",e,"content",t,"border")}),(0,l.jsx)(k,{className:"mt10",
390 -label:(0,x.__)("Border Radius","b-blocks"),values:r[t].radius[a],onChange:e=>i("styles",e,"content",t,"radius",a)}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:r.normal.transition,step:.05,min:0,max:5,onChange:e=>i("styles",e,"content","normal","transition")})]})},kw=e=>{const{attributes:t}=e,{datatables:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vw,{...e}),(0,l.jsx)(mw,{...e}),(0,l.jsx)(dw,{...e}),(0,l.jsx)(uw,{...e}),(0,l.jsx)(gw,{...e}),n.enabled&&(0,l.jsx)(hw,{...e})]})},ww=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],_w=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bblockswp.com/docs/"}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:ww,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(cw,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(kw,{...e})})]})})]})}),Cw=({attributes:e,id:t})=>{const{content:n,styles:o,datatableStyles:i}=e,{content:a,header:s,body:r,cells:c,footer:d}=o,{column:u,search:p,recordInfo:h,pageLength:g,pagination:m,buttons:b}=i,f=`#${t}`,x=`${f} .b-blocks-table-main-container`,y=`${x} :where(.wp-block-b-blocks-table-head)`,v=`${x} .wp-block-b-blocks-table-body`,k=`${x} :where(.wp-block-b-blocks-table-footer)`,w=`${v} .wp-block-b-blocks-table-row`,_=`${w} .wp-block-b-blocks-table-cell`,C=`${x} :where(.b-blocks-table-head-cell)`,j=`${x} :where(.b-blocks-table-footer-cell)`,$=`${f} .dt-container .dt-layout-row .dt-layout-cell`,S=`${$} .dt-search`,T=`${$} .dt-length`,N=`${$} .dt-info`,M=`${$}>.dt-paging>nav>.dt-paging-button`,L=`${$} .dt-buttons .dt-button`,P=`${x}>colgroup>col`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${ps("",c.typography).googleFontLink}\n\t\t${ps("",s.typography).googleFontLink}\n\t\t${ps("",p.label.typo).googleFontLink}\n\t\t${ps("",p.input.typo).googleFontLink}\n\t\t${ps("",h.typo).googleFontLink}\n\t\t${ps("",g.typo).googleFontLink}\n\t\t${ps("",m.typo).googleFontLink}\n\t\t${ps("",b.typo).googleFontLink}\n\n\t\t${ps(_,c.typography).styles}\n\t\t${ps(`${C} .wp-block-paragraph`,s.typography).styles}\n\t\t${ps(`${S}>label`,p.label.typo).styles}\n\t\t${ps(`${S}>.dt-input`,p.input.typo).styles}\n\t\t${ps(`${N}`,h.typo).styles}\n\t\t${ps(`${T}>label`,g.typo).styles}\n\t\t${ps(`${M}`,m.typo).styles}\n\t\t${ps(`${L}`,b.typo).styles}\n\n\t\t${f}{\n\t\t\t${ns("justify-content",a.align.desktop)}\n\t\t}\n\n\t\t${x}{\n\t\t\t${ns("width",a.width.desktop)}\n\t\t\t${ns("border-radius",hs(a.normal.radius.desktop))}\n\t\t}\n\t\t\t\n\t\t${x}, ${x} .wp-block-b-blocks-table-cell{\n\t\t\tborder-collapse: ${n.cellBorderType};\n\t\t\t${"separate"===n.cellBorderType?"border-spacing: 2px;":""}\n\t\t\t${as(a.normal.border)}\n\t\t}\n\n\t\t${x}:hover,\n\t\t${x}:hover .wp-block-b-blocks-table-cell{\n\t\t\t${as(a.hover.border)}\n\t\t\tborder-collapse: ${n.cellBorderType};\n\t\t\t${"separate"===n.cellBorderType?"border-spacing: 2px;":""}\n\t\t}\n\n\t\t${y}>.wp-block-b-blocks-table-row {\n\t\t\t${os(s.normal.bg)}\n\t\t\ttransition:all ${s.normal.transition}s ease-in-out;\n\t\t}\n\t\t${y}>.wp-block-b-blocks-table-row:hover{\n\t\t\t${os(s.hover.bg)}\n\t\t}\n\n\t\t${C}{\n\t\t\t${ns("color",s.normal.color)}\n\t\t\t${ns("padding",hs(s.normal.padding.desktop))}\n\t\t}\n\n\t\t${C}:hover{\n\t\t\t${ns("color",s.hover.color)}\n\t\t\t${ns("padding",hs(s.hover.padding.desktop))}\n\t\t}\n\n\t\t${v}{\n\t\t\t${os(r.normal.bg)}\n\t\t\ttransition:all ${r.normal.transition}s ease-in-out;\n\t\t}\n\n\t\t${v}:hover{\n\t\t\t${os(r.hover.bg)}\n\t\t}\n\n\t\t${_}{\n\t\t\t${as(_.border)}\n\t\t\t${ns("padding",hs(c.desktop.padding))}\n\t\t\t${ns("border-radius",hs(c.desktop.radius))}\n\t\t\ttransition: all ${c.evenCell.normal.transition}s ease-in-out;\n\t\t\t\n\t\t}\n\n\t\t${w}:nth-of-type(even){\n\t\t\t${os(c.evenCell.normal.bg)}\n\t\t}\n\t\t\n\t\t${w}:nth-of-type(even):hover{\n\t\t\t${os(c.evenCell.hover.bg)}\n\t\t}\n\n\t\t${w}:nth-of-type(odd){\n\t\t\t${os(c.oddCell.normal.bg)}\n\t\t}\n\t\t${w}:nth-of-type(odd):hover{\n\t\t\t${os(c.oddCell.hover.bg)}\n\t\t}\n\n\t\t${w}:nth-of-type(even) .wp-block-b-blocks-table-cell{\n\t\t\t${ns("color",c.evenCell.normal.color)}\n\t\t}\n\t\t\n\t\t${w}:nth-of-type(even):hover .wp-block-b-blocks-table-cell{\n\t\t\t${ns("color",c.evenCell.hover.color)}\n\t\t}\n\n\t\t${w}:nth-of-type(odd) .wp-block-b-blocks-table-cell{\n\t\t\t${ns("color",c.oddCell.normal.color)}\n\t\t}\n\t\t${w}:nth-of-type(odd):hover .wp-block-b-blocks-table-cell{\n\t\t\t${ns("color",c.oddCell.hover.color)}\n\t\t}\n\n\t\t${k}>.wp-block-b-blocks-table-row{\n\t\t\t${os(d.normal.bg)}\n\t\t}\n\t\t${k}>.wp-block-b-blocks-table-row:hover{\n\t\t\t${os(d.hover.bg)}\n\t\t}\n\t\t${j}{\n\t\t\t${ns("padding",hs(d.padding.desktop))}\n\t\t\t${ns("color",d.normal.color)}\n\t\t}\n\t\t${j}:hover{\n\t\t\t${ns("color",d.hover.color)}\n\t\t}\n\n\t\t${S}>label{\n\t\t\t${ns("color",p.label.color)}\n\t\t\t${os(p.label.bg)}\n\t\t\t${ns("padding",hs(p.label.desktop.padding))}\n\t\t\t${ns("margin",hs(p.label.desktop.margin))}\n\t\t}\n\n\t\t${S}>.dt-input{\n\t\t\t\t${ns("padding",hs(p.input.desktop.padding))}\n\t\t\t\t${ns("margin",hs(p.input.desktop.margin))}\n\t\t\t\t${ns("color",p.input.normal.color)}\n\t\t\t\t${os(p.input.normal.bg)}\n\t\t\t\t${as(p.input.normal.border)}\n\t\t\t\t${ns("border-radius",hs(p.input.normal.radius))}\n\t\t\t\ttransition: all ${p.input.normal.transition}s ease-in-out;\n\t\t\t\t\n\t\t}\n\n\t\t${S}>.dt-input:hover{\n\t\t\t${ns("color",p.input.hover.color)}\n\t\t\t${os(p.input.hover.bg)}\n\t\t\t${as(p.input.hover.border)}\n\t\t\t${ns("border-radius",hs(p.input.hover.radius))}\n\t\t}\n\n\t\t${S}>.dt-input:focus{\n\t\t\t${ns("color",p.input.focus.color)}\n\t\t\t${os(p.input.focus.bg)}\n\t\t\t${as(p.input.focus.border)}\n\t\t\t${ns("border-radius",hs(p.input.focus.radius))}\n\t\t}\n\n\t\t${N}{\n\t\t\t${ns("padding",hs(h.desktop.padding))}\n\t\t\t${ns("margin",hs(h.desktop.margin))}\n\t\t\t${ns("color",h.color)}\n\t\t\t${os(h.bg)}\n\t\t}\n\n\t\t${T}>label{\n\t\t\t${ns("color",g.color)}\n\t\t\t${os(g.bg)}\n\t\t\t${ns("padding",hs(g.desktop.padding))}\n\t\t\t${ns("margin",hs(g.desktop.margin))}\n\t\t}\n\n\t\t${M}{\n\t\t\t${ns("padding",hs(m.desktop.padding))}\n\t\t\t${ns("margin",hs(m.desktop.margin))}\n\t\t\t${ns("color",m.normal.color)}\n\t\t\t${os(m.normal.bg)}\n\t\t\t${as(m.normal.border)}\n\t\t\t${ns("border-radius",hs(m.normal.radius))}\n\t\t\ttransition: all ${m.normal.transition}s ease-in-out;\n\t\t}\n\t\t${M}:hover{\n\t\t\t${ns("color",m.hover.color)}\n\t\t\t${os(m.hover.bg)}\n\t\t\t${as(m.hover.border)}\n\t\t\t${ns("border-radius",hs(m.hover.radius))}\n\t\t}\n\t\t${M}.current{\n\t\t\t${ns("color",m.active.color)}\n\t\t\t${os(m.active.bg)}\n\t\t\t${as(m.active.border)}\n\t\t\t${ns("border-radius",hs(m.active.radius))}\n\t\t}\n\n\t\t${L}{\n\t\t\t${ns("padding",hs(b.desktop.padding))}\n\t\t\t${ns("color",b.normal.color)}\n\t\t\t${os(b.normal.bg)}\n\t\t\t${as(b.normal.border)}\n\t\t\t${ns("border-radius",hs(b.normal.radius))}\n\t\t\ttransition: all ${b.normal.transition}s ease-in-out;\n\t\t}\n\t\t${L}:hover{\n\t\t\t${ns("color",b.hover.color)}\n\t\t\t${os(b.hover.bg)}\n\t\t\t${as(b.hover.border)}\n\t\t\t${ns("border-radius",hs(b.hover.radius))}\n\t\t}\n\n\t\t${u.map(((e,t)=>`\n\t\t\t${P}[data-dt-column="${t}"]{\n\t\t\t\t${ns("color",e.color)}\n\t\t\t\t${os(e.bg)}\n\t\t\t}\n\t\t`)).join("")}\n\n\t`}})},jw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{device:n()?.toLowerCase(),innerBlocks:o(t)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,innerBlocks:a}=e,[r,c]=(0,m.useState)(3),[d,u]=(0,m.useState)(3),[g,b]=(0,m.useState)(!1),x=(0,m.useRef)(null),v=(0,m.useRef)(null),k=(0,m.useRef)(null);(0,m.useEffect)((()=>{
391 -if(!g)return;let e=!1;return(async()=>{const n=t.datatables,o=[s.e(5668).then(s.bind(s,5668))];let i=-1,a=-1,r=-1;n?.responsive&&o.push(Promise.all([s.e(5668),s.e(417)]).then(s.bind(s,417))),n?.fixedHeader&&o.push(Promise.all([s.e(5668),s.e(7917)]).then(s.bind(s,7917))),n?.buttons?.enabled&&(o.push(Promise.all([s.e(5668),s.e(2967)]).then(s.t.bind(s,2967,23))),(n.buttons.csv||n.buttons.excel||n.buttons.pdf)&&o.push(Promise.all([s.e(5668),s.e(7837),s.e(8486)]).then(s.t.bind(s,8486,23))),n.buttons.print&&o.push(Promise.all([s.e(5668),s.e(7837),s.e(897)]).then(s.t.bind(s,897,23))),n.buttons.colvis&&o.push(Promise.all([s.e(5668),s.e(7837),s.e(9908)]).then(s.t.bind(s,9908,23))),n.buttons.excel&&(i=o.length,o.push(s.e(1710).then(s.t.bind(s,1710,23)))),n.buttons.pdf&&(a=o.length,o.push(s.e(7164).then(s.t.bind(s,7164,23))),r=o.length,o.push(s.e(7108).then(s.t.bind(s,7108,23))))),n?.select?.enabled&&o.push(Promise.all([s.e(5668),s.e(2877)]).then(s.bind(s,2877)));const l=await Promise.all(o);if(e)return;const[{default:c}]=l;if(i>=0&&c.Buttons.jszip(l[i].default),a>=0){const e=l[a].default,t=l[r];e.vfs=t?.pdfMake?.vfs??t?.default?.pdfMake?.vfs??t?.default??t,c.Buttons.pdfMake(e)}const d=(()=>{const e=x.current?.querySelector("table");if(!e)return null;const t=e.cloneNode(!0);t.className="b-blocks-table-main-container",t.querySelectorAll('style, .block-list-appender, .block-editor-block-appender, [class*="open-parent-settings"], .components-popover').forEach((e=>e.remove())),t.querySelectorAll("td, th").forEach((e=>{const t=e.querySelector(".block-editor-block-list__layout");t&&(t.querySelectorAll(".block-list-appender, .block-editor-block-appender").forEach((e=>e.remove())),e.innerHTML=t.innerHTML)}));const n=["contenteditable","data-block","data-type","data-title","tabindex","aria-label","aria-multiline","aria-autocomplete"];return t.querySelectorAll("*").forEach((e=>{n.forEach((t=>e.removeAttribute(t)));const t=e.getAttribute("class");t&&e.setAttribute("class",t.split(/\s+/).filter((e=>e&&"wp-block"!==e&&!e.startsWith("block-editor")&&!e.startsWith("is-selected")&&!e.startsWith("is-hovered")&&!e.startsWith("is-highlighted")&&!e.startsWith("has-child-selected"))).join(" "))})),t})();if(!d||e)return;v.current.innerHTML="",v.current.appendChild(d);const u=((e,t=!1)=>{if(!e?.enabled)return null;const n={paging:e.paging.enabled,searching:e.searching.enabled,ordering:e.ordering.enabled,info:e.info,autoWidth:e.autoWidth,stateSave:!t&&e.stateSave,searchDelay:e.searchDelay};e.paging.enabled&&(n.pageLength=e.paging.pageLength,n.pagingType=e.paging.pagingType,n.lengthMenu=[[5,10,25,50,100,-1],["5","10","25","50","100","All"]]),e.searching.enabled&&(n.search={smart:e.searching.smart,regex:e.searching.regex,caseInsensitive:e.searching.caseInsensitive}),e.ordering.enabled&&(n.orderMulti=e.ordering.multiColumn),e.responsive&&(n.responsive=!0),e.fixedHeader&&(n.fixedHeader=!0),e.select?.enabled&&(n.select={style:e.select.style}),e.language&&(n.language={...e.language});const o={};if(["topStart","topEnd","bottomStart","bottomEnd"].forEach((t=>{const n=e.layout[t];o[t]=n&&"none"!==n?n:null})),e.buttons?.enabled){const t=(i=e.buttons,["copy","csv","excel","pdf","print","colvis"].filter((e=>i[e])));t.length&&(o.top2Start={buttons:t})}var i;return n.layout=o,e.serverSide?.enabled&&e.serverSide?.endpoint&&(n.serverSide=!0,n.ajax=e.serverSide.endpoint),n})(n,!0);u&&(k.current=new c(d,u),d.style.setProperty("border-collapse",t?.content?.cellBorderType||"collapse","important"))})().catch((e=>console.warn("b-blocks/table preview:",e))),()=>{e=!0,k.current&&(k.current.destroy(),k.current=null),v.current&&(v.current.innerHTML="")}}),[g,t.datatables]);const{options:w}=t,_=(e="td",t="")=>Array.from({length:d},(()=>["b-blocks/table-cell",{tagName:e,className:t}])),C=Array.from({length:r},(()=>["b-blocks/table-row",{},_("td")])),j=[w.isEnableHeader?["b-blocks/table-head",{},[["b-blocks/table-row",{},_("th","b-blocks-table-head-cell")]]]:null,["b-blocks/table-body",{},C],w.isEnableFooter?["b-blocks/table-footer",{},[["b-blocks/table-row",{},_("td","b-blocks-table-footer-cell")]]]:null].filter(Boolean),$=(0,h.useBlockProps)(),S=(0,h.useInnerBlocksProps)({tagName:"table",className:"b-blocks-table-main-container"},{template:j,templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-body","b-blocks/table-head","b-blocks/table-footer"]}),T=(0,f.useSelect)((e=>e("core/block-editor").getBlocks(o)),[o]),{insertBlock:N,removeBlock:M,replaceInnerBlocks:L}=(0,f.useDispatch)("core/block-editor"),P=T.find((e=>"b-blocks/table-body"===e.name)),E=T.find((e=>"b-blocks/table-head"===e.name)),A=T.find((e=>"b-blocks/table-footer"===e.name)),B=P?.innerBlocks[0]?.innerBlocks?.length||d,I=(e="td",t="")=>{const n=Array.from({length:B},(()=>(0,p.createBlock)("b-blocks/table-cell",{tagName:e,className:t})));return(0,p.createBlock)("b-blocks/table-row",{},n)},O=[{title:"Add Top Row",icon:Jk,onClick:()=>{P&&N(I("td"),0,P.clientId,!1)}},{title:"Insert Bottom Row",icon:ew,onClick:()=>{P&&N(I("td"),P.innerBlocks.length,P.clientId,!1)}},{title:"Insert Left Column",icon:tw,onClick:()=>{T.forEach((e=>{e.innerBlocks.forEach((e=>{const t=e.innerBlocks[0]?.attributes?.tagName||"td";N((0,p.createBlock)("b-blocks/table-cell",{tagName:t}),0,e.clientId,!1)}))}))}},{title:"Add Right Column",icon:nw,onClick:()=>{T.forEach((e=>{e.innerBlocks.forEach((e=>{const t=e.innerBlocks[e.innerBlocks.length-1],n=t?.attributes?.tagName||"td";N((0,p.createBlock)("b-blocks/table-cell",{tagName:n}),e.innerBlocks.length,e.clientId,!1)}))}))}}],R=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_w,{attributes:t,setAttributes:n,updateObj:R,device:i,handleToggleHeader:e=>{R("options",e,"isEnableHeader"),!e&&E?M(E.clientId,!1):e&&!E&&N((0,p.createBlock)("b-blocks/table-head",{},[I("th","b-blocks-table-head-cell")]),0,o,!1)},handleToggleFooter:e=>{R("options",e,"isEnableFooter"),!e&&A?M(A.clientId,!1):e&&!A&&N((0,p.createBlock)("b-blocks/table-footer",{},[I("td","b-blocks-table-footer-cell")]),T.length,o,!1)}}),(0,l.jsx)(Cw,{attributes:t,id:`block-${o}`}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsxs)(y.ToolbarGroup,{children:[(0,l.jsx)(y.DropdownMenu,{icon:(0,l.jsx)(yw,{}),label:"Table Actions",controls:O,className:"b-blocks-table-action-menu"}),(0,l.jsx)(y.ToolbarButton,{icon:g?ow:iw,label:g?"Exit Preview":"Preview DataTables",onClick:()=>b((e=>!e)),isActive:g,disabled:!t.datatables?.enabled||0===a.length})]})}),(0,l.jsxs)("div",{...$,children:[0===a.length&&(0,l.jsxs)("div",{className:"b-blocks-table-input-form-wrapper",children:[(0,l.jsxs)("div",{className:"b-blocks-table-input-form-title-wrapper",children:[Tl,(0,l.jsx)("h2",{children:"Table"})]}),(0,l.jsx)("p",{className:"b-blocks-table-input-form-description",children:"Start creating a custom table for your content"}),(0,l.jsxs)("div",{className:"b-blocks-table-input-field-wrapper",children:[(0,l.jsxs)("div",{className:"b-blocks-table-row-column-field",children:[(0,l.jsx)("span",{children:"Rows"}),(0,l.jsx)(y.__experimentalNumberControl,{value:r,onChange:e=>c(e)})]}),(0,l.jsxs)("div",{className:"b-blocks-table-row-column-field",children:[(0,l.jsx)("span",{children:"Columns"}),(0,l.jsx)(y.__experimentalNumberControl,{value:d,onChange:e=>u(e)})]})]}),(0,l.jsxs)("div",{className:"b-blocks-table-input-field-checkbox-wrapper",children:[(0,l.jsx)(y.CheckboxControl,{label:"Include Header",checked:w.isEnableHeader,onChange:e=>R("options",e,"isEnableHeader")}),(0,l.jsx)(y.CheckboxControl,{label:"Include Footer",checked:w.isEnableFooter,onChange:e=>R("options",e,"isEnableFooter")})]}),(0,l.jsx)(Bn,{onClick:()=>{const e=Number(d)||1,t=Number(r)||1,n=(t,n="")=>Array.from({length:e},(()=>(0,p.createBlock)("b-blocks/table-cell",{tagName:t,...n&&{className:n}}))),i=[w.isEnableHeader?(0,p.createBlock)("b-blocks/table-head",{},[(0,p.createBlock)("b-blocks/table-row",{},n("th","b-blocks-table-head-cell"))]):null,(0,p.createBlock)("b-blocks/table-body",{},Array.from({length:t},(()=>(0,
392 -p.createBlock)("b-blocks/table-row",{},n("td"))))),w.isEnableFooter?(0,p.createBlock)("b-blocks/table-footer",{},[(0,p.createBlock)("b-blocks/table-row",{},n("td","b-blocks-table-footer-cell"))]):null].filter(Boolean);L(o,i,!1)},children:"Generate Table"})]}),a.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:x,style:{display:g?"none":void 0},children:(0,l.jsx)("table",{...S})}),g&&(0,l.jsx)("div",{ref:v,className:"b-blocks-dt-editor-preview"})]})]})]})}));Ll(Zk.name)&&(0,p.registerBlockType)(Zk,{icon:Tl,edit:jw,save:h.InnerBlocks.Content});const $w=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-head","version":"1.0.0","title":"Table Head","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table"],"keywords":["key1","key2","key3","key4","key5"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"settings":{"type":"object","default":{"rowSpan":1,"colSpan":1}},"styles":{"type":"object","default":{"alignment":{"desktop":"","tablet":"","mobile":""},"normal":{"bg":""},"hover":{"bg":"","transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Sw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})})})})},Tw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${o} {\n\t\t\t${ns("text-align",n.alignment.desktop)}\n\t\t\t${os(n.normal.bg)}\n\t\t\ttransition: background ${n.hover.transition}s ease-in-out;\n\t\t}\n\t\t${o}:hover {\n\t\t\t${os(n.hover.bg)}\n\t\t}\n\t`}})},Nw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),a=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:a}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,parentClientId:a}=e,{settings:s}=t,r=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:"thead"}),{template:[["b-blocks/table-row",{},[["b-blocks/table-cell",{}],["b-blocks/table-cell",{}],["b-blocks/table-cell",{}],["b-blocks/table-cell",{}]]]],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-row"]}),c=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Sw,{attributes:t,setAttributes:n,device:i,updateObj:c,parentClientId:a}),(0,l.jsx)(Tw,{attributes:t,id:`block-${o}`}),(0,l.jsx)("thead",{...r,colSpan:s.colSpan,rowSpan:s.rowSpan})]})}));Ll("b-blocks/table")&&(0,p.registerBlockType)($w,{icon:Tl,edit:Nw,save:h.InnerBlocks.Content});const Mw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-body","version":"1.0.0","title":"Table Body","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table"],"keywords":["table","body","table-body","b-blocks","b-table-body"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"styles":{"type":"object","default":{"normal":{"bg":{}},"hover":{"bg":{},"transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Lw=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i}=e,{styles:a}=o;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Style","b-blocks"),children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a[t].bg,onChange:e=>i("styles",e,t,"bg")}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:a.hover.transition,step:.05,min:0,max:5,onChange:e=>i("styles",e,"hover","transition")})]})]})},Pw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})}),(0,l.jsx)(Lw,{...e})]})})},Ew=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${o}{\n\t\t\t\t${os(n.normal.bg)}\n\t\t\t\ttransition:background ${n.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${o}:hover{\n\t\t\t\t${os(n.hover.bg)}\n\t\t\t}\n\n\t`}})},Aw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),a=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:a}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,parentClientId:a}=e,s=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:"tbody"}),{template:[["b-blocks/table-row",{}],["b-blocks/table-row",{}],["b-blocks/table-row",{}]],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-row"]}),r=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Pw,{attributes:t,setAttributes:n,updateObj:r,device:i,parentClientId:a}),(0,l.jsx)(Ew,{attributes:t,id:`block-${o}`}),(0,l.jsx)("tbody",{...s})]})}));Ll("b-blocks/table")&&(0,p.registerBlockType)(Mw,{icon:Tl,edit:Aw,save:h.InnerBlocks.Content});const Bw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-row","version":"1.0.0","title":"Table Row","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table-body"],"keywords":["table","row","table-row","b-blocks","b-table-row"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"styles":{"type":"object","default":{"normal":{"bg":{}},"hover":{"bg":{},"transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Iw=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i}=e,{styles:a}=o;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Style","b-blocks"),children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a[t].bg,onChange:e=>i("styles",e,t,"bg")}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:a.hover.transition,step:.05,min:0,
393 -max:5,onChange:e=>i("styles",e,"hover","transition")})]})]})},Ow=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})}),(0,l.jsx)(Iw,{...e})]})})},Rw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${o}{\n\t\t\t\t${os(n.normal.bg)}\n\t\t\t\ttransition:background ${n.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${o}:hover{\n\t\t\t\t${os(n.hover.bg)}\n\t\t\t}\n\n\t`}})},zw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{device:n()?.toLowerCase(),innerBlocks:o(t)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=(0,Qa.useRef)(null),[s,r]=(0,Qa.useState)(!1);(0,Qa.useEffect)((()=>{r(!0)}),[]);const{insertBlock:c,removeBlock:d}=(0,f.useDispatch)("core/block-editor"),{blockIndex:u,parentClientId:g,parentBlockName:m,columnCount:b}=(0,f.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlock:i,getBlockName:a}=e("core/block-editor"),s=n(o),r=i(o);return{blockIndex:t(o),parentClientId:s,parentBlockName:a(s),columnCount:r?.innerBlocks?.length||4}}),[o]),x="b-blocks/table-body"===m,v=()=>{const e=Array.from({length:b},(()=>(0,p.createBlock)("b-blocks/table-cell",{})));return(0,p.createBlock)("b-blocks/table-row",{},e)},k=(0,h.useBlockProps)({tagName:"tr"}),_=(0,h.useInnerBlocksProps)(k,{template:[["b-blocks/table-cell",{}],["b-blocks/table-cell",{}],["b-blocks/table-cell",{}]],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-cell"]}),C=(0,w.useMergeRefs)([a,_.ref]),j=[{title:"Add Row Above",icon:"table-row-before",onClick:()=>c(v(),u,g,!0)},{title:"Add Row Below",icon:"table-row-after",onClick:()=>c(v(),u+1,g,!0)},{title:"Delete Row",icon:"trash",onClick:()=>d(o)}],$=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ow,{attributes:t,setAttributes:n,updateObj:$,device:i,parentClientId:g}),(0,l.jsx)(Rw,{attributes:t,id:`block-${o}`}),(0,l.jsx)("tr",{..._,ref:C}),s&&a.current&&x&&(0,l.jsx)(y.Popover,{anchor:a.current,placement:"right",noArrow:!0,animate:!1,flip:!1,resize:!1,focusOnMount:!1,className:"b-blocks-row-action-popover",children:(0,l.jsx)(y.DropdownMenu,{icon:"ellipsis",label:"Row Actions",controls:j,className:"b-blocks-row-action-menu"})})]})}));Ll(Bw.name)&&(0,p.registerBlockType)(Bw,{icon:Tl,edit:zw,save:h.InnerBlocks.Content});const Dw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-cell","version":"1.0.0","title":"Table Cell","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table-row"],"keywords":["key1","key2","key3","key4","key5"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"tagName":{"type":"string","default":"td"},"settings":{"type":"object","default":{"rowSpan":1,"colSpan":1}},"styles":{"type":"object","default":{"alignment":{"desktop":"","tablet":"","mobile":""},"normal":{"bg":""},"hover":{"bg":"","transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Fw=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Hw=[{label:"Left",value:"left",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"right",icon:"align-right"}],Ww=e=>{const{attributes:t,updateObj:n,device:o}=e,{settings:i,styles:a}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table Cell","b-blocks"),children:[(0,l.jsxs)(y.Flex,{align:"center",justify:"space-between",children:[(0,l.jsx)(v,{className:"",children:"Alignment"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{className:"mt10",value:a.alignment[o],onChange:e=>n("styles",e,"alignment",o),options:Hw,isIcon:!0,size:"default"}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Row Span","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i.rowSpan,onChange:e=>n("settings",e,"rowSpan")}),(0,l.jsx)(y.RangeControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Column Span","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i.colSpan,onChange:e=>n("settings",e,"colSpan")})]})]})},Uw=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i}=e,{styles:a}=o;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Style","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a[t].bg,onChange:e=>i("styles",e,t,"bg")}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:a.hover.transition,step:.05,min:0,max:5,onChange:e=>i("styles",e,"hover","transition")})]})})},Gw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Fw,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ww,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Uw,{...e})})]})})]})})},Vw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${o} {\n\t\t\t${ns("display","table-cell")}\n\t\t\t${ns("text-align",n.alignment.desktop)}\n\t\t\t${os(n.normal.bg)}\n\t\t\ttransition: background ${n.hover.transition}s ease-in-out;\n\t\t}\n\t\t${o}:hover {\n\t\t\t${os(n.hover.bg)}\n\t\t}\n\t`}})},qw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),a=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:a}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,innerBlocks:a,parentClientId:s}=e,{settings:r,tagName:c="td",className:d}=t,u=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:c,className:d}),{template:[["core/paragraph",{placeholder:"Type / to choose a block"}]],templateLock:!1,renderAppender:a?.length>0?void 0:h.InnerBlocks.ButtonBlockAppender,__experimentalDirectInsert:!1}),p=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Gw,{attributes:t,setAttributes:n,device:i,updateObj:p,clientId:o,parentClientId:s}),(0,l.jsx)(Vw,{attributes:t,id:`block-${o}`}),(0,l.jsx)(c,{...u,colSpan:r?.colSpan,rowSpan:r.rowSpan})]})}));Ll("b-blocks/table")&&(0,p.registerBlockType)(Dw,{icon:Tl,edit:qw,save:h.InnerBlocks.Content})
394 -;const Yw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-footer","version":"1.0.0","title":"Table Footer","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table"],"keywords":["key1","key2","key3","key4","key5"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"settings":{"type":"object","default":{"rowSpan":1,"colSpan":1}},"styles":{"type":"object","default":{"alignment":{"desktop":"","tablet":"","mobile":""},"normal":{"bg":""},"hover":{"bg":"","transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Kw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})})})})},Qw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${o} {\n\t\t\t${ns("text-align",n.alignment.desktop)}\n\t\t\t${os(n.normal.bg)}\n\t\t\ttransition: background ${n.hover.transition}s ease-in-out;\n\t\t}\n\t\t${o}:hover {\n\t\t\t${os(n.hover.bg)}\n\t\t}\n\t`}})},Zw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),a=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:a}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,parentClientId:a}=e,{settings:s}=t,r=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:"tfoot"}),{template:[],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-row"]}),c=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Kw,{attributes:t,setAttributes:n,device:i,updateObj:c,parentClientId:a}),(0,l.jsx)(Qw,{attributes:t,id:`block-${o}`}),(0,l.jsx)("tfoot",{...r,colSpan:s.colSpan,rowSpan:s.rowSpan})]})}));Ll("b-blocks/table")&&(0,p.registerBlockType)(Yw,{icon:Tl,edit:Zw,save:h.InnerBlocks.Content});const Xw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/divider","title":"Divider","category":"bBlocks","description":"Add a customizable inline divider between paragraphs and sections. Choose a plain line, centered icon, or text label, with options for line style, color, thickness, width, alignment, and spacing.","keywords":["divider","separator","hr","line","rule","horizontal rule","or","section divider"],"textdomain":"b-blocks","attributes":{"type":{"type":"string","default":"line"},"layout":{"type":"object","default":{"alignment":"center","width":"100%"}},"line":{"type":"object","default":{"style":"solid","color":"#cccccc","width":"2px"}},"icon":{"type":"object","default":{"svg":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 576 512\\" fill=\\"currentColor\\"><path d=\\"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z\\"/></svg>","size":"16px","color":"","bg":{"type":"solid","color":""},"padding":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"borderRadius":{"top":"50px","right":"50px","bottom":"50px","left":"50px"}}},"text":{"type":"object","default":{"content":"OR","color":"","bg":{"type":"solid","color":""},"typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":600,"textTransform":"none"},"padding":{"top":"4px","right":"12px","bottom":"4px","left":"12px"}}},"spacing":{"type":"object","default":{"top":"24px","right":"","bottom":"24px","left":""}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true,"className":true,"customClassName":true,"spacing":{"margin":false,"padding":false}},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css"],"viewScript":"file:./view.js","render":"file:./render.php"}'),Jw=({attributes:e,id:t,isBackend:n=!1})=>{const{layout:o={},line:i={},icon:a={},text:s={},spacing:r={},advanced:c}=e,d=i.color||"#cccccc",u=a.color||d,p=s.color||d,h=`${i.width||"2px"} ${i.style||"solid"} ${d}`,g=`#${t} .b-blocks-divider`,m=`${g} .b-blocks-divider-inner`,b=`${g} .b-blocks-divider-line`,f=`${g} .b-blocks-divider-icon`,x=`${g} .b-blocks-divider-text`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",s.typography).googleFontLink}\n\t\t\t${g}{\n\t\t\t\t${ns("margin",hs(r))}\n\t\t\t}\n\t\t\t${m}{\n\t\t\t\tmax-width: ${o.width||"100%"};\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\tborder-top: ${h};\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\tcolor: ${u};\n\t\t\t\tfont-size: ${a.size||"16px"};\n\t\t\t\t${ns("padding",hs(a.padding))}\n\t\t\t\t${ns("border-radius",hs(a.borderRadius))}\n\t\t\t\t${os(a.bg)}\n\t\t\t}\n\t\t\t${f}>svg{\n\t\t\t\tfill: ${u};\n\t\t\t\t${ns("height",a.size)}\n\t\t\t\t${ns("width",a.size)}\n\t\t\t}\n\t\t\t${ps(x,s.typography).styles}\n\t\t\t${x}{\n\t\t\t\tcolor: ${p};\n\t\t\t\t${ns("padding",hs(s.padding))}\n\t\t\t\t${os(s.bg)}\n\t\t\t}\n\t\t\t${_s(t,c,n,!1)}\n\t\t\t`}})},e_=["line","icon","text"],t_=["solid","dashed","dotted","double"],n_=["left","center","right"],o_=({attributes:e,textSlot:t=null})=>{
395 -const{type:n="line",layout:o={},line:i={},icon:a={},text:s={}}=e,r=e_.includes(n)?n:"line",c=["b-blocks-divider",`b-blocks-divider--${r}`,`b-blocks-divider-style--${t_.includes(i.style)?i.style:"solid"}`,`b-blocks-divider-align--${n_.includes(o.alignment)?o.alignment:"center"}`].join(" ");return(0,l.jsxs)("div",{className:c,children:["line"===r&&(0,l.jsx)("div",{className:"b-blocks-divider-inner",role:"separator",children:(0,l.jsx)("hr",{className:"b-blocks-divider-line","aria-hidden":"true"})}),"icon"===r&&(0,l.jsxs)("div",{className:"b-blocks-divider-inner",role:"separator",children:[(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"}),(0,l.jsx)("span",{className:"b-blocks-divider-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:a.svg||""}}),(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"})]}),"text"===r&&(0,l.jsxs)("div",{className:"b-blocks-divider-inner",role:"separator","aria-label":s.content||(0,x.__)("Section divider","b-blocks"),children:[(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"}),t||(0,l.jsx)("span",{className:"b-blocks-divider-text",children:s.content||""}),(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"})]})]})},i_=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],a_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],s_=[{label:(0,x.__)("Plain Line","b-blocks"),value:"line"},{label:(0,x.__)("Line with Icon","b-blocks"),value:"icon"},{label:(0,x.__)("Line with Text Label","b-blocks"),value:"text"}],r_=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],l_=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],c_=({attributes:e,updateObj:t})=>{const{type:n="line",layout:o={},icon:i={},text:a={}}=e,s="icon"===n,r="text"===n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:n||"line",options:s_,onChange:e=>t("type",e),help:(0,x.__)("Icon and Text place a centered element between two line segments.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Alignment","b-blocks"),labelPosition:"edge",className:"mt10",value:o.alignment||"center",options:l_,onChange:e=>t("layout",e,"alignment"),help:(0,x.__)("Only visible when Width is less than 100%.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Divider Width","b-blocks"),labelPosition:"edge",units:i_,isUnitSelectTabbable:!0,value:o.width||"100%",onChange:e=>t("layout",e,"width")})]}),s&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:i.svg,onChange:e=>t("icon",e,"svg")})}),r&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text Label","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label Text","b-blocks"),value:a.content||"",onChange:e=>t("text",(e||"").slice(0,40),"content"),placeholder:(0,x.__)("OR","b-blocks"),help:(0,x.__)("Short text shown centered on the line (max 40 chars). Also editable inline in the canvas.","b-blocks"),__nextHasNoMarginBottom:!0})})]})},d_=({attributes:e,updateObj:t})=>{const{type:n="line",line:o={},icon:i={},text:a={},spacing:s={}}=e,r="icon"===n,c="text"===n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Line Style","b-blocks"),labelPosition:"edge",value:o.style||"solid",options:r_,onChange:e=>t("line",e,"style"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Line Color","b-blocks"),value:o.color||"#cccccc",onChange:e=>t("line",e||"#cccccc","color"),defaultColor:"#cccccc"}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Line Thickness","b-blocks"),labelPosition:"edge",units:i_,isUnitSelectTabbable:!0,value:o.width||"2px",onChange:e=>t("line",e,"width")})]}),r&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size","b-blocks"),labelPosition:"edge",units:i_,isUnitSelectTabbable:!0,value:i.size||"16px",onChange:e=>t("icon",e,"size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:i.color||"",onChange:e=>t("icon",e||"","color"),defaultColor:o.color||"#cccccc"}),(0,l.jsx)(An,{label:(0,x.__)("Icon Background ","b-blocks"),value:i.bg,onChange:e=>t("icon",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Icon Padding","b-blocks"),units:i_,values:i.padding,resetValues:{top:"8px",right:"8px",bottom:"8px",left:"8px"},onChange:e=>t("icon",e,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Icon Border Radius","b-blocks"),units:i_,values:i.borderRadius,resetValues:{top:"50px",right:"50px",bottom:"50px",left:"50px"},onChange:e=>t("icon",e,"borderRadius")})]}),c&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:a.typography,onChange:e=>t("text",e,"typography")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:a.color||"",onChange:e=>t("text",e||"","color"),defaultColor:o.color||"#cccccc"}),(0,l.jsx)(An,{label:(0,x.__)("Text Background","b-blocks"),value:a.bg,onChange:e=>t("text",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),units:i_,values:a.padding,resetValues:{top:"4px",right:"12px",bottom:"4px",left:"12px"},onChange:e=>t("text",e,"padding")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Spacing","b-blocks"),initialOpen:!1,children:(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),units:i_,values:s,resetValues:{top:"24px",right:"",bottom:"24px",left:""},onChange:e=>t("spacing",e)})})]})},u_=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:a_,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(c_,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(d_,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},p_=["left","center","right"],h_=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{type:a="line",layout:s={},text:r={}}=t,c=bBlocksPremiumChecker,d=fe(t,n),u=p_.includes(s.alignment)?s.alignment:"center",p="text"===a?(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-divider-text",value:r.content||"",onChange:e=>d("text",e,"content"),placeholder:(0,x.__)("OR","b-blocks"),allowedFormats:[]}):null;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:u,onChange:e=>d("layout",e||"center","alignment")})}),(0,l.jsx)(u_,{attributes:t,setAttributes:n,updateObj:d,isPremium:c,device:i}),(0,l.jsx)("div",{...(0,h.useBlockProps)(),children:(0,l.jsxs)("div",{children:[(0,l.jsx)(Jw,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(o_,{attributes:t,textSlot:p})]})})]})}));Ll(Xw.name)&&(0,p.registerBlockType)(Xw,{icon:yl,edit:h_,save:()=>null})
396 -;const g_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/dual-color-heading","version":"1.0.0","title":"Dual Color Heading","category":"bBlocks","description":"Highlight content heading with different colors.","keywords":["dual","color","heading","dual-color-heading"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"sortElements":{"type":"array","default":["heading","separator","subHeading","icon"]},"heading":{"type":"object","default":{"tag":"h2","colorType":"solid","first":{"text":"Dual Heading","colorType":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)"},"last":{"text":"Example","colorType":"solid","color":"#FA52CA","gradient":"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)"},"typography":{"fontFamily":"Default","fontCategory":"sans-serif","fontVariant":"700","fontWeight":700,"isUploadFont":true,"fontSize":{"desktop":"40px","tablet":"36px","mobile":"32px"},"fontStyle":"normal","textTransform":"none","textDecoration":"auto","lineHeight":"135%","letterSpace":"0px"},"align":""}},"separator":{"type":"object","default":{"show":true,"type":"line","iconType":"upload","icon":{"upload":"","library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'> <path d=\'M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z\'></path></svg>"},"iconSize":36,"iconColor":"#1e1e1e","alignment":"center","distance":"0px","left":{"color":"#146EF5","width":"100px","height":"5px","bRadius":{}},"right":{"color":"#00ffff","width":"100px","height":"5px","bRadius":{}},"margin":{"top":"14px","right":"0px","bottom":"14px","left":"0px"}}},"subHeading":{"type":"object","default":{"text":"Insert a meaningful line to evaluate the headline.","color":"#333","typography":{"fontSize":{"desktop":"16px","tablet":"15px","mobile":"15px"}}}},"icon":{"type":"object","default":{"show":true,"iconType":"upload","icon":{"upload":"","library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'emoji-heart-eyes-fill\'><path d=\'M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0M4.756 4.566c.763-1.424 4.02-.12.952 3.434-4.496-1.596-2.35-4.298-.952-3.434m6.559 5.448a.5.5 0 0 1 .548.736A4.5 4.5 0 0 1 7.965 13a4.5 4.5 0 0 1-3.898-2.25.5.5 0 0 1 .548-.736h.005l.017.005.067.015.252.055c.215.046.515.108.857.169.693.124 1.522.242 2.152.242s1.46-.118 2.152-.242a27 27 0 0 0 1.109-.224l.067-.015.017-.004.005-.002zm-.07-5.448c1.397-.864 3.543 1.838-.953 3.434-3.067-3.554.19-4.858.952-3.434z\'></path></svg>"},"img":{"url":"","alt":"","title":""},"size":36,"color":"#000"}},"alignment":{"type":"object","default":{"desktop":"center","tablet":"center","mobile":"center"}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"tablet":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"mobile":{"top":"16px","right":"16px","bottom":"16px","left":"16px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),m_="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTIyLjg4IDExNy4wMyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIyLjg4IDExNy4wMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGc+PHBhdGggZD0iTTYzLjA5LDEuMTFsMTYsMzkuMWw0Mi4xNCwzLjEzYzAuOTgsMC4wNywxLjcyLDAuOTIsMS42NSwxLjljLTAuMDQsMC41Mi0wLjMsMC45OC0wLjY4LDEuMjhMOTAsNzMuNzlsMTAuMDQsNDEuMDUgYzAuMjMsMC45NS0wLjM2LDEuOTItMS4zMSwyLjE1Yy0wLjUsMC4xMi0xLDAuMDItMS4zOS0wLjI0bC0zNS45LTIyLjIxTDI1LjUsMTE2Ljc3Yy0wLjg0LDAuNTItMS45MywwLjI2LTIuNDUtMC41OCBjLTAuMjYtMC40Mi0wLjMyLTAuOTEtMC4yMi0xLjM1bDAsMGwxMC4wNC00MS4wNUwwLjYzLDQ2LjQ4Yy0wLjc1LTAuNjMtMC44NC0xLjc2LTAuMjEtMi41MWMwLjMyLTAuMzgsMC43Ny0wLjU5LDEuMjMtMC42M3YwIGw0Mi4xNC0zLjEzbDE2LTM5LjFjMC4zNy0wLjkxLDEuNDEtMS4zNSwyLjMxLTAuOThDNjIuNTcsMC4zMiw2Mi45MSwwLjY4LDYzLjA5LDEuMTFMNjMuMDksMS4xMUw2My4wOSwxLjExeiBNNjQuMSwzOS42NiBsNS43MSwxMy45NmwxNS4wNSwxLjEyYzAuMjcsMC4wMiwwLjUyLDAuMDgsMC43NiwwLjE3bDI5LjczLTguNDNsLTM3LjYyLTIuOGwwLTAuMDFjLTAuNjUtMC4wNS0xLjI2LTAuNDUtMS41Mi0xLjFMNjMuMTYsMTAuNjYgbDAuMywyOC4wOEM2My43NCwzOSw2My45NiwzOS4zMSw2NC4xLDM5LjY2TDY0LjEsMzkuNjZMNjQuMSwzOS42NnogTTExMS4xLDUxLjI1bC0yMy45NSw2Ljc5Yy0wLjE1LDAuNTItMC40NywwLjk3LTAuODgsMS4yOSBsLTExLjQ1LDkuN2wzLjU5LDE0LjY3YzAuMDcsMC4yOSwwLjA5LDAuNTgsMC4wNiwwLjg2bDE1Ljg2LDIxLjlMODYuMyw3My42NWMtMC4yLTAuNjYsMC0xLjQsMC41Ni0xLjg3TDExMS4xLDUxLjI1TDExMS4xLDUxLjI1eiBNOTIuMjEsMTA5LjM5bC0xNi4zLTIyLjUxYy0wLjUxLDAtMC45OS0wLjE1LTEuNC0wLjQyTDYzLjYsNzkuN3YxMS4xN2MwLDAuMjUtMC4wNSwwLjQ5LTAuMTUsMC43MUw5Mi4yMSwxMDkuMzlMOTIuMjEsMTA5LjM5eiBNNjAuMTgsOTEuMTNjLTAuMDEtMC4wOC0wLjAyLTAuMTctMC4wMi0wLjI1Vjc5LjUxbC0xMS4yOCw2Ljk4Yy0wLjM0LDAuMjEtMC43MSwwLjMzLTEuMDksMC4zN0wzMC42NSwxMDkuNEw2MC4xOCw5MS4xMyBMNjAuMTgsOTEuMTN6IE0yOC41MywxMDYuNTRsMTYuNDktMjEuNjhjLTAuMDgtMC4zOC0wLjA4LTAuNzgsMC4wMS0xLjE1bDAsMGwzLjU5LTE0LjY3TDM3LjEsNTkuMjdjLTAuNDMtMC4zNi0wLjctMC44My0wLjgzLTEuMzMgTDguNzEsNDguNjZsMjcuMzEsMjMuMTJsMCwwYzAuNSwwLjQyLDAuNzQsMS4xLDAuNTgsMS43OEwyOC41MywxMDYuNTRMMjguNTMsMTA2LjU0eiBNMTIsNDYuMTVsMjUuNjUsOC42NSBjMC4wOCwwLjAzLDAuMTYsMC4wNiwwLjIzLDAuMWMwLjIyLTAuMDgsMC40Ni0wLjEzLDAuNy0wLjE1bDAsMGwxNS4wNi0xLjEybDUuNzEtMTMuOTZjMC4xNi0wLjM5LDAuNC0wLjcxLDAuNjktMC45N2wtMC4zLTI4LjA1IGwtMTMuMDEsMzEuOGMtMC4yMSwwLjY4LTAuODIsMS4xOS0xLjU4LDEuMjVMMTIsNDYuMTVMMTIsNDYuMTV6IE02MC4xLDQ0LjU5bC00LjcsMTEuNDhsLTE2LjY0LDEuMjRsMTIuNzQsMTAuNzlsLTMuOTcsMTYuMjEgbDAuNjEtMC4zOGwyLjg4LTEuNzhsMTAuNy02LjYybDQuNzEsMi45Mmw5LjExLDUuNjRsMC4zNywwLjIzbC0zLjk3LTE2LjIxbDEyLjc0LTEwLjc5bC0wLjI2LTAuMDJ2MGwtMTYuMzgtMS4yMmwtNC41MS0xMS4wM3YwIGwtMS44MS00LjQyTDYwLjEsNDQuNTlMNjAuMSw0NC41OXoiLz48L2c+PC9zdmc+",b_="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI1NnB4IiBoZWlnaHQ9IjI1NnB4IiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+DQogICAgPHRpdGxlPm9rdGE8L3RpdGxlPg0KICAgIDxnPg0KICAgICAgICA8cGF0aCBkPSJNMTQwLjg0NDI4LDEuNzc3Nzc3NzggTDEzNS41Nzg0ODEsNjYuNjMxMTExMSBDMTMzLjA4NzksNjYuMzQ2NjY2NyAxMzAuNTk3MzIsNjYuMjA0NDQ0NCAxMjguMDM1NTgsNjYuMjA0NDQ0NCBDMTI0LjgzMzQwNSw2Ni4yMDQ0NDQ0IDEyMS43MDIzODksNjYuNDE3Nzc3OCAxMTguNjQyNTMzLDY2LjkxNTU1NTYgTDExNS42NTM4MzcsMzUuNDg0NDQ0NCBDMTE1LjU4MjY3NywzNC40ODg4ODg5IDExNi4zNjU0MzEsMzMuNjM1NTU1NiAxMTcuMzYxNjYzLDMzLjYzNTU1NTYgTDEyMi42OTg2MjEsMzMuNjM1NTU1NiBMMTIwLjEzNjg4MSwxLjg0ODg4ODg5IEMxMjAuMDY1NzIyLDAuODUzMzMzMzMzIDEyMC44NDg0NzYsMCAxMjEuNzczNTQ5LDAgTDEzOS4yMDc2MTIsMCBDMTQwLjIwMzg0NSwwIDE0MC45ODY1OTgsMC44NTMzMzMzMzMgMTQwLjg0NDI4LDEuODQ4ODg4ODkgTDE0MC44NDQyOCwxLjg0ODg4ODg5IEwxNDAuODQ0MjgsMS43Nzc3Nzc3OCBaIE05Ni44Njc3NDM0LDQuOTc3Nzc3NzggQzk2LjU4MzEwNTYsNC4wNTMzMzMzMyA5NS41ODY4NzM0LDMuNDg0NDQ0NDQgOTQuNjYxODAwNiwzLjg0IEw3OC4yOTUxMjg2LDkuODEzMzMzMzMgQzc3LjM3MDA1NTgsMTAuMTY4ODg4OSA3Ni45NDMwOTkxLDExLjIzNTU1NTYgNzcuMzcwMDU1OCwxMi4wODg4ODg5IEw5MC42NzY4NzE4LDQxLjEwMjIyMjIgTDg1LjYyNDU1MTMsNDIuOTUxMTExMSBDODQuNjk5NDc4NSw0My4zMDY2NjY3IDg0LjI3MjUyMTgsNDQuMzczMzMzMyA4NC42OTk0Nzg1LDQ1LjIyNjY2NjcgTDk4LjI5MDkzMjIsNzMuNzQyMjIyMiBDMTAzLjIwMDkzNCw3MS4wNCAxMDguNTM3ODkyLDY4Ljk3Nzc3NzggMTE0LjE1OTQ4OCw2Ny42OTc3Nzc4IEw5Ni45Mzg5MDI4LDQuOTc3Nzc3NzggTDk2Ljg2Nzc0MzQsNC45Nzc3Nzc3OCBaIE01Ni43MzM4MTcxLDIzLjA0IEw5NC4zNzcxNjI4LDc2LjA4ODg4ODkgQzg5LjYwOTQ4MDEsNzkuMjE3Nzc3OCA4NS4yNjg3NTQsODIuOTE1NTU1NiA4MS41Njg0NjMsODcuMTgyMjIyMiBMNTkuMDEwOTE5Myw2NC45OTU1NTU2IEM1OC4yOTkzMjQ5LDY0LjI4NDQ0NDQgNTguMzcwNDg0Myw2My4xNDY2NjY3IDU5LjA4MjA3ODgsNjIuNTA2NjY2NyBMNjMuMjA5MzI2NSw1OS4wOTMzMzMzIEw0MC43OTQxMDE3LDM2LjQwODg4ODkgQzQwLjA4MjUwNzMsMzUuNjk3Nzc3OCA0MC4xNTM2NjY3LDM0LjU2IDQwLjkzNjQyMDYsMzMuOTIgTDU0LjI0MzIzNjYsMjIuNzU1NTU1NiBDNTUuMDI1OTkwNSwyMi4xMTU1NTU2IDU2LjA5MzM4MjEsMjIuMjU3Nzc3OCA1Ni42NjI2NTc3LDIzLjA0IEw1Ni43MzM4MTcxLDIzLjA0IFogTTI1LjEzOTAyNDEsNTMuNzYgQzI0LjM1NjI3MDIsNTMuMTkxMTExMSAyMy4yMTc3MTkxLDUzLjQ3NTU1NTYgMjIuNzE5NjAzLDU0LjMyODg4ODkgTDE0LjAzODE1MDksNjkuNDA0NDQ0NCBDMTMuNTQwMDM0OCw3MC4yNTc3Nzc4IDEzLjg5NTgzMiw3MS4zMjQ0NDQ0IDE0Ljc0OTc0NTMsNzEuNzUxMTExMSBMNDMuNjQwNDc5NSw4NS40MDQ0NDQ0IEw0MC45MzY0MjA2LDkwLjAyNjY2NjcgQzQwLjQzODMwNDUsOTAuODggNDAuNzk0MTAxNyw5Mi4wMTc3Nzc4IDQxLjcxOTE3NDUsOTIuMzczMzMzMyBMNzAuNDY3NTg5NywxMDUuNTI4ODg5IEM3Mi41MzEyMTM2LDEwMC4xOTU1NTYgNzUuMzA2NDMxOSw5NS4yMTc3Nzc4IDc4LjcyMjA4NTIsOTAuNzM3Nzc3OCBMMjUuMTM5MDI0MSw1My43NiBaIE0zLjg2MjM1MDQyLDk0LjcyIEM0LjAwNDY2OTMxLDkzLjcyNDQ0NDQgNS4wMDA5MDE1Miw5My4xNTU1NTU2IDUuOTI1OTc0MjksOTMuMzY4ODg4OSBMNjguOTAyMDgyLDEwOS43OTU1NTYgQzY3LjI2NTQxNDgsMTE1LjEyODg4OSA2Ni4zNDAzNDIsMTIwLjc0NjY2NyA2Ni4xOTgwMjMxLDEyNi41Nzc3NzggTDM0LjY3NDM4OTYsMTI0LjAxNzc3OCBDMzMuNjc4MTU3MywxMjMuOTQ2NjY3IDMyLjk2NjU2MjksMTIzLjAyMjIyMiAzMy4xODAwNDEyLDEyMi4wMjY2NjcgTDM0LjEwNTExNCwxMTYuNzY0NDQ0IEwyLjI5Njg0MjY2LDExMy43Nzc3NzggQzEuMzAwNjEwNDQsMTEzLjcwNjY2NyAwLjY2MDE3NTQ1MSwxMTIuNzgyMjIyIDAuODAyNDk0MzM5LDExMS43ODY2NjcgTDMuNzkxMTkwOTgsOTQuNjQ4ODg4OSBMMy43OTExOTA5OCw5NC42NDg4ODg5IEwzLjg2MjM1MDQyLDk0LjcyIFogTTEuNTE0MDg4NzgsMTM3LjI0NDQ0NCBDMC41MTc4NTY1NjQsMTM3LjMxNTU1NiAtMC4xMjI1Nzg0MywxMzguMjQgMC4wMTk3NDA0NTc4LDEzOS4yMzU1NTYgTDMuMDc5NTk2NTQsMTU2LjM3MzMzMyBDMy4yMjE5MTU0MywxNTcuMzY4ODg5IDQuMjE4MTQ3NjQsMTU3LjkzNzc3OCA1LjE0MzIyMDQxLDE1Ny43MjQ0NDQgTDM2LjAyNjQxOSwxNDkuNjg4ODg5IEwzNi45NTE0OTE4LDE1NC45NTExMTEgQzM3LjA5MzgxMDYsMTU1Ljk0NjY2NyAzOC4wOTAwNDI5LDE1Ni41MTU1NTYgMzkuMDE1MTE1NiwxNTYuMzAyMjIyIEw2OS40NzEzNTc1LDE0Ny45MTExMTEgQzY3LjY5MjM3MTQsMTQyLjY0ODg4OSA2Ni41NTM4MjAzLDEzNy4wMzExMTEgNjYuMjY5MTgyNiwxMzEuMjcxMTExIEwxLjQ0MjkyOTMzLDEzNy4yNDQ0NDQgTDEuNTE0MDg4NzgsMTM3LjI0NDQ0NCBaIE0xMS42MTg3Mjk4LDE4Mi4zMjg4ODkgQzExLjEyMDYxMzcsMTgxLjQ3NTU1NiAxMS40NzY0MTA5LDE4MC40MDg4ODkgMTIuMzMwMzI0MiwxNzkuOTgyMjIyIEw3MS4xMDgwMjQ3LDE1Mi4xMDY2NjcgQzczLjMxMzk2NzUsMTU3LjM2ODg4OSA3Ni4zMDI2NjQxLDE2Mi4yNzU1NTYgNzkuODYwNjM2MywxNjYuNjg0NDQ0IEw1NC4xMDA5MTc3LDE4NS4wMzExMTEgQzUzLjMxODE2MzgsMTg1LjYgNTIuMTc5NjEyNywxODUuMzg2NjY3IDUxLjY4MTQ5NjYsMTg0LjUzMzMzMyBMNDguOTc3NDM3NywxNzkuODQgTDIyLjcxOTYwMywxOTcuOTczMzMzIEMyMS45MzY4NDkxLDE5OC41NDIyMjIgMjAuNzk4Mjk4LDE5OC4yNTc3NzggMjAuMzAwMTgxOSwxOTcuNDA0NDQ0IEwxMS41NDc1NzAzLDE4Mi4zMjg4ODkgTDExLjYxODcyOTgsMTgyLjMyODg4OSBaIE04Mi44NDkzMzMsMTcwLjA5Nzc3OCBMMzcuMDkzODEwNiwyMTYuMzkxMTExIEMzNi4zODIyMTYyLDIxNy4xMDIyMjIgMzYuNDUzMzc1NiwyMTguMjQgMzcuMjM2MTI5NSwyMTguODggTDUwLjYxNDEwNDksMjMwLjA0NDQ0NCBDNTEuMzk2ODU4OCwyMzAuNjg0NDQ0IDUyLjQ2NDI1MDUsMjMwLjU0MjIyMiA1My4wMzM1MjYsMjI5Ljc2IEw3MS41MzQ5ODE0LDIwMy43MzMzMzMgTDc1LjY2MjIyOTEsMjA3LjIxNzc3OCBDNzYuNDQ0OTgzLDIwNy44NTc3NzggNzcuNTgzNTM0MSwyMDcuNzE1NTU2IDc4LjE1MjgwOTcsMjA2Ljg2MjIyMiBMOTYuMDg0OTg5NSwxODAuODM1NTU2IEM5MS4yNDYxNDczLDE3Ny44NDg4ODkgODYuNzYzMTAyNCwxNzQuMjIyMjIyIDgyLjkyMDQ5MjQsMTcwLjA5Nzc3OCBMODIuODQ5MzMzLDE3MC4wOTc3NzggWiBNNzMuODEyMDgzNiwyNDQuNDA4ODg5IEM3Mi44ODcwMTA4LDI0NC4wNTMzMzMgNzIuNDYwMDU0MiwyNDIuOTg2NjY3IDcyLjg4NzAxMDgsMjQyLjEzMzMzMyBMOTkuOTk4NzU4OSwxODIuOTY4ODg5IEMxMDQuOTc5OTIsMTg1LjUyODg4OSAxMTAuMzg4MDM4LDE4Ny40NDg4ODkgMTE2LjAwOTYzNCwxODguNTE1NTU2IEwxMDguMDM5Nzc2LDIxOS4wOTMzMzMgQzEwNy44MjYyOTgsMjIwLjAxNzc3OCAxMDYuNzU4OTA2LDIyMC41ODY2NjcgMTA1LjgzMzgzMywyMjAuMjMxMTExIEwxMDAuNzgxNTEzLDIxOC4zODIyMjIgTDkyLjMxMzUzOSwyNDkuMTczMzMzIEM5Mi4wMjg5MDEyLDI1MC4wOTc3NzggOTEuMDMyNjY5LDI1MC42NjY2NjcgOTAuMTA3NTk2MiwyNTAuMzExMTExIEw3My43NDA5MjQyLDI0NC4zMzc3NzggTDczLjc0MDkyNDIsMjQ0LjMzNzc3OCBMNzMuODEyMDgzNiwyNDQuNDA4ODg5IFogTTEyMC40OTI2NzksMTg5LjI5Nzc3OCBMMTE1LjIyNjg4LDI1NC4xNTExMTEgQzExNS4xNTU3MiwyNTUuMTQ2NjY3IDExNS45Mzg0NzQsMjU2IDExNi44NjM1NDcsMjU2IEwxMzQuMjk3NjExLDI1NiBDMTM1LjI5Mzg0MywyNTYgMTM2LjA3NjU5NywyNTUuMTQ2NjY3IDEzNS45MzQyNzgsMjU0LjE1MTExMSBMMTMzLjM3MjUzOCwyMjIuMzY0NDQ0IEwxMzguNzA5NDk2LDIyMi4zNjQ0NDQgQzEzOS43MDU3MjgsMjIyLjM2NDQ0NCAxNDAuNDg4NDgyLDIyMS41MTExMTEgMTQwLjQxNzMyMywyMjAuNTE1NTU2IEwxMzcuNDI4NjI2LDE4OS4wODQ0NDQgQzEzNC4zNjg3NywxODkuNTgyMjIyIDEzMS4yMzc3NTUsMTg5Ljc5NTU1NiAxMjguMDM1NTgsMTg5Ljc5NTU1NiBDMTI1LjQ3Mzg0LDE4OS43OTU1NTYgMTIyLjk4MzI1OSwxODkuNjUzMzMzIDEyMC40OTI2NzksMTg5LjI5Nzc3OCBMMTIwLjQ5MjY3OSwxODkuMjk3Nzc4IFogTTE4My4yNTUzMDgsMTMuNzI0NDQ0NCBDMTgzLjY4MjI2NSwxMi44IDE4My4yNTUzMDgsMTEuODA0NDQ0NCAxODIuMzMwMjM1LDExLjQ0ODg4ODkgTDE2NS45NjM1NjMsNS40NzU1NTU1NiBDMTY1LjAzODQ5LDUuMTIgMTY0LjA0MjI1OCw1LjY4ODg4ODg5IDE2My43NTc2Miw2LjYxMzMzMzMzIEwxNTUuMjg5NjQ3LDM3LjQwNDQ0NDQgTDE1MC4yMzczMjYsMzUuNTU1NTU1NiBDMTQ5LjMxMjI1MywzNS4yIDE0OC4zMTYwMjEsMzUuNzY4ODg4OSAxNDguMDMxMzgzLDM2LjY5MzMzMzMgTDE0MC4wNjE1MjYsNjcuMjcxMTExMSBDMTQ1Ljc1NDI4MSw2OC40MDg4ODg5IDE1MS4wOTEyMzksNzAuMzI4ODg4OSAxNTYuMDcyNDAxLDcyLjgxNzc3NzggTDE4My4yNTUzMDgsMTMuNzI0NDQ0NCBMMTgzLjI1NTMwOCwxMy43MjQ0NDQ0IFogTTIxOC45NzczNDksMzkuNTM3Nzc3OCBMMTczLjIyMTgyNiw4NS44MzExMTExIEMxNjkuMzc5MjE3LDgxLjcwNjY2NjcgMTY0Ljk2NzMzMSw3OC4wOCAxNjAuMDU3MzI5LDc1LjA5MzMzMzMgTDE3Ny45ODk1MDksNDkuMDY2NjY2NyBDMTc4LjU1ODc4NSw0OC4yODQ0NDQ0IDE3OS42OTczMzYsNDguMDcxMTExMSAxODAuNDgwMDksNDguNzExMTExMSBMMTg0LjYwNzMzNyw1Mi4xOTU1NTU2IEwyMDMuMTA4NzkzLDI2LjE2ODg4ODkgQzIwMy42NzgwNjgsMjUuMzg2NjY2NyAyMDQuODE2NjIsMjUuMjQ0NDQ0NCAyMDUuNTI4MjE0LDI1Ljg4NDQ0NDQgTDIxOC45MDYxODksMzcuMDQ4ODg4OSBDMjE5LjY4ODk0MywzNy42ODg4ODg5IDIxOS42ODg5NDMsMzguODI2NjY2NyAyMTkuMDQ4NTA4LDM5LjUzNzc3NzggTDIxOC45NzczNDksMzkuNTM3Nzc3OCBaIE0yNDMuNzQwODM1LDc1Ljk0NjY2NjcgQzI0NC42NjU5MDgsNzUuNTIgMjQ0Ljk1MDU0Niw3NC40NTMzMzMzIDI0NC40NTI0Myw3My42IEwyMzUuNjk5ODE4LDU4LjUyNDQ0NDQgQzIzNS4yMDE3MDIsNTcuNjcxMTExMSAyMzQuMDYzMTUxLDU3LjQ1Nzc3NzggMjMzLjI4MDM5Nyw1Ny45NTU1NTU2IEwyMDcuMDIyNTYyLDc2LjA4ODg4ODkgTDIwNC4zMTg1MDMsNzEuNDY2NjY2NyBDMjAzLjgyMDM4Nyw3MC42MTMzMzMzIDIwMi42ODE4MzYsNzAuMzI4ODg4OSAyMDEuODk5MDgyLDcwLjk2ODg4ODkgTDE3Ni4xMzkzNjQsODkuMzE1NTU1NiBDMTc5LjY5NzMzNiw5My43MjQ0NDQ0IDE4Mi42MTQ4NzMsOTguNjMxMTExMSAxODQuODkxOTc1LDEwMy44OTMzMzMgTDI0My42Njk2NzYsNzYuMDE3Nzc3OCBMMjQzLjc0MDgzNSw3NS45NDY2NjY3IFogTTI1Mi45OTE1NjMsOTkuNTU1NTU1NiBMMjU1Ljk4MDI2LDExNi42OTMzMzMgQzI1Ni4xMjI1NzgsMTE3LjY4ODg4OSAyNTUuNDgyMTQzLDExOC41NDIyMjIgMjU0LjQ4NTkxMSwxMTguNjg0NDQ0IEwxODkuNjU5NjU4LDEyNC43Mjg4ODkgQzE4OS4zNzUwMiwxMTguODk3Nzc4IDE4OC4yMzY0NjksMTEzLjM1MTExMSAxODYuNDU3NDgzLDEwOC4wODg4ODkgTDIxNi45MTM3MjUsOTkuNjk3Nzc3OCBDMjE3LjgzODc5OCw5OS40MTMzMzMzIDIxOC44MzUwMywxMDAuMDUzMzMzIDIxOC45NzczNDksMTAxLjA0ODg4OSBMMjE5LjkwMjQyMiwxMDYuMzExMTExIEwyNTAuNzg1NjIsOTguMjc1NTU1NiBDMjUxLjcxMDY5Myw5OC4wNjIyMjIyIDI1Mi43MDY5MjUsOTguNjMxMTExMSAyNTIuODQ5MjQ0LDk5LjYyNjY2NjcgTDI1Mi44NDkyNDQsOTkuNjI2NjY2NyBMMjUyLjk5MTU2Myw5OS41NTU1NTU2IFogTTI1MC4wNzQwMjYsMTYyLjQ4ODg4OSBDMjUwLjk5OTA5OCwxNjIuNzAyMjIyIDI1MS45OTUzMzEsMTYyLjEzMzMzMyAyNTIuMTM3NjUsMTYxLjEzNzc3OCBMMjU1LjEyNjM0NiwxNDQgQzI1NS4yNjg2NjUsMTQzLjAwNDQ0NCAyNTQuNjI4MjMsMTQyLjE1MTExMSAyNTMuNjMxOTk4LDE0Mi4wMDg4ODkgTDIyMS44MjM3MjcsMTM5LjAyMjIyMiBMMjIyLjc0ODc5OSwxMzMuNzYgQzIyMi44OTExMTgsMTMyLjc2NDQ0NCAyMjIuMjUwNjgzLDEzMS45MTExMTEgMjIxLjI1NDQ1MSwxMzEuNzY4ODg5IEwxODkuNzMwODE3LDEyOS4yMDg4ODkgQzE4OS41ODg0OTksMTM1LjA0IDE4OC42NjM0MjYsMTQwLjY1Nzc3OCAxODcuMDI2NzU5LDE0NS45OTExMTEgTDI1MC4wMDI4NjYsMTYyLjQxNzc3OCBMMjUwLjAwMjg2NiwxNjIuNDE3Nzc4IEwyNTAuMDc0MDI2LDE2Mi40ODg4ODkgWiBNMjMzLjI4MDM5NywyMDEuNiBDMjMyLjc4MjI4MSwyMDIuNDUzMzMzIDIzMS42NDM3MywyMDIuNjY2NjY3IDIzMC44NjA5NzYsMjAyLjE2ODg4OSBMMTc3LjI3NzkxNSwxNjUuMTkxMTExIEMxODAuNjkzNTY4LDE2MC43MTExMTEgMTgzLjQ2ODc4NiwxNTUuNzMzMzMzIDE4NS41MzI0MSwxNTAuNCBMMjE0LjI4MDgyNiwxNjMuNTU1NTU2IEMyMTUuMjA1ODk4LDE2My45ODIyMjIgMjE1LjU2MTY5NiwxNjUuMDQ4ODg5IDIxNS4wNjM1NzksMTY1LjkwMjIyMiBMMjEyLjM1OTUyMSwxNzAuNTI0NDQ0IEwyNDEuMjUwMjU1LDE4NC4xNzc3NzggQzI0Mi4xMDQxNjgsMTg0LjYwNDQ0NCAyNDIuNDU5OTY1LDE4NS42NzExMTEgMjQxLjk2MTg0OSwxODYuNTI0NDQ0IEwyMzMuMjgwMzk3LDIwMS42IEwyMzMuMjgwMzk3LDIwMS42IEwyMzMuMjgwMzk3LDIwMS42IFogTTE2MS42MjI4MzcsMTc5Ljc2ODg4OSBMMTk5LjI2NjE4MywyMzIuODE3Nzc4IEMxOTkuODM1NDU4LDIzMy42IDIwMC45NzQwMSwyMzMuNzQyMjIyIDIwMS42ODU2MDQsMjMzLjEwMjIyMiBMMjE0Ljk5MjQyLDIyMS45Mzc3NzggQzIxNS43NzUxNzQsMjIxLjI5Nzc3OCAyMTUuNzc1MTc0LDIyMC4xNiAyMTUuMTM0NzM5LDIxOS40NDg4ODkgTDE5Mi43MTk1MTQsMTk2Ljc2NDQ0NCBMMTk2Ljg0Njc2MiwxOTMuMzUxMTExIEMxOTcuNjI5NTE2LDE5Mi43MTExMTEgMTk3LjYyOTUxNiwxOTEuNTczMzMzIDE5Ni45MTc5MjEsMTkwLjg2MjIyMiBMMTc0LjM2MDM3OCwxNjguNjc1NTU2IEMxNzAuNTg4OTI3LDE3Mi45NDIyMjIgMTY2LjMxOTM2LDE3Ni43MTExMTEgMTYxLjU1MTY3OCwxNzkuNzY4ODg5IEwxNjEuNTUxNjc4LDE3OS43Njg4ODkgTDE2MS42MjI4MzcsMTc5Ljc2ODg4OSBaIE0xNjEuMjY3MDQsMjUyLjAxNzc3OCBDMTYwLjM0MTk2NywyNTIuMzczMzMzIDE1OS4zNDU3MzUsMjUxLjgwNDQ0NCAxNTkuMDYxMDk3LDI1MC44OCBMMTQxLjg0MDUxMiwxODguMTYgQzE0Ny40NjIxMDgsMTg2Ljg4IDE1Mi43OTkwNjYsMTg0LjgxNzc3OCAxNTcuNzA5MDY4LDE4Mi4xMTU1NTYgTDE3MS4zMDA1MjIsMjEwLjYzMTExMSBDMTcxLjcyNzQ3OCwyMTEuNTU1NTU2IDE3MS4zMDA1MjIsMjEyLjYyMjIyMiAxNzAuMzc1NDQ5LDIxMi45MDY2NjcgTDE2NS4zMjMxMjgsMjE0Ljc1NTU1NiBMMTc4LjYyOTk0NCwyNDMuNzY4ODg5IEMxNzkuMDU2OTAxLDI0NC42OTMzMzMgMTc4LjYyOTk0NCwyNDUuNjg4ODg5IDE3Ny43MDQ4NzEsMjQ2LjA0NDQ0NCBMMTYxLjMzODE5OSwyNTIuMDE3Nzc4IEwxNjEuMzM4MTk5LDI1Mi4wMTc3NzggTDE2MS4yNjcwNCwyNTIuMDE3Nzc4IFoiPjwvcGF0aD4NCiAgICA8L2c+DQo8L3N2Zz4NCg==",f_=e=>"image/svg+xml"===(e&&(e.type||("string"==typeof e&&"svg"===e.split(".").pop().toLowerCase()?"image/svg+xml":null))),x_=({attributes:e})=>{
397 -const{sortElements:t,heading:n,icon:o,separator:i,subHeading:a}=e,s=(0,m.useRef)(null);return(0,l.jsx)("div",{className:"dch-dual-color-container",ref:s,children:t.map(((e,t)=>{switch(e){case"heading":return(0,l.jsxs)(zn,{tagName:n.tag,className:"dch-dual-color-title",children:[(0,l.jsxs)("span",{className:"heading-first",children:[n.first.text," "]}),(0,l.jsx)("span",{className:"heading-last",children:n.last.text})]},t);case"separator":return i.show&&(0,l.jsxs)("div",{className:"dch-separator-wrapper",children:["line"===i.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"separator-left"}),(0,l.jsx)("span",{className:"separator-right"})]}),"icon"===i.type&&(0,l.jsxs)(m.Fragment,{children:["upload"===i.iconType&&(0,l.jsx)("span",{className:"dch-separator-icon",children:f_(i.icon.upload)?(0,l.jsx)(qs,{src:i.icon?.upload?i.icon.upload:m_}):jt(i.icon.upload)?(0,l.jsx)("img",{src:i.icon?.upload,alt:""}):(0,l.jsx)(qs,{src:i.icon?.upload?i.icon.upload:m_})}),"library"===i.iconType&&(0,l.jsx)("span",{className:"dch-separator-icon",dangerouslySetInnerHTML:{__html:i.icon?.library}})]},t)]},t);case"subHeading":return(0,l.jsx)("div",{className:"dch-dual-color-subcontent",dangerouslySetInnerHTML:{__html:a.text}},t);case"icon":return o.show&&(0,l.jsxs)(m.Fragment,{children:["upload"===o.iconType&&(0,l.jsx)("span",{className:"dch-dual-color-icon-svg",children:f_(o.icon?.upload.url)?(0,l.jsx)(qs,{src:o.icon?.upload.url||b_}):jt(o.icon?.upload.url)?(0,l.jsx)("img",{src:o.icon?.upload.url,alt:""}):(0,l.jsx)(qs,{src:o.icon?.upload.url||b_})}),"library"===o.iconType&&(0,l.jsx)("span",{className:"dch-dual-color-icon-svg",dangerouslySetInnerHTML:{__html:o.icon.library}})]},t)}}))})},y_=({attributes:e,id:o,isBackend:i=!1})=>{const{heading:a,alignment:s,icon:r,subHeading:c,separator:d,advanced:u}=e,p=`#${o}`,h=`${p} .dch-dual-color-container`,g=`${h} .dch-dual-color-title`,m=`${h} .dch-dual-color-subcontent`,b=`${p} .dch-separator-wrapper`,f=`${b} .dch-separator-icon`,x=`${h} .dch-dual-color-icon-svg`,y=e=>"justify-items: "+("left"===s[e]?"start":"right"===s[e]?"end":"center");return(0,l.jsx)("style",{children:`\n\t\t\t${ps("",a.typography)?.googleFontLink}\n\t\t\t${ps("",c.typography)?.googleFontLink}\n\t\t\t${h}{\n\t\t\t\t${y("desktop")};\n\t\t\t}\n\t\t\t${ps(g,a.typography).styles}\n\n\t\t\t${b}{\n\t\t\t\tgap: ${d.distance};\n\t\t\t\tjustify-content:${"left"===d.alignment?"flex-start":"center"===d.alignment?"center":"flex-end"};\n\t\t\t\tmargin: ${hs(d.margin)};\n\t}\n\n ${["left","right"].map((e=>`${p} .separator-${e}{\n ${ns("width",d[e].width)}\n ${ns("height",d[e].height)}\n ${ns("background",d[e].color)}\n ${ns("border-radius",d[e].bRadius)}\n }`)).join("")}\n\n\t\t\t${g}{\n\t\t\t\t${ns("width",a?.align?"100%":"")}\n\t\t\t\t${ns("text-align",a?.align)}\n\t\t\t}\n\n\t\t\t${f}> svg{\n ${ns("height",jt(d.iconSize)?d.iconSize+"px":"")}\n ${ns("width",jt(d.iconSize)?d.iconSize+"px":"")}\n ${ns("color",d.iconColor)}\n ${ns("fill",d.iconColor)}\n\t\t\t}\n\t\t\t${f}> img{\n ${ns("height",jt(d.iconSize)?d.iconSize+"px":"")}\n ${ns("width",jt(d.iconSize)?d.iconSize+"px":"")}\n\t\t\t}\n\t\t\t${f} svg path{\n ${ns("color",d.iconColor)}\n\t\t\t}\n\t\t\t${x}>svg{\n ${ns("height",jt(r.size)?r.size+"px":"")}\n ${ns("width",jt(r.size)?r.size+"px":"")}\n ${ns("color",r.color)}\n ${ns("fill",r.color)}\n\t\t\t}\n\n\t\t\t${x}>img{\n ${ns("height",jt(r.size)?r.size+"px":"")}\n ${ns("width",jt(r.size)?r.size+"px":"")}\n ${ns("color",r.color)}\n\t\t\t}\n\n\t\t\t${x}>svg path{\n ${ns("color",r.color)}\n\t\t\t}\n\t\t\t${m}{\n ${ns("color",jt(c.color)?`${c.color} !important`:"")}\n\t\t\t\tdisplay:grid;\n\t\t\t\t${y("desktop")};\n\t\t\t}\n\t\t\t${ps(`${m}>*`,c.typography).styles}\n\n\t\t\t${["first","last"].map((e=>`${g} .heading-${e}{\n\t\t\t\t\t\t${a[e].color?`color:${"solid"===a[e].colorType&&a[e].color};`:`background:${a[e].gradient};`}\n\t\t\t\t\t\tbackground:${"gradient"===a[e].colorType&&a[e].gradient};\n\t\t\t${"gradient"===a[e].colorType||0===a[e].color.length?"\n\t\t\t\t\t-webkit-background-clip: text;\n\t\t\t\t\t-webkit-text-fill-color: transparent; \n\t\t\t\t\t":""}\n\t\t\t}`)).join("")}\n\t\t\t${t} {\n\t\t\t\t${h}{\n\t\t\t\t\t${y("tablet")};\n\t\t\t\t}\n\t\t\t\t${m}{\n\t\t\t\t\t${y("tablet")};\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t${n} {\n\t\t\t\t${h}{\n\t\t\t\t\t${y("mobile")};\n\t\t\t\t}\n\t\t\t\t${m}{\n\t\t\t\t\t${y("mobile")};\n\t\t\t\t}\n\t\t\t}\n\t\t\t${Cs(o,u,i)}\n\t`})},v_=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"span",value:"span"},{label:"P",value:"p"},{label:"div",value:"div"}],k_={top:"14px",right:"14px",bottom:"14px",left:"14px"},w_={top:"0px",right:"0px",bottom:"0px",left:"0px"},C_=[{label:(0,x.__)("Left","b-blocks"),value:"left",icon:"editor-alignleft"},{label:(0,x.__)("Center","b-blocks"),value:"center",icon:"editor-aligncenter"},{label:(0,x.__)("Right","b-blocks"),value:"right",icon:"editor-alignright"}],j_=[{title:(0,x.__)("Left","b-blocks"),name:"left"},{title:(0,x.__)("Right","b-blocks"),name:"right"}],$_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],S_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),T_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),N_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),M_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{
398 -d:"M448 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32L32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32z"})}),L_=e=>{const{attributes:t,setAttributes:n,updateObj:o}=e,{sortElements:i,heading:a,icon:s,separator:r,subHeading:c}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Elements","b-blocks"),children:(0,l.jsx)(Ma,{label:(0,x.__)("Sort Elements:"),value:i,onChange:e=>o("sortElements",e)})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Heading","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("HTML Tag","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:a.tag,onChange:e=>o("heading",e,"tag"),options:v_})]}),["first","last"].map((e=>(0,l.jsx)(y.__experimentalInputControl,{className:"mt20",label:(0,x.__)(("first"===e?"First":"Last")+" Part","b-blocks"),value:a[e].text,onChange:t=>n({heading:{...a,[e]:{...a[e],text:t}}})},e))),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a?.align,onChange:e=>o("heading",e,"align"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:S_}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:T_}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:N_}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Justify",value:"justify",icon:M_})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Separator","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:r.show,onChange:e=>o("separator",e,"show")}),r.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:"Type"}),(0,l.jsx)(y.SelectControl,{value:r.type,options:[{label:"Line",value:"line"},{label:"Icon",value:"icon"}],onChange:e=>o("separator",e,"type")})]}),"icon"===r.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{className:"mt10",options:[{label:"Library",value:"library"},{label:"Upload",value:"upload"}],value:r.iconType,label:(0,x.__)("Icon Type","b-blocks"),onChange:e=>o("separator",e,"iconType")}),"library"===r.iconType&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:r.icon.library,onChange:e=>o("separator",e,"icon","library")}),"upload"===r.iconType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:"Icon"}),(0,l.jsx)(we,{types:["image/*"],value:{url:r.icon.upload},default:m_,label:(0,x.__)("Choose Icon","b-blocks"),className:"dual-color-heading-icon",onChange:e=>o("separator",e?.url,"icon","upload")})]})]})]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Sub Heading","b-blocks"),children:(0,l.jsx)(La,{height:220,value:c.text,onChange:e=>n({subHeading:{...c,text:e}})})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Icon","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:s.show,onChange:e=>n({icon:{...s,show:e}})}),s.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{options:[{label:"Library",value:"library"},{label:"Upload",value:"upload"}],value:s.iconType,label:(0,x.__)("Icon Type","b-blocks"),onChange:e=>n({icon:be(s,e,"iconType")})}),"library"===s.iconType&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:s.icon.library,onChange:e=>n({icon:be(s,e,"icon","library")})}),"upload"===s.iconType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon","b-blocks")}),(0,l.jsx)(we,{default:b_,value:s.icon.upload,label:(0,x.__)("Choose Icon","b-blocks"),onChange:e=>n({icon:be(s,e,"icon","upload")})})]})]})]})]})},P_=(0,w.compose)((0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor"),{gradients:n}=e("core/block-editor").getSettings();return{device:t()?.toLowerCase(),gradients:n.length>12?n.slice(0,12):n}})))((({attributes:e,setAttributes:t,updateObj:n,device:i,gradients:a})=>{const{alignment:s,icon:r,heading:c,subHeading:d,separator:u}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,title:(0,x.__)("Wrapper/Container","dual-color-heading"),className:"bPlPanelBody",children:(0,l.jsx)(Tn,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","dual-color-heading"),(0,l.jsx)(_,{})]}),value:s[i],onChange:e=>n("alignment",e,i),options:C_,isIcon:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Heading","dual-color-heading"),children:[(0,l.jsx)(Oa,{className:"mb10",value:c.typography,onChange:e=>n("heading",e,"typography")}),["first","last"].map(((e,n)=>(0,l.jsxs)("div",{children:[(0,l.jsx)(y.PanelRow,{className:"mt20",children:(0,l.jsx)(Tn,{label:(0,x.__)(`${e[0].toUpperCase()+e.substring(1)} Color Type:`,"dual-color-heading"),value:c[e].colorType,onChange:n=>t({heading:{...c,[e]:{...c[e],colorType:n}}}),options:ze,size:"small"})}),"gradient"===c[e].colorType?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.GradientPicker,{value:c[e].gradient,onChange:n=>t({heading:{...c,[e]:{...c[e],gradient:n}}}),gradients:a})}):(0,l.jsx)(Ue,{label:(0,x.__)(`${e[0].toUpperCase()+e.substring(1)} Color:`,"dual-color-heading"),value:c[e].color,onChange:n=>t({heading:{...c,[e]:{...c[e],color:n}}}),defaultColor:"first"===e?o:""})]},n)))]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Sub Heading","dual-color-heading"),children:[(0,l.jsx)(Oa,{className:"mb10",value:d.typography,onChange:e=>n("subHeading",e,"typography")}),(0,l.jsx)(Ue,{color:d.color,value:d.color,label:(0,x.__)("Color","dual-color-heading"),onChange:e=>n("subHeading",e,"color")})]}),u.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Separator","dual-color-heading"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Alignment:","dual-color-heading")}),(0,l.jsx)(Tn,{value:u.alignment,onChange:e=>n("separator",e,"alignment"),options:C_,isIcon:!0})]}),(0,l.jsx)(k,{className:"mt20",label:"Margin",resetValues:k_,values:u.margin,onChange:e=>n("separator",e,"margin")}),"line"===u.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Distance Between Lines","dual-color-heading"),labelPosition:"left",min:0,max:1e3,step:5,value:u.distance,onChange:e=>n("separator",e,"distance")}),(0,l.jsx)("br",{}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:j_,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Width","dual-color-heading"),labelPosition:"left",min:0,max:u[e.name].width.includes("%")?100:1e3,step:1,value:u[e.name].width,onChange:t=>n("separator",t,e.name,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height","dual-color-heading"),labelPosition:"left",min:0,max:u[e.name].height.includes("%")?100:1e3,step:1,value:u[e.name].height,onChange:t=>n("separator",t,e.name,"height")}),(0,l.jsx)(Ye,{className:"mt20",label:"Color",value:u[e.name].color,onChange:t=>n("separator",t,e.name,"color")}),(0,l.jsx)(k,{className:"mt20",label:(0,x.__)("Border Radius","dual-color-heading"),values:u[e.name].bRadius,resetValues:w_,onChange:t=>n("separator",t,e.name,"bRadius")})]})})]}),"icon"===u.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt20",value:u.iconSize,
399 -label:(0,x.__)("Icon Size","dual-color-heading"),min:0,max:300,step:1,onChange:e=>n("separator",e,"iconSize")}),(0,l.jsx)(Ue,{label:"Icon Color",color:u.iconColor,value:u.iconColor,onChange:e=>n("separator",e,"iconColor")})]})]}),r.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Icon Style","dual-color-heading"),children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Icon Size","dual-color-heading"),value:r.size,min:10,max:550,onChange:e=>n("icon",e,"size")}),(0,l.jsx)(Ue,{label:"Icon Color",color:r.color,value:r.color,onChange:e=>n("icon",e,"color")})]})]})})),E_=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:"bBlocks"})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:$_,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(L_,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(P_,{...e})}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e}),isPremium:e.isPremium})]})})]})};Ll(g_.name)&&(0,p.registerBlockType)(g_,{icon:mr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=fe(t,n),a=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(E_,{attributes:t,setAttributes:n,updateObj:i,isPremium:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(y_,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(x_,{attributes:t})})]})]})}});const A_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/emoji-stack-separator","version":"0.1.0","title":"Emoji Stack Separator","category":"bBlocks","textdomain":"b-blocks","description":"A full-width emoji stack separator with customizable emoji and height","example":{"attributes":{"emoji":"🤗","height":192,"align":"full","emojiSize":"medium","density":"normal","animationStyle":"none"}},"attributes":{"emoji":{"type":"string","default":"🤗"},"height":{"type":"string","default":"192px"},"align":{"type":"string","default":"full"},"emojiSize":{"type":"string","default":"medium"},"density":{"type":"string","default":"normal"},"animationStyle":{"type":"string","default":"none"},"margin":{"type":"object","default":{}},"padding":{"type":"object","default":{}},"background":{"type":"object","default":{}},"border":{"type":"object","default":{}},"borderRadius":{"type":"object","default":{}}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),B_=({attributes:e})=>{const{emoji:t,height:n,align:o,emojiSize:i,density:a,animationStyle:s}=e,r=(0,m.useRef)(null);(0,m.useEffect)((()=>{if(r.current){const e=setTimeout((()=>{c(r.current,t,n,i,a)}),50);return()=>clearTimeout(e)}}),[t,n,o,i,a]);const c=(e,t,n,o,i)=>{e.innerHTML="";const a=(e=>{const t={small:{fontSize:2.5,overlap:-1},medium:{fontSize:3.75,overlap:-1.4},large:{fontSize:5,overlap:-1.8},xlarge:{fontSize:6.5,overlap:-2.3}};return t[e]||t.medium})(o),s=(e=>{const t={sparse:{overlapFactor:.5,rowMargin:-2,emojisExtra:2},normal:{overlapFactor:.65,rowMargin:-3,emojisExtra:4},dense:{overlapFactor:.75,rowMargin:-3.5,emojisExtra:6}};return t[e]||t.normal})(i),r=e.offsetWidth,l=Math.ceil(r/(60*s.overlapFactor))+s.emojisExtra;for(let n=0;n<4;n++){const o=document.createElement("div");o.className="b-blocks-emoji-stack-iemoji-row",n>0&&(o.style.marginTop=`${s.rowMargin}rem`);for(let e=0;e<l;e++){const n=document.createElement("span");n.textContent=t,n.className="b-blocks-emoji-stack-item";const i=60*Math.random()-30,s=20*Math.random()-10;n.style.fontSize=`${a.fontSize}rem`,n.style.marginRight=`${a.overlap}rem`,n.style.setProperty("--b-blocks-emoji-stack-separator-rotation",`${i}deg`),n.style.setProperty("--b-blocks-emoji-stack-separator-index",e),n.style.transform=`rotate(${i}deg) translateY(${s}px)`,o.appendChild(n)}e.appendChild(o)}};return(0,l.jsx)("div",{className:"b-blocks-emoji-stack-separator-container "+(s?`b-blocks-emoji-stack-separator-animation-${s}`:""),children:(0,l.jsx)("div",{ref:r,className:"b-blocks-emoji-stack-container"})})},I_=({attributes:e,setAttributes:t})=>{const{emoji:n,emojiSize:o,density:i,animationStyle:a}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Emoji Stack Settings","b-blocks"),children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Emoji","b-blocks"),value:n,onChange:e=>{const n=Array.from(e)[0];t({emoji:n})},help:(0,x.__)("Enter any emoji character","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Emoji Size","b-blocks"),value:o,options:[{label:(0,x.__)("Small","b-blocks"),value:"small"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"},{label:(0,x.__)("Extra Large","b-blocks"),value:"xlarge"}],onChange:e=>t({emojiSize:e}),help:(0,x.__)("Adjust the size of each emoji","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Stack Density","b-blocks"),value:i,options:[{label:(0,x.__)("Sparse","b-blocks"),value:"sparse"},{label:(0,x.__)("Normal","b-blocks"),value:"normal"},{label:(0,x.__)("Dense","b-blocks"),value:"dense"}],onChange:e=>t({density:e}),help:(0,x.__)("Control how tightly packed the emojis are","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Hover Animation","b-blocks"),value:a,options:[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"},{label:(0,x.__)("Rotate","b-blocks"),value:"rotate"},{label:(0,x.__)("Wave","b-blocks"),value:"wave"}],onChange:e=>t({animationStyle:e}),help:(0,x.__)("Add interactive hover effects to emojis","b-blocks")})]})})},O_=({attributes:e,setAttributes:t})=>{const{padding:n,margin:o,background:i,height:a,border:s,borderRadius:r}=e;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Emoji Container","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height","b-blocks"),value:a,onChange:e=>t({height:e}),step:8}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:n,onChange:e=>t({padding:e})}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Margin","b-blocks"),values:o,onChange:e=>t({margin:e})}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i,onChange:e=>t({background:e})}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:s,onChange:e=>t({border:e})}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:r,onChange:e=>t({borderRadius:e})})]})},R_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],z_=e=>(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:R_,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(I_,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(O_,{...e})})]})})}),D_=({attributes:e,id:t})=>{const{background:n,height:o,padding:i,margin:a,border:s,borderRadius:r}=e,c=`#${t} .b-blocks-emoji-stack-separator-container`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n ${c}{\n ${os(n)}\n ${ns("height",o)}\n ${ns("padding",hs(i))}\n ${ns("margin",hs(a))}\n ${as(s)}\n ${ns("border-radius",hs(r))}\n }\n `}})};Ll(A_.name)&&(0,p.registerBlockType)(A_,{icon:Yr,edit:e=>{const{attributes:t,clientId:n}=e,{align:o}=t,i=(0,h.useBlockProps)({className:`align${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(z_,{...e}),(0,
400 -l.jsx)(D_,{attributes:t,id:`block-${n}`}),(0,l.jsx)("div",{...i,children:(0,l.jsx)(B_,{attributes:t})})]})}})
401 -;const F_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/event-card","title":"Event Card","category":"bBlocks","description":"A single event announcement card with title, date/time, location, description, and a ticket CTA. Optionally outputs schema.org Event JSON-LD for Google rich results.","keywords":["event","schema","jsonld","calendar","webinar","workshop","rich results","tickets"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"content":{"type":"object","default":{"eventName":"Event Name","eventDescription":"","titleTag":"h3"}},"image":{"type":"object","default":{"id":0,"url":"","alt":"","border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"datetime":{"type":"object","default":{"startDate":"","startTime":"","endDate":"","endTime":"","timezone":"UTC","status":"EventScheduled"}},"location":{"type":"object","default":{"isVirtual":false,"virtualUrl":"","venueName":"","venueAddress":"","venueCity":"","venueCountry":"US","color":"","iconColor":"","typo":{}}},"organizer":{"type":"object","default":{"name":"","url":"","show":true,"color":"","iconColor":"","typo":{}}},"link":{"type":"object","default":{"label":"Get Tickets","url":"","newTab":true}},"cta":{"type":"object","default":{"showButton":true,"bg":"#146EF5","text":"#ffffff","hoverBg":"#0040E3","fontSize":"15px","borderRadius":6,"transition":0.3,"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"schema":{"type":"object","default":{"show":true}},"status":{"type":"object","default":{"show":true,"color":"","bg":{"type":"solid","color":""},"typo":{},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"card":{"type":"object","default":{"style":"default","alignment":"left","bg":"#ffffff","maxWidth":"640px","showDateBadge":true}},"badge":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"title":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"22px"},"fontWeight":"700"},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"meta":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"14px"}},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"description":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"15px"}},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"24px","right":"28px","bottom":"24px","left":"28px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"7px","spreed":"","color":"rgba(0, 0, 0, 0.08)","isInset":false},{"hOffset":"0px","vOffset":"8px","blur":"24px","spreed":"0px","color":"rgba(0, 0, 0, 0.06)","isInset":false}],"border":{"top":{"color":"#146ef5","style":"solid","width":"5px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),H_=(e,t)=>e?"object"==typeof e&&e[t]?hs(e[t]):"desktop"===t&&"object"==typeof e&&("top"in e||"right"in e||"bottom"in e||"left"in e)?hs(e):"":"",W_=(e,t)=>e?"object"==typeof e&&e[t]?is(e[t]):"desktop"===t?is(e):"":"",U_=({attributes:e,id:o,isBackend:i=!1})=>{
402 -const{card:a={},badge:s={},cta:r={},title:c={},meta:d={},description:u={},location:p={},organizer:h={},status:g={},image:m={},advanced:b={}}=e,{bg:f,maxWidth:x}=a,{color:y,iconColor:v,typo:k={}}=p,{color:w,iconColor:_,typo:C={}}=h,j=r.color||r.text,$=r.hoverColor||r.hoverText||j,S="object"==typeof r.bg?os(r.bg):ns("background-color",r.bg||"#146EF5"),T="object"==typeof r.hoverBg?os(r.hoverBg):ns("background-color",r.hoverBg||"#0040E3"),N=as(r.border)||(r.border?W_(r.border,"desktop"):r.borderRadius?`border-radius: ${parseInt(r.borderRadius,10)||0}px;`:""),M=ns("padding",H_(r.padding,"desktop")),L=ns("margin",H_(r.margin,"desktop")),P=ns("border-radius",H_(r.bRadius,"desktop")),E="0px"===x?"100%":x||"640px",A=`#${o} .b-blocks-event-card`,B=`#${o} .b-blocks-event-card-inner`,I=`#${o} .b-blocks-event-card-badge`,O=`#${o} .b-blocks-event-card-title`,R=`#${o} .b-blocks-event-card-meta`,z=`#${o} .b-blocks-event-card-description`,D=`#${o} .b-blocks-event-card-status`,F=`#${o} .b-blocks-event-card-cover img`,H=`#${o} .b-blocks-event-card-meta-location`,W=`#${o} .b-blocks-event-card-meta-organizer`,U=`#${o} .b-blocks-event-card-btn`,G=(e,t={})=>`\n\t\t${e}{\n\t\t\t${ns("color",t.color)}\n\t\t\t${os(t.bg)}\n\t\t\t${as(t.border)||W_(t.border,"desktop")}\n\t\t\t${ns("border-radius",H_(t.bRadius,"desktop"))}\n\t\t\t${ns("padding",H_(t.padding,"desktop"))}\n\t\t\t${ns("margin",H_(t.margin,"desktop"))}\n\t\t}\n\t\t${ps(e,t.typo||{}).styles}\n\t`,V=(e,t={},n="desktop")=>{const o=H_(t.padding,n),i=H_(t.margin,n),a=H_(t.bRadius,n),s=W_(t.border,n);return o||i||a||s?`\n\t\t\t${e}{\n\t\t\t\t${ns("padding",o)}\n\t\t\t\t${ns("margin",i)}\n\t\t\t\t${ns("border-radius",a)}\n\t\t\t\t${s}\n\t\t\t}\n\t\t`:""};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",s.typo).googleFontLink}\n\t\t\t${ps("",c.typo).googleFontLink}\n\t\t\t${ps("",d.typo).googleFontLink}\n\t\t\t${ps("",u.typo).googleFontLink}\n\t\t\t${ps("",g.typo).googleFontLink}\n\t\t\t${ps("",r.typo).googleFontLink}\n\t\t\t${A}{ max-width: ${E}; }\n\t\t\t${B}{ ${ns("background-color",f)} }\n\t\t\t${G(I,s)}\n\t\t\t${U}{\n\t\t\t\t${ns("color",j)}\n\t\t\t\t${S}\n\t\t\t\t${N}\n\t\t\t\t${P}\n\t\t\t\t${M}\n\t\t\t\t${L}\n\t\t\t\ttransition: all ${r.transition??.3}s ease-in-out;\n\t\t\t\t${!r.typo?.fontSize&&r.fontSize?ns("font-size",r.fontSize):""}\n\t\t\t}\n\t\t\t${ps(U,r.typo||{}).styles}\n\t\t\t${U}:hover, ${U}:focus{\n\t\t\t\t${T}\n\t\t\t\t${ns("color",$)}\n\t\t\t}\n\t\t\t${G(O,c)}\n\t\t\t${G(R,d)}\n\t\t\t${G(z,u)}\n\t\t\t${G(D,g)}\n\t\t\t${G(F,m)}\n\t\t\t${ps("",k).googleFontLink}\n\t\t\t${ps(H,k).styles}\n\t\t\t${H}{ ${ns("color",y)} }\n\t\t\t${H} .b-blocks-event-card-meta-icon{ ${ns("color",v)} }\n\t\t\t${ps("",C).googleFontLink}\n\t\t\t${ps(W,C).styles}\n\t\t\t${W}{ ${ns("color",w)} }\n\t\t\t${W} .b-blocks-event-card-meta-icon{ ${ns("color",_)} }\n\t\t\t${t}{\n\t\t\t\t${V(I,s,"tablet")}\n\t\t\t\t${V(O,c,"tablet")}\n\t\t\t\t${V(R,d,"tablet")}\n\t\t\t\t${V(z,u,"tablet")}\n\t\t\t\t${V(D,g,"tablet")}\n\t\t\t\t${V(F,m,"tablet")}\n\t\t\t\t${V(U,r,"tablet")}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${V(I,s,"mobile")}\n\t\t\t\t${V(O,c,"mobile")}\n\t\t\t\t${V(R,d,"mobile")}\n\t\t\t\t${V(z,u,"mobile")}\n\t\t\t\t${V(D,g,"mobile")}\n\t\t\t\t${V(F,m,"mobile")}\n\t\t\t\t${V(U,r,"mobile")}\n\t\t\t}\n\t\t\t${_s(o,b,i)}\n\t\t\t`.replace(/\s+/g," ").trim()}})},G_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],V_=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],q_={top:"",right:"",bottom:"",left:""},Y_=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Toronto","America/Sao_Paulo","America/Mexico_City","Europe/London","Europe/Paris","Europe/Berlin","Europe/Madrid","Europe/Rome","Europe/Amsterdam","Europe/Moscow","Africa/Cairo","Africa/Johannesburg","Asia/Dubai","Asia/Kolkata","Asia/Bangkok","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Tokyo","Asia/Seoul","Australia/Sydney","Australia/Perth","Pacific/Auckland"],K_=({attributes:e,setAttributes:t,updateObj:n})=>{const{image:o={},datetime:i={},location:a={},organizer:s={},link:r={},cta:c={}}=e,{id:d,url:u,alt:p}=o,{startDate:h,startTime:g,endDate:m,endTime:b,timezone:f,status:k}=i,{isVirtual:w,virtualUrl:_,venueName:C,venueAddress:j,venueCity:$,venueCountry:S}=a,{label:T,url:N,newTab:M}=r,{showButton:L=!0}=c,P="_custom"===f||f&&!Y_.includes(f),E=P?"_custom":f||"UTC";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Event Details","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("p",{style:{marginTop:0,fontStyle:"italic",opacity:.75},children:(0,x.__)("Edit the event name and description directly on the card. Set the heading level (H2–H4) from the block toolbar.","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Start Date","b-blocks"),type:"date",value:h||"",onChange:e=>n("datetime",e,"startDate"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Start Time","b-blocks"),type:"time",value:g||"",onChange:e=>n("datetime",e,"startTime"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("End Date (optional)","b-blocks"),type:"date",value:m||"",onChange:e=>n("datetime",e,"endDate"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("End Time (optional)","b-blocks"),type:"time",value:b||"",onChange:e=>n("datetime",e,"endTime"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Timezone","b-blocks"),value:E,options:[...Y_.map((e=>({label:e,value:e}))),{label:(0,x.__)("Custom…","b-blocks"),value:"_custom"}],onChange:e=>n("datetime","_custom"===e?"":e,"timezone"),__nextHasNoMarginBottom:!0}),P&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Custom timezone","b-blocks"),value:"_custom"===f?"":f||"",onChange:e=>n("datetime",e,"timezone"),placeholder:"Continent/City",help:(0,x.__)("Use a valid IANA timezone name, e.g. America/New_York.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Event Status","b-blocks"),value:k||"EventScheduled",options:[{label:(0,x.__)("Scheduled","b-blocks"),value:"EventScheduled"},{label:(0,x.__)("Cancelled","b-blocks"),value:"EventCancelled"},{label:(0,x.__)("Postponed","b-blocks"),value:"EventPostponed"},{label:(0,x.__)("Moved Online","b-blocks"),value:"EventMovedOnline"}],onChange:e=>n("datetime",e,"status"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Virtual / Online event","b-blocks"),checked:!!w,onChange:e=>n("location",e,"isVirtual")}),w&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Virtual Event URL","b-blocks"),type:"url",value:_||"",onChange:e=>n("location",e,"virtualUrl"),placeholder:"https://example.com/webinar",__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,x.__)("Cover Image:","b-blocks")}),(0,l.jsx)(we,{label:u?(0,x.__)("Replace Image","b-blocks"):(0,x.__)("Select Image","b-blocks"),value:{id:d,url:u,alt:p},types:["image"],height:"100%",width:"100%",onChange:e=>t({image:{...o,id:e?.id||0,url:e?.url||"",alt:e?.alt||p||""}})}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Alt Text","b-blocks"),value:p||"",onChange:e=>n("image",e,"alt"),help:(0,x.__)("Describes the image; leave empty for a decorative image.","b-blocks"),__nextHasNoMarginBottom:!0})]}),!w&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Location","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Venue Name","b-blocks"),value:C||"",onChange:e=>n("location",e,"venueName"),placeholder:(0,x.__)("e.g. City Hall Auditorium","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Address","b-blocks"),value:j||"",onChange:e=>n("location",e,"venueAddress"),__nextHasNoMarginBottom:!0
403 -}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("City","b-blocks"),value:$||"",onChange:e=>n("location",e,"venueCity"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Country (ISO 2-letter)","b-blocks"),value:S||"",onChange:e=>n("location",e,"venueCountry"),placeholder:"US",help:(0,x.__)("Two-letter ISO country code used in schema markup.","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Organizer","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Organizer Name","b-blocks"),value:s.name||"",onChange:e=>n("organizer",e,"name"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Organizer URL","b-blocks"),type:"url",value:s.url||"",onChange:e=>n("organizer",e,"url"),placeholder:"https://example.com",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show organizer on card","b-blocks"),checked:!!s.show,onChange:e=>n("organizer",e,"show")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Button","b-blocks"),checked:!1!==L,onChange:e=>n("cta",e,"showButton")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Button Label","b-blocks"),value:T||"",onChange:e=>n("link",e,"label"),placeholder:(0,x.__)("Get Tickets","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button URL","b-blocks"),type:"url",value:N||"",onChange:e=>n("link",e,"url"),placeholder:"https://example.com/register",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Open in new tab","b-blocks"),checked:!!M,onChange:e=>n("link",e,"newTab")})]})]})},Q_=(e,t="desktop")=>e?"object"==typeof e&&e[t]?e[t]:"object"==typeof e&&("top"in e||"right"in e||"bottom"in e||"left"in e)&&"desktop"===t?e:q_:q_,Z_=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,Qa.useState)("normal"),{card:a={},badge:s={},cta:r={},title:c={},meta:d={},description:u={},location:p={},organizer:h={},status:g={},image:m={}}=e,{showDateBadge:b}=a,{color:f,iconColor:v,typo:w={}}=p,{color:C,iconColor:j,typo:$={}}=h,S=(e,o,i,a="")=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:e,initialOpen:!1,children:[a&&(0,l.jsx)(y.ToggleControl,{label:a,checked:!1!==i.show,onChange:e=>t(o,e,"show")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i.color||"",onChange:e=>t(o,e,"color"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>t(o,e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typo||{},onChange:e=>t(o,e,"typo")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i.border,onChange:e=>t(o,e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(i.bRadius,n),resetValues:q_,onChange:e=>t(o,e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(i.padding,n),resetValues:q_,onChange:e=>t(o,e,"padding",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(i.margin,n),resetValues:q_,onChange:e=>t(o,e,"margin",n)})]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show date badge","b-blocks"),checked:!!b,onChange:e=>t("card",e,"showDateBadge")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:s.color||"",onChange:e=>t("badge",e,"color"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:s.bg,onChange:e=>t("badge",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typo||{},onChange:e=>t("badge",e,"typo")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("badge",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(s.bRadius,n),resetValues:q_,onChange:e=>t("badge",e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(s.padding,n),resetValues:q_,onChange:e=>t("badge",e,"padding",n)})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:m.border,onChange:e=>t("image",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(m.bRadius,n),resetValues:q_,onChange:e=>t("image",e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(m.padding,n),resetValues:q_,onChange:e=>t("image",e,"padding",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(m.margin,n),resetValues:q_,onChange:e=>t("image",e,"margin",n)})]}),S((0,x.__)("Title","b-blocks"),"title",c),S((0,x.__)("Meta","b-blocks"),"meta",d),S((0,x.__)("Description","b-blocks"),"description",u),S((0,x.__)("Event Status","b-blocks"),"status",g,(0,x.__)("Show event status","b-blocks")),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Location","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:f||"",onChange:e=>t("location",e,"color"),defaultColor:""}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:v||"",onChange:e=>t("location",e,"iconColor"),defaultColor:""}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:w,onChange:e=>t("location",e,"typo")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Organizer","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:C||"",onChange:e=>t("organizer",e,"color"),defaultColor:""}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:j||"",onChange:e=>t("organizer",e,"iconColor"),defaultColor:""}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:$,onChange:e=>t("organizer",e,"typo")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA Button Style","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:r.typo||{},onChange:e=>t("cta",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),"normal"===o?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:r.color||r.text||"",onChange:e=>t("cta",e,"color"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:r.bg,onChange:e=>t("cta",e,"bg")})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Hover Color","b-blocks"),value:r.hoverColor||r.hoverText||"",onChange:e=>t("cta",e,"hoverColor"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Hover Background","b-blocks"),value:r.hoverBg,onChange:e=>t("cta",e,"hoverBg")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:r.transition??.3,min:0,max:5,step:.05,
404 -onChange:e=>t("cta",e,"transition")})]}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>t("cta",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(r.bRadius,n),resetValues:q_,onChange:e=>t("cta",e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(r.padding,n),resetValues:q_,onChange:e=>t("cta",e,"padding",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:V_,values:Q_(r.margin,n),resetValues:q_,onChange:e=>t("cta",e,"margin",n)})]})]})},X_=e=>{const{attributes:t,setAttributes:n}=e;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:G_,onSelect:me,children:o=>(0,l.jsxs)(l.Fragment,{children:["general"===o.name&&(0,l.jsx)(K_,{...e}),"style"===o.name&&(0,l.jsx)(Z_,{...e}),"advanced"===o.name&&(0,l.jsx)(Qt,{advanced:t.advanced,onChange:e=>n({advanced:e})})]})})})},J_=()=>[(0,x.__)("Jan","b-blocks"),(0,x.__)("Feb","b-blocks"),(0,x.__)("Mar","b-blocks"),(0,x.__)("Apr","b-blocks"),(0,x.__)("May","b-blocks"),(0,x.__)("Jun","b-blocks"),(0,x.__)("Jul","b-blocks"),(0,x.__)("Aug","b-blocks"),(0,x.__)("Sep","b-blocks"),(0,x.__)("Oct","b-blocks"),(0,x.__)("Nov","b-blocks"),(0,x.__)("Dec","b-blocks")],eC=(e,t)=>{if(!e)return"";const n=e.split("-");if(3!==n.length)return e;const o=parseInt(n[1],10)-1,i=parseInt(n[2],10);let a=`${J_()[o]||""} ${i}, ${n[0]}`;return t&&(a+=` · ${t}`),a.trim()},tC=[{tag:"h2",label:(0,x.__)("Heading 2","b-blocks")},{tag:"h3",label:(0,x.__)("Heading 3","b-blocks")},{tag:"h4",label:(0,x.__)("Heading 4","b-blocks")}];Ll(F_.name)&&(0,p.registerBlockType)(F_,{icon:$l,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{content:i={},image:a={},datetime:s={},location:r={},organizer:c={},link:d={},card:u={},cta:p={},status:g={}}=t,m=(0,f.useSelect)((e=>e("core/editor")?.getDeviceType()?.toLowerCase()||"desktop"),[]),{url:b,alt:v}=a,{eventName:k,eventDescription:w,titleTag:_}=i,{startDate:C,startTime:j,endDate:$,endTime:S,status:T}=s,{isVirtual:N,venueName:M,venueAddress:L,venueCity:P,venueCountry:E}=r,{label:A}=d,{showButton:B=!0}=p,{style:I,alignment:O,showDateBadge:R=!0}=u,{show:z=!0}=g,D=fe(t,n),F=["h2","h3","h4"].includes(_)?_:"h3",H=["left","center","right"].includes(O)?O:"left",W=["default","outlined","flat"].includes(I)?I:"default",U=(e=>({EventCancelled:{label:(0,x.__)("Cancelled","b-blocks"),cls:"is-cancelled"},EventPostponed:{label:(0,x.__)("Postponed","b-blocks"),cls:"is-postponed"},EventMovedOnline:{label:(0,x.__)("Moved Online","b-blocks"),cls:"is-moved-online"}}[e]||null))(T),G=["b-blocks-event-card",`b-blocks-event-card--${W}`,`b-blocks-event-card--align-${H}`,N?"is-virtual":"",U?U.cls:""].filter(Boolean).join(" "),V=(0,h.useBlockProps)({id:`block-${o}`}),q=(e=>{const t=(e||(new Date).toISOString().split("T")[0]).split("-");if(3!==t.length)return{month:"JAN",day:"1"};const n=parseInt(t[1],10)-1,o=String(parseInt(t[2],10));return{month:J_()[n]||"JAN",day:o}})(C),Y=eC(C,j),K=eC($,S),Q=(({isVirtual:e,venueName:t,venueAddress:n,venueCity:o})=>e?(0,x.__)("Online / Virtual","b-blocks"):[t,n,o].filter(Boolean).join(", "))({isVirtual:N,venueName:M,venueAddress:L,venueCity:P}),Z=F;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(X_,{...e,updateObj:D,device:m}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.AlignmentControl,{value:H,onChange:e=>D("card",e||"left","alignment")}),(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(y.ToolbarDropdownMenu,{icon:"heading",label:(0,x.__)("Title heading level","b-blocks"),controls:tC.map((e=>({title:e.label,isActive:F===e.tag,onClick:()=>D("content",e.tag,"titleTag")})))})})]}),(0,l.jsxs)("div",{...V,children:[(0,l.jsx)(U_,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:G,children:(0,l.jsxs)("article",{className:"b-blocks-event-card-inner",children:[b&&(0,l.jsx)("div",{className:"b-blocks-event-card-cover",children:(0,l.jsx)("img",{src:b,alt:v||""})}),(0,l.jsxs)("div",{className:"b-blocks-event-card-header",children:[R&&q.day&&(0,l.jsxs)("div",{className:"b-blocks-event-card-badge","aria-hidden":"true",children:[(0,l.jsx)("span",{className:"b-blocks-event-card-badge-month",children:q.month}),(0,l.jsx)("span",{className:"b-blocks-event-card-badge-day",children:q.day})]}),(0,l.jsxs)("div",{className:"b-blocks-event-card-heading",children:[(0,l.jsxs)(Z,{className:"b-blocks-event-card-title",children:[(0,l.jsx)(h.RichText,{tagName:"span",value:k||"",onChange:e=>D("content",e,"eventName"),placeholder:(0,x.__)("Event Name","b-blocks"),allowedFormats:[]}),!1!==z&&U&&(0,l.jsx)("span",{className:"b-blocks-event-card-status",contentEditable:!1,children:U.label})]}),Y&&(0,l.jsxs)("p",{className:"b-blocks-event-card-meta b-blocks-event-card-meta-date",children:[(0,l.jsx)("svg",{className:"b-blocks-event-card-meta-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{fill:"currentColor",d:"M7 2v2H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7Zm12 7v10H5V9h14Z"})}),(0,l.jsx)("time",{children:Y}),K&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"b-blocks-event-card-dash","aria-hidden":"true",children:" – "}),(0,l.jsx)("time",{children:K})]})]})]})]}),Q&&(0,l.jsxs)("address",{className:"b-blocks-event-card-meta b-blocks-event-card-meta-location",children:[(0,l.jsx)("svg",{className:"b-blocks-event-card-meta-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{fill:"currentColor",d:"M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z"})}),Q,!N&&E&&(0,l.jsx)("span",{className:"b-blocks-event-card-country",children:E})]}),c.show&&c.name&&(0,l.jsxs)("p",{className:"b-blocks-event-card-meta b-blocks-event-card-meta-organizer",children:[(0,l.jsx)("svg",{className:"b-blocks-event-card-meta-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{fill:"currentColor",d:"M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5 0-9 2.5-9 5.5V22h18v-2.5c0-3-4-5.5-9-5.5Z"})}),(0,l.jsx)("span",{className:"b-blocks-event-card-organizer-label",children:(0,x.__)("By","b-blocks")})," ",c.name]}),(0,l.jsx)(h.RichText,{tagName:"div",className:"b-blocks-event-card-description",value:w||"",onChange:e=>D("content",e,"eventDescription"),placeholder:(0,x.__)("Optional event description…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]}),B&&(0,l.jsx)("div",{className:"b-blocks-event-card-cta",children:(0,l.jsx)("span",{className:"b-blocks-event-card-btn",children:A||(0,x.__)("Get Tickets","b-blocks")})})]})})})]})]})},save:()=>null})
405 -;const nC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/expand-content","title":"Expand Content","description":"Wrap any inner blocks in a collapsible reveal. The first portion is visible behind a fade overlay and a Show More / Show Less button toggles the rest. Accessible and reduced-motion aware.","category":"bBlocks","keywords":["expand","read more","show more","collapse","truncate"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"buttons":{"type":"object","default":{"showMore":"Show More","showLess":"Show Less","isShowCollapse":true,"persistState":false,"alignment":"center"}},"layout":{"type":"object","default":{"previewHeight":"200px","fadeHeight":"80px","fadeColor":"#ffffff"}},"styles":{"type":"object","default":{"buttons":{"showMore":{"padding":{"top":"","right":"","bottom":"","left":""},"border":{},"radius":{},"color":"#ffffff","bg":{"color":"#0073aa"},"typo":{"fontSize":{"desktop":"","tablet":"","mobile":""}}},"showLess":{"padding":{"top":"","right":"","bottom":"","left":""},"border":{},"radius":{},"color":"#ffffff","bg":{"color":"#0073aa"},"typo":{"fontSize":{"desktop":"","tablet":"","mobile":""}}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}],"border":{"color":"#dddddd","style":"solid","width":"1px"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}},"animationDuration":{"type":"number","default":300}},"supports":{"align":["wide","full"],"html":false,"className":true,"customClassName":true},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),oC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],iC=[{label:"Left",value:"left",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"right",icon:"align-right"}],aC=e=>{const{attributes:t,updateObj:n}=e,{buttons:o}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Content","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Show More Label","b-blocks"),value:o?.showMore,onChange:e=>n("buttons",e,"showMore"),placeholder:(0,x.__)("Show More","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Show Less Label","b-blocks"),value:o?.showLess,onChange:e=>n("buttons",e,"showLess"),placeholder:(0,x.__)("Show Less","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show collapse button after expanding","b-blocks"),checked:o.isShowCollapse,onChange:e=>n("buttons",e,"isShowCollapse"),help:(0,x.__)("When disabled, visitors can expand once and the content stays open.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Remember state for the visitor","b-blocks"),checked:o.persistState,onChange:e=>n("buttons",e,"persistState"),help:(0,x.__)("Saves the open / closed state in sessionStorage so it persists across page navigation in the same tab.","b-blocks")})]})},sC=e=>{const{attributes:t,updateObj:n}=e,{layout:o,buttons:i}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Collapsed Preview Height (px)","b-blocks"),value:o?.previewHeight,onChange:e=>n("layout",e,"previewHeight"),help:(0,x.__)("How much of the content stays visible before the Show More button.","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Fade Overlay Height (px)","b-blocks"),value:o?.fadeHeight,onChange:e=>n("layout",e,"fadeHeight"),help:(0,x.__)("Set to 0 to hide the fade overlay entirely.","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Fade Color:","b-blocks"),value:o?.fadeColor,onChange:e=>n("layout",e,"fadeColor"),defaultColor:"#ffffff"}),(0,l.jsx)("p",{className:"components-base-control__help",style:{marginTop:"-8px"},children:(0,x.__)("Match your page background color so the fade blends seamlessly.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Align","b-blocks")}),(0,l.jsx)(Tn,{value:i.alignment,onChange:e=>n("buttons",e,"alignment"),options:iC,isIcon:!0,size:"default"})]})]})},rC=e=>{const{attributes:t,setAttributes:n}=e,{animationDuration:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(sC,{...e}),(0,l.jsx)(aC,{...e}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Animation Duration (ms)","b-blocks"),value:o,onChange:e=>n({animationDuration:e}),min:0,max:1e3,step:50,help:(0,x.__)("Set to 0 to snap instantly. The animation is also disabled automatically when the visitor has prefers-reduced-motion enabled.","b-blocks")})})]})},lC=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{buttons:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Button Style","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)("p",{className:"mb10",children:(0,l.jsx)("b",{children:"Show More Button"})}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i.showMore.padding,onChange:e=>n("styles",e,"buttons","showMore","padding")}),(0,l.jsx)(An,{value:i.showMore.bg,onChange:e=>n("styles",e,"buttons","showMore","bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.showMore.color,onChange:e=>n("styles",e,"buttons","showMore","color")}),(0,l.jsx)(Oa,{value:i.showMore.typo,onChange:e=>n("styles",e,"buttons","showMore","typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i.showMore.border,onChange:e=>n("styles",e,"buttons","showMore","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i.showMore.radius,onChange:e=>n("styles",e,"buttons","showMore","radius")}),(0,l.jsx)("p",{className:"mb10 mt10",children:(0,l.jsx)("b",{children:"Show Less Button"})}),(0,
406 -l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i.showLess.padding,onChange:e=>n("styles",e,"buttons","showLess","padding")}),(0,l.jsx)(An,{value:i.showLess.bg,onChange:e=>n("styles",e,"buttons","showLess","bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.showLess.color,onChange:e=>n("styles",e,"buttons","showLess","color")}),(0,l.jsx)(Oa,{value:i.showLess.typo,onChange:e=>n("styles",e,"buttons","showLess","typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i.showLess.border,onChange:e=>n("styles",e,"buttons","showLess","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i.showLess.radius,onChange:e=>n("styles",e,"buttons","showLess","radius")})]})},cC=e=>{const{attributes:t,updateObj:n}=e,{advanced:o}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:oC,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(rC,{...e}),"style"===t.name&&(0,l.jsx)(lC,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:o,onChange:e=>n("advanced",e)})]})})})},dC=({attributes:e,id:t,isBackend:n=!1})=>{const{styles:o,layout:i,buttons:a,advanced:s,animationDuration:r}=e,{buttons:c}=o,d=Number.isFinite(r)?r:300,u=i.fadeColor||"#ffffff",p=`#${t} .b-blocks-expand-content-wrapper`,h=`${p} .b-blocks-expand-content-innerBlocks`,g=`${p} .b-blocks-expand-content-toggle-button-container`,m=`${g} .b-blocks-expand-content-toggle-button`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n ${ps("",c.showMore.typo).googleFontLink}\n ${ps(`${m}.is-showMore`,c.showMore.typo).styles}\n\n ${ps("",c.showLess.typo).googleFontLink}\n ${ps(`${m}.is-showLess`,c.showLess.typo).styles}\n\n ${h}{\n transition: max-height ${d}ms ease-in-out;\n }\n\n ${h}.is-clamped{\n ${ns("max-height",i.previewHeight)}\n }\n\n ${h}.is-clamped::after{\n height: ${i.fadeHeight||"80px"};\n background: linear-gradient(to bottom, ${(e=>{const t=(e||"").trim(),n=t.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i);if(n)return`rgba(${n[1]}, ${n[2]}, ${n[3]}, 0)`;let o=t.replace("#","");return/^[0-9a-fA-F]{3,4}$/.test(o)&&(o=o.split("").map((e=>e+e)).join("")),/^[0-9a-fA-F]{6,8}$/.test(o)?`rgba(${parseInt(o.slice(0,2),16)}, ${parseInt(o.slice(2,4),16)}, ${parseInt(o.slice(4,6),16)}, 0)`:"rgba(0, 0, 0, 0)"})(u)} 0%, ${u} 100%);\n }\n\n ${m}.is-showMore{\n ${ns("padding",hs(c.showMore.padding))}\n ${os(c.showMore.bg)}\n ${as(c.showMore.border)}\n ${ns("border-radius",hs(c.showMore.radius))}\n ${ns("color",c.showMore.color)}\n }\n\n ${m}.is-showLess{\n ${ns("padding",hs(c.showLess.padding))}\n ${os(c.showLess.bg)}\n ${as(c.showLess.border)}\n ${ns("border-radius",hs(c.showLess.radius))}\n ${ns("color",c.showLess.color)}\n }\n\n ${g}{\n ${ns("justify-content",a.alignment)}\n }\n\n ${_s(t,s,n,!1)}\n\n `}})},uC=[["core/heading",{level:3,placeholder:(0,x.__)("Section heading...","b-blocks")}],["core/paragraph",{placeholder:(0,x.__)("Add the content that should always be visible here, then keep writing — anything past the preview height will be hidden behind a Show More button on the frontend.","b-blocks")}]];Ll(nC.name)&&(0,p.registerBlockType)(nC,{icon:hl,edit:({attributes:e,setAttributes:t,clientId:n})=>{const{buttons:o}=e,[i,a]=(0,Qa.useState)(!1),s=`block-${n}`,r=fe(e,t);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(cC,{attributes:e,setAttributes:t,updateObj:r}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(dC,{attributes:e,id:s,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"b-blocks-expand-content-wrapper",children:[(0,l.jsx)("div",{className:"b-blocks-expand-content-innerBlocks "+(i?"":"is-clamped"),children:(0,l.jsx)(h.InnerBlocks,{template:uC,templateLock:!1})}),(0,l.jsx)("div",{className:"b-blocks-expand-content-toggle-button-container",children:(0,l.jsx)("button",{type:"button",className:"b-blocks-expand-content-toggle-button "+(i?"is-showLess":"is-showMore"),"aria-disabled":"true",tabIndex:-1,onClick:()=>a((e=>!e)),children:i?o.showLess:o.showMore})})]})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const pC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/facebook-embed","version":"1.0.0","title":"Facebook Embed","category":"bBlocks","description":"Facebook Embed allows you to facebook posts, videos on your website or blog.","keywords":["facebook","embed","post"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"facebook":{"type":"object","default":{"alignment":"center","type":"post","url":{"post":"https://www.facebook.com/photo/?fbid=1113142977483877&set=a.520898976708283","video":"https://www.facebook.com/bPluginsLLC/videos/281067148325015"},"fullScreen":false,"autoPlay":false,"height":"100%","width":500,"caption":false,"fullPost":true}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","facebookEmbbed","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","facebookEmbbed"]}'),hC=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{
407 -d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),gC=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),mC=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),bC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],fC=[{label:"Post",value:"post"},{label:"Video",value:"video"}],xC=[{label:"Left",value:"left",icon:hC},{label:"Center",value:"center",icon:gC},{label:"Right",value:"right",icon:mC}],yC=({attributes:e,updateObj:t,facebookKey:n})=>{const{facebook:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Embed","b-blocks"),initialOpen:!0,children:[!n&&(0,l.jsxs)(y.Notice,{className:"mb10",status:"warning",isDismissible:!1,children:["Set your Facebook App ID in the ",(0,l.jsx)("a",{href:`${location.origin}/wp-admin/admin.php?page=b-blocks#/settings`,target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("em",{children:"Settings"})})," to use this block."]}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:o.type,onChange:e=>t("facebook",e,"type"),options:fC}),(0,l.jsx)(y.__experimentalInputControl,{className:"mt10",label:(0,x.__)("URL","b-blocks"),labelPosition:"edge",value:o.url[o.type],onChange:e=>t("facebook",e,"url",o.type)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Full Post","b-blocks"),checked:o.fullPost,onChange:e=>t("facebook",e,"fullPost")}),"video"===o.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Caption","b-blocks"),checked:o.caption,onChange:e=>t("facebook",e,"caption")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Full Screen","b-blocks"),checked:o.fullScreen,onChange:e=>t("facebook",e,"fullScreen")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Auto Play","b-blocks"),checked:o.autoPlay,onChange:e=>t("facebook",e,"autoPlay")})]}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Width","b-blocks"),labelPosition:"edge",value:o.width,onChange:e=>t("facebook",e,"width"),min:1,max:1200,step:5}),(0,l.jsx)(Tn,{className:"mt10",value:o.alignment,isIcon:!0,label:(0,x.__)("Alignment","b-blocks"),options:xC,onChange:e=>t("facebook",e,"alignment")})]})},vC=({attributes:e,updateObj:t,isPremium:n,facebookKey:o})=>{const{advanced:i}=e;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:bC,onSelect:me,children:a=>(0,l.jsxs)(l.Fragment,{children:["general"===a.name&&(0,l.jsx)(yC,{attributes:e,updateObj:t,facebookKey:o}),"advanced"===a.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>t("advanced",e),isPremium:n})]})})})},kC=({attributes:e,id:t})=>{const{advanced:n}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${Cs(t,n)}\n\t`}})},wC=({attributes:e,facebookKey:t})=>{const{facebook:n}=e,o=`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(n.url?.video||"")}&width=${n.width||"500"}&show_text=${n.fullPost}&show_captions=${n.caption}&autoplay=${n.autoPlay}&appId=${t}`,i=`https://www.facebook.com/plugins/post.php?href=${encodeURIComponent(n.url?.post||"")}&width=${n.width||"500"}&show_text=${n.fullPost}&appId=${t}`;return(0,l.jsxs)("div",{className:`b-blocks-facebookEmbed-wrapper ${n.alignment}`,children:["video"===n.type&&(0,l.jsx)("div",{className:"fb-video-container",children:(0,l.jsx)("iframe",{src:o,width:n.width||"500",height:"auto",style:{border:"none",overflow:"hidden",width:"100%",minHeight:"315px"},scrolling:"no",frameBorder:"0",allowFullScreen:n.fullScreen,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"})}),"post"===n.type&&(0,l.jsx)("div",{className:"fb-post-container",children:(0,l.jsx)("iframe",{src:i,width:n.width||"500",height:"auto",style:{border:"none",overflow:"hidden",width:"100%",minHeight:"500px"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"})})]})};Ll(pC.name)&&(0,p.registerBlockType)(pC,{icon:br,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,a]=(0,m.useState)(""),s=window.bBlocksCursorDataConfig?.nonce,{data:r,isLoading:c}=Cd("bblocks_api_keys",{_wpnonce:s},!0),d=bBlocksPremiumChecker;(0,m.useEffect)((()=>{a(r?.facebook?.key)}),[r,c]);const u=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vC,{attributes:t,updateObj:u,isPremium:d,facebookKey:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(kC,{attributes:t,id:`block-${o}`}),(0,l.jsx)(wC,{attributes:t,facebookKey:i})]})]})}})
408 -;const _C=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/facebook-page","version":"1.0.0","title":"Facebook Page","category":"bBlocks","description":"The Facebook Page Block allows you to embed your Social Media on your WordPress website.","keywords":["facebook","page","embed"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"facebook":{"type":"object","default":{"appId":"","link":"https://www.facebook.com/bPluginsLLC","layout":["timeline"],"smallHeader":false,"coverPhoto":true,"profilePhotos":true,"ctaButton":true,"width":340,"height":500,"align":"center"}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","facebookPage","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","facebookPage"]}'),CC=({attributes:e,facebookKey:t})=>{const{facebook:n}=e,o=`https://www.facebook.com/plugins/page.php?href=${encodeURIComponent(n.link)}&tabs=${n.layout?.join(",")||"timeline"}&width=${n.width}&height=${n.height}&small_header=${n.smallHeader}&adapt_container_width=true&hide_cover=${!n.coverPhoto}&show_facepile=${n.profilePhotos}&hide_cta=${n.ctaButton}&appId=${t}`;return(0,l.jsx)("div",{className:`bBlocks-fbPage-wrapper ${n.align}`,children:(0,l.jsx)("div",{children:(0,l.jsx)("iframe",{src:o,width:n.width,height:n.height,scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share",title:"Facebook Page"})})})},jC=({attributes:e,id:t})=>{const{advanced:n}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:` \n\t\t\t${_s(t,n)}\n\t\t`}})},$C=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],SC=[{label:"Left",value:"left",icon:hC},{label:"Center",value:"center",icon:gC},{label:"Right",value:"right",icon:mC}],TC=e=>{const{attributes:t,updateObj:n,facebookKey:o}=e,{facebook:i}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Items","b-blocks"),children:[!o&&(0,l.jsxs)(y.Notice,{className:"mb10",status:"warning",isDismissible:!1,children:["Set your Facebook App ID in the ",(0,l.jsx)("a",{href:`${location.origin}/wp-admin/admin.php?page=b-blocks#/settings`,target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("em",{children:"Settings"})})," to use this block."]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link","social-media-page-block"),value:i.link,onChange:e=>n("facebook",e,"link")}),(0,l.jsx)(v,{children:(0,x.__)("Layout","social-media-page-block")}),(0,l.jsx)(Ft,{value:i.layout,options:[{label:"Timeline",value:"timeline"},{label:"Events",value:"events"},{label:"Messages",value:"messages"}],onChange:e=>n("facebook",e,"layout")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Small Header","social-media-page-block"),checked:i.smallHeader,value:i.smallHeader,onChange:e=>n("facebook",e,"smallHeader")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Cover Photo","social-media-page-block"),checked:i.coverPhoto,value:i.coverPhoto,onChange:e=>n("facebook",e,"coverPhoto")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Profile Photos","social-media-page-block"),checked:i.profilePhotos,value:i.profilePhotos,onChange:e=>n("facebook",e,"profilePhotos")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Width","social-media-page-block"),value:i.width,onChange:e=>n("facebook",e,"width"),min:0,max:1e3}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Height","social-media-page-block"),value:i.height,onChange:e=>n("facebook",e,"height"),min:0,max:1e3}),(0,l.jsx)(Tn,{className:"mt10",value:i.align,isIcon:!0,label:(0,x.__)("Alignment","b-blocks"),options:SC,onChange:e=>n("facebook",e,"align")})]})]})},NC=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:$C,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(TC,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})})};Ll(_C.name)&&(0,p.registerBlockType)(_C,{icon:fr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,a]=(0,m.useState)(""),s=window.bBlocksCursorDataConfig?.nonce,{data:r,isLoading:c}=Cd("bblocks_api_keys",{_wpnonce:s},!0),d=fe(t,n),u=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{a(r?.facebook?.key)}),[r,c]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(NC,{attributes:t,setAttributes:n,updateObj:d,isPremium:u,facebookKey:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(jC,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(CC,{attributes:t,facebookKey:i},JSON.stringify(t.facebook))]})]})}})
409 -;const MC=JSON.parse('{"apiVersion":3,"name":"b-blocks/feature-boxes","title":"Feature Boxes","description":"Display Feature boxes section.","category":"bBlocks","keywords":["features","feature boxes","features section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"features":{"type":"array","default":[{"background":{"color":"#0000"},"isUpIcon":false,"icon":{"class":"fa-brands fa-wordpress","fontSize":120},"upIcon":{"id":null,"url":"","alt":"","title":""},"iconWidth":"120px","title":"Feature 1","titleColor":"#333","separator":{"width":"20%","height":"2px","style":"solid","color":"#bbb"},"desc":"This content area describes feature 1 descriptions or details.","descColor":"#333"},{"background":{"color":"#0000"},"isUpIcon":false,"icon":{"class":"fa-brands fa-wordpress","fontSize":120},"upIcon":{"id":null,"url":"","alt":"","title":""},"iconWidth":"120px","title":"Feature 2","titleColor":"#333","separator":{"width":"20%","height":"2px","style":"solid","color":"#bbb"},"desc":"This content area describes feature 2 descriptions or details.","descColor":"#333"},{"background":{"color":"#0000"},"isUpIcon":false,"icon":{"class":"fa-brands fa-wordpress","fontSize":120},"upIcon":{"id":null,"url":"","alt":"","title":""},"iconWidth":"120px","title":"Feature 3","titleColor":"#333","separator":{"width":"20%","height":"2px","style":"solid","color":"#bbb"},"desc":"This content area describes feature 3 descriptions or details.","descColor":"#333"}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"30px"},"rowGap":{"type":"string","default":"30px"},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"20px"}},"isIcon":{"type":"boolean","default":true},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"isTitle":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"20px","tablet":"18px","mobile":"16px"},"fontWeight":600}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isSep":{"type":"boolean","default":true},"sepMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px","tablet":"15px","mobile":"15px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),LC=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateFeature:n,activeIndex:o,setActiveIndex:i,device:a})=>{const{features:s=[],columns:r,columnGap:c,rowGap:d,textAlign:u,padding:p,isIcon:g,iconMargin:m,isTitle:b,titleTypo:f,titleMargin:k,isSep:w,sepMargin:C,isDesc:j,descTypo:$}=e,S=()=>{t({features:[...s,{background:{color:"#0000"},isUpIcon:!1,icon:{class:"fa fa-wordpress",fontSize:120},upIcon:{id:null,url:"",alt:"",title:""},iconWidth:"120px",title:`Feature ${s.length+1}`,titleColor:"#333",separator:{width:"20%",height:"2px",style:"solid",color:"#bbb"},desc:`This content area describes feature ${s.length+1} description/details.`,descColor:"#333"}]}),i(s.length)},{background:T={},isUpIcon:N=!1,icon:M={},upIcon:L={},iconWidth:P="",titleColor:E="",separator:A={},descColor:B=""}=s[o]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Features","b-blocks"),children:[null!==o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Feature No ${o+1}:`,"b-blocks")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:T,onChange:e=>n("background",e)}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:N,onChange:e=>n("isUpIcon",e)}),N?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:L,onChange:e=>n("upIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:P,onChange:e=>n("iconWidth",e),units:[Pe(),Ee(),Ae()]})]}):(0,l.jsx)(Un,{value:M,onChange:e=>n("icon",e),defaults:{class:"fa fa-wordpress",fontSize:120}})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:E,onChange:e=>n("titleColor",e),defaultColor:"#333"}),(0,l.jsx)(Ta,{value:A,onChange:e=>n("separator",e),defaults:{width:"20%"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:B,onChange:e=>n("descColor",e),defaultColor:"#333"}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<s?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{e.preventDefault(),t({features:[...s.slice(0,o),...s.slice(o+1)]}),i(0===o?0:o-1)},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{e.preventDefault(),t({features:[...s.slice(0,o),{...s[o]},...s.slice(o)]}),i(o+1)},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Feature","b-blocks"),onClick:S,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Feature","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:r[a],onChange:e=>{t({columns:{...r,[a]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(id,{label:(0,x.__)("Padding:","b-blocks"),value:p,onChange:e=>t({padding:e}),defaults:{vertical:"50px",horizontal:"20px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:g,onChange:e=>t({isIcon:e})}),g&&(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:m,onChange:e=>t({iconMargin:e}),defaults:{side:4,bottom:"20px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:b,onChange:e=>t({isTitle:e})}),b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Oa,{value:f,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:20,tablet:18,mobile:16},fontWeight:600}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:k,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:w,onChange:e=>t({isSep:e})}),w&&(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>t({sepMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{
410 -className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:j,onChange:e=>t({isDesc:e})}),j&&(0,l.jsx)(Oa,{value:$,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Feature","b-blocks"),onClick:S,children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:u,onChange:e=>t({textAlign:e})})]})]})})),PC="bBlocksFeatureBoxes",EC=({attributes:e,id:t})=>{const{features:n=[],columnGap:o,rowGap:i,textAlign:a,padding:s,iconMargin:r,titleTypo:c,titleMargin:d,sepMargin:u,descTypo:p}=e,h=`#${t}`,g=`${h} .${PC}`,m=`${g} .feature`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",c)?.googleFontLink}\n\t\t${ps("",p)?.googleFontLink}\n\t\t${ps(`${m} .featureTitle`,c)?.styles}\n\t\t${ps(`${m} .featureDescription`,p)?.styles}\n\n\t\t${g}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t}\n\t\t${m}{\n\t\t\ttext-align: ${a};\n\t\t\tpadding: ${us(s)};\n\t\t}\n\t\t${m} .featureIcon{\n\t\t\tmargin: ${us(r)};\n\t\t}\n\t\t${m} .featureTitle{\n\t\t\tmargin: ${us(d)};\n\t\t}\n\t\t${m} .featureSeparator{\n\t\t\tmargin: ${us(u)};\n\t\t}\n\n\t\t${n.map(((e,t)=>{const{background:n,icon:o,iconWidth:i,titleColor:a,separator:s,descColor:r}=e,l=`${h} #feature-${t}`;return`\n\t\t\t\t${l}{\n\t\t\t\t\t${os(n)}\n\t\t\t\t}\n\t\t\t\t${l} .featureIcon i{\n\t\t\t\t\t${rs(o)}\n\t\t\t\t}\n\t\t\t\t${l} .featureIcon img{\n\t\t\t\t\twidth: ${i};\n\t\t\t\t}\n\t\t\t\t${l} .featureTitle{\n\t\t\t\t\tcolor: ${a};\n\t\t\t\t}\n\t\t\t\t${l} .featureSeparator{\n\t\t\t\t\t${cs(s)}\n\t\t\t\t}\n\t\t\t\t${l} .featureDescription{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})};Ll(MC.name)&&(0,p.registerBlockType)(MC,{icon:xr,edit:({attributes:e,setAttributes:t,clientId:n})=>{const{features:o=[],columns:i,isIcon:a,isTitle:s,isSep:r,isDesc:c}=e,[d,u]=(0,m.useState)(0),p=(e,n)=>{const i=Rb(o,(t=>{t[d][e]=n}));t({features:i})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(LC,{attributes:e,setAttributes:t,updateFeature:p,activeIndex:d,setActiveIndex:u}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(EC,{attributes:e,id:`block-${n}`}),(0,l.jsx)("div",{className:`${PC} columns-${i.desktop} columns-tablet-${i.tablet} columns-mobile-${i.mobile}`,children:o.map(((e,t)=>{const{isUpIcon:n,icon:o,upIcon:i,title:g,desc:m}=e;return(0,l.jsxs)("div",{onClick:()=>u(t),className:"feature "+(t===d?"bPlNowEditing":""),id:`feature-${t}`,children:[a&&(0,l.jsx)("div",{className:"featureIcon",children:n?(0,l.jsx)("img",{className:i?.id?`wp-image-${i?.id}`:null,src:i?.url,alt:i?.alt}):o?.class&&(0,l.jsx)("i",{className:o?.class})}),(0,l.jsxs)("div",{className:"featureDetails",children:[s&&(0,l.jsx)(h.RichText,{className:"featureTitle",tagName:"h4",value:g,onChange:e=>p("title",e),placeholder:(0,x.__)("Feature title","b-blocks"),inlineToolbar:!0}),r&&(0,l.jsx)("span",{className:"featureSeparator"}),c&&(0,l.jsx)(h.RichText,{className:"featureDescription",tagName:"p",value:m,onChange:e=>p("desc",e),placeholder:(0,x.__)("Description of the feature","b-blocks"),inlineToolbar:!0})]})]},t)}))})]})]})},save:()=>null})
411 -;const AC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/file-download-card","title":"File Download Card","category":"bBlocks","description":"A single-file download card with a file-type badge, title, size, and download button.","keywords":["download","file","pdf","ebook","zip","document","attachment","button"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"file":{"type":"object","default":{"id":0,"url":"","name":"","type":"","size":"","buttonLabel":"Download","openNewTab":false,"showFileType":true,"showFileSize":true}},"content":{"type":"object","default":{"title":"","description":""}},"layout":{"type":"object","default":{"type":"horizontal"}},"icon":{"type":"object","default":{"style":"filled","bg":{},"color":"#2563eb","border":{"color":"#2563eb","style":"solid","width":"2px"},"size":48,"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"title":{"type":"object","default":{"color":"#111827","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":"600"},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"description":{"type":"object","default":{"color":"#6b7280","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"meta":{"type":"object","default":{"color":"#9ca3af","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"12px","tablet":"","mobile":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"button":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","border":{},"padding":{"desktop":{"top":"10px","right":"20px","bottom":"10px","left":"20px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{"type":"solid","color":""},"color":"","border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"typo":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":"600"},"transition":0.2}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"20px","right":"25px","bottom":"20px","left":"25px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"5px","spreed":"0px","color":"rgba(113, 144, 176, 0.43)","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 0)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),BC=({attributes:e,id:o,isBackend:i=!1})=>{
412 -const{icon:a={},title:s={},description:r={},meta:c={},button:d={},advanced:u}=e,p=parseInt(a.size,10)||48,h=`#${o} .b-blocks-file-download-card`,g=`${h} .b-blocks-file-download-card-badge`,m=`${h} .b-blocks-file-download-card-title`,b=`${h} .b-blocks-file-download-card-desc`,f=`${h} .b-blocks-file-download-card-meta`,x=`${h} .b-blocks-file-download-card-btn`,y=(e,t,n)=>ns(e,hs(t?.[n])),v=e=>`\n\t\t${g}{ ${y("padding",a.padding,e)} ${y("margin",a.margin,e)} ${y("border-radius",a.radius,e)} }\n\t\t${m}{ ${y("padding",s.padding,e)} ${y("margin",s.margin,e)} ${y("border-radius",s.borderRadius,e)} }\n\t\t${b}{ ${y("padding",r.padding,e)} ${y("margin",r.margin,e)} ${y("border-radius",r.borderRadius,e)} }\n\t\t${f}{ ${y("padding",c.padding,e)} ${y("margin",c.margin,e)} ${y("border-radius",c.borderRadius,e)} }\n\t\t${x}{ ${y("padding",d.normal?.padding,e)} ${y("margin",d.normal?.margin,e)} ${y("border-radius",d.normal?.radius,e)} }\n\t\t${x}:hover, ${x}:focus-visible{ ${y("padding",d.hover?.padding,e)} ${y("margin",d.hover?.margin,e)} ${y("border-radius",d.hover?.radius,e)} }\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",s.typo).googleFontLink}\n\t\t\t${ps("",r.typo).googleFontLink}\n\t\t\t${ps("",c.typo).googleFontLink}\n\t\t\t${ps("",d.typo).googleFontLink}\n\t\t\t${g}{\n\t\t\t\twidth:${p}px;\n\t\t\t\theight:${p}px;\n\t\t\t\tfont-size:${Math.round(.28*p)}px;\n\t\t\t\t${os(a.bg)}\n\t\t\t\t${ns("color",a.color)}\n\t\t\t\t${is(a.border)}\n\t\t\t}\n\t\t\t${m}{\n\t\t\t\t${ns("color",s.color)}\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${is(s.border)}\n\t\t\t}\n\t\t\t${ps(m,s.typo).styles}\n\t\t\t${b}{\n\t\t\t\t${ns("color",r.color)}\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${is(r.border)}\n\t\t\t}\n\t\t\t${ps(b,r.typo).styles}\n\t\t\t${f}{\n\t\t\t\t${ns("color",c.color)}\n\t\t\t\t${os(c.bg)}\n\t\t\t\t${is(c.border)}\n\t\t\t}\n\t\t\t${ps(f,c.typo).styles}\n\t\t\t${x}{\n\t\t\t\t${os(d.normal?.bg)}\n\t\t\t\t${ns("color",d.normal?.color)}\n\t\t\t\t${is(d.normal?.border)}\n\t\t\t\ttransition:all ${d.transition??.2}s ease;\n\t\t\t}\n\t\t\t${ps(x,d.typo).styles}\n\t\t\t${x}:hover, ${x}:focus-visible{\n\t\t\t\t${os(d.hover?.bg)}\n\t\t\t\t${ns("color",d.hover?.color)}\n\t\t\t\t${is(d.hover?.border)}\n\t\t\t}\n\t\t\t${v("desktop")}\n\t\t\t${t}{ ${v("tablet")} }\n\t\t\t${n}{ ${v("mobile")} }\n\t\t\t${_s(o,u,i,!1)}\n\t\t\t`}})},IC=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],OC={top:"",right:"",bottom:"",left:""},RC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],zC=[{label:(0,x.__)("Horizontal (icon left)","b-blocks"),value:"horizontal"},{label:(0,x.__)("Vertical (icon top)","b-blocks"),value:"vertical"}],DC=[{label:(0,x.__)("Filled","b-blocks"),value:"filled"},{label:(0,x.__)("Outline","b-blocks"),value:"outline"}],FC={"application/pdf":"PDF","application/zip":"ZIP","application/x-zip-compressed":"ZIP","application/x-rar-compressed":"RAR","application/x-7z-compressed":"7Z","application/gzip":"GZ","application/msword":"DOC","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"DOC","application/vnd.ms-excel":"XLS","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"XLS","application/vnd.ms-powerpoint":"PPT","application/vnd.openxmlformats-officedocument.presentationml.presentation":"PPT","application/json":"JSON","application/rtf":"RTF","application/epub+zip":"EPUB","text/plain":"TXT","text/csv":"CSV","text/html":"HTML","image/png":"PNG","image/jpeg":"JPG","image/gif":"GIF","image/webp":"WEBP","image/svg+xml":"SVG","audio/mpeg":"MP3","audio/wav":"WAV","audio/ogg":"OGG","video/mp4":"MP4","video/quicktime":"MOV","video/webm":"WEBM"},HC=(e,t)=>{const n=(e||"").toLowerCase().trim();if(n&&FC[n])return FC[n];const o=(t||"").split("?")[0].split("#")[0],i=o.lastIndexOf(".");if(i>-1){const e=o.slice(i+1).toUpperCase();if(/^[A-Z0-9]{1,5}$/.test(e))return e}return"FILE"},WC=({attributes:e,updateObj:t,setAttributes:n})=>{const{file:o={},content:i={},layout:a={},icon:s={}}=e,{id:r,url:c,name:d,type:u,size:p,buttonLabel:g,openNewTab:m,showFileType:b=!0,showFileSize:f=!0}=o,v=c?HC(u,c):"";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("File","b-blocks"),initialOpen:!0,children:[c?(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10,padding:"8px 10px",background:"#f0f0f1",borderRadius:6},children:[(0,l.jsx)("strong",{style:{fontSize:11},children:v}),(0,l.jsx)("span",{style:{fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d||c})]}):null,(0,l.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:12},children:[(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{value:r||0,onSelect:e=>{n({file:{...o,id:e?.id||0,url:e?.url||"",name:e?.title||e?.filename||"",type:e?.mime||"",size:e?.filesizeHumanReadable||""}})},render:({open:e})=>(0,l.jsx)(y.Button,{variant:"secondary",onClick:e,children:c?(0,x.__)("Replace File","b-blocks"):(0,x.__)("Select File","b-blocks")})})}),c&&(0,l.jsx)(y.Button,{variant:"link",isDestructive:!0,onClick:()=>n({file:{...o,id:0,url:"",name:"",type:"",size:""}}),children:(0,x.__)("Remove","b-blocks")})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Or enter file URL","b-blocks"),value:r?"":c||"",onChange:e=>n({file:{...o,url:e,id:0}}),type:"url",placeholder:"https://",help:r?(0,x.__)("Using a media-library file. Remove it to enter an external URL.","b-blocks"):(0,x.__)("Use for files hosted outside the media library.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Card title","b-blocks"),value:i.title||"",onChange:e=>t("content",e,"title"),placeholder:d||(0,x.__)("Auto-uses file name","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Description","b-blocks"),value:i.description||"",onChange:e=>t("content",e,"description"),placeholder:(0,x.__)("Optional short description","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button label","b-blocks"),value:g||"",onChange:e=>t("file",e,"buttonLabel"),placeholder:(0,x.__)("Download","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("File size (override)","b-blocks"),value:p||"",onChange:e=>t("file",e,"size"),placeholder:"e.g. 2.4 MB",help:r?(0,x.__)("Auto-detected from the media library on the front end.","b-blocks"):(0,x.__)("Shown for external URLs (not auto-detected).","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Open in new tab","b-blocks"),checked:!!m,onChange:e=>t("file",!!e,"openNewTab")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show file type badge","b-blocks"),checked:!!b,onChange:e=>t("file",!!e,"showFileType")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show file size","b-blocks"),checked:!!f,onChange:e=>t("file",!!e,"showFileSize")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Layout","b-blocks"),labelPosition:"edge",value:a.type||"horizontal",options:zC,onChange:e=>t("layout",e,"type"),__nextHasNoMarginBottom:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Badge","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Style","b-blocks"),value:s.style||"filled",options:DC,onChange:e=>t("icon",e,"style"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Badge Size","b-blocks"),value:parseInt(s.size,10)||48,onChange:e=>t("icon",e,"size"),min:32,max:96,__nextHasNoMarginBottom:!0})]})]})},UC=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,
413 -m.useState)("normal"),{icon:a={},title:s={},description:r={},meta:c={},button:d={}}=e,u=d[o]||{},p=(e,o,i,a,s)=>(0,l.jsx)(k,{className:s,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:IC,values:a?.[n],resetValues:OC,onChange:e=>t(o,e,i,n)}),h=(e,i,a,s)=>(0,l.jsx)(k,{className:s,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:IC,values:a?.[n],resetValues:OC,onChange:e=>t("button",e,o,i,n)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Badge","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:a.bg,onChange:e=>t("icon",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Icon / Text Color:","b-blocks"),value:a.color,onChange:e=>t("icon",e,"color"),defaultColor:"#2563eb"}),p((0,x.__)("Padding","b-blocks"),"icon","padding",a.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"icon","margin",a.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("icon",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Corner Radius","b-blocks"),"icon","radius",a.radius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:s.color||"#111827",onChange:e=>t("title",e,"color"),defaultColor:"#111827"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:s.bg,onChange:e=>t("title",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typo,onChange:e=>t("title",e,"typo")}),p((0,x.__)("Padding","b-blocks"),"title","padding",s.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"title","margin",s.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("title",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Border Radius","b-blocks"),"title","borderRadius",s.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:r.color||"#6b7280",onChange:e=>t("description",e,"color"),defaultColor:"#6b7280"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:r.bg,onChange:e=>t("description",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.typo,onChange:e=>t("description",e,"typo")}),p((0,x.__)("Padding","b-blocks"),"description","padding",r.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"description","margin",r.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>t("description",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Border Radius","b-blocks"),"description","borderRadius",r.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:c.color||"#9ca3af",onChange:e=>t("meta",e,"color"),defaultColor:"#9ca3af"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:c.bg,onChange:e=>t("meta",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:c.typo,onChange:e=>t("meta",e,"typo")}),p((0,x.__)("Padding","b-blocks"),"meta","padding",c.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"meta","margin",c.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:c.border,onChange:e=>t("meta",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Border Radius","b-blocks"),"meta","borderRadius",c.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:d.typo,onChange:e=>t("button",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:u.bg,onChange:e=>t("button",e,o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:u.color||"",onChange:e=>t("button",e,o,"color"),defaultColor:"#ffffff"}),h((0,x.__)("Padding","b-blocks"),"padding",u.padding,"mt10"),h((0,x.__)("Margin","b-blocks"),"margin",u.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:u.border,onChange:e=>t("button",e||{},o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),h((0,x.__)("Border Radius","b-blocks"),"radius",u.radius),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:d.transition??.2,onChange:e=>t("button",e,"transition"),min:0,max:5,step:.01,__nextHasNoMarginBottom:!0})]})]})},GC=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:RC,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(WC,{...e}),"style"===t.name&&(0,l.jsx)(UC,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},VC=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{file:i={},content:a={},layout:s={},icon:r={}}=t,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,d=fe(t,n),{url:u,id:p,name:g,type:m,size:b,buttonLabel:f,showFileType:v=!0,showFileSize:k=!0}=i,w=e=>{n({file:{...i,id:e?.id||0,url:e?.url||"",name:e?.title||e?.filename||"",type:e?.mime||"",size:e?.filesizeHumanReadable||""}})},_=u?HC(m,u):"FILE",C=!(!b||!String(b).trim()),j=v&&_||k&&C,$=["b-blocks-file-download-card",`b-blocks-file-download-card--${s.type||"horizontal"}`,`b-blocks-file-download-card--icon-${r.style||"filled"}`].join(" "),S=(0,h.useBlockProps)({id:`block-${o}`});return u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(GC,{...e,updateObj:d,isPremium:c}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(h.MediaUpload,{value:p||0,onSelect:w,render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{icon:"media-document",label:(0,x.__)("Replace file","b-blocks"),onClick:e})})})}),(0,l.jsxs)(y.ToolbarGroup,{children:[(0,l.jsx)(y.ToolbarButton,{icon:"align-pull-left",label:(0,x.__)("Horizontal layout","b-blocks"),isPressed:"horizontal"===(s.type||"horizontal"),onClick:()=>d("layout","horizontal","type")}),(0,l.jsx)(y.ToolbarButton,{icon:"editor-insertmore",label:(0,x.__)("Vertical layout","b-blocks"),isPressed:"vertical"===s.type,onClick:()=>d("layout","vertical","type")})]})]}),(0,l.jsxs)("div",{...S,children:[(0,l.jsx)(BC,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:$,children:(0,l.jsxs)("article",{className:"b-blocks-file-download-card-card",children:[(0,l.jsx)("span",{className:"b-blocks-file-download-card-badge","aria-hidden":"true",children:_}),(0,l.jsxs)("div",{className:"b-blocks-file-download-card-body",children:[(0,l.jsx)(h.RichText,{tagName:"h3",className:"b-blocks-file-download-card-title",value:a.title,onChange:e=>d("content",e,"title"),placeholder:g||(0,x.__)("Card title…","b-blocks"),allowedFormats:[]}),(0,l.jsx)(h.RichText,{tagName:"p",className:"b-blocks-file-download-card-desc",value:a.description,onChange:e=>d("content",e,"description"),placeholder:(0,x.__)("Optional short description","b-blocks"),allowedFormats:[]}),j?(0,
414 -l.jsxs)("p",{className:"b-blocks-file-download-card-meta",children:[v&&_?(0,l.jsx)("span",{className:"b-blocks-file-download-card-meta-type",children:_}):null,v&&_&&k&&C?(0,l.jsx)("span",{className:"b-blocks-file-download-card-meta-sep",children:"·"}):null,k&&C?(0,l.jsx)("span",{className:"b-blocks-file-download-card-meta-size",children:b}):null]}):null]}),(0,l.jsx)("div",{className:"b-blocks-file-download-card-action",children:(0,l.jsxs)("span",{className:"b-blocks-file-download-card-btn",children:[(0,l.jsx)("svg",{className:"b-blocks-file-download-card-btn-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M5 21h14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,l.jsx)("span",{className:"b-blocks-file-download-card-btn-label",children:f||(0,x.__)("Download","b-blocks")})]})})]})})})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(GC,{...e,updateObj:d,isPremium:c}),(0,l.jsx)("div",{...S,children:(0,l.jsx)("div",{children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{value:p||0,onSelect:w,render:({open:e})=>(0,l.jsxs)("button",{type:"button",className:"b-blocks-file-download-card-placeholder",onClick:e,children:[(0,l.jsx)("span",{className:"b-blocks-file-download-card-placeholder-icon",children:(0,x.__)("FILE","b-blocks")}),(0,l.jsx)("span",{children:(0,x.__)("Select a file from the media library to create a download card.","b-blocks")})]})})})})})]})}));Ll(AC.name)&&(0,p.registerBlockType)(AC,{icon:jl,edit:VC,save:()=>null});const qC=JSON.parse('{"apiVersion":3,"name":"b-blocks/flip-boxes","title":"Flip Boxes","description":"Display Flip boxes section.","category":"bBlocks","keywords":["flip","flip boxes","flip boxes section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"boxes":{"type":"array","default":[{"frontBG":{"type":"solid","color":"#000000b3"},"backBG":{"type":"solid","color":"#000000b3"},"border":{"solid":"solid"},"shadow":{"type":"box"},"isFrontUpIcon":false,"frontIcon":{"class":"fa fa-sync-alt","fontSize":70,"color":"#fff"},"upFrontIcon":{"id":null,"url":"","alt":"","title":""},"frontIconWidth":"70px","isBackUpIcon":false,"backIcon":{"class":"fa-brands fa-wordpress","fontSize":70,"color":"#fff"},"upBackIcon":{"id":null,"url":"","alt":"","title":""},"backIconWidth":"70px","frontTitle":"Front Title 1","frontTitleColor":"#fff","backTitle":"Back Title 1","backTitleColor":"#fff","desc":"This content area describes flip box 1 descriptions/details.","descColor":"#fff","btn":"Button 1","btnLink":"#","btnBorder":{"radius":"3px"},"btnColors":{"color":"#fff","bg":"#ff4500"},"btnHovColors":{"color":"#fff","bg":"#ff7500"},"direction":"right"},{"frontBG":{"type":"solid","color":"#000000b3"},"backBG":{"type":"solid","color":"#000000b3"},"border":{"solid":"solid"},"shadow":{"type":"box"},"isFrontUpIcon":false,"frontIcon":{"class":"fa fa-sync-alt","fontSize":70,"color":"#fff"},"upFrontIcon":{"id":null,"url":"","alt":"","title":""},"frontIconWidth":"70px","isBackUpIcon":false,"backIcon":{"class":"fa-brands fa-wordpress","fontSize":70,"color":"#fff"},"upBackIcon":{"id":null,"url":"","alt":"","title":""},"backIconWidth":"70px","frontTitle":"Front Title 2","frontTitleColor":"#fff","backTitle":"Back Title 2","backTitleColor":"#fff","desc":"This content area describes flip box 2 descriptions/details.","descColor":"#fff","btn":"Button 2","btnLink":"#","btnBorder":{"radius":"3px"},"btnColors":{"color":"#fff","bg":"#ff4500"},"btnHovColors":{"color":"#fff","bg":"#ff7500"},"direction":"right"},{"frontBG":{"type":"solid","color":"#000000b3"},"backBG":{"type":"solid","color":"#000000b3"},"border":{"solid":"solid"},"shadow":{"type":"box"},"isFrontUpIcon":false,"frontIcon":{"class":"fa fa-sync-alt","fontSize":70,"color":"#fff"},"upFrontIcon":{"id":null,"url":"","alt":"","title":""},"frontIconWidth":"70px","isBackUpIcon":false,"backIcon":{"class":"fa-brands fa-wordpress","fontSize":70,"color":"#fff"},"upBackIcon":{"id":null,"url":"","alt":"","title":""},"backIconWidth":"70px","frontTitle":"Front Title 3","frontTitleColor":"#fff","backTitle":"Back Title 3","backTitleColor":"#fff","desc":"This content area describes flip box 3 descriptions/details.","descColor":"#fff","btn":"Button 3","btnLink":"#","btnBorder":{"radius":"3px"},"btnColors":{"color":"#fff","bg":"#ff4500"},"btnHovColors":{"color":"#fff","bg":"#ff7500"},"direction":"right"}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"40px"},"rowGap":{"type":"string","default":"30px"},"boxHeight":{"type":"string","default":"400px"},"textAlign":{"type":"string","default":"center"},"boxPadding":{"type":"object","default":{"vertical":"30px","horizontal":"25px"}},"isIcon":{"type":"boolean","default":true},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"isBtn":{"type":"boolean","default":true},"isLinkNewTab":{"type":"boolean","default":true},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"btnPadding":{"type":"object","default":{"vertical":"15px","horizontal":"25px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),YC=[{name:"front",title:(0,x.__)("Front","b-blocks")},{name:"back",title:(0,x.__)("Back","b-blocks")}],KC=e=>{const{attributes:t,setAttributes:n,index:o}=e,{boxes:i=[],isIcon:a}=t,{frontBG:s={},backBG:r={},border:c={},shadow:d={},isFrontUpIcon:u=!1,frontIcon:p={},upFrontIcon:h={},frontIconWidth:g="70px",isBackUpIcon:m=!1,backIcon:b={},upBackIcon:f={},backIconWidth:k="70px",frontTitle:w="",frontTitleColor:_="",backTitle:C="",backTitleColor:j="",desc:$="",descColor:S="",btn:T="",btnLink:N="",btnBorder:M={},btnColors:L={},btnHovColors:P={}}=i?.[o]||{},E=(e,i)=>{fe(t,n)("boxes",i,o,e)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",gap:10,children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o].direction,onChange:e=>E("direction",e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:"arrow-right-alt"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"bottom",icon:"arrow-down-alt"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:"arrow-left-alt"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"top",icon:"arrow-up-alt"})]})]}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:c,onChange:e=>E("border",e)}),(0,l.jsx)(od,{label:(0,x.__)("Shadow:","b-blocks"),value:d,onChange:e=>E("shadow",e)}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:YC,children:e=>(0,l.jsxs)(l.Fragment,{children:["front"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Front Box","b-blocks"),children:(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:s,onChange:e=>E("frontBG",e)})}),a&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Front Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:u,onChange:e=>E("isFrontUpIcon",e)}),u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,
415 -x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:h,onChange:e=>E("upFrontIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:g,onChange:e=>E("frontIconWidth",e),units:[Pe(),Ee(),Ae()]})]}):(0,l.jsx)(Un,{value:p,onChange:e=>E("frontIcon",e),defaults:{class:"fa fa-sync-alt",fontSize:70,color:"#fff"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Front Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:w,onChange:e=>E("frontTitle",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:_,onChange:e=>E("frontTitleColor",e),defaultColor:"#fff"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:$,onChange:e=>E("desc",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:S,onChange:e=>E("descColor",e),defaultColor:"#fff"})]})]}),"back"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Back Box","b-blocks"),children:(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:r,onChange:e=>E("backBG",e)})}),a&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Back Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:m,onChange:e=>E("isBackUpIcon",e)}),m?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:f,onChange:e=>E("upBackIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:k,onChange:e=>E("backIconWidth",e),units:[Pe(),Ee(),Ae()]})]}):(0,l.jsx)(Un,{value:b,onChange:e=>E("backIcon",e),defaults:{class:"fa fa-wordpress",fontSize:70,color:"#fff"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Back Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:C,onChange:e=>E("backTitle",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:j,onChange:e=>E("backTitleColor",e),defaultColor:"#fff"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:T,onChange:e=>E("btn",e)}),(0,l.jsx)(v,{children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:N,onChange:e=>E("btnLink",e)}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:M,onChange:e=>E("btnBorder",e),defaults:{radius:"3px"}}),(0,l.jsx)(On,{value:L,onChange:e=>E("btnColors",e),defaults:{color:"#fff",bg:"#ff4500"}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:P,onChange:e=>E("btnHovColors",e),defaults:{color:"#fff",bg:"#ff7500"}})]})]})]})})]})},QC=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,isPremium:i,device:a})=>{const{boxes:s=[],columns:r,columnGap:c,rowGap:d,boxHeight:u,textAlign:p,boxPadding:g,isIcon:m,iconMargin:b,titleTypo:f,titleMargin:k,isDesc:w,descTypo:C,isBtn:j,isLinkNewTab:$,btnTypo:S,btnPadding:T}=e,N={frontBG:{type:"solid",color:"#000000b3"},backBG:{type:"solid",color:"#000000b3"},border:{},shadow:{},frontIcon:{class:"fa fa-sync-alt",fontSize:70,color:"#fff"},backIcon:{class:"fa-brands fa-wordpress",fontSize:70,color:"#fff"},frontTitle:`Front Title ${s.length+1}`,frontTitleColor:"#fff",backTitle:`Back Title ${s.length+1}`,backTitleColor:"#fff",desc:`This content area describes flip box ${s.length+1} descriptions/details.`,descColor:"#fff",btn:`Button ${s.length+1}`,btnLink:"#",btnBorder:{radius:"3px"},btnColors:{color:"#fff",bg:"#ff4500"},btnHovColors:{color:"#fff",bg:"#ff7500"}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:s=>(0,l.jsxs)(l.Fragment,{children:["general"==s.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Boxes","b-blocks"),children:[(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,arrKey:"boxes",minItem:1,ItemSettings:KC,itemLabel:"Flip Box",newItem:N,title:"frontTitle",design:i?"sortable":"single"}),!i&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:r[a],onChange:e=>{t({columns:{...r,[a]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:m,onChange:e=>t({isIcon:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Description","b-blocks"),checked:w,onChange:e=>t({isDesc:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Button","b-blocks"),checked:j,onChange:e=>t({isBtn:e})}),j&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Link in New Tab","b-blocks"),checked:$,onChange:e=>t({isLinkNewTab:e})})]})]}),"style"==s.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Box","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({boxHeight:e}),units:[Pe(),Ae()]}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:g,onChange:e=>t({boxPadding:e}),defaults:{vertical:"30px",horizontal:"25px"}})]}),m&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:(0,l.jsx)(id,{label:(0,x.__)("Margin:","b-blocks"),value:b,onChange:e=>t({iconMargin:e}),defaults:{side:4,bottom:"20px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:f,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}}),f&&(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:k,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"20px"}})]}),w&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Oa,{value:C,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}})}),j&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:S,onChange:e=>t({btnTypo:e}),defaults:{fontSize:{desktop:20,tablet:18,mobile:16}}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:T,onChange:e=>t({btnPadding:e}),defaults:{vertical:"15px",horizontal:"25px"}})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,
416 -l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Box","b-blocks"),onClick:()=>t({boxes:[...s,N]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:p,onChange:e=>t({textAlign:e})})]})]})})),ZC="bBlocksFlipBoxes",XC=({attributes:e,id:t})=>{const{boxes:n,columnGap:o,rowGap:i,boxHeight:a,textAlign:s,boxPadding:r,iconMargin:c,titleTypo:d,titleMargin:u,descTypo:p,btnTypo:h,btnPadding:g}=e,m=`#${t}`,b=`${m} .flipBox`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",d)?.googleFontLink}\n\t\t${ps("",p)?.googleFontLink}\n\t\t${ps("",h)?.googleFontLink}\n\t\t${ps(`${b} .flipTitle`,d)?.styles}\n\t\t${ps(`${b} .flipDescription`,p)?.styles}\n\t\t${ps(`${b} .flipBtn`,h)?.styles}\n\n\t\t${m} .${ZC}{ grid-gap: ${i} ${o}; }\n\t\t${b}{\n\t\t\theight: ${a};\n\t\t}\n\t\t${b} .box{\n\t\t\ttext-align: ${s};\n\t\t\tpadding: ${us(r)};\n\t\t}\n\t\t${b} i.flipIcon{\n\t\t\tmargin: ${us(c)};\n\t\t}\n\t\t${b} .flipTitle{\n\t\t\tmargin: ${us(u)};\n\t\t}\n\t\t${b} .flipBtn{\n\t\t\tpadding: ${us(g)};\n\t\t}\n\t\t\t\n\t\t${n.map(((e,t)=>{const{frontBG:n,backBG:o,border:i,shadow:a,frontIcon:s={},frontIconWidth:r="70px",backIcon:l={},backIconWidth:c="70px",frontTitleColor:d,backTitleColor:u,descColor:p,btnBorder:h,btnColors:g,btnHovColors:b}=e,f=`${m} #flipBox-${t}`;return`\n\t\t\t\t${f} .box{\n\t\t\t\t\t${is(i)}\n\t\t\t\t\tbox-shadow: ${ds(a)};\n\t\t\t\t}\n\t\t\t\t${f} .box.front{\n\t\t\t\t\t${os(n)}\n\t\t\t\t}\n\t\t\t\t${f} .box.back{\n\t\t\t\t\t${os(o)}\n\t\t\t\t}\n\t\t\t\t${f} img.flipIcon.frontIcon{\n\t\t\t\t\twidth: ${r};\n\t\t\t\t}\n\t\t\t\t${f} i.flipIcon.frontIcon{\n\t\t\t\t\t${rs(s)}\n\t\t\t\t}\n\t\t\t\t${f} img.flipIcon.backIcon{\n\t\t\t\t\twidth: ${c};\n\t\t\t\t}\n\t\t\t\t${f} i.flipIcon.backIcon{\n\t\t\t\t\t${rs(l)}\n\t\t\t\t}\n\t\t\t\t${f} .flipTitle.flipFrontTitle{\n\t\t\t\t\tcolor: ${d};\n\t\t\t\t}\n\t\t\t\t${f} .flipTitle.flipBackTitle{\n\t\t\t\t\tcolor: ${u};\n\t\t\t\t}\n\t\t\t\t${f} .flipDescription{\n\t\t\t\t\tcolor: ${p};\n\t\t\t\t}\n\t\t\t\t${f} .flipBtn{\n\t\t\t\t\t${ss(g)}\n\t\t\t\t\t${is(h)}\n\t\t\t\t}\n\t\t\t\t${f} .flipBtn:hover{\n\t\t\t\t\t${ss(b)}\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},JC=({attributes:e,isBackend:t=!1,custom:n})=>{const{boxes:o,columns:i,isIcon:a,isDesc:s,isBtn:r,isLinkNewTab:c}=e;return(0,l.jsx)("div",{className:`${ZC} columns-${i.desktop} columns-tablet-${i.tablet} columns-mobile-${i.mobile}`,children:o.map(((e,o)=>{const{isFrontUpIcon:i=!1,frontIcon:d={},upFrontIcon:u={},isBackUpIcon:p=!1,backIcon:h={},upBackIcon:g={},frontTitle:m,backTitle:b,desc:f,btn:x,btnLink:y,direction:v="right"}=e;return(0,l.jsxs)("div",{onClick:()=>t&&n.setActiveIndex(o),className:"flipBox "+(t&&o===n.activeIndex?"bPlNowEditing":""),id:`flipBox-${o}`,"data-direction":v,children:[(0,l.jsx)("div",{className:"box front",children:(0,l.jsxs)("div",{className:"frontContent",children:[a&&(0,l.jsx)(l.Fragment,{children:i?(0,l.jsx)("img",{className:u?.id?"flipIcon frontIcon":null,src:u?.url,alt:u?.alt}):d?.class&&(0,l.jsx)("i",{className:`flipIcon frontIcon ${d?.class}`})}),m&&(0,l.jsx)("h3",{className:"flipTitle flipFrontTitle",children:m}),s&&f&&(0,l.jsx)("p",{className:"flipDescription",children:f})]})}),(0,l.jsx)("div",{className:"box back",children:(0,l.jsxs)("div",{className:"backContent",children:[a&&(0,l.jsx)(l.Fragment,{children:p?(0,l.jsx)("img",{className:g?.id?"flipIcon backIcon":null,src:g?.url,alt:g?.alt}):h?.class&&(0,l.jsx)("i",{className:`flipIcon backIcon ${h?.class}`})}),b&&(0,l.jsx)("h3",{className:"flipTitle flipBackTitle",children:b}),r&&x&&(0,l.jsx)("a",{href:$t(y),className:"flipBtn",target:c?"_blank":"_self",rel:"noreferrer noopener",children:x})]})})]},o)}))})};Ll(qC.name)&&(0,p.registerBlockType)(qC,{icon:yr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,a]=(0,m.useState)(0),s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(QC,{attributes:t,setAttributes:n,activeIndex:i,setActiveIndex:a,isPremium:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(XC,{attributes:t,id:`block-${o}`}),(0,l.jsx)(JC,{attributes:t,isBackend:!0,custom:{activeIndex:i,setActiveIndex:a}})]})]})},save:()=>null})
417 -;const ej=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/form-builder","version":"1.0.0","title":"Form","category":"bBlocks","description":"Create Beautiful and Professional Login, Register or any other custom Forms easily with a few clicks.","keywords":["form","register","login","sign in","sign up"],"textdomain":"b-blocks","attributes":{"formId":{"type":"string","default":""},"postId":{"type":"number","default":""},"clientId":{"type":"string","default":""},"form":{"type":"object","default":{"formType":""}},"align":{"type":"string","default":""},"weakPassword":{"type":"object","default":{"option":"default","validation":{"length":8,"uppercase":true,"lowercase":true,"number":true,"specialChar":true}}},"password":{"type":"object","default":{"container":{"desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{},"bg":{"color":"#0000"}},"meter":{"desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{}},"passStrengthTxt":{"veryWeak":"Very Weak","weak":"Weak Password","medium":"Medium Password","strong":"Strong Password","desktop":{"margin":{},"padding":{}},"tablet":{"margin":{},"padding":{}},"mobile":{"margin":{},"padding":{}},"typography":{}},"colors":{"veryWeak":"","weak":"","medium":"","strong":"","bg":{}}}},"button":{"type":"object","default":{"button":{"text":"Submit"},"navigation":{"isNavigation":true,"first":{"text":"Already have an account?"},"second":{"text":"Sign In","url":""}},"spinner":{"show":false},"signup":{"text":"Register","desktop":{"margin":{},"padding":{"top":"12px","left":"25px","bottom":"12px","right":"25px"},"justify":"space-between","displayAs":"row","alignment":"left","width":"","height":""},"tablet":{"margin":{},"padding":{"top":"12px","left":"25px","bottom":"12px","right":"25px"},"justify":"space-between","displayAs":"row","alignment":"left","width":"","height":""},"mobile":{"margin":{},"padding":{"top":"12px","left":"25px","bottom":"12px","right":"25px"},"justify":"space-between","displayAs":"row","alignment":"left","width":"","height":""},"typography":{},"normal":{"color":"#fff","bg":{"color":"#146EF5"},"border":{},"radius":{}},"hover":{"color":"#fff","bg":{"color":"#146EF5"},"border":{},"radius":{}},"animation":"none","spinner":{"show":false,"position":0,"color":""}},"signin":{"text":{"first":"","second":"Sign In","link":""},"desktop":{"margin":{},"padding":{},"displayAs":"row","justify":"start","alignment":"baseline","containerWidth":"","width":"","height":""},"tablet":{"margin":{},"padding":{},"displayAs":"row","justify":"start","alignment":"baseline","containerWidth":"","width":"","height":""},"mobile":{"margin":{},"padding":{},"displayAs":"row","justify":"start","alignment":"baseline","containerWidth":"","width":"","height":""},"typography":{"fontSize":{"desktop":"16px"}},"normal":{"color":"","bg":{},"border":{},"radius":{}},"hover":{"color":"","bg":{},"border":{},"radius":{}}},"signout":{"text":{"first":"You are already loggedin.","second":"Logout"}}}},"formOptions":{"type":"object","default":{"isRedirect":true,"customUrl":"","redirectPrevious":false,"userRole":"subscriber"}},"emailOptions":{"type":"object","default":{"user":{"type":"default","messageType":"HTML","mail":{"subject":"Thank you for registering","message":"<p>Thank you for registering on gutenberg plugin development!</p> \\n <p>Username: [username]</p> \\n <p>Password: [password]</p> \\n<p>Please click the following address to login to your account:</p> \\n<p>http://localhost/my-site/wp-admin/post.php/ </p>"}},"admin":{"type":"default","messageType":"HTML","email":"","mail":{"subject":"New User Registration","message":"<p>New user registration on your site gutenberg plugin development</p>\\n<p>Username: [username]</p>\\n<p>Email: [email]</p>"}}}},"termsConditions":{"type":"object","default":{"show":false,"label":{"first":"I Accept","second":"the Terms and Conditions."},"url":"","margin":{"desktop":{},"tablet":{},"mobile":{}},"padding":{"desktop":{},"tablet":{},"mobile":{}},"checkboxMargin":{"desktop":{},"tablet":{},"mobile":{}},"color":{"text":"","link":"","bg":"","checkbox":""},"typography":{"fontSize":{"desktop":"15px"}}}},"validation":{"type":"object","default":{"error":{"email":{"invalid":"You have used an invalid email","missing":"Email is missing","alreadyUsed":"Email is already registered with other account."},"username":{"invalid":"You have used an invalid username","alreadyUsed":"The username already registered.","missing":"Username is missing"},"password":{"invalid":"Your password is invalid","confirmedPass":"Your confirmed password did not match","missing":"Password is missing","custom":""},"styles":{"typo":{"fontSize":{"desktop":"11px"}},"color":"","margin":{}}},"success":{"text":"Form submitted successfully!","styles":{"isShow":false,"typo":{"fontSize":{"desktop":"14px"}},"color":{"text":"","bg":{}},"margin":{},"padding":{},"border":{"left":{"color":"#00F","style":"solid","width":"2px"}},"radius":{}}}}},"message":{"type":"object","default":{"isShowDemoSuccess":false,"isShowDemoError":false,"success":{"successFulRegistration":"Registration completed successfully!"},"error":{"default":"Something went wrong!"}}},"styles":{"type":"object","default":{"form":{"bg":{},"width":{"type":"full","desktop":"100%","tablet":"","mobile":""},"align":"center","border":{},"shadow":[],"desktop":{"margin":{},"padding":{},"radius":{},"fieldGap":10},"tablet":{"margin":{},"padding":{},"radius":{},"fieldGap":""},"mobile":{"margin":{},"padding":{},"radius":{},"fieldGap":""}},"buttonStyle":{"container":{"desktop":{"display":"row","margin":{},"padding":{},"justify":"space-between","align":"flex-start","gap":"10px"},"tablet":{"display":"row","margin":{},"padding":{},"justify":"","align":"","gap":""},"mobile":{"display":"row","margin":{},"padding":{},"justify":"","align":"","gap":""}},"button":{"typography":{"fontSize":{"desktop":"15px"}},"desktop":{"position":"","margin":{},"padding":{}},"tablet":{"position":"","margin":{},"padding":{}},"mobile":{"position":"","margin":{},"padding":{}},"normal":{"color":"","bg":{},"desktop":{"border":{},"shadow":[],"radius":{}},"tablet":{"border":{},"shadow":[],"radius":{}},"mobile":{"border":{},"shadow":[],"radius":{}}},"hover":{"animation":"","transition":"","color":"","bg":{},"desktop":{"border":{},"shadow":[],"radius":{}},"tablet":{"border":{},"shadow":[],"radius":{}},"mobile":{"border":{},"shadow":[],"radius":{}}}},"spinner":{"isDemo":false,"margin":{"left":"10px","right":"","top":"","bottom":""},"color":"#fff","size":"16px"},"navigation":{"first":{"typography":{},"color":"","desktop":{"margin":{}},"tablet":{"margin":{}},"mobile":{"margin":{}}},"second":{"typography":{},"color":"","desktop":{"margin":{}},"tablet":{"margin":{}},"mobile":{"margin":{}}}}},"message":{"success":{"typo":{"fontSize":{"desktop":"14px"}},"color":{"text":"","bg":{}},"margin":{},"padding":{},"border":{"left":{"color":"#00F","style":"solid","width":"2px"}},"radius":{}},"error":{"typo":{"fontSize":{"desktop":"14px"}},"color":{"text":"","bg":{}},"margin":{},"padding":{},"border":{"left":{"color":"#ff2c2c","style":"solid","width":"2px"}},"radius":{}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"60px","right":"60px","bottom":"60px","left":"60px"},"tablet":{"top":"50px","right":"50px","bottom":"50px","left":"50px"},"mobile":{"top":"40px","right":"40px","bottom":"40px","left":"40px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"usesContext":["b-blocks/inputClientId"],"example":{"attributes":{}},"editorScript":"file:../index.js","render":"file:./render.php","style":"file:./view.css","viewScript":["file:./view.js","wp-util"]}'),tj=({handleReplaceForm:e})=>(0,
418 -l.jsxs)("div",{className:"b-blocks-b-form-preselectFormSkeleton-wrapper",children:[(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton-wrapper",children:[(0,l.jsxs)("div",{onClick:()=>e("register"),children:[(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton",children:[(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton-button-wrapper",children:[(0,l.jsx)("div",{}),(0,l.jsx)("div",{})]})]}),(0,l.jsx)("p",{className:"b-blocks-b-form-skeleton-form-title",children:"Register Form"})]}),(0,l.jsxs)("div",{onClick:()=>e("login"),children:[(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton",children:[(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-button-wrapper",children:(0,l.jsx)("div",{})})]}),(0,l.jsx)("p",{className:"b-blocks-b-form-skeleton-form-title",children:"Login Form"})]})]}),(0,l.jsx)("div",{})]}),nj={register:[{clientId:"49f6ed66-21bd-479f-a38d-df2c86fa87db",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"text",placeholder:"Username",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z'/></svg>",name:"username"},label:{text:"User Name"},options:{isLabel:!0,isRequired:!0,isIcon:!0,isShowRequiredIcon:!1},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{left:"33px",bottom:"10px",top:"10px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"49f6ed66-21bd-479f-a38d-df2c86fa87db"},innerBlocks:[]},{clientId:"3aad4b69-888a-415e-bd89-ae47dbca7f4a",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"email",placeholder:"Email",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z'/></svg>",name:"email"},label:{text:"Email"},options:{isLabel:!0,isRequired:!0,isIcon:!0,isShowRequiredIcon:!1},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{top:"10px",bottom:"10px",left:"33px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"3aad4b69-888a-415e-bd89-ae47dbca7f4a"},innerBlocks:[]},{clientId:"de949083-6ecf-4d44-9ce6-95ae2cfa39e9",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"password",placeholder:"Password",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z'/></svg>",name:"password"},label:{text:"Password"},options:{isLabel:!0,isRequired:!0,isIcon:!0,isShowRequiredIcon:!1},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",
296 +;return`\n\n\t\t\t${ps("",l.typography).googleFontLink}\n\t\t\t${ps("",c.typography).googleFontLink}\n\n\t\t\t${ps(y,l.typography).styles}\n\t\t\t${ps(k,c.typography).styles}\n\n\t\t\t${h}{\n\t\t\t\t${ns("flex-direction",i.desktop.direction)}\n\t\t\t}\n\n\t\t\t${g}{\n\t\t\t\t${ns("justify-content",$("desktop")?i.desktop.columnJustify:i.desktop.rowJustify)}\n\t\t\t\t${ns("flex-direction",j("desktop")?"column":"")}\n\t\t\t\t${ns("gap",r.desktop.gap)}\n\t\t\t\t${ns("padding",hs(s.desktop.padding))}\n\t\t\t\t${ns("margin",hs(s.desktop.margin))}\n\t\t\t\t${ns("border-radius",hs(s.desktop.radius))}\n\t\t\t\t${as(s.border)}\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${N.includes(i?.desktop?.direction)?ns("width",r.desktop.width):""}\n\t\t\t\t${M.includes(i.desktop.direction)?ns("flex-wrap",i.desktop.wrap):""}\n\t\t\t}\n\n\t\t\t${m}{\n\t\t\t\t${ns("width",$("desktop")&&"stretch"===i.desktop.columnJustify?"100%":"")}\n\t\t\t\t${ns("height",j("desktop")&&"stretch"===i.desktop.rowJustify?"100%":"")}\n\t\t\t\t${ns("justify-content",i.desktop.contentAlign)}\n\t\t\t\t${ns("flex-direction",d.desktop.position)}\n\t\t\t\t${S("normal","normal")}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out; \n\t\t\t}\n\n\t\t\t${f}:hover{\n\t\t\t\t${S("normal","hover")}\n\t\t\t}\n\t\t\t\n\t\t\t${b}{\n\t\t\t\t${S("active","normal")}\n\t\t\t}\n\t\t\t${b}:hover{\n\t\t\t\t${S("active","hover")}\n\t\t\t}\n\n\t\t\t${x}{\n\t\t\t\t${ns("text-align",i.desktop.contentAlign)}\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-title{\n\t\t\t\t${ns("color",l.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-title{\n\t\t\t\t${ns("color",l.active.hover.color)}\n\t\t\t}\n\n\t\t\t${y}{\n\t\t\t\t${ns("color",l.normal.normal.color)}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out; \n\t\t\t}\n\n\t\t\t${v}{\n\t\t\t\t${ns("color",l.active.normal.color)}\n\t\t\t}\n\n\t\t\t${k}{\n\t\t\t ${ns("color",c.normal.normal.color)}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out;\n\t\t\t\t${i.isShowActiveSubTitle?ns("display","none"):""}\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-subTitle{\n\t\t\t\t${ns("color",c.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${w}{\n\t\t\t\t${ns("color",c.active.normal.color)}\n\t\t\t\t${i.isShowActiveSubTitle?ns("display","block"):""}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-subTitle{\n\t\t\t\t${ns("color",jt(c.active.hover.color)?c.active.hover.color:c.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${T("normal","normal")}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t${T("normal","hover")}\n\t\t\t}\n\n\t\t\t${_}>svg{\n\t\t\t\t${ns("height",d.desktop.size)}\n\t\t\t\t${ns("width",d.desktop.size)}\n\t\t\t\t${ns("fill",d.normal.normal.color)}\n\t\t\t\t${ns("color",d.normal.normal.color)}\n\t\t\t\ttransition:all ${r.normal.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon>svg{\n\t\t\t\t${ns("fill",d.normal.hover.color)}\n\t\t\t\t${ns("color",d.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${b} .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t${T("active","normal")}\n\t\t\t}\n\n\t\t\t${b} .b-blocks-advanced-tabs-button-icon>svg{\n\t\t\t\t${ns("fill",d.active.normal.color)}\n\t\t\t\t${ns("color",d.active.normal.color)}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("active","hover")}\n\t\t\t}\n\n\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon>svg{\n\t\t\t\t${ns("fill",jt(d.active.hover.color)?d.active.hover.color:d.normal.hover.color)}\n\t\t\t\t${ns("color",jt(d.active.hover.color)?d.active.hover.color:d.normal.hover.color)}\n\t\t\t}\n\n\t\t\t${C}{\n\t\t\t\t${N.includes(i?.desktop?.direction)&&ns("max-width",u.desktop.width)}\n\t\t\t}\n\n\t\t\t${t}{\n\t\t\t\t${h}{\n\t\t\t\t\t${ns("flex-direction",i?.tablet?.direction)}\n\t\t\t\t}\n\t\t\t\t\t${g}{\n\t\t\t\t\t${ns("justify-content",$("tablet")?i?.tablet?.columnJustify:i?.tablet?.rowJustify)}\n\t\t\t\t\t${ns("flex-direction",j("tablet")?"column":"")}\n\t\t\t\t\t${ns("gap",r?.tablet?.gap)}\n\t\t\t\t\t${ns("padding",hs(s?.tablet?.padding))}\n\t\t\t\t\t${ns("margin",hs(s?.tablet?.margin))}\n\t\t\t\t\t${ns("border-radius",hs(s?.tablet?.radius))}\n\t\t\t\t\t${N.includes(i?.tablet?.direction)?ns("width",r?.tablet?.width):""}\n\t\t\t\t\t${M.includes(i?.tablet?.direction)?ns("flex-wrap",i?.tablet?.wrap):""}\n\t\t\t\t}\n\n\t\t\t\t${m}{\n\t\t\t\t\t${ns("width",$("tablet")&&"stretch"===i?.tablet.columnJustify?"100%":"")}\n\t\t\t\t\t${ns("height",j("tablet")&&"stretch"===i?.tablet.rowJustify?"100%":"")}\n\t\t\t\t\t${ns("justify-content",i?.tablet.contentAlign)}\n\t\t\t\t\t${ns("flex-direction",d?.tablet.position)}\n\t\t\t\t\t${S("normal","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${f}:hover{\n\t\t\t\t\t${S("normal","hover","tablet")}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t${b}{\n\t\t\t\t\t${S("active","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${b}:hover{\n\t\t\t\t\t${S("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${x}{\n\t\t\t\t\t${ns("text-align",i?.tablet.contentAlign)}\n\t\t\t\t}\n\n\t\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("normal","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${_}>svg{\n\t\t\t\t\t${ns("height",d?.tablet.size)}\n\t\t\t\t\t${ns("width",d?.tablet.size)}\n\t\t\t\t}\n\n\t\t\t\t${b} .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("active","normal","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t\t${T("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${C}{\n\t\t\t\t\t${N.includes(i?.tablet?.direction)&&ns("max-width",u?.tablet.width)}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t${h}{\n\t\t\t\t\t${ns("flex-direction",i?.tablet?.direction)}\n\t\t\t\t}\n\t\t\t\t\t${g}{\n\t\t\t\t\t${ns("justify-content",$("tablet")?i?.tablet?.columnJustify:i?.tablet?.rowJustify)}\n\t\t\t\t\t${ns("flex-direction",j("tablet")?"column":"")}\n\t\t\t\t\t${ns("gap",r?.tablet?.gap)}\n\t\t\t\t\t${ns("padding",hs(s?.tablet?.padding))}\n\t\t\t\t\t${ns("margin",hs(s?.tablet?.margin))}\n\t\t\t\t\t${ns("border-radius",hs(s?.tablet?.radius))}\n\t\t\t\t\t${N.includes(i?.tablet?.direction)?ns("width",r?.tablet?.width):""}\n\t\t\t\t\t${M.includes(i?.tablet?.direction)?ns("flex-wrap",i?.tablet?.wrap):""}\n\t\t\t\t}\n\n\t\t\t\t${m}{\n\t\t\t\t\t${ns("width",$("tablet")&&"stretch"===i?.tablet.columnJustify?"100%":"")}\n\t\t\t\t\t${ns("height",j("tablet")&&"stretch"===i?.tablet.rowJustify?"100%":"")}\n\t\t\t\t\t${ns("justify-content",i?.tablet.contentAlign)}\n\t\t\t\t\t${ns("flex-direction",d?.tablet.position)}\n\t\t\t\t\t${S("normal","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${f}:hover{\n\t\t\t\t\t${S("normal","hover","tablet")}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t${b}{\n\t\t\t\t\t${S("active","normal","tablet")}\n\t\t\t\t}\n\t\t\t\t${b}:hover{\n\t\t\t\t\t${S("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${x}{\n\t\t\t\t\t${ns("text-align",i?.tablet.contentAlign)}\n\t\t\t\t}\n\n\t\t\t\t${m}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("normal","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${_}>svg{\n\t\t\t\t\t${ns("height",d?.tablet.size)}\n\t\t\t\t\t${ns("width",d?.tablet.size)}\n\t\t\t\t}\n\n\t\t\t\t${b} .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t${T("active","normal","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${b}:hover .b-blocks-advanced-tabs-button-icon{\n\t\t\t\t\t\t${T("active","hover","tablet")}\n\t\t\t\t}\n\n\t\t\t\t${C}{\n\t\t\t\t\t${N.includes(i?.tablet?.direction)&&ns("max-width",u?.tablet.width)}\n\t\t\t\t}\n\t\t\t}\n\n\t`},nu=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{tabLists:a=[],tabs:s}=t,r=(0,m.useRef)(null),[c,d]=(0,m.useState)(null),[u,p]=(0,m.useState)(null),g=(0,m.useRef)(null),b=(0,m.useMemo)((()=>{const e=(a||[]).find((e=>e.isDefault));return s.isCloseAllTab?"":(e||{id:1})?.id}),[a]);(0,
297 +m.useEffect)((()=>{c||d(b)}),[b]);const f="b-blocks/container",x=[[f,{className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-1 b-blocks-advanced-tabs-parent-${t.clientId}`,lock:{remove:!0,move:!0}}],[f,{className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-2 b-blocks-advanced-tabs-parent-${t.clientId}`,lock:{remove:!0,move:!0}}],[f,{className:`b-blocks-advanced-tabs-panel b-blocks-advanced-tabs-panel-3 b-blocks-advanced-tabs-parent-${t.clientId}`,lock:{remove:!0,move:!0}}]],v=fe(t,n);return(0,m.useEffect)((()=>{if(c){const e=g?.current,t=e?.querySelector(`.b-blocks-advanced-tabs-panel-${c}`),n=e?.querySelector(".b-blocks-advanced-tabs-panel");t?t.style.display="block":n&&(n.style.display="none")}}),[g,c]),(0,m.useEffect)((()=>{n({clientId:o.slice(0,12)})}),[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eu,{attributes:t,setAttributes:n,updateObj:v,clientId:o,device:i,activeIndex:u,setActiveIndex:p}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:tu(t,`block-${o}`)}}),(0,l.jsx)("div",{className:"b-blocks-advanced-tabs-main-wrapper",children:(0,l.jsxs)("div",{className:"b-blocks-advanced-tabs-wrapper",ref:r,children:[(0,l.jsxs)("div",{className:"b-blocks-advanced-tabs-button-lists",children:[(a||[]).map(((e,t)=>(0,l.jsxs)("button",{"data-title-tab-id":e.id,onClick:()=>{(e=>{d(String(e));const t=g?.current,n=t.querySelectorAll(".b-blocks-advanced-tabs-panel");(Array.from(n)||[]).forEach((t=>{t.classList.contains(`b-blocks-advanced-tabs-panel-${e}`)?t.style.display="block":t.style.display="none"}))})(e.id),p(t)},className:"b-blocks-advanced-tabs-button "+(c==e.id?"b-blocks-advanced-tabs-button-active":"b-blocks-advanced-tabs-button-normal"),children:[s.isShowIcon&&"none"!==e.iconType&&(0,l.jsx)("p",{className:"b-blocks-advanced-tabs-button-icon",dangerouslySetInnerHTML:{__html:e?.[e.iconType]}}),(0,l.jsxs)("div",{className:"b-blocks-advanced-tabs-button-title-container",children:[s.isShowTitle&&(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-advanced-tabs-button-title",placeholder:"Tab Title",value:e.title,onChange:e=>v("tabLists",e,t,"title")}),s.isShowSubTitle&&(0,l.jsx)(h.RichText,{className:"b-blocks-advanced-tabs-button-subTitle",placeholder:"Tab SubTitle",value:e.subTitle,onChange:e=>v("tabLists",e,t,"subTitle")})]})]},`${t}-${e.id}`))),(0,l.jsx)("div",{className:"b-blocks-advanced-tabs-button-add",onClick:()=>{Nd({clientId:o,blockId:"",tabLists:a,setAttributes:n})},children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})]}),(0,l.jsx)("div",{className:"b-blocks-advanced-tabs-contents",ref:g,children:(0,l.jsx)(h.InnerBlocks,{templateLock:!1,template:a.length>0?x:[],renderAppender:!1})})]})})]})]})}));Pl(wd.name)&&(0,p.registerBlockType)(wd,{icon:sl,edit:nu,save:h.InnerBlocks.Content,deprecated:[{attributes:{...wd.attributes,oldHTML:{type:"string",source:"html"}},isEligible:()=>!0,migrate:(e,t)=>[e,t],save:()=>null}]})
298 +;const ou=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/article-card","title":"Article Card","category":"bBlocks","description":"A single static article, resource, or featured-page preview card — image, category badge, heading, excerpt, optional meta line, and CTA link — in horizontal or vertical layout. No JavaScript required.","keywords":["article","card","resource","read also","featured","preview","link"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"type":{"desktop":"horizontal","tablet":"","mobile":"vertical"},"alignment":{"desktop":"left","tablet":"","mobile":""}}},"image":{"type":"object","default":{"id":{"desktop":0,"tablet":0,"mobile":0},"url":{"desktop":"","tablet":"","mobile":""},"alt":"","objectFit":{"desktop":"cover","tablet":"","mobile":""},"objectPosition":{"desktop":"center","tablet":"","mobile":""},"filter":{"desktop":{},"tablet":{},"mobile":{}},"position":{"desktop":"left","tablet":"","mobile":""},"splitRatio":{"desktop":"40","tablet":"","mobile":""},"splitLeft":{"desktop":"40%","tablet":"","mobile":""},"splitRight":{"desktop":"60%","tablet":"","mobile":""}}},"content":{"type":"object","default":{"badge":"Read Also","heading":"Article title goes here","headingTag":"h3","excerpt":"","meta":"","metaIcon":""}},"link":{"type":"object","default":{"url":"","target":false,"ctaLabel":"Read More","ctaStyle":"button","cardLinkMode":false}},"badge":{"type":"object","default":{"align":"left","bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","padding":{"desktop":{"top":"3px","right":"10px","bottom":"3px","left":"10px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"999px","right":"999px","bottom":"999px","left":"999px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"colors":{"type":"object","default":{"heading":"#111827","text":"#374151","meta":"#6b7280"}},"heading":{"type":"object","default":{"background":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"excerpt":{"type":"object","default":{"background":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"meta":{"type":"object","default":{"color":"#6b7280","iconColor":"#6b7280","bg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"","style":"solid","color":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"card":{"type":"object","default":{"background":{"type":"solid","color":""},"padding":{"desktop":{"top":"20px","right":"20px","bottom":"20px","left":"20px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{"width":"1px","style":"solid","color":"#e5e7eb"},"borderRadius":{"desktop":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[{"hOffset":"0px","vOffset":"1px","blur":"3px","spreed":"0px","color":"rgba(0,0,0,0.12)","isInset":false}]}},"cta":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","border":{"width":"","style":"solid","color":""},"shadow":[]},"hover":{"bg":{"type":"solid","color":"#1d4ed8"},"color":"#ffffff","border":{"width":"","style":"solid","color":""},"shadow":[]},"padding":{"desktop":{"top":"8px","right":"18px","bottom":"8px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"typography":{"type":"object","default":{"heading":{"fontSize":{"desktop":"18px","tablet":"","mobile":""},"fontWeight":"600"},"excerpt":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":"400"},"cta":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":"600"},"badge":{"fontSize":{"desktop":"12px","tablet":"","mobile":""},"fontWeight":"600"},"meta":{"fontSize":{"desktop":"13px","tablet":"","mobile":""},"fontWeight":"400"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 0)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":["file:../index.js"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),iu=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,au={
299 +left:"flex-start",center:"center",right:"flex-end"},su=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:a,layout:s={},image:r={},badge:c={},meta:d={},colors:u={},card:p={},cta:h={},typography:g={},heading:m={},excerpt:b={}}=e,{type:f={},alignment:x}=s,y="string"==typeof x?{desktop:x,tablet:"",mobile:""}:x||{},{position:v={},objectFit:k={},objectPosition:w={},filter:_={},splitRatio:C={},splitLeft:j={},splitRight:$={}}=r,{align:S,bg:T,color:N,padding:M={},margin:L={},border:P={},borderRadius:E={}}=c,{heading:A,text:B,meta:I}=u,{background:O={},padding:R={},border:z={},borderRadius:D={},shadow:F}=p,{normal:H={},hover:W={},padding:U={},margin:G={},borderRadius:V={},transition:q=.2}=h,{heading:Y={},excerpt:K={},cta:Q={},badge:Z={},meta:X={}}=g,J=`#${o} .b-blocks-article-card`,ee=`${J} .b-blocks-article-card-card`,te=`${J} .b-blocks-article-card-media`,ne=`${J} .b-blocks-article-card-img`,oe=`${J} .b-blocks-article-card-media-placeholder`,ie=`${J} .b-blocks-article-card-body`,ae=`${J} .b-blocks-article-card-badge`,se=`${J} .b-blocks-article-card-heading`,re=`${J} .b-blocks-article-card-excerpt`,le=`${J} .b-blocks-article-card-meta`,ce=`${J} .b-blocks-article-card-meta-icon`,de=`${J} .b-blocks-article-card-cta`,ue=`${J} .b-blocks-article-card-link`,pe=`#${o} .b-blocks-article-card--cta-button .b-blocks-article-card-cta`,he=`#${o} .b-blocks-article-card--cta-link .b-blocks-article-card-cta`,ge=(e,t,n)=>ns(e,hs(t?.[n])),me=e=>`\n\t\t${ie}{ ${ge("padding",R,e)} }\n\t\t${ee}{ ${ge("border-radius",D,e)} }\n\t\t${ae}{ ${ge("padding",M,e)} ${ge("margin",L,e)} ${ge("border-radius",E,e)} }\n\t\t${se}{ ${ge("padding",m.padding,e)} ${ge("margin",m.margin,e)} ${ge("border-radius",m.borderRadius,e)} }\n\t\t${re}{ ${ge("padding",b.padding,e)} ${ge("margin",b.margin,e)} ${ge("border-radius",b.borderRadius,e)} }\n\t\t${le}{ ${ge("padding",d.padding,e)} ${ge("margin",d.margin,e)} ${ge("border-radius",d.borderRadius,e)} }\n\t\t${pe}{ ${ge("padding",U,e)} ${ge("margin",G,e)} ${ge("border-radius",V,e)} }\n\t`,be=e=>{const t=iu(k,e)||"cover",n=iu(w,e)||"center";return`\n\t\t\t${ne}{ ${ns("object-fit",t)} ${ns("object-position",n)} ${(e=>{if(!e)return"";const t=[];return e.blur&&t.push(`blur(${e.blur}px)`),null!=e.brightness&&100!==e.brightness&&t.push(`brightness(${e.brightness}%)`),null!=e.contrast&&100!==e.contrast&&t.push(`contrast(${e.contrast}%)`),null!=e.saturate&&100!==e.saturate&&t.push(`saturate(${e.saturate}%)`),e.grayscale&&t.push(`grayscale(${e.grayscale}%)`),t.length?`filter:${t.join(" ")};`:""})(_?.[e])} }\n\t\t`},fe=e=>{const t="horizontal"===(iu(f,e)||"horizontal"),n=iu(v,e)||(t?"left":"top"),o=iu(C,e),i=parseInt(o,10)||40,a="custom"===o?iu(j,e)||"40%":`${i}%`,s="custom"===o?iu($,e)||"60%":100-i+"%",r=t?"right"===n?"row-reverse":"row":"bottom"===n?"column-reverse":"column",l=iu(y,e)||"left";let c="";return c="center"===l?`\n\t\t\t\t${J}{ display: flex; justify-content: center; }\n\t\t\t\t${ie}{ align-items: center; text-align: center; }\n\t\t\t\t${de}{ align-self: center !important; }\n\t\t\t`:"right"===l?`\n\t\t\t\t${J}{ display: flex; justify-content: flex-end; }\n\t\t\t\t${ie}{ align-items: flex-end; text-align: right; }\n\t\t\t\t${de}{ align-self: flex-end !important; }\n\t\t\t`:`\n\t\t\t\t${J}{ display: block; }\n\t\t\t\t${ie}{ align-items: flex-start; text-align: left; }\n\t\t\t\t${de}{ align-self: flex-start; }\n\t\t\t`,`\n\t\t\t${ee}, ${ue}{ flex-direction:${r}; }\n\t\t\t${t?`\n\t\t\t\t${te}{ flex:0 0 ${a}; max-width:${a}; width:${a}; align-self:stretch; position:relative; }\n\t\t\t\t${ne}{ width:100%; height:100%; aspect-ratio:auto; }\n\t\t\t\t${oe}{ width:100%; height:100%; min-height:180px; }\n\t\t\t\t${ie}{ flex:1 1 ${s}; max-width:${s}; width:${s}; justify-content:center; }\n\t\t\t`:`\n\t\t\t\t${te}{ flex:0 0 auto; width:100%; max-width:100%; align-self:auto; }\n\t\t\t\t${ne}{ width:100%; height:auto; }\n\t\t\t\t${oe}{ width:100%; min-height:180px; }\n\t\t\t\t${ie}{ flex:1 1 auto; width:100%; max-width:100%; justify-content:normal; }\n\t\t\t`}\n\t\t\t${c}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",Y).googleFontLink}\n\t\t\t${ps("",K).googleFontLink}\n\t\t\t${ps("",Q).googleFontLink}\n\t\t\t${ps("",Z).googleFontLink}\n\t\t\t${ps("",X).googleFontLink}\n\t\t\t${ee}{\n\t\t\t\t${ns("box-shadow",ls(F))}\n\t\t\t\t${os(O)}\n\t\t\t\t${is(z)}\n\t\t\t}\n\t\t\t${ae}{\n\t\t\t\talign-self:${au[S]||"flex-start"} !important;\n\t\t\t\t${os(T)}\n\t\t\t\tcolor:${N||"#ffffff"};\n\t\t\t\t${is(P)}\n\t\t\t}\n\t\t\t${se}{\n\t\t\t\tcolor:${A||"#111827"};\n\t\t\t\t${os(m.background)}\n\t\t\t\t${is(m.border)}\n\t\t\t}\n\t\t\t${re}{\n\t\t\t\tcolor:${B||"#374151"};\n\t\t\t\t${os(b.background)}\n\t\t\t\t${is(b.border)}\n\t\t\t}\n\t\t\t${le}{\n\t\t\t\tcolor:${d.color||I||"#6b7280"};\n\t\t\t\t${os(d.bg)}\n\t\t\t\t${is(d.border)}\n\t\t\t}\n\t\t\t${ce}{\n\t\t\t\tcolor:${d.iconColor||d.color||I||"#6b7280"};\n\t\t\t}\n\t\t\t${ce} svg{\n\t\t\t\tfill: currentColor;\n\t\t\t}\n\t\t\t${ps(se,Y).styles}\n\t\t\t${ps(re,K).styles}\n\t\t\t${ps(de,Q).styles}\n\t\t\t${ps(ae,Z).styles}\n\t\t\t${ps(le,X).styles}\n\t\t\t${pe}{\n\t\t\t\t${is(H.border)}\n\t\t\t\t${os(H.bg)}\n\t\t\t\t${ns("box-shadow",ls(H.shadow))}\n\t\t\t\tcolor:${H.color||"#ffffff"};\n\t\t\t\ttransition:all ${q}s ease;\n\t\t\t}\n\t\t\t${pe}:hover, ${pe}:focus-visible{\n\t\t\t\t${os(W.bg)}\n\t\t\t\t${is(W.border)}\n\t\t\t\t${ns("box-shadow",ls(W.shadow))}\n\t\t\t\tcolor:${W.color||"#ffffff"};\n\t\t\t}\n\t\t\t${he}{ color:${H.bg?.color||"#2563eb"}; }\n\t\t\t${de}:focus-visible, ${ue}:focus-visible{\n\t\t\t\toutline:2px solid ${H.bg?.color||"#2563eb"};\n\t\t\t\toutline-offset:2px;\n\t\t\t}\n\t\t\t${me("desktop")}\n\t\t\t${be("desktop")}\n\t\t\t${fe("desktop")}\n\t\t\t${t}{\n\t\t\t\t${me("tablet")}\n\t\t\t\t${be("tablet")}\n\t\t\t\t${fe("tablet")}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${me("mobile")}\n\t\t\t\t${be("mobile")}\n\t\t\t\t${fe("mobile")}\n\t\t\t}\n\t\t\t${_s(o,a,i,!1)}\n\t\t\t`}})},ru=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],lu={top:"",right:"",bottom:"",left:""},cu=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],du=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",...e,children:(0,l.jsx)("path",{d:"M4 11h12.17l-3.58-3.59L14 6l6 6-6 6-1.41-1.41L16.17 13H4z"})}),uu=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,pu=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},image:a={},content:s={},link:r={},colors:c={}}=e,{type:d={},alignment:u}=i,p="string"==typeof u?{desktop:u,tablet:"",mobile:""}:u||{},{id:h={},url:g={},alt:m="",objectFit:b={},objectPosition:f={},filter:k={},position:w={},splitRatio:C={},splitLeft:j={},splitRight:$={}}=a,S=k[o]||{},{badge:T,headingTag:N,meta:M,metaIcon:L}=s,{url:P,target:E,ctaLabel:A,ctaStyle:B,cardLinkMode:I}=r,{meta:O}=c,R="horizontal"===uu(d,o),z=uu(C,o),D=!!uu(g,o);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:2,children:[(0,x.__)("Layout","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",isBlock:!0,isDeselectable:!0,value:d[o]||"",onChange:e=>{const n=w[o]||"";let s=n;"horizontal"!==e||["left","right"].includes(n)||(s="left"),"vertical"!==e||["top","bottom"].includes(n)||(s="top"),t({layout:{...i,type:{...d,[o]:e||""}},image:{...a,position:{...w,[o]:s}}})},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"})]}),(0,l.jsxs)(y.Flex,{align:"center",
300 +className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Image Position","b-blocks")," ",(0,l.jsx)(_,{})]})}),R?(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:w[o]||"",onChange:e=>n("image",e,"position",o),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(du,{style:{rotate:"180deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(du,{})})]}):(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:w[o]||"",onChange:e=>n("image",e,"position",o),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Top","b-blocks"),value:"top",icon:(0,l.jsx)(du,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Bottom","b-blocks"),value:"bottom",icon:(0,l.jsx)(du,{style:{rotate:"90deg"}})})]})]}),R&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Image Split Ratio","b-blocks")," ",(0,l.jsx)(_,{})]}),value:z||"",options:[{label:"30 / 70",value:"30"},{label:"40 / 60",value:"40"},{label:"50 / 50",value:"50"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}],onChange:e=>{"custom"===e?n("image",e,"splitRatio",o):t({image:{...a,splitRatio:{...C,[o]:e},splitLeft:{...j,[o]:`${e}%`},splitRight:{...$,[o]:100-parseInt(e,10)+"%"}}})},__nextHasNoMarginBottom:!0}),"custom"===z&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Left","b-blocks"),className:"flex1",value:j[o],onChange:e=>n("image",e,"splitLeft",o)}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Right","b-blocks"),className:"flex1",value:$[o],onChange:e=>n("image",e,"splitRight",o)})]})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:p[o]||"",onChange:e=>{const t="string"==typeof u?{desktop:u,tablet:"",mobile:""}:{...u};t[o]=e,n("layout",t,"alignment")},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:"editor-alignleft"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:"editor-aligncenter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:"editor-alignright"})]})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Wrap entire card in link","b-blocks"),help:(0,x.__)("The whole card becomes a single link (no separate CTA button).","b-blocks"),checked:!!I,onChange:e=>n("link",e,"cardLinkMode")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Image:","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(we,{label:g[o]?(0,x.__)("Replace Image","b-blocks"):(0,x.__)("Select Image","b-blocks"),value:{id:h[o],url:g[o],alt:m},types:["image"],height:"100%",width:"100%",onChange:e=>t({image:{...a,id:{...h,[o]:e?.id||0},url:{...g,[o]:e?.url||""},alt:e?.alt||m||""}})}),"desktop"!==o&&(0,l.jsx)("p",{style:{margin:"6px 0 0",fontSize:11,color:"#777"},children:(0,x.__)("Leave empty to reuse the Desktop image on this device.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Alt Text","b-blocks"),value:m||"",onChange:e=>n("image",e,"alt"),help:(0,x.__)("Describes the image; leave empty for a decorative image.","b-blocks"),__nextHasNoMarginBottom:!0}),D&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Object Fit","b-blocks")," ",(0,l.jsx)(_,{})]}),value:b[o]||"",options:[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"},{label:(0,x.__)("Fill","b-blocks"),value:"fill"},{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Scale Down","b-blocks"),value:"scale-down"}],onChange:e=>n("image",e,"objectFit",o),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Object Position","b-blocks")," ",(0,l.jsx)(_,{})]}),value:f[o]||"",options:[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"},{label:(0,x.__)("Top Left","b-blocks"),value:"top left"},{label:(0,x.__)("Top Right","b-blocks"),value:"top right"},{label:(0,x.__)("Bottom Left","b-blocks"),value:"bottom left"},{label:(0,x.__)("Bottom Right","b-blocks"),value:"bottom right"}],onChange:e=>n("image",e,"objectPosition",o),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt20",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Filter","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Blur (px)","b-blocks"),value:S.blur??0,onChange:e=>n("image",e,"filter",o,"blur"),min:0,max:20,step:.5}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Brightness (%)","b-blocks"),value:S.brightness??100,onChange:e=>n("image",e,"filter",o,"brightness"),min:0,max:200}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Contrast (%)","b-blocks"),value:S.contrast??100,onChange:e=>n("image",e,"filter",o,"contrast"),min:0,max:200}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Saturation (%)","b-blocks"),value:S.saturate??100,onChange:e=>n("image",e,"filter",o,"saturate"),min:0,max:200}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Grayscale (%)","b-blocks"),value:S.grayscale??0,onChange:e=>n("image",e,"filter",o,"grayscale"),min:0,max:100})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Badge Text","b-blocks"),value:T||"",onChange:e=>n("content",e,"badge"),placeholder:(0,x.__)("e.g. Read Also","b-blocks"),help:(0,x.__)("Empty hides the badge.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Heading Tag","b-blocks"),labelPosition:"edge",value:N,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:(0,x.__)("Paragraph","b-blocks"),value:"p"}],onChange:e=>n("content",e,"headingTag"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Meta Line","b-blocks"),value:M||"",onChange:e=>n("content",e,"meta"),placeholder:(0,x.__)("e.g. 5 min read","b-blocks"),help:(0,x.__)("Empty hides the meta line.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Meta Icon","b-blocks"),value:L,onChange:e=>n("content",e,"metaIcon")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Meta Color:","b-blocks"),value:O||"#6b7280",onChange:e=>n("colors",e,"meta"),defaultColor:"#6b7280"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Link & CTA","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link URL","b-blocks"),value:P||"",
301 +onChange:e=>n("link",e,"url"),type:"url",placeholder:"https://",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open in new tab","b-blocks"),checked:!!E,onChange:e=>n("link",e,"target")}),!I&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("CTA Label","b-blocks"),value:A||"",onChange:e=>n("link",e,"ctaLabel"),placeholder:(0,x.__)("Read More","b-blocks"),help:(0,x.__)("Empty hides the CTA.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("CTA Style","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:B,options:[{label:(0,x.__)("Button","b-blocks"),value:"button"},{label:(0,x.__)("Arrow Link","b-blocks"),value:"link"}],onChange:e=>n("link",e,"ctaStyle"),__nextHasNoMarginBottom:!0})]})]})]})]})},hu=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,m.useState)("normal"),{card:a={},colors:s={},cta:r={},link:c={},typography:d={},badge:u={},meta:p={},heading:h={},excerpt:g={}}=e,{background:b={},padding:f={},border:v={},borderRadius:w={},shadow:C}=a,{heading:j,text:$}=s,{align:S,bg:T={},color:N,padding:M={},margin:L={},border:P={},borderRadius:E={}}=u,{padding:A={},margin:B={},borderRadius:I={},transition:O}=r,R=r[o]||{},{ctaStyle:z,cardLinkMode:D,ctaLabel:F}=c,{heading:H={},excerpt:W={},cta:U={},badge:G={},meta:V={}}=d,q="button"===z,Y=(e,o,i,a,s)=>(0,l.jsx)(k,{className:s,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:ru,values:a?.[n],resetValues:lu,onChange:e=>t(o,e,i,n)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:b,onChange:e=>t("card",e,"background")}),Y((0,x.__)("Padding","b-blocks"),"card","padding",f,"mt10"),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:v,onChange:e=>t("card",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"card","borderRadius",w),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Shadow","b-blocks"),value:C,onChange:e=>t("card",e,"shadow")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Heading","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:j||"#111827",onChange:e=>t("colors",e,"heading"),defaultColor:"#111827"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:H,onChange:e=>t("typography",e,"heading")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:h.background,onChange:e=>t("heading",e,"background")}),Y((0,x.__)("Padding","b-blocks"),"heading","padding",h.padding),Y((0,x.__)("Margin","b-blocks"),"heading","margin",h.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:h.border,onChange:e=>t("heading",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"heading","borderRadius",h.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Excerpt","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:$||"#374151",onChange:e=>t("colors",e,"text"),defaultColor:"#374151"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:W,onChange:e=>t("typography",e,"excerpt")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:g.background,onChange:e=>t("excerpt",e,"background")}),Y((0,x.__)("Padding","b-blocks"),"excerpt","padding",g.padding),Y((0,x.__)("Margin","b-blocks"),"excerpt","margin",g.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:g.border,onChange:e=>t("excerpt",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"excerpt","borderRadius",g.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Alignment","b-blocks"),labelPosition:"edge",value:S,options:[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],onChange:e=>t("badge",e,"align"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:T,onChange:e=>t("badge",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:N||"#ffffff",onChange:e=>t("badge",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:G,onChange:e=>t("typography",e,"badge")}),Y((0,x.__)("Padding","b-blocks"),"badge","padding",M),Y((0,x.__)("Margin","b-blocks"),"badge","margin",L),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:P,onChange:e=>t("badge",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"badge","borderRadius",E)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:p.color||s.meta||"#6b7280",onChange:e=>t("meta",e,"color"),defaultColor:"#6b7280"}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:p.iconColor||p.color||s.meta||"#6b7280",onChange:e=>t("meta",e,"iconColor"),defaultColor:"#6b7280"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:V,onChange:e=>t("typography",e,"meta")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:p.bg,onChange:e=>t("meta",e,"bg")}),Y((0,x.__)("Padding","b-blocks"),"meta","padding",p.padding),Y((0,x.__)("Margin","b-blocks"),"meta","margin",p.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:p.border,onChange:e=>t("meta",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),Y((0,x.__)("Border Radius","b-blocks"),"meta","borderRadius",p.borderRadius)]}),!D&&F&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:U,onChange:e=>t("typography",e,"cta")}),q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:R.bg,onChange:e=>t("cta",e,o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:R.color||"#ffffff",onChange:e=>t("cta",e,o,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:R.border,onChange:e=>t("cta",e||{},o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Shadow","b-blocks"),value:R.shadow,onChange:e=>t("cta",e,o,"shadow")}),Y((0,x.__)("Padding","b-blocks"),"cta","padding",A),Y((0,x.__)("Margin","b-blocks"),"cta","margin",B),Y((0,x.__)("Border Radius","b-blocks"),"cta","borderRadius",I),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:O,onChange:e=>t("cta",e,"transition"),min:0,max:5,step:.01})]}),!q&&(0,l.jsx)(Ue,{label:(0,x.__)("Link Color:","b-blocks"),value:r.normal?.bg?.color||"#2563eb",onChange:e=>t("cta",{...r.normal?.bg||{},type:"solid",color:e},"normal","bg"),defaultColor:"#2563eb"})]})]})},gu=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",
302 +tabs:cu,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(pu,{...e}),"style"===t.name&&(0,l.jsx)(hu,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},mu=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,bu=(0,w.compose)((0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop"}=e,{layout:a={},image:s={},content:r={},link:c={}}=t,{alignment:d}=a,u="string"==typeof d?{desktop:d,tablet:"",mobile:""}:d||{},{id:p={},url:g={},alt:m=""}=s,{badge:b,heading:f,headingTag:v,excerpt:k,meta:w,metaIcon:_}=r,{ctaLabel:C,ctaStyle:j,cardLinkMode:$}=c,S="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,T=fe(t,n),N=mu(g,i),M=v||"h3",L=["b-blocks-article-card",`b-blocks-article-card--cta-${j}`].filter(Boolean).join(" "),P=N?(0,l.jsx)("div",{className:"b-blocks-article-card-media",children:(0,l.jsx)("img",{className:"b-blocks-article-card-img",src:N,alt:m||""})}):(0,l.jsx)("div",{className:"b-blocks-article-card-media",children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{onSelect:e=>{n({image:{...s,id:{...p,[i]:e?.id||0},url:{...g,[i]:e?.url||""},alt:e?.alt||m||""}})},allowedTypes:["image"],value:mu(p,i),render:({open:e})=>(0,l.jsxs)("div",{className:"b-blocks-article-card-media-placeholder",onClick:e,children:[(0,l.jsx)(y.Dashicon,{icon:"format-image",style:{fontSize:36,width:36,height:36,marginBottom:8}}),(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:(0,x.__)("Select or Upload Image","b-blocks")})}),(0,l.jsx)("span",{style:{fontSize:12,opacity:.8,marginTop:4},children:(0,x.__)("Click to open Media Library","b-blocks")})]})})})}),E=(0,l.jsxs)("div",{className:"b-blocks-article-card-body",children:[b?(0,l.jsx)("span",{className:"b-blocks-article-card-badge",children:b}):null,(0,l.jsx)(h.RichText,{tagName:M,className:"b-blocks-article-card-heading",value:f,onChange:e=>T("content",e,"heading"),placeholder:(0,x.__)("Article title goes here","b-blocks"),allowedFormats:["core/bold","core/italic"]}),(0,l.jsx)(h.RichText,{tagName:"p",className:"b-blocks-article-card-excerpt",value:k,onChange:e=>T("content",e,"excerpt"),placeholder:(0,x.__)("Add a short excerpt or description…","b-blocks"),allowedFormats:["core/bold","core/italic"]}),w?(0,l.jsxs)("span",{className:"b-blocks-article-card-meta",children:[_?(0,l.jsx)("span",{className:"b-blocks-article-card-meta-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:_}}):null,(0,l.jsx)("span",{className:"b-blocks-article-card-meta-text",children:w})]}):null,!$&&C?(0,l.jsxs)("span",{className:"b-blocks-article-card-cta",children:[(0,l.jsx)("span",{className:"b-blocks-article-card-cta-label",children:C}),"link"===j?(0,l.jsx)("svg",{className:"b-blocks-article-card-cta-arrow",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null]}):null]}),A=(0,h.useBlockProps)({id:`block-${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(gu,{...e,updateObj:T,isPremium:S}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],value:p[i]||0,onSelect:e=>n({image:{...s,id:{...p,[i]:e?.id||0},url:{...g,[i]:e?.url||""},alt:e?.alt||m||""}}),render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{icon:"format-image",label:N?(0,x.__)("Replace image","b-blocks"):(0,x.__)("Add image","b-blocks"),onClick:e})})})}),(0,l.jsx)(h.AlignmentToolbar,{value:u[i]||mu(u,i)||"left",onChange:e=>{const t="string"==typeof d?{desktop:d,tablet:"",mobile:""}:{...d};t[i]=e||"",T("layout",t,"alignment")}})]}),(0,l.jsxs)("div",{...A,children:[(0,l.jsx)(su,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:L,children:(0,l.jsxs)("article",{className:"b-blocks-article-card-card",children:[P,E]})})})]})]})}));Pl(ou.name)&&(0,p.registerBlockType)(ou,{icon:Cl,edit:bu,save:()=>null})
303 +;const fu=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/audio-player","title":"Audio Player","category":"bBlocks","description":"A custom-styled HTML5 audio player with bar, card, sound-bars, vinyl, coverflow and playlist themes.","keywords":["audio player","podcast","music","mp3","html5 audio","playlist"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"audio":{"type":"object","default":{"url":"","id":0,"trackTitle":"","artistName":"","albumArt":{"url":"","id":0}}},"tracks":{"type":"array","default":[]},"behavior":{"type":"object","default":{"autoPlay":false,"loop":false,"showDownload":true,"showSeek":true,"showTimecode":true,"showVolume":true,"showSkip":true,"skipSeconds":10,"showRestart":false,"showStop":false,"showRepeat":false,"showSpeed":false,"speeds":[1,1.25,1.5,2],"showRemaining":false}},"layout":{"type":"object","default":{"style":"bar","alignment":"left","maxWidth":{"desktop":"","tablet":"","mobile":""}}},"player":{"type":"object","default":{"bg":{"type":"solid","color":"#006F9E"},"border":{},"borderRadius":{"desktop":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"16px","right":"20px","bottom":"16px","left":"20px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"colors":{"type":"object","default":{"control":"#ffffff","accent":"","track":"","trackActive":""}},"title":{"type":"object","default":{"color":"#ffffff","typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""},"fontWeight":"600"},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"artist":{"type":"object","default":{"color":"#ffffff","typo":{"fontSize":{"desktop":"13px","tablet":"","mobile":""}},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"buttonStyle":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"hoverColor":"","hoverBg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"playBtnStyle":{"type":"object","default":{"color":"#fff","bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"skipBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"restartBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"repeatBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"stopBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"speedBtnStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""}}},"volumeStyle":{"type":"object","default":{"trackColor":"#FFFFFF","fillColor":"#EAEAEA","margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{}}},"downloadStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"hoverBg":{"type":"solid","color":""},"iconSize":{"desktop":"","tablet":"","mobile":""}}},"seekStyle":{"type":"object","default":{"trackColor":"#FFFFFF","fillColor":"#EAEAEA","margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"trackSize":{"desktop":"","tablet":"","mobile":""},"fillSize":{"desktop":"","tablet":"","mobile":""}}},"timecode":{"type":"object","default":{"position":"left","color":"","typo":{}}},"playlistStyle":{"type":"object","default":{"bg":{"type":"solid","color":""},"color":"","activeBg":{"type":"solid","color":""},"activeColor":"","itemPadding":{"desktop":{"top":"","left":"","bottom":"","right":""},"tablet":{"top":"","left":"","bottom":"","right":""},"mobile":{"top":"","left":"","bottom":"","right":""}},"border":{},"borderRadius":{"desktop":{"top":"","left":"","bottom":"","right":""},"tablet":{"top":"","left":"","bottom":"","right":""},"mobile":{"top":"","left":"","bottom":"","right":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 0)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),xu=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,yu=({attributes:e,id:o,isBackend:i=!1})=>{
304 +const{layout:a={},player:s={},colors:r={},title:c={},artist:d={},timecode:u={},buttonStyle:p={},playBtnStyle:h={},skipBtnStyle:g={},restartBtnStyle:m={},repeatBtnStyle:b={},stopBtnStyle:f={},speedBtnStyle:x={},volumeStyle:y={},downloadStyle:v={},seekStyle:k={},playlistStyle:w={},advanced:_}=e,C=r.control,j=r.accent,$=s.bg?.color,S=r.track,T=r.trackActive,N=`#${o} .b-blocks-audio-player`,M=`${N} .b-blocks-audio-player-player`,L=`${N} .b-blocks-audio-player-title`,P=`${N} .b-blocks-audio-player-artist`,E=`${N} .b-blocks-audio-player-time, ${N} .b-blocks-audio-player-current, ${N} .b-blocks-audio-player-duration`,A=`${N} .b-blocks-audio-player-playpause, ${N} .b-blocks-audio-player-skip, ${N} .b-blocks-audio-player-restart, ${N} .b-blocks-audio-player-repeat, ${N} .b-blocks-audio-player-stop, ${N} .b-blocks-audio-player-speed`,B=`${N} .b-blocks-audio-player-playpause`,I=`${N} .b-blocks-audio-player-skip`,O=`${N} .b-blocks-audio-player-restart`,R=`${N} .b-blocks-audio-player-repeat`,z=`${N} .b-blocks-audio-player-stop`,D=`${N} .b-blocks-audio-player-speed`,F=`${N} input[type='range'].b-blocks-audio-player-volume`,H=`${N} .b-blocks-audio-player-download`,W=`${N} .b-blocks-audio-player-seek-wrap`,U=`${N} input[type='range'].b-blocks-audio-player-seek`,G=`${N} .b-blocks-audio-player-list-item`,V=`${N} .b-blocks-audio-player-list-item.is-active`,q=(e,t,n)=>ns(e,hs(t?.[n])),Y=(e,t)=>e.split(",").map((e=>`${e.trim()}${t}`)).join(", "),K=(e,t)=>`\n\t\t${e}{\n\t\t\t${ns("color",t?.color)}\n\t\t\t${os(t?.bg)}\n\t\t\t${is(t?.border)}\n\t\t}\n\t\t${Y(e,":hover")}{\n\t\t\t${ns("color",t?.hoverColor)}\n\t\t\t${os(t?.hoverBg)}\n\t\t}\n\t`,Q=(e,t,n)=>{const o=xu(t?.iconSize,n);return`\n\t\t\t${e}{\n\t\t\t\t${q("margin",t?.margin,n)}\n\t\t\t\t${q("padding",t?.padding,n)}\n\t\t\t\t${q("border-radius",t?.borderRadius,n)}\n\t\t\t}\n\t\t\t${o?`${Y(e," svg")}{ ${ns("width",o)} ${ns("height",o)} }`:""}\n\t\t`},Z=e=>`\n\t\t${M}{\n\t\t\t${ns("max-width",xu(a.maxWidth,e))}\n\t\t\t${q("margin",s.margin,e)}\n\t\t\t${q("padding",s.padding,e)}\n\t\t\t${q("border-radius",s.borderRadius,e)}\n\t\t}\n\t\t${Q(A,p,e)}\n\t\t${Q(B,h,e)}\n\t\t${Q(I,g,e)}\n\t\t${Q(O,m,e)}\n\t\t${Q(R,b,e)}\n\t\t${Q(z,f,e)}\n\t\t${Q(D,x,e)}\n\t\t${Q(F,y,e)}\n\t\t${Q(H,v,e)}\n\t\t${W}{\n\t\t\t${q("margin",k.margin,e)}\n\t\t}\n\t\t${U}::-webkit-slider-runnable-track{\n\t\t\t${ns("height",xu(k.trackSize,e))}\n\t\t\t${q("border-radius",k.borderRadius,e)}\n\t\t}\n\t\t${U}::-moz-range-track{\n\t\t\t${ns("height",xu(k.trackSize,e))}\n\t\t\t${q("border-radius",k.borderRadius,e)}\n\t\t}\n\t\t${L}{\n\t\t\t${q("margin",c.margin,e)}\n\t\t\t${q("padding",c.padding,e)}\n\t\t\t${q("border-radius",c.borderRadius,e)}\n\t\t}\n\t\t${P}{\n\t\t\t${q("margin",d.margin,e)}\n\t\t\t${q("padding",d.padding,e)}\n\t\t\t${q("border-radius",d.borderRadius,e)}\n\t\t}\n\t\t${G}{\n\t\t\t${q("padding",w.itemPadding,e)}\n\t\t\t${q("border-radius",w.borderRadius,e)}\n\t\t}\n\t`,X=k.fillColor||j,J=k.trackColor,ee=k.trackColor||"rgba(127, 127, 127, 0.3)",te=y.fillColor||j,ne=y.trackColor||"rgba(127, 127, 127, 0.3)";return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",c.typo).googleFontLink}\n\t\t\t${ps("",d.typo).googleFontLink}\n\t\t\t${ps("",u.typo).googleFontLink}\n\n\t\t\t${M}{\n\t\t\t\t${ns("color",C)}\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${is(s.border)}\n\t\t\t}\n\n\t\t\t${A}{\n\t\t\t\t${ns("color",C)}\n\t\t\t}\n\n\t\t\t${B}{\n\t\t\t\t${ns("background",j)}\n\t\t\t\t${ns("color",$)}\n\t\t\t}\n\n\t\t\t${R}.is-active{\n\t\t\t\t${ns("color",j)}\n\t\t\t}\n\n\t\t\t${K(A,p)}\n\t\t\t${K(B,h)}\n\t\t\t${K(I,g)}\n\t\t\t${K(O,m)}\n\t\t\t${K(R,b)}\n\t\t\t${K(z,f)}\n\t\t\t${K(D,x)}\n\t\t\t${K(F,y)}\n\t\t\t${K(H,v)}\n\n\t\t\t${U}::-webkit-slider-runnable-track{ background: linear-gradient(to right, ${X} 0%, ${X} var(--b-blocks-audio-player-var-progress, 0%), ${ee} var(--b-blocks-audio-player-var-progress, 0%), ${ee} 100%); }\n\t\t\t${U}::-moz-range-track{ background: ${ee}; }\n\t\t\t${U}::-moz-range-progress{ background: ${X}; }\n\t\t\t${U}::-webkit-slider-thumb {\n\t\t\t\t${ns("border-color",X)}\n\t\t\t\t${ns("background",C)}\n\t\t\t}\n\t\t\t${U}::-moz-range-thumb {\n\t\t\t\t${ns("border-color",X)}\n\t\t\t\t${ns("background",C)}\n\t\t\t}\n\n\t\t\t${F}::-webkit-slider-runnable-track{ background: linear-gradient(to right, ${te} 0%, ${te} var(--b-blocks-audio-player-var-progress, 0%), ${ne} var(--b-blocks-audio-player-var-progress, 0%), ${ne} 100%); }\n\t\t\t${F}::-moz-range-track{ background: ${ne}; }\n\t\t\t${F}::-moz-range-progress{ background: ${te}; }\n\t\t\t${F}::-webkit-slider-thumb{ border-color: ${te}; }\n\t\t\t${F}::-moz-range-thumb{ border-color: ${te}; }\n\n\t\t\t${N} .b-blocks-audio-player-bar {\n\t\t\t\t${ns("background",J||"rgba(127, 127, 127, 0.35)")}\n\t\t\t}\n\n\t\t\t${N} .b-blocks-audio-player-bar.is-played {\n\t\t\t\tbackground: ${X};\n\t\t\t}\n\n\t\t\t${N} .b-blocks-audio-player-vinyl-disc {\n\t\t\t\t${ns("border-color",j)}\n\t\t\t}\n\n\t\t\t${N} .b-blocks-audio-player-vinyl-center {\n\t\t\t\t${ns("background",j)}\n\t\t\t}\n\n\t\t\t${L}{\n\t\t\t\t${ns("color",c.color||C)}\n\t\t\t\t${os(c.bg)}\n\t\t\t\t${is(c.border)}\n\t\t\t}\n\t\t\t${ps(L,c.typo).styles}\n\t\t\t${P}{\n\t\t\t\t${ns("color",d.color||C)}\n\t\t\t\t${os(d.bg)}\n\t\t\t\t${is(d.border)}\n\t\t\t}\n\t\t\t${ps(P,d.typo).styles}\n\t\t\t${E}{ ${ns("color",u.color||C)} }\n\t\t\t${ps(E,u.typo).styles}\n\n\t\t\t${G}{\n\t\t\t\t${ns("color",w.color||C)}\n\t\t\t\t${os(w.bg)||`background:${S};`}\n\t\t\t\t${is(w.border)}\n\t\t\t}\n\n\t\t\t${V}{\n\t\t\t\t${ns("color",w.activeColor)}\n\t\t\t\t${os(w.activeBg)||`background:${T};`}\n\t\t\t}\n\n\t\t\t${Z("desktop")}\n\t\t\t${t}{ ${Z("tablet")} }\n\t\t\t${n}{ ${Z("mobile")} }\n\t\t\t${_s(o,_,i,!1)}\n\t\t\t`}})},vu=e=>{(!isFinite(e)||e<0)&&(e=0);const t=Math.floor(e),n=Math.floor(t/3600),o=Math.floor(t%3600/60),i=t%60,a=e=>String(e).padStart(2,"0");return n>0?`${n}:${a(o)}:${a(i)}`:`${o}:${a(i)}`},ku=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M8 5v14l11-7z"})}),wu=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M6 5h4v14H6zM14 5h4v14h-4z"})}),_u=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M6 6h12v12H6z"})}),Cu=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M11 12l8.5 6V6L11 12zM4 6h2.5v12H4z"})}),ju=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M13 12L4.5 6v12L13 12zM17.5 6H20v12h-2.5z"})}),$u=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M4 4v6h6M4.5 10a8 8 0 1 1-1 5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),Su=()=>(0,l.jsx)("svg",{viewBox:"0 0 640 640",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M534.6 182.6C547.1 170.1 547.1 149.8 534.6 137.3L470.6 73.3C461.4 64.1 447.7 61.4 435.7 66.4C423.7 71.4 416 83.1 416 96L416 128L256 128C150 128 64 214 64 320C64 337.7 78.3 352 96 352C113.7 352 128 337.7 128 320C128 249.3 185.3 192 256 192L416 192L416 224C416 236.9 423.8 248.6 435.8 253.6C447.8 258.6 461.5 255.8 470.7 246.7L534.7 182.7zM105.4 457.4C92.9 469.9 92.9 490.2 105.4 502.7L169.4 566.7C178.6 575.9 192.3 578.6 204.3 573.6C216.3 568.6 224 556.9 224 544L224 512L384 512C490 512 576 426 576 320C576 302.3 561.7 288 544 288C526.3 288 512 302.3 512 320C512 390.7 454.7 448 384 448L224 448L224 416C224 403.1 216.2 391.4 204.2 386.4C192.2 381.4 178.5 384.2 169.3 393.3L105.3 457.3z"})}),Tu=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M5 21h14",
305 +stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})}),Nu=()=>(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[(0,l.jsx)("path",{d:"M9 18V6l10-2v12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("circle",{cx:"6",cy:"18",r:"3",stroke:"currentColor",strokeWidth:"1.6"}),(0,l.jsx)("circle",{cx:"16",cy:"16",r:"3",stroke:"currentColor",strokeWidth:"1.6"})]}),Mu="b-blocks-audio-player",Lu=({player:e,className:t=""})=>{const{playing:n,buffering:o,togglePlay:i}=e;return(0,l.jsx)("button",{type:"button",className:`${Mu}-playpause ${t}`.trim(),"aria-label":n?(0,x.__)("Pause","b-blocks"):(0,x.__)("Play","b-blocks"),"aria-pressed":n?"true":"false",onClick:i,children:o?(0,l.jsx)("span",{className:`${Mu}-spinner`,"aria-hidden":"true"}):(0,l.jsx)("span",{className:`${Mu}-icon`,"aria-hidden":"true",children:n?(0,l.jsx)(wu,{}):(0,l.jsx)(ku,{})})})},Pu=({player:e,dir:t,className:n=""})=>(0,l.jsx)("button",{type:"button",className:`${Mu}-skip ${Mu}-skip--${t<0?"prev":"next"} ${n}`.trim(),"aria-label":t<0?(0,x.__)("Previous","b-blocks"):(0,x.__)("Next","b-blocks"),onClick:()=>e.skip(t),children:t<0?(0,l.jsx)(Cu,{}):(0,l.jsx)(ju,{})}),Eu=({player:e,className:t=""})=>(0,l.jsx)("button",{type:"button",className:`${Mu}-stop ${t}`.trim(),"aria-label":(0,x.__)("Stop","b-blocks"),onClick:e.stop,children:(0,l.jsx)(_u,{})}),Au=({player:e,className:t=""})=>(0,l.jsx)("button",{type:"button",className:`${Mu}-restart ${t}`.trim(),"aria-label":(0,x.__)("Restart","b-blocks"),onClick:e.restart,children:(0,l.jsx)($u,{})}),Bu=({player:e,className:t=""})=>(0,l.jsx)("button",{type:"button",className:`${Mu}-repeat ${e.repeat?"is-active":""} ${t}`.trim(),"aria-label":(0,x.__)("Repeat","b-blocks"),"aria-pressed":e.repeat?"true":"false",onClick:e.toggleRepeat,children:(0,l.jsx)(Su,{})}),Iu=({player:e,className:t=""})=>(0,l.jsxs)("button",{type:"button",className:`${Mu}-speed ${t}`.trim(),"aria-label":(0,x.__)("Playback speed","b-blocks"),onClick:e.cycleSpeed,children:[e.speed,"x"]}),Ou=({player:e,className:t=""})=>{const{seekingRef:n,currentTime:o,duration:i,seekTo:a}=e,[s,r]=(0,m.useState)(null),c=(0,m.useRef)(null),d=(0,m.useRef)(a);c.current=s,d.current=a;const u=null!==s?s:o,p=i>0?Math.min(100,u/i*100):0;return(0,m.useEffect)((()=>{const e=()=>{if(null===c.current)return;const e=c.current;n.current=!1,r(null),d.current(e)};return window.addEventListener("pointerup",e),window.addEventListener("mouseup",e),window.addEventListener("touchend",e),window.addEventListener("pointercancel",e),()=>{window.removeEventListener("pointerup",e),window.removeEventListener("mouseup",e),window.removeEventListener("touchend",e),window.removeEventListener("pointercancel",e)}}),[n]),(0,l.jsx)("input",{type:"range",className:`${Mu}-seek ${t}`.trim(),min:"0",max:i||0,step:"0.1",value:u,"aria-label":(0,x.__)("Seek","b-blocks"),"aria-valuemin":"0","aria-valuemax":Math.floor(i),"aria-valuenow":Math.floor(u),"aria-valuetext":vu(u),style:{"--b-blocks-audio-player-var-progress":`${p}%`},onPointerDown:()=>{n.current=!0},onChange:e=>{n.current=!0,r(parseFloat(e.target.value)||0)},onKeyUp:e=>{const t=parseFloat(e.currentTarget.value)||0;n.current=!1,r(null),a(t)}})},Ru=({player:e,className:t=""})=>(0,l.jsx)("input",{type:"range",className:`${Mu}-volume ${t}`.trim(),min:"0",max:"1",step:"0.01",value:e.muted?0:e.volume,"aria-label":(0,x.__)("Volume","b-blocks"),style:{"--b-blocks-audio-player-var-progress":100*(e.muted?0:e.volume)+"%"},onChange:t=>e.setVol(t.target.value)}),zu=({player:e,remaining:t=!1,className:n=""})=>{const{currentTime:o,duration:i}=e;return t?(0,l.jsxs)("span",{className:`${Mu}-time ${n}`.trim(),"aria-hidden":"true",children:["-",vu(Math.max(0,i-o))]}):(0,l.jsxs)("span",{className:`${Mu}-time ${n}`.trim(),"aria-hidden":"true",children:[(0,l.jsx)("span",{className:`${Mu}-current`,children:vu(o)}),(0,l.jsx)("span",{className:`${Mu}-sep`,children:" / "}),(0,l.jsx)("span",{className:`${Mu}-duration`,children:vu(i)})]})},Du=({url:e,className:t=""})=>(0,l.jsxs)("a",{className:`${Mu}-download ${t}`.trim(),href:e,download:!0,"aria-label":(0,x.__)("Download audio","b-blocks"),children:[(0,l.jsx)(Tu,{}),(0,l.jsx)("span",{className:"screen-reader-text",children:(0,x.__)("Download audio","b-blocks")})]}),Fu="b-blocks-audio-player",Hu=({track:e})=>e.title||e.artist?(0,l.jsxs)("div",{className:`${Fu}-meta`,children:[e.title?(0,l.jsx)("p",{className:`${Fu}-title`,children:e.title}):null,e.artist?(0,l.jsx)("p",{className:`${Fu}-artist`,children:e.artist}):null]}):null,Wu=({track:e,className:t=""})=>(0,l.jsx)("div",{className:`${Fu}-art ${t}`.trim(),children:e.art?(0,l.jsx)("img",{className:`${Fu}-art-img`,src:e.art,alt:"",loading:"lazy",decoding:"async"}):(0,l.jsx)("span",{className:`${Fu}-art-placeholder`,"aria-hidden":"true",children:(0,l.jsx)(Nu,{})})}),Uu=e=>{const t=43758.5453*Math.sin(12.9898*e);return 18+42*(t-Math.floor(t))},Gu=new WeakMap,Vu=({player:e})=>{const t=(0,m.useRef)([]),n=(0,m.useRef)(0),{playing:o,audioRef:i,url:a}=e,s=()=>{for(let e=0;e<t.current.length;e++){const n=t.current[e];n&&(n.style.height=`${Uu(e)}%`)}};return(0,m.useEffect)((()=>{s()}),[]),(0,m.useEffect)((()=>{const e=i.current;if(!o||!e)return void s();const a=(e=>{if(Gu.has(e))return Gu.get(e);let t=null;try{const n=window.AudioContext||window.webkitAudioContext;if(n){const o=new n,i=o.createMediaElementSource(e),a=o.createAnalyser();a.fftSize=128,a.smoothingTimeConstant=.75,i.connect(a),a.connect(o.destination),t={ctx:o,analyser:a,data:new Uint8Array(a.frequencyBinCount)}}}catch(e){t=null}return Gu.set(e,t),t})(e);if(!a)return void s();"suspended"===a.ctx.state&&a.ctx.resume();const{analyser:r,data:l}=a,c=l.length,d=()=>{r.getByteFrequencyData(l);for(let e=0;e<56;e++){const n=t.current[e];if(!n)continue;const o=Math.min(c-1,Math.floor((e/56)**.85*c)),i=l[o]/255;n.style.height=8+92*i+"%"}n.current=requestAnimationFrame(d)};return n.current=requestAnimationFrame(d),()=>cancelAnimationFrame(n.current)}),[o,a]),(0,l.jsx)("div",{className:`${Fu}-bars`,"aria-hidden":"true",children:Array.from({length:56}).map(((n,o)=>(0,l.jsx)("span",{ref:e=>{t.current[o]=e},className:`${Fu}-bar${o/56*100<=e.seekPct?" is-played":""}`},o)))})},qu=({attributes:e,isBackend:t=!1})=>{const{layout:n={},behavior:o={},timecode:i={}}=e,a=((e,t=!1)=>{const{behavior:n={}}=e,{autoPlay:o=!1,loop:i=!1,skipSeconds:a=10,speeds:s=[1,1.25,1.5,2]}=n,r=(0,m.useMemo)((()=>(e=>{const{audio:t={},tracks:n=[]}=e,o=(Array.isArray(n)?n:[]).map((e=>({url:e?.url||"",title:e?.title||"",artist:e?.artist||"",art:e?.art?.url||""}))).filter((e=>e.url));return o.length?o:[{url:t.url||"",title:t.trackTitle||"",artist:t.artistName||"",art:t.albumArt?.url||""}]})(e)),[e]),l=r.length>1,c=(0,m.useRef)(null),d=(0,m.useRef)(!1),u=(0,m.useRef)(!1),p=(0,m.useRef)(0),h=(0,m.useRef)(""),g=(0,m.useRef)(!1),[b,f]=(0,m.useState)({}),[x,y]=(0,m.useState)(0),[v,k]=(0,m.useState)(!1),[w,_]=(0,m.useState)(!1),[C,j]=(0,m.useState)(0),[$,S]=(0,m.useState)(0),[T,N]=(0,m.useState)(1),[M,L]=(0,m.useState)(!1),[P,E]=(0,m.useState)(1),[A,B]=(0,m.useState)(!!i),I=r[Math.min(x,r.length-1)]||{},O=I.url||"",[R,z]=(0,m.useState)(O);(0,m.useEffect)((()=>{if(z(O),!O||"undefined"==typeof fetch)return;let e=!1;return fetch(O).then((e=>e.ok?e.blob():Promise.reject(e.status))).then((t=>{if(e)return;const n=URL.createObjectURL(t),o=c.current;o&&(p.current=o.currentTime||0,u.current=!o.paused),h.current&&URL.revokeObjectURL(h.current),h.current=n,z(n)})).catch((()=>{})),()=>{e=!0}}),[O]),(0,m.useEffect)((()=>()=>{h.current&&URL.revokeObjectURL(h.current)}),[]),(0,m.useEffect)((()=>{if("undefined"==typeof window||"undefined"==typeof Audio||!r||!r.length)return;const e=[];return r.forEach((t=>{if(!t.url)return;const n=new Audio;n.preload="metadata";const o=()=>{isFinite(n.duration)&&n.duration>0&&f((e=>({...e,[t.url]:n.duration})))};n.addEventListener("loadedmetadata",o),n.src=t.url,e.push({
306 +audio:n,onMeta:o})})),()=>{e.forEach((({audio:e,onMeta:t})=>{e.removeEventListener("loadedmetadata",t)}))}}),[r]),(0,m.useEffect)((()=>{const e=c.current;if(!e)return;const t=()=>k(!0),n=()=>k(!1),o=()=>{if(e.duration===1/0){g.current=!0;try{e.currentTime=1e101}catch(e){}return}const t=isFinite(e.duration)?e.duration:0;if(t>0&&(j(t),O&&f((e=>({...e,[O]:t})))),g.current||p.current>0){g.current=!1;const t=p.current||0;p.current=0;try{e.currentTime=t}catch(e){}S(t)}if(u.current){u.current=!1;const t=e.play();t&&"function"==typeof t.catch&&t.catch((()=>k(!1)))}},i=()=>{d.current||g.current||S(e.currentTime||0)},a=()=>_(!0),s=()=>{_(!1),k(!0)},h=()=>_(!1),m=()=>{N(e.volume),L(e.muted)},b=()=>{if(A&&!l)return e.currentTime=0,void e.play().catch((()=>{}));l&&x<r.length-1?y((e=>e+1)):l&&A?y(0):k(!1)};return e.addEventListener("play",t),e.addEventListener("pause",n),e.addEventListener("loadedmetadata",o),e.addEventListener("durationchange",o),e.addEventListener("timeupdate",i),e.addEventListener("waiting",a),e.addEventListener("playing",s),e.addEventListener("canplay",h),e.addEventListener("volumechange",m),e.addEventListener("ended",b),e.playbackRate=P,e.readyState>=1&&o(),()=>{e.removeEventListener("play",t),e.removeEventListener("pause",n),e.removeEventListener("loadedmetadata",o),e.removeEventListener("durationchange",o),e.removeEventListener("timeupdate",i),e.removeEventListener("waiting",a),e.removeEventListener("playing",s),e.removeEventListener("canplay",h),e.removeEventListener("volumechange",m),e.removeEventListener("ended",b)}}),[O,A,l,x,r.length]),(0,m.useEffect)((()=>{c.current&&(c.current.playbackRate=P)}),[P,O]);const D=(0,m.useRef)(!1);(0,m.useEffect)((()=>{const e=c.current;e&&(D.current||!o||t||(D.current=!0,e.muted=!0,e.play().catch((()=>{}))))}),[o,t,O]);const F=()=>{const e=c.current;if(!e)return;const t=e.play();t&&"function"==typeof t.catch&&t.catch((()=>k(!1)))},H=()=>{const e=c.current;e&&(e.paused||e.ended?F():c.current&&c.current.pause())},W=e=>{let t=parseFloat(e);if(Number.isNaN(t))return null;const n=c.current,o=(n&&isFinite(n.duration)?n.duration:0)||C||b[O]||0;return o>0&&(t=Math.min(t,o)),Math.max(0,t)},U=e=>{const t=W(e);if(null===t)return;S(t);const n=c.current;if(n)try{n.currentTime=t}catch(e){}},G=e=>{const t=(e%r.length+r.length)%r.length;t!==x?(u.current=!0,y(t),S(0)):H()},V=C||b[O]||0;return{audioRef:c,seekingRef:d,mediaSrc:R,list:r,index:x,multi:l,track:I,url:O,playing:v,buffering:w,duration:V,durations:b,currentTime:$,volume:T,muted:M,speed:P,repeat:A,seekPct:V>0?$/V*100:0,togglePlay:H,stop:()=>{const e=c.current;e&&(e.pause(),e.currentTime=0,S(0))},restart:()=>{const e=c.current;e&&(e.currentTime=0,S(0),F())},skip:e=>{if(l)return void G(x+e);const t=c.current;if(!t)return;const n=Math.min(Math.max(0,(t.currentTime||0)+e*a),t.duration||0);U(n)},seekTo:U,previewTime:e=>{const t=W(e);null!==t&&S(t)},playIndex:G,setVol:e=>{const t=c.current,n=Math.min(1,Math.max(0,parseFloat(e)||0));N(n),t&&(t.volume=n,n>0&&(t.muted=!1))},toggleMute:()=>{const e=c.current;e&&(e.muted=!e.muted)},cycleSpeed:()=>{const e=s&&s.length?s:[1],t=e.indexOf(P);E(e[(t+1)%e.length])},toggleRepeat:()=>B((e=>!e))}})(e,t),{url:s,track:r,list:c,index:d,playing:u}=a,p=n.style||"bar",h="left"===i.position,g=!1!==o.showSeek,b=!1!==o.showSkip,f=!1!==o.showTimecode,y=!1!==o.showVolume,v=!1!==o.showDownload,k=!!o.showRestart,w=!!o.showStop,_=!!o.showRepeat,C=!!o.showSpeed,j=!!o.showRemaining,$=[Fu,`${Fu}--style-${p}`,`${Fu}--align-${n.alignment||"left"}`,u?"is-playing":""].filter(Boolean).join(" ");if(!s)return(0,l.jsx)("div",{className:$,children:(0,l.jsxs)("div",{className:`${Fu}-empty`,children:[(0,l.jsx)("span",{className:`${Fu}-empty-icon`,"aria-hidden":"true",children:(0,l.jsx)(Nu,{})}),(0,l.jsx)("span",{className:`${Fu}-empty-title`,children:(0,x.__)("No audio selected","b-blocks")}),(0,l.jsx)("span",{className:`${Fu}-empty-text`,children:(0,x.__)("Add an audio file to start playing.","b-blocks")})]})});const S=(0,l.jsx)("audio",{ref:a.audioRef,className:`${Fu}-audio`,preload:"metadata",src:a.mediaSrc||s,children:(0,x.__)("Your browser does not support the audio element.","b-blocks")}),T=(e=null)=>(0,l.jsxs)("div",{className:`${Fu}-transport`,children:[k?(0,l.jsx)(Au,{player:a}):null,b?(0,l.jsx)(Pu,{player:a,dir:-1}):null,(0,l.jsx)(Lu,{player:a}),b?(0,l.jsx)(Pu,{player:a,dir:1}):null,w?(0,l.jsx)(Eu,{player:a}):null,_?(0,l.jsx)(Bu,{player:a}):null,e]}),N=f?(0,l.jsx)(zu,{player:a}):null,M=(0,l.jsxs)("div",{className:`${Fu}-controls`,children:[T(),h?N:null,g?(0,l.jsx)("div",{className:`${Fu}-seek-wrap`,children:(0,l.jsx)(Ou,{player:a})}):null,h?null:N,j?(0,l.jsx)(zu,{player:a,remaining:!0}):null,C?(0,l.jsx)(Iu,{player:a}):null,y?(0,l.jsx)(Ru,{player:a}):null,v?(0,l.jsx)(Du,{url:s}):null]});let L;return"bar"===p||"card"===p?L=(0,l.jsxs)("div",{className:`${Fu}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:["card"===p?(0,l.jsx)(Wu,{track:r}):null,(0,l.jsxs)("div",{className:`${Fu}-body`,children:[(0,l.jsx)(Hu,{track:r}),M]})]}):"bars"===p?L=(0,l.jsxs)("div",{className:`${Fu}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[(0,l.jsx)(Hu,{track:r}),(0,l.jsxs)("div",{className:`${Fu}-wave-seek`,children:[(0,l.jsx)(Vu,{player:a}),(0,l.jsx)(Ou,{player:a,className:`${Fu}-seek--overlay`})]}),(0,l.jsxs)("div",{className:`${Fu}-controls`,children:[T(),h&&f?(0,l.jsx)(zu,{player:a,className:`${Fu}-time--current`,remaining:!1}):null,g?(0,l.jsx)("div",{className:`${Fu}-seek-wrap`,children:(0,l.jsx)(Ou,{player:a})}):null,!h&&f?(0,l.jsx)(zu,{player:a,className:`${Fu}-time--current`,remaining:!1}):null,y?(0,l.jsx)(Ru,{player:a}):null,j?(0,l.jsx)(zu,{player:a,remaining:!0}):null,C?(0,l.jsx)(Iu,{player:a}):null,v?(0,l.jsx)(Du,{url:s}):null]})]}):"vinyl"===p?L=(0,l.jsxs)("div",{className:`${Fu}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[(0,l.jsxs)("div",{className:`${Fu}-vinyl`,children:[(0,l.jsxs)("div",{className:`${Fu}-vinyl-disc`,children:[r.art?(0,l.jsx)("img",{className:`${Fu}-vinyl-art`,src:r.art,alt:""}):null,(0,l.jsx)("span",{className:`${Fu}-vinyl-center`})]}),(0,l.jsxs)("div",{className:`${Fu}-vinyl-arm`,"aria-hidden":"true",children:[(0,l.jsx)("span",{className:`${Fu}-vinyl-arm-base`}),(0,l.jsx)("span",{className:`${Fu}-vinyl-arm-stick`}),(0,l.jsx)("span",{className:`${Fu}-vinyl-arm-head`})]})]}),(0,l.jsxs)("div",{className:`${Fu}-body`,children:[r.title?(0,l.jsx)("p",{className:`${Fu}-title ${Fu}-title--pill`,children:r.title}):null,g?(0,l.jsx)("div",{className:`${Fu}-seek-wrap`,children:(0,l.jsx)(Ou,{player:a})}):null,T(),(0,l.jsxs)("div",{className:`${Fu}-vinyl-row`,children:[f?(0,l.jsxs)("span",{className:`${Fu}-time ${Fu}-time--pill`,"aria-hidden":"true",children:[vu(a.currentTime)," / ",vu(a.duration)]}):null,j?(0,l.jsx)(zu,{player:a,remaining:!0,className:`${Fu}-time--pill`}):null,y?(0,l.jsx)(Ru,{player:a}):null]})]}),v?(0,l.jsx)(Du,{url:s}):null]}):"coverflow"===p?L=(0,l.jsxs)("div",{className:`${Fu}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[v?(0,l.jsx)(Du,{url:s}):null,(0,l.jsx)("div",{className:`${Fu}-coverflow`,children:c.map(((e,t)=>{const n=t-d;return Math.abs(n)>2?null:(0,l.jsx)("button",{type:"button",className:`${Fu}-cover ${Fu}-cover--pos${n}`,"aria-label":e.title||(0,x.__)("Track","b-blocks"),"aria-current":0===n?"true":void 0,onClick:()=>a.playIndex(t),children:e.art?(0,l.jsx)("img",{src:e.art,alt:""}):(0,l.jsx)("span",{className:`${Fu}-art-placeholder`,"aria-hidden":"true",children:(0,l.jsx)(Nu,{})})},t)}))}),(0,l.jsx)(Hu,{track:r}),(0,l.jsxs)("div",{className:`${Fu}-controls`,children:[f?(0,l.jsx)("span",{className:`${Fu}-current`,children:vu(a.currentTime)}):null,g?(0,l.jsx)("div",{className:`${Fu}-seek-wrap`,children:(0,l.jsx)(Ou,{player:a})}):null,f?(0,l.jsx)("span",{className:`${Fu}-duration`,children:vu(a.duration)}):null,j?(0,l.jsx)(zu,{player:a,remaining:!0}):null]}),T()]
307 +}):"playlist"===p&&(L=(0,l.jsxs)("div",{className:`${Fu}-player`,role:"region","aria-label":(0,x.__)("Audio player","b-blocks"),children:[v?(0,l.jsx)(Du,{url:s}):null,(0,l.jsxs)("div",{className:`${Fu}-nowplaying`,children:[f?(0,l.jsx)("span",{className:`${Fu}-current`,children:vu(a.currentTime)}):null,r.title?(0,l.jsx)("span",{className:`${Fu}-np-title`,children:r.title}):null,f?(0,l.jsx)("span",{className:`${Fu}-duration`,children:vu(a.duration)}):null,j?(0,l.jsx)(zu,{player:a,remaining:!0}):null]}),g?(0,l.jsx)("div",{className:`${Fu}-seek-wrap`,children:(0,l.jsx)(Ou,{player:a})}):null,T(),y?(0,l.jsx)("div",{className:`${Fu}-volume-row`,children:(0,l.jsx)(Ru,{player:a})}):null,(0,l.jsx)("ul",{className:`${Fu}-list`,children:c.map(((e,t)=>{const n=t===d&&a.duration>0?a.duration:a.durations?.[e.url]||e.duration||0,o=()=>t===d?a.togglePlay():a.playIndex(t);return(0,l.jsxs)("li",{className:`${Fu}-list-item ${t===d?"is-active":""}`.trim(),onClick:o,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o())},role:"button",tabIndex:0,"aria-label":e.title||`${(0,x.__)("Track","b-blocks")} ${t+1}`,children:[(0,l.jsx)("button",{type:"button",className:`${Fu}-list-play`,"aria-hidden":"true",tabIndex:-1,onClick:e=>{e.stopPropagation(),o()},children:t===d&&u?(0,l.jsx)(wu,{}):(0,l.jsx)(ku,{})}),(0,l.jsx)("span",{className:`${Fu}-list-title`,children:e.title||`${(0,x.__)("Track","b-blocks")} ${t+1}`}),(0,l.jsx)("span",{className:`${Fu}-list-time`,children:vu(n)})]},t)}))})]})),(0,l.jsxs)("div",{className:$,children:[S,L]})},Yu=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],Ku={top:"",right:"",bottom:"",left:""},Qu=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Zu=[{label:(0,x.__)("Bar (compact)","b-blocks"),value:"bar"},{label:(0,x.__)("Card (album art top)","b-blocks"),value:"card"},{label:(0,x.__)("Sound Bars","b-blocks"),value:"bars"},{label:(0,x.__)("Vinyl (spinning record)","b-blocks"),value:"vinyl"},{label:(0,x.__)("Coverflow (multi-track)","b-blocks"),value:"coverflow"},{label:(0,x.__)("Playlist (multi-track)","b-blocks"),value:"playlist"}],Xu=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Ju={url:"",id:0,title:"",artist:"",art:{url:"",id:0}},ep=({attributes:e,setAttributes:t,index:n})=>{const o=e?.tracks||[],i=o[n]||Ju,a=e=>{const i=[...o];i[n]={...Ju,...i[n],...e},t({tracks:i})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Audio:","b-blocks")}),(0,l.jsx)(ve,{value:i.url||"",types:["audio"],onChange:e=>a({url:e||"",id:0}),placeholder:(0,x.__)("Audio URL","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Title","b-blocks"),value:i.title||"",onChange:e=>a({title:e}),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Artist","b-blocks"),value:i.artist||"",onChange:e=>a({artist:e}),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Album Art:","b-blocks")}),(0,l.jsx)(ve,{value:i.art?.url||"",types:["image"],onChange:e=>a({art:{url:e||"",id:0}}),placeholder:(0,x.__)("Art URL","b-blocks")})]})},tp={url:"",id:0,title:"",artist:"",art:{url:"",id:0}},np=({attributes:e,updateObj:t,setAttributes:n,device:o="desktop",activeIndex:i,setActiveIndex:a})=>{const{behavior:s={},layout:r={}}=e,{autoPlay:c,loop:d,showDownload:u,showTimecode:p,showVolume:h,showSkip:g,skipSeconds:m=10,showRestart:b,showStop:f,showRepeat:k,showSpeed:w,showRemaining:C,showSeek:j}=s,$="playlist"===r.style||"coverflow"===r.style,S=r.maxWidth||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tracks (playlist / coverflow)","b-blocks"),initialOpen:!1,children:[!$&&(0,l.jsx)(y.Notice,{status:"info",isDismissible:!1,children:(0,x.__)("The track list is used by the Playlist and Coverflow themes. Other themes play the single Audio file above.","b-blocks")}),(0,l.jsx)(_a,{attributes:e,setAttributes:n,arrKey:"tracks",newItem:tp,itemLabel:"Track",title:"title",design:"sortable",minItem:0,activeIndex:i,setActiveIndex:a,ItemSettings:ep})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:r.style||"bar",options:Zu,onChange:e=>t("layout",e,"style"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Alignment:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:r.alignment,onChange:e=>t("layout",e,"alignment"),children:Xu.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:`editor-align${e.value}`},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:S?.[o],units:Yu,onChange:e=>{const t=S&&"object"==typeof S?S:{};n({layout:{...r,maxWidth:{...t,[o]:e}}})},__next40pxDefaultSize:!0})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Controls","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Skip / Prev-Next","b-blocks"),checked:!1!==g,onChange:e=>t("behavior",!!e,"showSkip")}),!1!==g&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Skip seconds","b-blocks"),value:m,onChange:e=>t("behavior",e,"skipSeconds"),min:5,max:60,step:5,__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Restart","b-blocks"),checked:!!b,onChange:e=>t("behavior",!!e,"showRestart")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Stop","b-blocks"),checked:!!f,onChange:e=>t("behavior",!!e,"showStop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Repeat","b-blocks"),checked:!!k,onChange:e=>t("behavior",!!e,"showRepeat")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Playback Speed","b-blocks"),checked:!!w,onChange:e=>t("behavior",!!e,"showSpeed")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Seek Bar / Progress","b-blocks"),checked:!1!==j,onChange:e=>t("behavior",!!e,"showSeek")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Timecode","b-blocks"),checked:!1!==p,onChange:e=>t("behavior",!!e,"showTimecode")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Remaining Time","b-blocks"),checked:!!C,onChange:e=>t("behavior",!!e,"showRemaining")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Volume Slider","b-blocks"),checked:!1!==h,onChange:e=>t("behavior",!!e,"showVolume")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Download Link","b-blocks"),checked:!1!==u,onChange:e=>t("behavior",!!e,"showDownload")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Autoplay","b-blocks"),checked:!!c,onChange:e=>t("behavior",!!e,"autoPlay")}),c&&(0,l.jsx)(y.Notice,{status:"warning",isDismissible:!1,children:(0,x.__)("Most browsers block autoplay with sound; the player starts muted. The visitor must interact to hear audio.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Loop","b-blocks"),checked:!!d,onChange:e=>t("behavior",!!e,"loop")})]})]})},op=({player:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Player Container","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(An,{label:(0,
308 +x.__)("Background","b-blocks"),value:e.bg,onChange:e=>t("player",e,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("player",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("player",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("player",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("player",e,"borderRadius",n)})]}),ip=({colors:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Color Palette","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Controls & Text","b-blocks"),value:e.control,onChange:e=>t("colors",e,"control")}),(0,l.jsx)(Ue,{label:(0,x.__)("Accent Color","b-blocks"),value:e.accent,onChange:e=>t("colors",e,"accent")}),(0,l.jsx)(Ue,{label:(0,x.__)("Playlist Row","b-blocks"),value:e.track,onChange:e=>t("colors",e,"track")}),(0,l.jsx)(Ue,{label:(0,x.__)("Playlist Active Row","b-blocks"),value:e.trackActive,onChange:e=>t("colors",e,"trackActive")})]}),ap=({buttonStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("All Buttons (Global)","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color","b-blocks"),value:e.color,onChange:e=>t("buttonStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:e.bg,onChange:e=>t("buttonStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color","b-blocks"),value:e.hoverColor,onChange:e=>t("buttonStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background","b-blocks"),value:e.hoverBg,onChange:e=>t("buttonStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Yu,onChange:e=>t("buttonStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("buttonStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("buttonStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("buttonStyle",e,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("buttonStyle",e,"borderRadius",n)})]}),sp=({playBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Play / Pause Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color,onChange:e=>t("playBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("playBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor,onChange:e=>t("playBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("playBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Yu,onChange:e=>t("playBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("playBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("playBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("playBtnStyle",e,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("playBtnStyle",e,"borderRadius",n)})]}),rp=({skipBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Skip Buttons (Next / Prev)","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("skipBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("skipBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("skipBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("skipBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Yu,onChange:e=>t("skipBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("skipBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("skipBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("skipBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("skipBtnStyle",e,"borderRadius",n)})]}),lp=({restartBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Restart Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("restartBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("restartBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("restartBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("restartBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,
309 +x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Yu,onChange:e=>t("restartBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("restartBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("restartBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("restartBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("restartBtnStyle",e,"borderRadius",n)})]}),cp=({repeatBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Repeat Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("repeatBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("repeatBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("repeatBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("repeatBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Yu,onChange:e=>t("repeatBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("repeatBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("repeatBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("repeatBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("repeatBtnStyle",e,"borderRadius",n)})]}),dp=({stopBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Stop Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("stopBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("stopBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("stopBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("stopBtnStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Yu,onChange:e=>t("stopBtnStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("stopBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("stopBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("stopBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("stopBtnStyle",e,"borderRadius",n)})]}),up=({speedBtnStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Speed Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",onChange:e=>t("speedBtnStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("speedBtnStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("speedBtnStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("speedBtnStyle",e,"hoverBg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("speedBtnStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("speedBtnStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("speedBtnStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("speedBtnStyle",e,"borderRadius",n)})]}),pp=({volumeStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Volume Control","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Track Color","b-blocks"),value:e.trackColor,onChange:e=>t("volumeStyle",e,"trackColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Fill Color","b-blocks"),value:e.fillColor,onChange:e=>t("volumeStyle",e,"fillColor")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("volumeStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("volumeStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("volumeStyle",e,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("volumeStyle",e,"borderRadius",n)})]}),hp=({downloadStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Download Link","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / Text Color:","b-blocks"),value:e.color||"",
310 +onChange:e=>t("downloadStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("downloadStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:e.hoverColor||"",onChange:e=>t("downloadStyle",e,"hoverColor")}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:e.hoverBg,onChange:e=>t("downloadStyle",e,"hoverBg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.iconSize?.[n],units:Yu,onChange:e=>t("downloadStyle",e,"iconSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("downloadStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("downloadStyle",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("downloadStyle",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("downloadStyle",e,"borderRadius",n)})]}),gp=({seekStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Seek Bar / Progress","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Track Color","b-blocks"),value:e.trackColor,onChange:e=>t("seekStyle",e,"trackColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Progress Fill Color","b-blocks"),value:e.fillColor,onChange:e=>t("seekStyle",e,"fillColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Track Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.trackSize?.[n],units:Yu,onChange:e=>t("seekStyle",e,"trackSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Progress Fill Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.fillSize?.[n],units:Yu,onChange:e=>t("seekStyle",e,"fillSize",n),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("seekStyle",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("seekStyle",e,"borderRadius",n)})]}),mp=({title:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Track Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:e.color||"#ffffff",onChange:e=>t("title",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("title",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("title",e,"typo")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("title",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("title",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("title",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("title",e,"borderRadius",n)})]}),bp=({artist:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Artist","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:e.color||"#ffffff",onChange:e=>t("artist",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:e.bg,onChange:e=>t("artist",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("artist",e,"typo")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.margin?.[n],resetValues:Ku,onChange:e=>t("artist",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.padding?.[n],resetValues:Ku,onChange:e=>t("artist",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("artist",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("artist",e,"borderRadius",n)})]}),fp=({timecode:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Timecode","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:e.position,onChange:e=>t("timecode",e,"position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Left","b-blocks"),value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Right","b-blocks"),value:"right"})]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color:","b-blocks"),value:e.color,onChange:e=>t("timecode",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("timecode",e,"typo")})]}),xp=({playlistStyle:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Playlist Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Item Background:","b-blocks"),value:e.bg,onChange:e=>t("playlistStyle",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Item Color:","b-blocks"),value:e.color,onChange:e=>t("playlistStyle",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Active Background:","b-blocks"),value:e.activeBg,onChange:e=>t("playlistStyle",e,"activeBg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Active Color:","b-blocks"),value:e.activeColor,onChange:e=>t("playlistStyle",e,"activeColor")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Item Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.itemPadding?.[n],resetValues:Ku,onChange:e=>t("playlistStyle",e,"itemPadding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Item Border","b-blocks"),value:e.border,onChange:e=>t("playlistStyle",e,"border"),withSlider:!0,
311 +__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Item Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:Yu,values:e.borderRadius?.[n],resetValues:Ku,onChange:e=>t("playlistStyle",e,"borderRadius",n)})]}),yp=({attributes:e,updateObj:t,device:n="desktop"})=>{const{layout:o={},behavior:i={},player:a={},colors:s={},title:r={},artist:c={},timecode:d={},buttonStyle:u={},playBtnStyle:p={},skipBtnStyle:h={},restartBtnStyle:g={},repeatBtnStyle:m={},stopBtnStyle:b={},speedBtnStyle:f={},volumeStyle:x={},downloadStyle:y={},seekStyle:v={},playlistStyle:k={}}=e,w={skip:!1!==i.showSkip,restart:!!i.showRestart,stop:!!i.showStop,repeat:!!i.showRepeat,speed:!!i.showSpeed,volume:!1!==i.showVolume,download:!1!==i.showDownload,seek:!1!==i.showSeek,timecode:!1!==i.showTimecode||!!i.showRemaining,playlist:"playlist"===o.style};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(op,{player:a,updateObj:t,device:n}),(0,l.jsx)(ip,{colors:s,updateObj:t}),(0,l.jsx)(ap,{buttonStyle:u,updateObj:t,device:n}),(0,l.jsx)(sp,{playBtnStyle:p,updateObj:t,device:n}),w.skip&&(0,l.jsx)(rp,{skipBtnStyle:h,updateObj:t,device:n}),w.restart&&(0,l.jsx)(lp,{restartBtnStyle:g,updateObj:t,device:n}),w.repeat&&(0,l.jsx)(cp,{repeatBtnStyle:m,updateObj:t,device:n}),w.stop&&(0,l.jsx)(dp,{stopBtnStyle:b,updateObj:t,device:n}),w.speed&&(0,l.jsx)(up,{speedBtnStyle:f,updateObj:t,device:n}),w.volume&&(0,l.jsx)(pp,{volumeStyle:x,updateObj:t,device:n}),w.download&&(0,l.jsx)(hp,{downloadStyle:y,updateObj:t,device:n}),w.seek&&(0,l.jsx)(gp,{seekStyle:v,updateObj:t,device:n}),(0,l.jsx)(mp,{title:r,updateObj:t,device:n}),(0,l.jsx)(bp,{artist:c,updateObj:t,device:n}),w.timecode&&(0,l.jsx)(fp,{timecode:d,updateObj:t,device:n}),w.playlist&&(0,l.jsx)(xp,{playlistStyle:k,updateObj:t,device:n})]})},vp=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Qu,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(np,{...e}),"style"===t.name&&(0,l.jsx)(yp,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},kp=()=>(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[(0,l.jsx)("path",{d:"M9 18V6l10-2v12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("circle",{cx:"6",cy:"18",r:"3",stroke:"currentColor",strokeWidth:"1.6"}),(0,l.jsx)("circle",{cx:"16",cy:"16",r:"3",stroke:"currentColor",strokeWidth:"1.6"})]}),_p=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{layout:i={},audio:a={},tracks:s=[]}=t,[r,c]=(0,Qa.useState)(0),d="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,u=fe(t,n),p=(0,h.useBlockProps)({id:`block-${o}`}),g=!(!a.url&&!s.some((e=>e?.url)));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vp,{...e,updateObj:u,isPremium:d,activeIndex:r,setActiveIndex:c}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:i.alignment,onChange:e=>u("layout",e,"alignment")})}),(0,l.jsxs)("div",{...p,children:[(0,l.jsx)(yu,{attributes:t,id:`block-${o}`,isBackend:!0}),g?(0,l.jsx)(qu,{attributes:t,isBackend:!0}):(0,l.jsxs)("div",{className:"b-blocks-audio-player-placeholder",children:[(0,l.jsx)("span",{className:"b-blocks-audio-player-placeholder-icon","aria-hidden":"true",children:(0,l.jsx)(kp,{})}),(0,l.jsx)("h4",{className:"b-blocks-audio-player-placeholder-title",children:(0,x.__)("Audio Player","b-blocks")}),(0,l.jsx)("p",{className:"b-blocks-audio-player-placeholder-text",children:(0,x.__)("Upload an audio file or pick one from your media library.","b-blocks")}),(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["audio"],value:a.id,onSelect:e=>n({audio:{...a,url:e?.url||"",id:e?.id||0,trackTitle:a.trackTitle||e?.title||""}}),render:({open:e})=>(0,l.jsx)(y.Button,{variant:"primary",icon:"upload",onClick:e,children:(0,x.__)("Select Audio","b-blocks")})})})]})]})]})}));Pl(fu.name)&&(0,p.registerBlockType)(fu,{icon:pl,edit:_p,save:()=>null})
312 +;const Cp=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/blockquote","title":"Blockquote","category":"bBlocks","description":"Styled blockquote with an accent bar or large decorative quote-mark, optional author photo, name, and role — the designer alternative to the core Quote block.","keywords":["blockquote","quote","pullquote","indent","testimonial","citation","author"],"textdomain":"b-blocks","attributes":{"quote":{"type":"object","default":{"text":"The details are not the details. They make the design.","color":"","bg":{"type":"solid","color":""},"typography":{"fontSize":{"desktop":"20px","tablet":"","mobile":""}},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""}}},"authorName":{"type":"object","default":{"text":"Charles Eames","color":"","typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":600},"bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"authorRole":{"type":"object","default":{"text":"","show":true,"color":"","typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"avatar":{"type":"object","default":{"show":true,"id":0,"url":"","alt":"","size":"48px","shape":"circle","bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"layout":{"type":"object","default":{"type":"border","alignment":"left"}},"icon":{"type":"object","default":{"color":"#6366f1","size":"48px","align":"left","bg":{"type":"solid","color":""},"border":{"width":"","style":"solid","color":""},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"15px","right":"15px","bottom":"15px","left":"15px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"color":"#6366f1","style":"solid","width":"4px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":["file:./view.css"],"viewScript":"file:./view.js","render":"file:./render.php"}'),jp=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],$p=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Sp=[{label:(0,x.__)("Border — left accent bar","b-blocks"),value:"border"},{label:(0,x.__)("Quotation — large decorative mark","b-blocks"),value:"quotation"}],Tp=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Np=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"},{label:(0,x.__)("Square","b-blocks"),value:"square"}],Mp=(e={})=>`\n\t${os(e.bg)}\n\t${ns("padding",hs(e.padding))}\n\t${ns("margin",hs(e.margin))}\n\t${is(e.border)}\n\t${ns("border-radius",hs(e.borderRadius))}\n`,Lp=({attributes:e,id:t,isBackend:n=!1})=>{const{quote:o={},authorName:i={},authorRole:a={},avatar:s={},icon:r={},advanced:c}=e,{color:d,bg:u={},typography:p={},padding:h={},margin:g={},border:m={},borderRadius:b={}}=o,{color:f,typography:x={}}=i,{color:y,typography:v={}}=a,{size:k,shape:w}=s,{color:_,size:C,align:j}=r,$="circle"===w?"50%":"rounded"===w?"12px":"0",S="center"===j?"center":"right"===j?"flex-end":"flex-start",T=C||"48px",N=`#${t} .bBlocks-blockquote-wrapper`,M=`${N} .bBlocks-blockquote-quote`,L=`${N} .bBlocks-blockquote-avatar`,P=`${N} .bBlocks-blockquote-author`,E=`${N} .bBlocks-blockquote-role`,A=`${N} .bBlocks-blockquote-icon`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",p).googleFontLink}\n\t\t\t${ps("",x).googleFontLink}\n\t\t\t${ps("",v).googleFontLink}\n\t\t\t${A}{\n\t\t\t\t${ns("width",T)}\n\t\t\t\t${ns("height",T)}\n\t\t\t\t${ns("color",_)}\n\t\t\t\talign-self: ${S};\n\t\t\t\t${Mp(r)}\n\t\t\t}\n\t\t\t${ps(M,p).styles}\n\t\t\t${M}{\n\t\t\t\t${ns("color",d)}\n\t\t\t\t${os(u)}\n\t\t\t\t${ns("padding",hs(h))}\n\t\t\t\t${ns("margin",hs(g))}\n\t\t\t\t${is(m)}\n\t\t\t\t${ns("border-radius",hs(b))}\n\t\t\t}\n\t\t\t${L}{\n\t\t\t\t${ns("width",k)}\n\t\t\t\t${ns("height",k)}\n\t\t\t\t${ns("border-radius",$)}\n\t\t\t\t${Mp(s)}\n\t\t\t}\n\t\t\t${ps(P,x).styles}\n\t\t\t${P}{\n\t\t\t\t${ns("color",f)}\n\t\t\t\t${Mp(i)}\n\t\t\t}\n\t\t\t${ps(E,v).styles}\n\t\t\t${E}{\n\t\t\t\t${ns("color",y)}\n\t\t\t\t${Mp(a)}\n\t\t\t}\n\t\t\t${_s(t,c,n,!1)}\n\t\t\t`}})},Pp={style:"none",width:"0px"},Ep={top:Pp,right:Pp,bottom:Pp,left:{color:"#6366f1",style:"solid",width:"4px"}},Ap={top:Pp,right:Pp,bottom:Pp,left:Pp},Bp={top:"10px",right:"10px",bottom:"10px",left:"10px"},Ip=({attributes:e,updateObj:t})=>{const{layout:n={},authorName:o={},authorRole:i={},avatar:a={},advanced:s={}}=e,{text:r}=o,{text:c,show:d}=i,{show:u,url:p,alt:h}=a;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,
313 +x.__)("Layout","b-blocks"),labelPosition:"edge",value:n.type||"border",options:Sp,onChange:e=>{t("layout",e,"type");const n=s?.borderShadow?.normal||{};t("advanced",{...n,border:"border"===e?Ep:Ap,radius:"border"===e?Bp:n.radius},"borderShadow","normal")},help:(0,x.__)("Border = left accent bar (editable in the Advanced tab). Quotation = large decorative quote mark.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Alignment","b-blocks"),labelPosition:"edge",className:"mt10",value:n.alignment||"left",options:Tp,onChange:e=>t("layout",e,"alignment"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Name","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Author Name","b-blocks"),value:r||"",onChange:e=>t("authorName",e,"text"),placeholder:(0,x.__)("Jane Doe","b-blocks"),__nextHasNoMarginBottom:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Role / Company","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Role / Company","b-blocks"),checked:!!d,onChange:e=>t("authorRole",e,"show")}),d&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Role / Company","b-blocks"),value:c||"",onChange:e=>t("authorRole",e,"text"),placeholder:(0,x.__)("CEO, Acme","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Photo","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Author Photo","b-blocks"),checked:!!u,onChange:e=>t("avatar",e,"show")}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(we,{className:"mt10",label:p?(0,x.__)("Replace Photo","b-blocks"):(0,x.__)("Select Photo","b-blocks"),value:a,types:["image"],width:"90%",height:"90%",onChange:e=>{return n={id:e?.id||0,url:e?.url||"",alt:e?.alt||h||""},t("avatar",{...a,...n});var n}}),p&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Image Alt Text","b-blocks"),value:h||"",onChange:e=>t("avatar",e,"alt"),placeholder:(0,x.__)("Photo of Jane Doe","b-blocks"),help:(0,x.__)('Defaults to "Photo of <author name>" when empty.',"b-blocks"),__nextHasNoMarginBottom:!0})]})]})]})},Op={top:"",right:"",bottom:"",left:""},Rp=({attrKey:e,value:t={},updateObj:n})=>{const{bg:o={},padding:i={},margin:a={},border:s={},borderRadius:r={}}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o,onChange:t=>n(e,t,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),units:jp,values:i,resetValues:Op,onChange:t=>n(e,t,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),units:jp,values:a,resetValues:Op,onChange:t=>n(e,t,"margin")}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border:","b-blocks"),value:s,onChange:t=>n(e,t||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),units:jp,values:r,resetValues:Op,onChange:t=>n(e,t,"borderRadius")})]})},zp=({attributes:e,updateObj:t})=>{const{quote:n={},authorName:o={},authorRole:i={},avatar:a={},layout:s={},icon:r={}}=e,{color:c,bg:d={},typography:u={},padding:p={},margin:h={},border:g={},borderRadius:m={}}=n,{color:b,typography:f={}}=o,{color:v,typography:w={}}=i,{size:_,shape:C}=a,{color:j,size:$,align:S}=r,T="quotation"===s.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Quote Text","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:c||"",onChange:e=>t("quote",e||"","color"),defaultColor:""}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:u,onChange:e=>t("quote",e,"typography")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t("quote",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),units:jp,values:p,resetValues:Op,onChange:e=>t("quote",e,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),units:jp,values:h,resetValues:Op,onChange:e=>t("quote",e,"margin")}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:g,onChange:e=>t("quote",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),units:jp,values:m,resetValues:Op,onChange:e=>t("quote",e,"borderRadius")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Name","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Name Color","b-blocks"),value:b,onChange:e=>t("authorName",e||"","color"),defaultColor:""}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:f,onChange:e=>t("authorName",e,"typography")}),(0,l.jsx)(Rp,{attrKey:"authorName",value:o,updateObj:t})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Role / Company","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Role Color:","b-blocks"),value:v,onChange:e=>t("authorRole",e||"","color"),defaultColor:""}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:w,onChange:e=>t("authorRole",e,"typography")}),(0,l.jsx)(Rp,{attrKey:"authorRole",value:i,updateObj:t})]}),T&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Quote Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Icon Alignment","b-blocks"),labelPosition:"edge",value:S,options:Tp,onChange:e=>t("icon",e,"align"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size","b-blocks"),className:"mt10",labelPosition:"edge",units:jp,isUnitSelectTabbable:!0,value:$||"48px",onChange:e=>t("icon",e,"size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:j,onChange:e=>t("icon",e,"color"),defaultColor:"#6366f1"}),(0,l.jsx)(Rp,{attrKey:"icon",value:r,updateObj:t})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Author Photo","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Avatar Size","b-blocks"),labelPosition:"edge",units:jp,isUnitSelectTabbable:!0,value:_||"48px",onChange:e=>t("avatar",e,"size")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Avatar Shape","b-blocks"),labelPosition:"edge",className:"mt10",value:C,options:Np,onChange:e=>t("avatar",e,"shape"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Rp,{attrKey:"avatar",value:a,updateObj:t})]})]})},Dp=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:$p,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(Ip,{...e}),"style"===t.name&&(0,l.jsx)(zp,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},Fp=["border","quotation"],Hp=["left","center","right"],Wp=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{quote:a={},authorName:s={},authorRole:r={},avatar:c={},layout:d={}}=t,{text:u}=a,{text:p}=s,{text:g,show:m}=r,{show:b,url:f,alt:y,size:v}=c,k=parseInt(v,10)||48,w=bBlocksPremiumChecker,_=fe(t,n),C=Fp.includes(d.type)?d.type:"border",j=Hp.includes(d.alignment)?d.alignment:"left",$=["bBlocks-blockquote-wrapper",`bBlocks-blockquote-layout-${C}`,`bBlocks-blockquote-align-${j}`].join(" "),S=b&&!!f,T=!(!p||!p.trim()),N=m&&!(!g||!g.trim()),M=S||T||N,L=y||(T?(0,x.sprintf)((0,x.__)("Photo of %s","b-blocks"),p):"");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:j,onChange:e=>_("layout",e||"left","alignment")})}),(0,l.jsx)(Dp,{attributes:t,setAttributes:n,updateObj:_,isPremium:w,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Lp,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{children:(0,l.jsxs)("figure",{className:$,
314 +children:["quotation"===C&&(0,l.jsx)("span",{className:"bBlocks-blockquote-icon","aria-hidden":"true",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 435 332",fill:"currentColor",focusable:"false",children:(0,l.jsx)("path",{d:"m142.6 0.7h-99.6c-23.5 0-42.7 19.2-42.7 42.6v99.7c0 23.4 19.2 42.6 42.7 42.6h60.4c0 47.2-34.6 85.4-81.7 85.4v60.3c86.4 0 156.3-69.9 156.3-156.3v-131.7c0-23.4-19.2-42.6-35.4-42.6zm256 0h-99.6c-23.5 0-42.7 19.2-42.7 42.6v99.7c0 23.4 19.2 42.6 42.7 42.6h60.4c0 47.2-34.6 85.4-81.7 85.4v60.3c86.4 0 156.3-69.9 156.3-156.3v-131.7c0-23.4-19.2-42.6-35.4-42.6z"})})}),(0,l.jsx)("blockquote",{className:"bBlocks-blockquote-quote",children:(0,l.jsx)(h.RichText,{tagName:"p",className:"bBlocks-blockquote-quoteText",value:u||"",onChange:e=>_("quote",e,"text"),placeholder:(0,x.__)("Type the quote…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]})}),M&&(0,l.jsxs)("figcaption",{className:"bBlocks-blockquote-caption",children:[S&&(0,l.jsx)("img",{className:"bBlocks-blockquote-avatar",src:f,alt:L,width:k,height:k}),(T||N)&&(0,l.jsxs)("cite",{className:"bBlocks-blockquote-cite",children:[T&&(0,l.jsx)("span",{className:"bBlocks-blockquote-author",children:p}),N&&(0,l.jsx)("span",{className:"bBlocks-blockquote-role",children:g})]})]})]})})})]})]})}));Pl(Cp.name)&&(0,p.registerBlockType)(Cp,{icon:fl,edit:Wp,save:()=>null});const Up=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/breadcrumb","title":"Breadcrumb","category":"bBlocks","description":"Show a breadcrumb navigation trail for better navigation","keywords":["breadcrumb","breadcrumb block","navigation"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"home":{"type":"object","default":{"label":"Home"}},"separator":{"type":"object","default":{"type":"text","text":">","library":"","image":"","upload":""}},"prefix":{"type":"object","default":{"type":"text","text":"Browse:","library":"","image":"","upload":""}},"options":{"type":"object","default":{"isHomeShow":true,"isSchema":false,"isShowPrefix":false,"isBeforeSeparator":false}},"styles":{"type":"object","default":{"crumbs":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}},"normal":{"color":"","bg":{},"border":{},"shadow":[{}],"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"transition":0.2,"color":"","bg":{},"border":{},"shadow":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"active":{"color":"","bg":{},"border":{},"shadow":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"desktop":{"align":"start","gap":""},"tablet":{"align":"","gap":""},"mobile":{"align":"","gap":""}},"separator":{"color":"","text":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}}},"library":{"desktop":{"size":""},"tablet":{"size":""},"mobile":{"size":""}}},"prefix":{"color":"","text":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}}},"library":{"desktop":{"size":""},"tablet":{"size":""},"mobile":{"size":""}},"image":{"height":"","width":""},"bg":{},"border":{},"shadow":{},"desktop":{"rightGap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"rightGap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"rightGap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Gp=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Vp=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),qp=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),Yp=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Kp=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,home:a,options:s}=t,{crumbs:r}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("BreadCrumb","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r?.[o]?.align,onChange:e=>n("styles",e,"crumbs",o,"align"),isDeselectable:!0,size:"small",style:{padding:"2px"},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"start",icon:Vp}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:qp}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"end",icon:Yp})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2 mb0",children:[(0,x.__)("Gap","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r?.[o]?.gap,onChange:e=>n("styles",e,"crumbs",o,"gap")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Home Page","b-blocks"),checked:s?.isHomeShow,onChange:e=>n("options",e,"isHomeShow")}),s?.isHomeShow&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Home Label","b-blocks"),value:a?.label,
315 +onChange:e=>n("home",e,"label")})]})},Qp=({attributes:e,updateObj:t})=>{const{options:n,prefix:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Prefix","b-blocks"),checked:n?.isShowPrefix,onChange:e=>t("options",e,"isShowPrefix")}),n.isShowPrefix&&(0,l.jsxs)(m.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Before Separator","b-blocks"),checked:n?.isBeforeSeparator,onChange:e=>t("options",e,"isBeforeSeparator")}),(0,l.jsx)(v,{className:"flex1 mb0 mt10",children:(0,x.__)("Prefix Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o?.type,onChange:e=>t("prefix",e,"type"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Text","b-blocks"),value:"text"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Icon","b-blocks"),value:"library"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Image","b-blocks"),value:"image"})]}),"text"===o.type&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Prefix Text","b-blocks"),value:o?.text,onChange:e=>t("prefix",e,"text")}),"library"===o.type&&(0,l.jsx)(Zn,{className:"mt10",value:o?.library,onChange:e=>t("prefix",e,"library")}),"image"===o.type&&(0,l.jsx)(we,{height:"80%",width:"80%",className:"mt10",value:{url:o?.image},onChange:e=>t("prefix",e?.url,"image")})]})]})},Zp=({attributes:e,updateObj:t})=>{const{separator:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Separator Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n?.type,onChange:e=>t("separator",e,"type"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Text","b-blocks"),value:"text"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Icon","b-blocks"),value:"library"})]})]}),"text"===n.type&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Separator Text","b-blocks"),value:n?.text,onChange:e=>t("separator",e,"text")}),"library"===n.type&&(0,l.jsx)(Zn,{className:"mt10",value:n?.library,onChange:e=>t("separator",e,"library")})]})},Xp=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Kp,{...e}),(0,l.jsx)(Zp,{...e}),(0,l.jsx)(Qp,{...e})]}),Jp=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{crumbs:i}=o,[a,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Breadcrumb Styles","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Oa,{value:i.typo,onChange:e=>t("styles",e,"crumbs","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Active","b-blocks"),value:"active"})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:i[a][n].padding,onChange:e=>t("styles",e,"crumbs",a,n,"padding")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i[a].color,onChange:e=>t("styles",e,"crumbs",a,"color")}),(0,l.jsx)(An,{isImage:!1,label:(0,x.__)("Background","b-blocks"),value:i[a].bg,onChange:e=>t("styles",e,"crumbs",a,"bg")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),values:i[a].shadow,onChange:e=>t("styles",e,"crumbs",a,"shadow")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i[a].border,onChange:e=>t("styles",e,"crumbs",a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i[a][n].radius,onChange:e=>t("styles",e,"crumbs",a,n,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.01,value:i.hover.transition,onChange:e=>t("styles",e,"crumbs","hover","transition")})]})},eh=({attributes:e,updateObj:t,device:n})=>{const{styles:o,prefix:i}=e,{prefix:a}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix","b-blocks"),initialOpen:!1,children:["text"===i.type&&(0,l.jsx)(Oa,{value:a.text.typo,onChange:e=>t("styles",e,"prefix","text","typo")}),"library"===i.type&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"flex2 mb0",children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.library[n].size,onChange:e=>t("styles",e,"prefix","library",n,"size")})]})}),"image"===i.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.image.height,onChange:e=>t("styles",e,"prefix","image","height")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.image.width,onChange:e=>t("styles",e,"prefix","image","width")})]})]}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),values:a[n].padding,onChange:e=>t("styles",e,"prefix",n,"padding")}),"text"===i.type&&(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color,onChange:e=>t("styles",e,"prefix","color")}),(0,l.jsx)(An,{isImage:!1,label:(0,x.__)("Background","b-blocks"),value:a.bg,onChange:e=>t("styles",e,"prefix","bg")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:a.shadow,onChange:e=>t("styles",e,"prefix","shadow")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("styles",e,"prefix","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:a[n].radius,onChange:e=>t("styles",e,"prefix",n,"radius")})]})},th=({attributes:e,updateObj:t,device:n})=>{const{styles:o,separator:i}=e,{separator:a}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color,onChange:e=>t("styles",e,"separator","color")}),"text"===i.type&&(0,l.jsx)(Oa,{value:a.text.typo,onChange:e=>t("styles",e,"separator","text","typo")}),"library"===i.type&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.library[n].size,onChange:e=>t("styles",e,"separator","library",n,"size")})]})]})},nh=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Jp,{...e}),(0,l.jsx)(th,{...e}),(0,l.jsx)(eh,{...e})]}),oh=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Gp,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Xp,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(nh,{...e})})]})})})}),ih=({attributes:e,id:o})=>{
316 +const{styles:i}=e,{crumbs:a,separator:s,prefix:r}=i,c=`#${o} .bBlocks-breadCrumb-wrapper .bBlocks-breadCrumb-items`,d=`${c} .bBlocks-breadCrumb-item`,u=`${c} .bBlocks-breadCrumb-item-active`,p=`${c} .bBlocks-breadCrumb-item-separator`,h=`${p}.bBlocks-breadCrumb-item-separator-library`,g=`${c} .bBlocks-breadCrumbItem-prefix`,m=(e="")=>`\n\t\t${ns("padding",hs(a[e].desktop.padding))}\n\t\t${ns("color",a[e].color)}\n\t\t${os(a[e].bg)}\n\t\t${as(a[e].border)}\n\t\t${ns("border-radius",hs(a[e].desktop.radius))}\n\t\t${ns("box-shadow",ls(a[e].shadow))}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",a.typo).googleFontLink}\n\t\t${ps("",s.text.typo).googleFontLink}\n\t\t${ps("",r.text.typo).googleFontLink}\n\n\t\t${ps(d,a.typo).styles}\n\t\t${ps(p,s.text.typo).styles}\n\t\t${ps(`${g}.bBlocks-breadCrumbItem-prefixText`,r.text.typo).styles}\n\n\t\t${c}{\n\t\t\t${ns("justify-content",a.desktop.align)}\n\t\t\t${ns("gap",a.desktop.gap)}\n\t\t}\n\n\t\t${d}{\n\t\t\t${m("normal")}\n\t\t\t${ns("transition",jt(a.hover.transition)?"all "+a.hover.transition+"s ease-in-out":"")}\n\t\t}\n\n\t\t${d}:hover{\n\t\t\t${m("hover")}\n\t\t}\n\n\t\t${u}{\n\t\t\t${m("active")}\n\t\t}\n\n\t\t${p}{\n\t\t\t${ns("color",s.color)}\n\t\t\t${ns("fill",s.color)}\n\t\t}\n\n\t\t${h}>svg{\n\t\t\t${ns("fill",s.color)}\n\t\t\t${ns("height",s.library.desktop.size)}\n\t\t\t${ns("width",s.library.desktop.size)}\n\t\t}\n\n\t\t${g}{\n\t\t\t${ns("color",r.color)}\n\t\t\t${ns("padding",hs(r.desktop.padding))}\n\t\t\t${os(r.bg)}\n\t\t\t${as(r.border)}\n\t\t\t${ns("border-radius",hs(r.desktop.radius))}\n\t\t\t${ns("box-shadow",ls(r.shadow))}\n\t\t}\n\n\t\t${g}.bBlocks-breadCrumbItem-prefixIcon>svg{\n\t\t\t${ns("fill",r.color)}\n\t\t\t${ns("height",r.library.desktop.size)}\n\t\t\t${ns("width",r.library.desktop.size)}\n\t\t}\n\t\t${g}.bBlocks-breadCrumbItem-prefixImage>img{\n\t\t\t${ns("height",r.image.height)}\n\t\t\t${ns("width",r.image.width)}\n\t\t}\n\n\t\t${t}{\n\n\t\t\t${d}{\n\t\t\t\t${ns("padding",hs(a.normal.tablet.padding))}\n\t\t\t\t${ns("border-radius",hs(a.normal.tablet.radius))}\n\t\t\t}\n\n\t\t\t${d}:hover{\n\t\t\t\t${ns("padding",hs(a.hover.tablet.padding))}\n\t\t\t\t${ns("border-radius",hs(a.hover.tablet.radius))}\n\t\t\t}\n\n\t\t\t${u}{\n\t\t\t\t${ns("padding",hs(a.active.tablet.padding))}\n\t\t\t\t${ns("border-radius",hs(a.active.tablet.radius))}\n\t\t\t}\n\t\t\t\n\t\t\t${h}>svg{\n\t\t\t\t${ns("height",s.library.tablet.size)}\n\t\t\t\t${ns("width",s.library.tablet.size)}\n\t\t\t}\n\n\t\t\t${g}{\n\t\t\t\t${ns("padding",hs(r.tablet.padding))}\n\t\t\t\t${ns("border-radius",hs(r.tablet.radius))}\n\t\t\t}\n\n\t\t\t${g}.bBlocks-breadCrumbItem-prefixIcon>svg{\n\t\t\t\t${ns("height",r.library.tablet.size)}\n\t\t\t\t${ns("width",r.library.tablet.size)}\n\t\t\t}\n\n\t\t}\n\n\t\t${n}{\n\t\t\t${d}{\n\t\t\t\t${ns("padding",hs(a.normal.mobile.padding))}\n\t\t\t\t${ns("border-radius",hs(a.normal.mobile.radius))}\n\t\t\t}\n\n\t\t\t${d}:hover{\n\t\t\t\t${ns("padding",hs(a.hover.mobile.padding))}\n\t\t\t\t${ns("border-radius",hs(a.hover.mobile.radius))}\n\t\t\t}\n\n\t\t\t${u}{\n\t\t\t\t${ns("padding",hs(a.active.mobile.padding))}\n\t\t\t\t${ns("border-radius",hs(a.active.mobile.radius))}\n\t\t\t}\n\t\t\t\n\t\t\t${h}>svg{\n\t\t\t\t${ns("height",s.library.mobile.size)}\n\t\t\t\t${ns("width",s.library.mobile.size)}\n\t\t\t}\n\n\t\t\t${g}{\n\t\t\t\t${ns("padding",hs(r.mobile.padding))}\n\t\t\t\t${ns("border-radius",hs(r.mobile.radius))}\n\t\t\t}\n\n\t\t\t${g}.bBlocks-breadCrumbItem-prefixIcon>svg{\n\t\t\t\t${ns("height",r.library.mobile.size)}\n\t\t\t\t${ns("width",r.library.mobile.size)}\n\t\t\t}\n\t\t}\n\n\t\t\n\t`}})},ah=({separator:e})=>{const{type:t,text:n,library:o}=e;return(0,l.jsxs)(m.Fragment,{children:["text"===t&&(0,l.jsxs)("span",{className:"bBlocks-breadCrumb-item-separator",children:[" ",n]}),"library"===t&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item-separator bBlocks-breadCrumb-item-separator-library",dangerouslySetInnerHTML:{__html:o}})]})},sh=({prefix:e,isBeforeSeparator:t,separator:n})=>{const{type:o,text:i,library:a,image:s}=e;return(0,l.jsxs)(m.Fragment,{children:["text"===o&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item bBlocks-breadCrumbItem-prefix bBlocks-breadCrumbItem-prefixText",children:i}),"library"===o&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item bBlocks-breadCrumbItem-prefix bBlocks-breadCrumbItem-prefixIcon",dangerouslySetInnerHTML:{__html:a}}),"image"===o&&(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item bBlocks-breadCrumbItem-prefix bBlocks-breadCrumbItem-prefixImage",children:s&&(0,l.jsx)("img",{src:s,alt:""})}),t&&(0,l.jsx)(ah,{separator:n})]})},rh=({attributes:e,crumbs:t})=>{const{separator:n,options:o,prefix:i}=e;return(0,l.jsx)("div",{className:"bBlocks-breadCrumb-wrapper",children:(0,l.jsxs)("div",{className:"bBlocks-breadCrumb-items",children:[o.isShowPrefix&&(0,l.jsx)(sh,{prefix:i,separator:n,isBeforeSeparator:o.isBeforeSeparator}),t.map(((e,o)=>(0,l.jsxs)(m.Fragment,{children:[0!==o&&(0,l.jsx)(ah,{separator:n}),e?.url?(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item "+(o===t.length-1?"bBlocks-breadCrumb-item-active":""),children:(0,l.jsx)("a",{href:e.url,children:e.label})}):(0,l.jsx)("span",{className:"bBlocks-breadCrumb-item "+(o===t.length-1?"bBlocks-breadCrumb-item-active":""),children:e.label})]},o)))]})})},lh=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{home:a,options:s}=t,r=fe(t,n),c=[s.isHomeShow&&{label:a.label},{label:"Template"},{label:"Current Page"}].filter(Boolean);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(oh,{attributes:t,setAttributes:n,isPremium:!1,updateObj:r,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(ih,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{children:(0,l.jsx)(rh,{attributes:t,crumbs:c})})]})]})}));Pl(Up.name)&&(0,p.registerBlockType)(Up,{icon:rl,edit:lh})
317 +;const ch=JSON.parse('{"apiVersion":3,"name":"b-blocks/button","title":"Button","description":"Implement multi-functional button.","category":"bBlocks","keywords":["multi-functional button","download button","link button"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"text":{"type":"string","default":"Button"},"actionType":{"type":"string","default":"link"},"security":{"type":"string","default":"none"},"securityPassword":{"type":"string","default":""},"securityRole":{"type":"string"},"url":{"type":"string","default":""},"tooltip":{"type":"string","default":""},"tooltipPos":{"type":"string","default":"top"},"target":{"type":"string","default":"_self"},"attrs":{"type":"object","default":{"rel":"noreferrer","referrerpolicy":"no-referrer"}},"hideOn":{"type":"object","default":{"desktop":false,"tablet":false,"mobile":false}},"isDownload":{"type":"boolean","default":false},"downloadFileName":{"type":"string","default":""},"isUpIcon":{"type":"boolean","default":false},"icon":{"type":"object","default":{"class":"fa fa-paper-plane"}},"upIcon":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"iconPos":{"type":"string","default":"left"},"type":{"type":"string","default":"flat"},"isFullWidth":{"type":"boolean","default":false},"size":{"type":"string","default":"medium"},"popup":{"type":"object","default":{"type":"image","content":"","caption":"","width":"","videoOptions":{"autoplay":false}}},"animationType":{"type":"string","default":""},"animationDuration":{"type":"number","default":0.4},"addID":{"type":"string","default":""},"addCSS":{"type":"string","default":""},"alignment":{"type":"string","default":"center"},"typography":{"type":"object","default":{"fontSize":{"desktop":"16px"},"fontWeight":600,"textDecoration":"none"}},"colors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"hovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"padding":{"type":"object","default":{"vertical":"12px","horizontal":"24px"}},"border":{"type":"object","default":{"radius":"5px"}},"shadow":{"type":"array","default":[]},"buttonHover":{"type":"object","default":{"padding":{},"shadow":[],"border":{}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos","wp-util"]}'),dh="bBlocksButton",uh=(e,t="none",n,o,i=!1)=>{const{actionType:a="link",url:s,tooltip:r,tooltipPos:l="top",target:c,attrs:d={rel:"noreferrer",referrerpolicy:"no-referrer"},isDownload:u,downloadFileName:p="",animationType:h,animationDuration:g,addID:m}=e,b=d?.referrerpolicy||"no-referrer",f=d?.rel||"noreferrer",x=s&&(n||"none"===t)?{href:$t(s)}:{},y="popup"===a||i?{}:{...x,target:c,...o?{referrerPolicy:b,rel:f}:{},...u?{download:o?p:""}:{}};return{className:i?`${dh} btnEditor`:dh,...y,tooltip:r,"tooltip-pos":o?l:"top","data-aos":h,"data-aos-duration":1e3*g,id:m}},ph=({attributes:e})=>{const{isUpIcon:t,icon:n,upIcon:o}=e;return(0,l.jsxs)(l.Fragment,{children:[t&&o?.url&&(0,l.jsx)("img",{src:o?.url,alt:o?.alt}),!t&&n?.class&&(0,l.jsx)("i",{className:n?.class})]})};function hh(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gh(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function mh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function fh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bh(Object(n),!0).forEach((function(t){mh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xh={addCSS:!0,thumbWidth:15,watch:!0},yh=function(e){return null!=e?e.constructor:null},vh=function(e,t){return!!(e&&t&&e instanceof t)},kh=function(e){return yh(e)===String},wh=function(e){return Array.isArray(e)},_h=function(e){return vh(e,NodeList)},Ch=kh,jh=wh,$h=_h,Sh=function(e){return vh(e,Element)},Th=function(e){return vh(e,Event)},Nh=function(e){return function(e){return null==e}(e)||(kh(e)||wh(e)||_h(e))&&!e.length||function(e){return yh(e)===Object}(e)&&!Object.keys(e).length};var Mh=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),Sh(t)?this.element=t:Ch(t)&&(this.element=document.querySelector(t)),Sh(this.element)&&Nh(this.element.rangeTouch)&&(this.config=fh({},xh,{},n),this.init())}return function(e,t,n){t&&gh(e.prototype,t),n&&gh(e,n)}(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(e){t.element[n](e,(function(e){return t.set(e)}),!1)}))}},{key:"get",value:function(t){if(!e.enabled||!Th(t))return null;var n,o=t.target,i=t.changedTouches[0],a=parseFloat(o.getAttribute("min"))||0,s=parseFloat(o.getAttribute("max"))||100,r=parseFloat(o.getAttribute("step"))||1,l=o.getBoundingClientRect(),c=100/l.width*(this.config.thumbWidth/2)/100;return 0>(n=100/l.width*(i.clientX-l.left))?n=0:100<n&&(n=100),50>n?n-=(100-2*n)*c:50<n&&(n+=2*(n-50)*c),a+function(e,t){if(1>t){var n=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(n))}return Math.round(e/t)*t}(n/100*(s-a),r)}},{key:"set",value:function(t){e.enabled&&Th(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var n=new Event(t,{bubbles:!0});e.dispatchEvent(n)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=null;if(Nh(t)||Ch(t)?o=Array.from(document.querySelectorAll(Ch(t)?t:'input[type="range"]')):Sh(t)?o=[t]:$h(t)?o=Array.from(t):jh(t)&&(o=t.filter(Sh)),Nh(o))return null;var i=fh({},xh,{},n);if(Ch(t)&&i.watch){var a=new MutationObserver((function(n){Array.from(n).forEach((function(n){Array.from(n.addedNodes).forEach((function(n){Sh(n)&&function(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}(n,t)&&new e(n,i)}))}))}));a.observe(document.body,{childList:!0,subtree:!0})}return o.map((function(t){return new e(t,n)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const Lh=e=>null!=e?e.constructor:null,Ph=(e,t)=>Boolean(e&&t&&e instanceof t),Eh=e=>null==e,Ah=e=>Lh(e)===Object,Bh=e=>Lh(e)===String,Ih=e=>"function"==typeof e,Oh=e=>Array.isArray(e),Rh=e=>Ph(e,NodeList);function zh(e){return Eh(e)||(Bh(e)||Oh(e)||Rh(e))&&!e.length||Ah(e)&&!Object.keys(e).length}var Dh={nullOrUndefined:Eh,object:Ah,
318 +number:e=>Lh(e)===Number&&!Number.isNaN(e),string:Bh,boolean:e=>Lh(e)===Boolean,function:Ih,array:Oh,weakMap:e=>Ph(e,WeakMap),nodeList:Rh,element:function(e){return null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument},textNode:e=>Lh(e)===Text,event:e=>Ph(e,Event),keyboardEvent:e=>Ph(e,KeyboardEvent),cue:e=>Ph(e,window.TextTrackCue)||Ph(e,window.VTTCue),track:e=>Ph(e,TextTrack)||!Eh(e)&&Bh(e.kind),promise:e=>Ph(e,Promise)&&Ih(e.then),url:function(e){if(Ph(e,window.URL))return!0;if(!Bh(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t=`http://${e}`);try{return!zh(new URL(t).hostname)}catch{return!1}},empty:zh};const Fh=(()=>{const e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n=Object.keys(t).find((t=>void 0!==e.style[t]));return!!Dh.string(n)&&t[n]})();function Hh(e,t){setTimeout((()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}}),t)}function Wh(e,t){return t.split(".").reduce(((e,t)=>e&&e[t]),e)}function Uh(e={},...t){if(!t.length)return e;const n=t.shift();return Dh.object(n)?(Object.keys(n).forEach((t=>{Dh.object(n[t])?(Object.keys(e).includes(t)||Object.assign(e,{[t]:{}}),Uh(e[t],n[t])):Object.assign(e,{[t]:n[t]})})),Uh(e,...t)):e}function Gh(e,t){const n=e.length?e:[e];Array.from(n).reverse().forEach(((e,n)=>{const o=n>0?t.cloneNode(!0):t,i=e.parentNode,a=e.nextSibling;o.appendChild(e),a?i.insertBefore(o,a):i.appendChild(o)}))}function Vh(e,t){Dh.element(e)&&!Dh.empty(t)&&Object.entries(t).filter((([,e])=>!Dh.nullOrUndefined(e))).forEach((([t,n])=>e.setAttribute(t,n)))}function qh(e,t,n){const o=document.createElement(e);return Dh.object(t)&&Vh(o,t),Dh.string(n)&&(o.textContent=n),o}function Yh(e,t,n,o){Dh.element(t)&&t.appendChild(qh(e,n,o))}function Kh(e){Dh.nodeList(e)||Dh.array(e)?Array.from(e).forEach(Kh):Dh.element(e)&&Dh.element(e.parentNode)&&e.parentNode.removeChild(e)}function Qh(e){if(!Dh.element(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function Zh(e,t){return Dh.element(t)&&Dh.element(t.parentNode)&&Dh.element(e)?(t.parentNode.replaceChild(e,t),e):null}function Xh(e,t){if(!Dh.string(e)||Dh.empty(e))return{};const n={},o=Uh({},t);return e.split(",").forEach((e=>{const t=e.trim(),i=t.replace(".",""),a=t.replace(/[[\]]/g,"").split("="),[s]=a,r=a.length>1?a[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":Dh.string(o.class)?n.class=`${o.class} ${i}`:n.class=i;break;case"#":n.id=t.replace("#","");break;case"[":n[s]=r}})),Uh(o,n)}function Jh(e,t){if(!Dh.element(e))return;let n=t;Dh.boolean(n)||(n=!e.hidden),e.hidden=n}function eg(e,t,n){if(Dh.nodeList(e))return Array.from(e).map((e=>eg(e,t,n)));if(Dh.element(e)){let o="toggle";return void 0!==n&&(o=n?"add":"remove"),e.classList[o](t),e.classList.contains(t)}return!1}function tg(e,t){return Dh.element(e)&&e.classList.contains(t)}function ng(e,t){const{prototype:n}=Element;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function og(e){return this.elements.container.querySelectorAll(e)}function ig(e){return this.elements.container.querySelector(e)}function ag(e=null,t=!1){Dh.element(e)&&e.focus({preventScroll:!0,focusVisible:t})}const sg={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},rg={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t){const n=rg[e]||"html5"!==t;return{api:n,ui:n&&rg.rangeInput}},pip:document.pictureInPictureEnabled&&!qh("video").disablePictureInPicture,airplay:Dh.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(Dh.empty(e))return!1;const[t]=e.split("/");let n=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(sg).includes(n)&&(n+=`; codecs="${sg[e]}"`);try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range","range"===e.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==Fh,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},lg=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e})();function cg(e,t,n,o=!1,i=!0,a=!1){if(!e||!("addEventListener"in e)||Dh.empty(t)||!Dh.function(n))return;const s=t.split(" ");let r=a;lg&&(r={passive:i,capture:a}),s.forEach((t=>{this&&this.eventListeners&&o&&this.eventListeners.push({element:e,type:t,callback:n,options:r}),e[o?"addEventListener":"removeEventListener"](t,n,r)}))}function dg(e,t="",n,o=!0,i=!1){cg.call(this,e,t,n,!0,o,i)}function ug(e,t="",n,o=!0,i=!1){cg.call(this,e,t,n,!1,o,i)}function pg(e,t="",n,o=!0,i=!1){const a=(...s)=>{ug(e,t,a,o,i),n.apply(this,s)};cg.call(this,e,t,a,!0,o,i)}function hg(e,t="",n=!1,o={}){if(!Dh.element(e)||Dh.empty(t))return;const i=new CustomEvent(t,{bubbles:n,detail:{...o,plyr:this}});e.dispatchEvent(i)}function gg(){this&&this.eventListeners&&(this.eventListeners.forEach((e=>{const{element:t,type:n,callback:o,options:i}=e;t.removeEventListener(n,o,i)})),this.eventListeners=[])}function mg(){return new Promise((e=>this.ready?setTimeout(e,0):dg.call(this,this.elements.container,"ready",e))).then((()=>{}))}function bg(e){Dh.promise(e)&&e.then(null,(()=>{}))}function fg(e){return Dh.array(e)?e.filter(((t,n)=>e.indexOf(t)===n)):e}function xg(e,t){return Dh.array(e)&&e.length?e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)):null}function yg(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const vg=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce(((e,[t,n])=>({...e,[t/n]:[t,n]})),{});function kg(e){return!!(Dh.array(e)||Dh.string(e)&&e.includes(":"))&&(Dh.array(e)?e:e.split(":")).map(Number).every(Dh.number)}function wg(e){if(!Dh.array(e)||!e.every(Dh.number))return null;const[t,n]=e,o=(e,t)=>0===t?e:o(t,e%t),i=o(t,n);return[t/i,n/i]}function _g(e){const t=e=>kg(e)?e.split(":").map(Number):null;let n=t(e);if(null===n&&(n=t(this.config.ratio)),null===n&&!Dh.empty(this.embed)&&Dh.array(this.embed.ratio)&&({ratio:n}=this.embed),null===n&&this.isHTML5){const{videoWidth:e,videoHeight:t}=this.media;n=[e,t]}return wg(n)}function Cg(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,n=_g.call(this,e);if(!Dh.array(n))return{};const[o,i]=wg(n),a=100/o*i;if(yg(`aspect-ratio: ${o}/${i}`)?t.style.aspectRatio=`${o}/${i}`:t.style.paddingBottom=`${a}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const e=100/this.media.offsetWidth*Number.parseInt(window.getComputedStyle(this.media).paddingBottom,10),n=(e-a)/(e/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${n}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:a,ratio:n}}function jg(e,t,n=.05){const o=e/t,i=xg(Object.keys(vg),o);return Math.abs(i-o)<=n?vg[i]:[e,t]}const $g={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((e=>{const t=e.getAttribute("type");return!!Dh.empty(t)||rg.mime.call(this,t)})):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:$g.getSources.call(this).map((e=>Number(e.getAttribute("size")))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,Dh.empty(this.config.ratio)||Cg.call(e),Object.defineProperty(e.media,"quality",{get(){const t=$g.getSources.call(e).find((t=>t.getAttribute("src")===e.source))
319 +;return t&&Number(t.getAttribute("size"))},set(t){if(e.quality!==t){if(e.config.quality.forced&&Dh.function(e.config.quality.onChange))e.config.quality.onChange(t);else{const n=$g.getSources.call(e).find((e=>Number(e.getAttribute("size"))===t));if(!n)return;const{currentTime:o,paused:i,preload:a,readyState:s,playbackRate:r}=e.media;e.media.src=n.getAttribute("src"),("none"!==a||s)&&(e.once("loadedmetadata",(()=>{e.speed=r,e.currentTime=o,i||bg(e.play())})),e.media.load())}hg.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(Kh($g.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};var Sg={isIE:Boolean(window.document.documentMode),isEdge:/Edge/.test(navigator.userAgent),isWebKit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPadOS:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,isIos:/iPad|iPhone|iPod/i.test(navigator.userAgent)&&navigator.maxTouchPoints>1};function Tg(e,...t){return Dh.empty(e)?e:e.toString().replace(/\{(\d+)\}/g,((e,n)=>t[n].toString()))}function Ng(e="",t="",n=""){return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),n.toString())}function Mg(e=""){return e.toString().replace(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()))}function Lg(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const Pg={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Eg={get(e="",t={}){if(Dh.empty(e)||Dh.empty(t))return"";let n=Wh(t.i18n,e);if(Dh.empty(n))return Object.keys(Pg).includes(e)?Pg[e]:"";const o={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(o).forEach((([e,t])=>{n=Ng(n,e,t)})),n}};class Ag{constructor(e){hh(this,"get",(e=>{if(!Ag.supported||!this.enabled)return null;const t=window.localStorage.getItem(this.key);if(Dh.empty(t))return null;const n=JSON.parse(t);return Dh.string(e)&&e.length?n[e]:n})),hh(this,"set",(e=>{if(!Ag.supported||!this.enabled)return;if(!Dh.object(e))return;let t=this.get();Dh.empty(t)&&(t={}),Uh(t,e);try{window.localStorage.setItem(this.key,JSON.stringify(t))}catch{}})),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}}function Bg(e,t="text",n=!1){return new Promise(((o,i)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;n&&(i.withCredentials=!0),i.addEventListener("load",(()=>{if("text"===t)try{o(JSON.parse(i.responseText))}catch{o(i.responseText)}else o(i.response)})),i.addEventListener("error",(()=>{throw new Error(i.status)})),i.open("GET",e,!0),i.responseType=t,i.send()}catch(e){i(e)}}))}function Ig(e,t){if(!Dh.string(e))return;const n="cache",o=Dh.string(t);let i=!1;const a=()=>null!==document.getElementById(t),s=(e,t)=>{e.innerHTML=t,o&&a()||document.body.insertAdjacentElement("afterbegin",e)};if(!o||!a()){const a=Ag.supported,r=document.createElement("div");if(r.setAttribute("hidden",""),o&&r.setAttribute("id",t),a){const e=window.localStorage.getItem(`${n}-${t}`);if(i=null!==e,i){const t=JSON.parse(e);s(r,t.content)}}Bg(e).then((e=>{if(!Dh.empty(e)){if(a)try{window.localStorage.setItem(`${n}-${t}`,JSON.stringify({content:e}))}catch{}s(r,e)}})).catch((()=>{}))}}const Og=e=>Math.trunc(e/60/60%60,10);function Rg(e=0,t=!1,n=!1){if(!Dh.number(e))return Rg(void 0,t,n);const o=e=>`0${e}`.slice(-2);let i=Og(e);const a=(s=e,Math.trunc(s/60%60,10));var s;const r=(e=>Math.trunc(e%60,10))(e);return i=t||i>0?`${i}:`:"",`${n&&e>0?"-":""}${i}${o(a)}:${o(r)}`}const zg={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,n=e.host!==t||Sg.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:n}},findElements(){try{return this.elements.controls=ig.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:og.call(this,this.config.selectors.buttons.play),pause:ig.call(this,this.config.selectors.buttons.pause),restart:ig.call(this,this.config.selectors.buttons.restart),rewind:ig.call(this,this.config.selectors.buttons.rewind),fastForward:ig.call(this,this.config.selectors.buttons.fastForward),mute:ig.call(this,this.config.selectors.buttons.mute),pip:ig.call(this,this.config.selectors.buttons.pip),airplay:ig.call(this,this.config.selectors.buttons.airplay),settings:ig.call(this,this.config.selectors.buttons.settings),captions:ig.call(this,this.config.selectors.buttons.captions),fullscreen:ig.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=ig.call(this,this.config.selectors.progress),this.elements.inputs={seek:ig.call(this,this.config.selectors.inputs.seek),volume:ig.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:ig.call(this,this.config.selectors.display.buffer),currentTime:ig.call(this,this.config.selectors.display.currentTime),duration:ig.call(this,this.config.selectors.display.duration)},Dh.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,t){const n="http://www.w3.org/2000/svg",o=zg.getIconUrl.call(this),i=`${o.cors?"":o.url}#${this.config.iconPrefix}`,a=document.createElementNS(n,"svg");Vh(a,Uh(t,{"aria-hidden":"true",focusable:"false"}));const s=document.createElementNS(n,"use"),r=`${i}-${e}`;return"href"in s&&s.setAttributeNS("http://www.w3.org/1999/xlink","href",r),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),a.appendChild(s),a},createLabel(e,t={}){const n=Eg.get(e,this.config);return qh("span",{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")},n)},createBadge(e){if(Dh.empty(e))return null;const t=qh("span",{class:this.config.classNames.menu.value});return t.appendChild(qh("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const n=Uh({},t);let o=function(e=""){let t=e.toString();return t=function(e=""){let t=e.toString();return t=Ng(t,"-"," "),t=Ng(t,"_"," "),t=Mg(t),Ng(t," ","")}(t),t.charAt(0).toLowerCase()+t.slice(1)}(e);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((e=>{Object.keys(n).includes(e)&&(i[e]=n[e],delete n[e])})),"button"!==i.element||Object.keys(n).includes("type")||(n.type="button"),Object.keys(n).includes("class")?n.class.split(" ").includes(this.config.classNames.control)||Uh(n,{class:`${n.class} ${this.config.classNames.control}`}):n.class=this.config.classNames.control,e){case"play":i.toggle=!0,i.label="play",i.labelPressed="pause",i.icon="play",i.iconPressed="pause";break;case"mute":i.toggle=!0,i.label="mute",i.labelPressed="unmute",i.icon="volume",i.iconPressed="muted";break;case"captions":i.toggle=!0,i.label="enableCaptions",i.labelPressed="disableCaptions",i.icon="captions-off",i.iconPressed="captions-on";break;case"fullscreen":i.toggle=!0,i.label="enterFullscreen",i.labelPressed="exitFullscreen",i.icon="enter-fullscreen",i.iconPressed="exit-fullscreen";break;case"play-large":n.class+=` ${this.config.classNames.control}--overlaid`,o="play",i.label="play",i.icon="play";break;default:Dh.empty(i.label)&&(i.label=o),Dh.empty(i.icon)&&(i.icon=e)}const a=qh(i.element);return i.toggle?(a.appendChild(zg.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),a.appendChild(zg.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),a.appendChild(zg.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),a.appendChild(zg.createLabel.call(this,i.label,{class:"label--not-pressed"
320 +}))):(a.appendChild(zg.createIcon.call(this,i.icon)),a.appendChild(zg.createLabel.call(this,i.label))),Uh(n,Xh(this.config.selectors.buttons[o],n)),Vh(a,n),"play"===o?(Dh.array(this.elements.buttons[o])||(this.elements.buttons[o]=[]),this.elements.buttons[o].push(a)):this.elements.buttons[o]=a,a},createRange(e,t){const n=qh("input",Uh(Xh(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Eg.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,zg.updateRangeFill.call(this,n),Mh.setup(n),n},createProgress(e,t){const n=qh("progress",Uh(Xh(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){n.appendChild(qh("span",null,"0"));const t={played:"played",buffer:"buffered"}[e],o=t?Eg.get(t,this.config):"";n.textContent=`% ${o.toLowerCase()}`}return this.elements.display[e]=n,n},createTime(e,t){const n=Xh(this.config.selectors.display[e],t),o=qh("div",Uh(n,{class:`${n.class?n.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Eg.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=o,o},bindMenuItemShortcuts(e,t){dg.call(this,e,"keydown keyup",(n=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(n.key))return;if(n.preventDefault(),n.stopPropagation(),"keydown"===n.type)return;const o=ng(e,'[role="menuitemradio"]');if(!o&&[" ","ArrowRight"].includes(n.key))zg.showMenuPanel.call(this,t,!0);else{let t;" "!==n.key&&("ArrowDown"===n.key||o&&"ArrowRight"===n.key?(t=e.nextElementSibling,Dh.element(t)||(t=e.parentNode.firstElementChild)):(t=e.previousElementSibling,Dh.element(t)||(t=e.parentNode.lastElementChild)),ag.call(this,t,!0))}}),!1),dg.call(this,e,"keyup",(e=>{"Return"===e.key&&zg.focusFirstMenuItem.call(this,null,!0)}))},createMenuItem({value:e,list:t,type:n,title:o,badge:i=null,checked:a=!1}){const s=Xh(this.config.selectors.inputs[n]),r=qh("button",Uh(s,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${s.class?s.class:""}`.trim(),"aria-checked":a,value:e})),l=qh("span");l.innerHTML=o,Dh.element(i)&&l.appendChild(i),r.appendChild(l),Object.defineProperty(r,"checked",{enumerable:!0,get:()=>"true"===r.getAttribute("aria-checked"),set(e){e&&Array.from(r.parentNode.children).filter((e=>ng(e,'[role="menuitemradio"]'))).forEach((e=>e.setAttribute("aria-checked","false"))),r.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(r,"click keyup",(t=>{if(!Dh.keyboardEvent(t)||" "===t.key){switch(t.preventDefault(),t.stopPropagation(),r.checked=!0,n){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=Number.parseFloat(e)}zg.showMenuPanel.call(this,"home",Dh.keyboardEvent(t))}}),n,!1),zg.bindMenuItemShortcuts.call(this,r,n),t.appendChild(r)},formatTime(e=0,t=!1){return Dh.number(e)?Rg(e,Og(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,n=!1){Dh.element(e)&&Dh.number(t)&&(e.textContent=zg.formatTime(t,n))},updateVolume(){this.supported.ui&&(Dh.element(this.elements.inputs.volume)&&zg.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),Dh.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(e,t=0){Dh.element(e)&&(e.value=t,zg.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!Dh.event(e))return;let t=0;const n=(e,t)=>{const n=Dh.number(t)?t:0,o=Dh.element(e)?e:this.elements.display.buffer;if(Dh.element(o)){o.value=n;const e=o.getElementsByTagName("span")[0];Dh.element(e)&&(e.childNodes[0].nodeValue=n)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":o=this.currentTime,i=this.duration,t=0===o||0===i||Number.isNaN(o)||Number.isNaN(i)?0:(o/i*100).toFixed(2),"timeupdate"===e.type&&zg.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":n(this.elements.display.buffer,100*this.buffered)}var o,i},updateRangeFill(e){const t=Dh.event(e)?e.target:e;if(Dh.element(t)&&"range"===t.getAttribute("type")){if(ng(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const e=zg.formatTime(this.currentTime),n=zg.formatTime(this.duration),o=Eg.get("seekLabel",this.config);t.setAttribute("aria-valuetext",o.replace("{currentTime}",e).replace("{duration}",n))}else if(ng(t,this.config.selectors.inputs.volume)){const e=100*t.value;t.setAttribute("aria-valuenow",e),t.setAttribute("aria-valuetext",`${e.toFixed(1)}%`)}else t.setAttribute("aria-valuenow",t.value);(Sg.isWebKit||Sg.isIPadOS)&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){var t,n;if(!this.config.tooltips.seek||!Dh.element(this.elements.inputs.seek)||!Dh.element(this.elements.display.seekTooltip)||0===this.duration)return;const o=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,a=e=>eg(o,i,e);if(this.touch)return void a(!1);let s=0;const r=this.elements.progress.getBoundingClientRect();if(Dh.event(e)){const t=e.pageX-e.clientX;s=100/r.width*(e.pageX-r.left-t)}else{if(!tg(o,i))return;s=Number.parseFloat(o.style.left,10)}s<0?s=0:s>100&&(s=100);const l=this.duration/100*s;o.textContent=zg.formatTime(l);const c=null===(t=this.config.markers)||void 0===t||null===(n=t.points)||void 0===n?void 0:n.find((({time:e})=>e===Math.round(l)));c&&o.insertAdjacentHTML("afterbegin",`${c.label}<br>`),o.style.left=`${s}%`,Dh.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&a("mouseenter"===e.type)},timeUpdate(e){const t=!Dh.element(this.elements.display.duration)&&this.config.invertTime;zg.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||zg.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return Jh(this.elements.display.currentTime,!0),void Jh(this.elements.progress,!0);Dh.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=Dh.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&zg.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&zg.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&zg.setMarkers.call(this),zg.updateSeekTooltip.call(this)},toggleMenuButton(e,t){Jh(this.elements.settings.buttons[e],!t)},updateSetting(e,t,n){const o=this.elements.settings.panels[e];let i=null,a=t;if("captions"===e)i=this.currentTrack;else{if(i=Dh.empty(n)?this[e]:n,Dh.empty(i)&&(i=this.config[e].default),!Dh.empty(this.options[e])&&!this.options[e].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${e}`);if(!this.config[e].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${e}`)}if(Dh.element(a)||(a=o&&o.querySelector('[role="menu"]')),!Dh.element(a))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=zg.getLabel.call(this,e,i);const s=a&&a.querySelector(`[value="${i}"]`);Dh.element(s)&&(s.checked=!0)},getLabel(e,t){switch(e){case"speed":return 1===t?Eg.get("normal",this.config):`${t}&times;`;case"quality":if(Dh.number(t)){const e=Eg.get(`qualityLabel.${t}`,this.config);return e.length?e:`${t}p`}return Mg(t);case"captions":return Hg.getLabel.call(this);default:return null}},setQualityMenu(e){if(!Dh.element(this.elements.settings.panels.quality))return;const t="quality",n=this.elements.settings.panels.quality.querySelector('[role="menu"]');Dh.array(e)&&(this.options.quality=fg(e).filter((e=>this.config.quality.options.includes(e))));const o=!Dh.empty(this.options.quality)&&this.options.quality.length>1;if(zg.toggleMenuButton.call(this,t,o),Qh(n),zg.checkMenu.call(this),!o)return;const i=e=>{
321 +const t=Eg.get(`qualityBadge.${e}`,this.config);return t.length?zg.createBadge.call(this,t):null};this.options.quality.sort(((e,t)=>{const n=this.config.quality.options;return n.indexOf(e)>n.indexOf(t)?1:-1})).forEach((e=>{zg.createMenuItem.call(this,{value:e,list:n,type:t,title:zg.getLabel.call(this,"quality",e),badge:i(e)})})),zg.updateSetting.call(this,t,n)},setCaptionsMenu(){if(!Dh.element(this.elements.settings.panels.captions))return;const e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),n=Hg.getTracks.call(this),o=Boolean(n.length);if(zg.toggleMenuButton.call(this,e,o),Qh(t),zg.checkMenu.call(this),!o)return;const i=n.map(((e,n)=>({value:n,checked:this.captions.toggled&&this.currentTrack===n,title:Hg.getLabel.call(this,e),badge:e.language&&zg.createBadge.call(this,e.language.toUpperCase()),list:t,type:"language"})));i.unshift({value:-1,checked:!this.captions.toggled,title:Eg.get("disabled",this.config),list:t,type:"language"}),i.forEach(zg.createMenuItem.bind(this)),zg.updateSetting.call(this,e,t)},setSpeedMenu(){if(!Dh.element(this.elements.settings.panels.speed))return;const e="speed",t=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((e=>e>=this.minimumSpeed&&e<=this.maximumSpeed));const n=!Dh.empty(this.options.speed)&&this.options.speed.length>1;zg.toggleMenuButton.call(this,e,n),Qh(t),zg.checkMenu.call(this),n&&(this.options.speed.forEach((n=>{zg.createMenuItem.call(this,{value:n,list:t,type:e,title:zg.getLabel.call(this,"speed",n)})})),zg.updateSetting.call(this,e,t))},checkMenu(){const{buttons:e}=this.elements.settings,t=!Dh.empty(e)&&Object.values(e).some((e=>!e.hidden));Jh(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let n=e;Dh.element(n)||(n=Object.values(this.elements.settings.panels).find((e=>!e.hidden)));const o=n.querySelector('[role^="menuitem"]');ag.call(this,o,t)},toggleMenu(e){const{popup:t}=this.elements.settings,n=this.elements.buttons.settings;if(!Dh.element(t)||!Dh.element(n))return;const{hidden:o}=t;let i=o;if(Dh.boolean(e))i=e;else if(Dh.keyboardEvent(e)&&"Escape"===e.key)i=!1;else if(Dh.event(e)){const o=Dh.function(e.composedPath)?e.composedPath()[0]:e.target,a=t.contains(o);if(a||!a&&e.target!==n&&i)return}n.setAttribute("aria-expanded",i),Jh(t,!i),eg(this.elements.container,this.config.classNames.menu.open,i),i&&Dh.keyboardEvent(e)?zg.focusFirstMenuItem.call(this,null,!0):i||o||ag.call(this,n,Dh.keyboardEvent(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const n=t.scrollWidth,o=t.scrollHeight;return Kh(t),{width:n,height:o}},showMenuPanel(e="",t=!1){const n=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!Dh.element(n))return;const o=n.parentNode,i=Array.from(o.children).find((e=>!e.hidden));if(rg.transitions&&!rg.reducedMotion){o.style.width=`${i.scrollWidth}px`,o.style.height=`${i.scrollHeight}px`;const e=zg.getMenuSize.call(this,n),t=e=>{e.target===o&&["width","height"].includes(e.propertyName)&&(o.style.width="",o.style.height="",ug.call(this,o,Fh,t))};dg.call(this,o,Fh,t),o.style.width=`${e.width}px`,o.style.height=`${e.height}px`}Jh(i,!0),Jh(n,!1),zg.focusFirstMenuItem.call(this,n,t)},setDownloadUrl(){const e=this.elements.buttons.download;Dh.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:t,createButton:n,createProgress:o,createRange:i,createTime:a,setQualityMenu:s,setSpeedMenu:r,showMenuPanel:l}=zg;this.elements.controls=null,Dh.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(n.call(this,"play-large"));const c=qh("div",Xh(this.config.selectors.controls.wrapper));this.elements.controls=c;const d={class:"plyr__controls__item"};return fg(Dh.array(this.config.controls)?this.config.controls:[]).forEach((s=>{if("restart"===s&&c.appendChild(n.call(this,"restart",d)),"rewind"===s&&c.appendChild(n.call(this,"rewind",d)),"play"===s&&c.appendChild(n.call(this,"play",d)),"fast-forward"===s&&c.appendChild(n.call(this,"fast-forward",d)),"progress"===s){const t=qh("div",{class:`${d.class} plyr__progress__container`}),n=qh("div",Xh(this.config.selectors.progress));if(n.appendChild(i.call(this,"seek",{id:`plyr-seek-${e.id}`})),n.appendChild(o.call(this,"buffer")),this.config.tooltips.seek){const e=qh("span",{class:this.config.classNames.tooltip},"00:00");n.appendChild(e),this.elements.display.seekTooltip=e}this.elements.progress=n,t.appendChild(this.elements.progress),c.appendChild(t)}if("current-time"===s&&c.appendChild(a.call(this,"currentTime",d)),"duration"===s&&c.appendChild(a.call(this,"duration",d)),"mute"===s||"volume"===s){let{volume:t}=this.elements;if(Dh.element(t)&&c.contains(t)||(t=qh("div",Uh({},d,{class:`${d.class} plyr__volume`.trim()})),this.elements.volume=t,c.appendChild(t)),"mute"===s&&t.appendChild(n.call(this,"mute")),"volume"===s&&!Sg.isIos&&!Sg.isIPadOS){const n={max:1,step:.05,value:this.config.volume};t.appendChild(i.call(this,"volume",Uh(n,{id:`plyr-volume-${e.id}`})))}}if("captions"===s&&c.appendChild(n.call(this,"captions",d)),"settings"===s&&!Dh.empty(this.config.settings)){const o=qh("div",Uh({},d,{class:`${d.class} plyr__menu`.trim(),hidden:""}));o.appendChild(n.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const i=qh("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),a=qh("div"),s=qh("div",{id:`plyr-settings-${e.id}-home`}),r=qh("div",{role:"menu"});s.appendChild(r),a.appendChild(s),this.elements.settings.panels.home=s,this.config.settings.forEach((n=>{const o=qh("button",Uh(Xh(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,o,n),dg.call(this,o,"click",(()=>{l.call(this,n,!1)}));const i=qh("span",null,Eg.get(n,this.config)),s=qh("span",{class:this.config.classNames.menu.value});s.innerHTML=e[n],i.appendChild(s),o.appendChild(i),r.appendChild(o);const c=qh("div",{id:`plyr-settings-${e.id}-${n}`,hidden:""}),d=qh("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});d.appendChild(qh("span",{"aria-hidden":!0},Eg.get(n,this.config))),d.appendChild(qh("span",{class:this.config.classNames.hidden},Eg.get("menuBack",this.config))),dg.call(this,c,"keydown",(e=>{"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),l.call(this,"home",!0))}),!1),dg.call(this,d,"click",(()=>{l.call(this,"home",!1)})),c.appendChild(d),c.appendChild(qh("div",{role:"menu"})),a.appendChild(c),this.elements.settings.buttons[n]=o,this.elements.settings.panels[n]=c})),i.appendChild(a),o.appendChild(i),c.appendChild(o),this.elements.settings.popup=i,this.elements.settings.menu=o}if("pip"===s&&rg.pip&&c.appendChild(n.call(this,"pip",d)),"airplay"===s&&rg.airplay&&c.appendChild(n.call(this,"airplay",d)),"download"===s){const e=Uh({},d,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(e.download="");const{download:t}=this.config.urls;!Dh.url(t)&&this.isEmbed&&Uh(e,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(n.call(this,"download",e))}"fullscreen"===s&&c.appendChild(n.call(this,"fullscreen",d))})),this.isHTML5&&s.call(this,$g.getQualityOptions.call(this)),r.call(this),c},inject(){if(this.config.loadSprite){const e=zg.getIconUrl.call(this);e.cors&&Ig(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const t={id:this.id,seektime:this.config.seekTime,title:this.config.title};let n,o=!0;if(Dh.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]),
322 +Dh.element(this.config.controls)||Dh.string(this.config.controls)?e=this.config.controls:(e=zg.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Hg.getLabel.call(this)}),o=!1),o&&Dh.string(this.config.controls)&&(e=(e=>{let n=e;return Object.entries(t).forEach((([e,t])=>{n=Ng(n,`{${e}}`,t)})),n})(e)),Dh.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),Dh.element(n)||(n=this.elements.container),n[Dh.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),Dh.element(this.elements.controls)||zg.findElements.call(this),!Dh.empty(this.elements.buttons)){const e=e=>{const t=this.config.classNames.controlPressed;e.setAttribute("aria-pressed","false"),Object.defineProperty(e,"pressed",{configurable:!0,enumerable:!0,get:()=>tg(e,t),set(n=!1){eg(e,t,n),e.setAttribute("aria-pressed",n?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach((t=>{Dh.array(t)||Dh.nodeList(t)?Array.from(t).filter(Boolean).forEach(e):e(t)}))}if(Sg.isEdge&&Hh(n),this.config.tooltips.controls){const{classNames:e,selectors:t}=this.config,n=`${t.controls.wrapper} ${t.labels} .${e.hidden}`,o=og.call(this,n);Array.from(o).forEach((e=>{eg(e,this.config.classNames.hidden,!1),eg(e,this.config.classNames.tooltip,!0)}))}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;const n=null===(e=this.config.markers)||void 0===e||null===(t=e.points)||void 0===t?void 0:t.filter((({time:e})=>e>0&&e<this.duration));if(null==n||!n.length)return;const o=document.createDocumentFragment(),i=document.createDocumentFragment();let a=null;const s=`${this.config.classNames.tooltip}--visible`,r=e=>eg(a,s,e);n.forEach((e=>{const t=qh("span",{class:this.config.classNames.marker},""),n=e.time/this.duration*100+"%";a&&(t.addEventListener("mouseenter",(()=>{e.label||(a.style.left=n,a.innerHTML=e.label,r(!0))})),t.addEventListener("mouseleave",(()=>{r(!1)}))),t.addEventListener("click",(()=>{this.currentTime=e.time})),t.style.left=n,i.appendChild(t)})),o.appendChild(i),this.config.tooltips.seek||(a=qh("span",{class:this.config.classNames.tooltip},""),o.appendChild(a)),this.elements.markers={points:i,tip:a},this.elements.progress.appendChild(o)}};function Dg(e,t=!0){let n=e;if(t){const e=document.createElement("a");e.href=n,n=e.href}try{return new URL(n)}catch{return null}}function Fg(e){const t=new URLSearchParams;return Dh.object(e)&&Object.entries(e).forEach((([e,n])=>{t.set(e,n)})),t}const Hg={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!rg.textTracks)return void(Dh.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&zg.setCaptionsMenu.call(this));var e,t;if(Dh.element(this.elements.captions)||(this.elements.captions=qh("div",Xh(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),e=this.elements.captions,t=this.elements.wrapper,Dh.element(e)&&Dh.element(t)&&t.parentNode.insertBefore(e,t.nextSibling)),Sg.isIE&&window.URL){const e=this.media.querySelectorAll("track");Array.from(e).forEach((e=>{const t=e.getAttribute("src"),n=Dg(t);null!==n&&n.hostname!==window.location.href.hostname&&["http:","https:"].includes(n.protocol)&&Bg(t,"blob").then((t=>{e.setAttribute("src",window.URL.createObjectURL(t))})).catch((()=>{Kh(e)}))}))}const n=fg((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((e=>e.split("-")[0])));let o=(this.storage.get("language")||this.captions.language||this.config.captions.language||"auto").toLowerCase();"auto"===o&&([o]=n);let i=this.storage.get("captions")||this.captions.active;if(Dh.boolean(i)||({active:i}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:i,language:o,languages:n}),this.isHTML5){const e=this.config.captions.update?"addtrack removetrack":"removetrack";dg.call(this,this.media.textTracks,e,Hg.update.bind(this))}setTimeout(Hg.update.bind(this),0)},update(){const e=Hg.getTracks.call(this,!0),{active:t,language:n,meta:o,currentTrackNode:i}=this.captions,a=Boolean(e.find((e=>e.language===n)));this.isHTML5&&this.isVideo&&e.filter((e=>!o.get(e))).forEach((e=>{this.debug.log("Track added",e),o.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),dg.call(this,e,"cuechange",(()=>Hg.updateCues.call(this)))})),(a&&this.language!==n||!e.includes(i))&&(Hg.setLanguage.call(this,n),Hg.toggle.call(this,t&&a)),this.elements&&eg(this.elements.container,this.config.classNames.captions.enabled,!Dh.empty(e)),Dh.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&zg.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:n}=this.captions,o=this.config.classNames.captions.active,i=Dh.nullOrUndefined(e)?!n:e;if(i!==n){if(t||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!t){const e=Hg.getTracks.call(this),t=Hg.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=t.language,void Hg.set.call(this,e.indexOf(t))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),eg(this.elements.container,o,i),this.captions.toggled=i,zg.updateSetting.call(this,"captions"),hg.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout((()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")}))},set(e,t=!0){const n=Hg.getTracks.call(this);if(-1!==e)if(Dh.number(e))if(e in n){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const o=n[e],{language:i}=o||{};this.captions.currentTrackNode=o,zg.updateSetting.call(this,"captions"),t||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i,null,!1),hg.call(this,this.media,"languagechange")}Hg.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Hg.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Hg.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!Dh.string(e))return void this.debug.warn("Invalid language argument",e);const n=e.toLowerCase();this.captions.language=n;const o=Hg.getTracks.call(this),i=Hg.findTrack.call(this,[n]);Hg.set.call(this,o.indexOf(i),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter((t=>!this.isHTML5||e||this.captions.meta.has(t))).filter((e=>["captions","subtitles"].includes(e.kind)))},findTrack(e,t=!1){const n=Hg.getTracks.call(this),o=e=>Number((this.captions.meta.get(e)||{}).default),i=Array.from(n).sort(((e,t)=>o(t)-o(e)));let a;return e.every((e=>(a=i.find((t=>t.language===e)),!a))),a||(t?i[0]:void 0)},getCurrentTrack(){return Hg.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!Dh.track(t)&&rg.textTracks&&this.captions.toggled&&(t=Hg.getCurrentTrack.call(this)),Dh.track(t)?Dh.empty(t.label)?Dh.empty(t.language)?Eg.get("enabled",this.config):e.language.toUpperCase():t.label:Eg.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!Dh.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!Dh.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const e=Hg.getCurrentTrack.call(this);t=Array.from((e||{}).activeCues||[]).map((e=>e.getCueAsHTML())).map(Lg)}const n=t.map((e=>e.trim())).join("\n");if(n!==this.elements.captions.innerHTML){Qh(this.elements.captions);const e=qh("span",Xh(this.config.selectors.caption));e.innerHTML=n,this.elements.captions.appendChild(e),
323 +hg.call(this,this.media,"cuechange")}}},Wg={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.8.4/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:"",withCredentials:!1},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},Ug="picture-in-picture",Gg={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Vg="video";function qg(){}class Yg{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):qg}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):qg}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):qg}}class Kg{constructor(e){hh(this,"onChange",(()=>{if(!this.supported)return;const e=this.player.elements.buttons.fullscreen;Dh.element(e)&&(e.pressed=this.active);const t=this.target===this.player.media?this.target:this.player.elements.container;hg.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)})),hh(this,"toggleFallback",((e=!1)=>{var t,n;if(e?this.scrollPosition={x:null!==(t=window.scrollX)&&void 0!==t?t:0,y:null!==(n=window.scrollY)&&void 0!==n?n:0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",eg(this.target,this.player.config.classNames.fullscreen.fallback,e),Sg.isIos){let t=document.head.querySelector('meta[name="viewport"]');const n="viewport-fit=cover";t||(t=document.createElement("meta"),t.setAttribute("name","viewport"));const o=Dh.string(t.content)&&t.content.includes(n);e?(this.cleanupViewport=!o,o||(t.content+=`,${n}`)):this.cleanupViewport&&(t.content=t.content.split(",").filter((e=>e.trim()!==n)).join(","))}this.onChange()})),hh(this,"trapFocus",(e=>{if(Sg.isIos||Sg.isIPadOS||!this.active||"Tab"!==e.key)return;const t=document.activeElement,n=og.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[o]=n,i=n[n.length-1];t!==i||e.shiftKey?t===o&&e.shiftKey&&(i.focus(),e.preventDefault()):(o.focus(),e.preventDefault())})),hh(this,"update",(()=>{if(this.supported){let e;e=this.forceFallback?"Fallback (forced)":Kg.nativeSupported?"Native":"Fallback",this.player.debug.log(`${e} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");eg(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)})),hh(this,"enter",(()=>{
324 +this.supported&&(Sg.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Kg.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?Dh.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))})),hh(this,"exit",(()=>{if(this.supported)if(Sg.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),bg(this.player.play());else if(!Kg.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!Dh.empty(this.prefix)){const e="moz"===this.prefix?"Cancel":"Exit";document[`${this.prefix}${e}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),hh(this,"toggle",(()=>{this.active?this.exit():this.enter()})),this.player=e,this.prefix=Kg.prefix,this.property=Kg.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(e,t){const{prototype:n}=Element;return(n.closest||function(){let e=this;do{if(ng.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,e.config.fullscreen.container),dg.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":`${this.prefix}fullscreenchange`,(()=>{this.onChange()})),dg.call(this.player,this.player.elements.container,"dblclick",(e=>{Dh.element(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,"fullscreen")})),dg.call(this,this.player.elements.container,"keydown",(e=>this.trapFocus(e))),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Kg.nativeSupported&&!this.forceFallback}static get prefix(){if(Dh.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some((t=>!(!Dh.function(document[`${t}ExitFullscreen`])&&!Dh.function(document[`${t}CancelFullScreen`])||(e=t,0)))),e}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Kg.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Kg.nativeSupported||!Sg.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Kg.nativeSupported||this.forceFallback)return tg(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){var e;return Sg.isIos&&this.player.config.fullscreen.iosNative?this.player.media:null!==(e=this.player.elements.fullscreen)&&void 0!==e?e:this.player.elements.container}}function Qg(e,t=1){return new Promise(((n,o)=>{const i=new Image,a=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=t?n:o)(i)};Object.assign(i,{onload:a,onerror:a,src:e})}))}const Zg={addStyleHook(){eg(this.elements.container,this.config.selectors.container.replace(".",""),!0),eg(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Zg.toggleNativeControls.call(this,!0);Dh.element(this.elements.controls)||(zg.inject.call(this),this.listeners.controls()),Zg.toggleNativeControls.call(this),this.isHTML5&&Hg.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,zg.updateVolume.call(this),zg.timeUpdate.call(this),zg.durationUpdate.call(this),Zg.checkPlaying.call(this),eg(this.elements.container,this.config.classNames.pip.supported,rg.pip&&this.isHTML5&&this.isVideo),eg(this.elements.container,this.config.classNames.airplay.supported,rg.airplay&&this.isHTML5),eg(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((()=>{hg.call(this,this.media,"ready")}),0),Zg.setTitle.call(this),this.poster&&Zg.setPoster.call(this,this.poster,!1).catch((()=>{})),this.config.duration&&zg.durationUpdate.call(this),this.config.mediaMetadata&&zg.setMediaMetadata.call(this)},setTitle(){let e=Eg.get("play",this.config);if(Dh.string(this.config.title)&&!Dh.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach((t=>{t.setAttribute("aria-label",e)})),this.isEmbed){const e=ig.call(this,"iframe");if(!Dh.element(e))return;const t=Dh.empty(this.config.title)?"video":this.config.title,n=Eg.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",t))}},togglePoster(e){eg(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),mg.call(this).then((()=>Qg(e))).catch((t=>{throw e===this.poster&&Zg.togglePoster.call(this,!1),t})).then((()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),Zg.togglePoster.call(this,!0),e))))},checkPlaying(e){eg(this.elements.container,this.config.classNames.playing,this.playing),eg(this.elements.container,this.config.classNames.paused,this.paused),eg(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",Eg.get(this.playing?"pause":"play",this.config))})),Dh.event(e)&&"timeupdate"===e.type||Zg.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((()=>{eg(this.elements.container,this.config.classNames.loading,this.loading),Zg.toggleControls.call(this)}),this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const n=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||n))}},migrateStyles(){Object.values({...this.media.style}).filter((e=>!Dh.empty(e)&&Dh.string(e)&&e.startsWith("--plyr"))).forEach((e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)})),Dh.empty(this.media.style)&&this.media.removeAttribute("style")}};class Xg{constructor(e){hh(this,"firstTouch",(()=>{const{player:e}=this,{elements:t}=e;e.touch=!0,eg(t.container,e.config.classNames.isTouch,!0)})),hh(this,"global",((e=!0)=>{const{player:t}=this;t.config.keyboard.global&&cg.call(t,window,"keydown keyup",this.handleKey,e,!1),cg.call(t,document.body,"click",this.toggleMenu,e),pg.call(t,document.body,"touchstart",this.firstTouch)})),hh(this,"container",(()=>{const{player:e}=this,{config:t,elements:n,timers:o}=e;!t.keyboard.global&&t.keyboard.focused&&dg.call(e,n.container,"keydown keyup",this.handleKey,!1),dg.call(e,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(t=>{const{controls:i}=n;i&&"enterfullscreen"===t.type&&(i.pressed=!1,i.hover=!1);let a=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(Zg.toggleControls.call(e,!0),a=e.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout((()=>Zg.toggleControls.call(e,!1)),a)}))
325 +;const i=()=>{if(!e.isVimeo||e.config.vimeo.premium)return;const t=n.wrapper,{active:o}=e.fullscreen,[i,a]=_g.call(e),s=yg(`aspect-ratio: ${i} / ${a}`);if(!o)return void(s?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null));const[r,l]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=r/l>i/a;s?(t.style.width=c?"auto":"100%",t.style.height=c?"100%":"auto"):(t.style.maxWidth=c?l/a*i+"px":null,t.style.margin=c?"0 auto":null)},a=()=>{clearTimeout(o.resized),o.resized=setTimeout(i,50)};dg.call(e,n.container,"enterfullscreen exitfullscreen",(t=>{const{target:o}=e.fullscreen;o===n.container&&(!e.isEmbed&&Dh.empty(e.config.ratio)||(i(),("enterfullscreen"===t.type?dg:ug).call(e,window,"resize",a)))}))})),hh(this,"media",(()=>{const{player:e}=this,{elements:t}=e;if(dg.call(e,e.media,"timeupdate seeking seeked",(t=>zg.timeUpdate.call(e,t))),dg.call(e,e.media,"durationchange loadeddata loadedmetadata",(t=>zg.durationUpdate.call(e,t))),dg.call(e,e.media,"ended",(()=>{e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())})),dg.call(e,e.media,"progress playing seeking seeked",(t=>zg.updateProgress.call(e,t))),dg.call(e,e.media,"volumechange",(t=>zg.updateVolume.call(e,t))),dg.call(e,e.media,"playing play pause ended emptied timeupdate",(t=>Zg.checkPlaying.call(e,t))),dg.call(e,e.media,"waiting canplay seeked playing",(t=>Zg.checkLoading.call(e,t))),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){const n=ig.call(e,`.${e.config.classNames.video}`);if(!Dh.element(n))return;dg.call(e,t.container,"click",(o=>{([t.container,n].includes(o.target)||n.contains(o.target))&&(e.touch&&e.config.hideControls||(e.ended?(this.proxy(o,e.restart,"restart"),this.proxy(o,(()=>{bg(e.play())}),"play")):this.proxy(o,(()=>{bg(e.togglePlay())}),"play")))}))}e.supported.ui&&e.config.disableContextMenu&&dg.call(e,t.wrapper,"contextmenu",(e=>{e.preventDefault()}),!1),dg.call(e,e.media,"volumechange",(()=>{e.storage.set({volume:e.volume,muted:e.muted})})),dg.call(e,e.media,"ratechange",(()=>{zg.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})})),dg.call(e,e.media,"qualitychange",(t=>{zg.updateSetting.call(e,"quality",null,t.detail.quality)})),dg.call(e,e.media,"ready qualitychange",(()=>{zg.setDownloadUrl.call(e)}));const n=e.config.events.concat(["keyup","keydown"]).join(" ");dg.call(e,e.media,n,(n=>{let{detail:o={}}=n;"error"===n.type&&(o=e.media.error),hg.call(e,t.container,n.type,!0,o)}))})),hh(this,"proxy",((e,t,n)=>{const{player:o}=this,i=o.config.listeners[n];let a=!0;Dh.function(i)&&(a=i.call(o,e)),!1!==a&&Dh.function(t)&&t.call(o,e)})),hh(this,"bind",((e,t,n,o,i=!0)=>{const{player:a}=this,s=a.config.listeners[o],r=Dh.function(s);dg.call(a,e,t,(e=>this.proxy(e,n,o)),i&&!r)})),hh(this,"controls",(()=>{const{player:e}=this,{elements:t}=e,n=Sg.isIE?"change":"input";if(t.buttons.play&&Array.from(t.buttons.play).forEach((t=>{this.bind(t,"click",(()=>{bg(e.togglePlay())}),"play")})),this.bind(t.buttons.restart,"click",e.restart,"restart"),this.bind(t.buttons.rewind,"click",(()=>{e.lastSeekTime=Date.now(),e.rewind()}),"rewind"),this.bind(t.buttons.fastForward,"click",(()=>{e.lastSeekTime=Date.now(),e.forward()}),"fastForward"),this.bind(t.buttons.mute,"click",(()=>{e.muted=!e.muted}),"mute"),this.bind(t.buttons.captions,"click",(()=>e.toggleCaptions())),this.bind(t.buttons.download,"click",(()=>{hg.call(e,e.media,"download")}),"download"),this.bind(t.buttons.fullscreen,"click",(()=>{e.fullscreen.toggle()}),"fullscreen"),this.bind(t.buttons.pip,"click",(()=>{e.pip="toggle"}),"pip"),this.bind(t.buttons.airplay,"click",e.airplay,"airplay"),this.bind(t.buttons.settings,"click",(t=>{t.stopPropagation(),t.preventDefault(),zg.toggleMenu.call(e,t)}),null,!1),this.bind(t.buttons.settings,"keyup",(t=>{[" ","Enter"].includes(t.key)&&("Enter"!==t.key?(t.preventDefault(),t.stopPropagation(),zg.toggleMenu.call(e,t)):zg.focusFirstMenuItem.call(e,null,!0))}),null,!1),this.bind(t.settings.menu,"keydown",(t=>{"Escape"===t.key&&zg.toggleMenu.call(e,t)})),this.bind(t.inputs.seek,"mousedown mousemove",(e=>{const n=t.progress.getBoundingClientRect(),o=e.pageX-e.clientX,i=100/n.width*(e.pageX-n.left-o);e.currentTarget.setAttribute("seek-value",i)})),this.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(t=>{const n=t.currentTarget,o="play-on-seeked";if(Dh.keyboardEvent(t)&&!["ArrowLeft","ArrowRight"].includes(t.key))return;e.lastSeekTime=Date.now();const i=n.hasAttribute(o),a=["mouseup","touchend","keyup"].includes(t.type);i&&a?(n.removeAttribute(o),bg(e.play())):!a&&e.playing&&(n.setAttribute(o,""),e.pause())})),Sg.isIos){const t=og.call(e,'input[type="range"]');Array.from(t).forEach((e=>this.bind(e,n,(e=>Hh(e.target)))))}this.bind(t.inputs.seek,n,(t=>{const n=t.currentTarget;let o=n.getAttribute("seek-value");Dh.empty(o)&&(o=n.value),n.removeAttribute("seek-value"),e.currentTime=o/n.max*e.duration}),"seek"),this.bind(t.progress,"mouseenter mouseleave mousemove",(t=>zg.updateSeekTooltip.call(e,t))),this.bind(t.progress,"mousemove touchmove",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.startMove(t)})),this.bind(t.progress,"mouseleave touchend click",(()=>{const{previewThumbnails:t}=e;t&&t.loaded&&t.endMove(!1,!0)})),this.bind(t.progress,"mousedown touchstart",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.startScrubbing(t)})),this.bind(t.progress,"mouseup touchend",(t=>{const{previewThumbnails:n}=e;n&&n.loaded&&n.endScrubbing(t)})),Sg.isWebKit&&Array.from(og.call(e,'input[type="range"]')).forEach((t=>{this.bind(t,"input",(t=>zg.updateRangeFill.call(e,t.target)))})),e.config.toggleInvert&&!Dh.element(t.display.duration)&&this.bind(t.display.currentTime,"click",(()=>{0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,zg.timeUpdate.call(e))})),this.bind(t.inputs.volume,n,(t=>{e.volume=t.target.value}),"volume"),this.bind(t.controls,"mouseenter mouseleave",(n=>{t.controls.hover=!e.touch&&"mouseenter"===n.type})),t.fullscreen&&Array.from(t.fullscreen.children).filter((e=>!e.contains(t.container))).forEach((n=>{this.bind(n,"mouseenter mouseleave",(n=>{t.controls&&(t.controls.hover=!e.touch&&"mouseenter"===n.type)}))})),this.bind(t.controls,"mousedown mouseup touchstart touchend touchcancel",(e=>{t.controls.pressed=["mousedown","touchstart"].includes(e.type)})),this.bind(t.controls,"focusin",(()=>{const{config:n,timers:o}=e;eg(t.controls,n.classNames.noTransition,!0),Zg.toggleControls.call(e,!0),setTimeout((()=>{eg(t.controls,n.classNames.noTransition,!1)}),0);const i=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout((()=>Zg.toggleControls.call(e,!1)),i)})),this.bind(t.inputs.volume,"wheel",(t=>{const n=t.webkitDirectionInvertedFromDevice,[o,i]=[t.deltaX,-t.deltaY].map((e=>n?-e:e)),a=Math.sign(Math.abs(o)>Math.abs(i)?o:i);e.increaseVolume(a/50);const{volume:s}=e.media;(1===a&&s<1||-1===a&&s>0)&&t.preventDefault()}),"volume",!1)})),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:n}=t,{key:o,type:i,altKey:a,ctrlKey:s,metaKey:r,shiftKey:l}=e,c="keydown"===i,d=c&&o===this.lastKey;var u;if(!(a||s||r||l)&&o)if(c){const i=document.activeElement;if(Dh.element(i)){const{editable:o}=t.config.selectors,{seek:a}=n.inputs;if(i!==a&&ng(i,o))return;if(" "===e.key&&ng(i,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(o)&&(e.preventDefault(),e.stopPropagation()),o){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d||(u=Number.parseInt(o,10),t.currentTime=t.duration/10*u);break;case" ":case"k":d||bg(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":
326 +t.decreaseVolume(.1);break;case"m":d||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":d||t.toggleCaptions();break;case"l":t.loop=!t.loop}"Escape"===o&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=o}else this.lastKey=null}toggleMenu(e){zg.toggleMenu.call(this.player,e)}}function Jg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var em,tm={exports:{}},nm=(em||(em=1,tm.exports=function(){var e=function(){},t={},n={},o={};function i(e,t){if(e){var i=o[e];if(n[e]=t,i)for(;i.length;)i[0](e,t),i.splice(0,1)}}function a(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function s(t,n,o,i){var a,r,l,c=document,d=o.async,u=(o.numRetries||0)+1,p=o.before||e,h=t.replace(/[\?|#].*$/,""),g=t.replace(/^(css|img|module|nomodule)!/,"");if(i=i||0,/(^css!|\.css$)/.test(h))(l=c.createElement("link")).rel="stylesheet",l.href=g,(a="hideFocus"in l)&&l.relList&&(a=0,l.rel="preload",l.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h))(l=c.createElement("img")).src=g;else if((l=c.createElement("script")).src=g,l.async=void 0===d||d,r="noModule"in l,/^module!/.test(h)){if(!r)return n(t,"l");l.type="module"}else if(/^nomodule!/.test(h)&&r)return n(t,"l");l.onload=l.onerror=l.onbeforeload=function(e){var r=e.type[0];if(a)try{l.sheet.cssText.length||(r="e")}catch(e){18!=e.code&&(r="e")}if("e"==r){if((i+=1)<u)return s(t,n,o,i)}else if("preload"==l.rel&&"style"==l.as)return l.rel="stylesheet";n(t,r,e.defaultPrevented)},!1!==p(t,l)&&c.head.appendChild(l)}function r(e,n,o){var r,l;if(n&&n.trim&&(r=n),l=(r?o:n)||{},r){if(r in t)throw"LoadJS";t[r]=!0}function c(t,n){!function(e,t,n){var o,i,a=(e=e.push?e:[e]).length,r=a,l=[];for(o=function(e,n,o){if("e"==n&&l.push(e),"b"==n){if(!o)return;l.push(e)}--a||t(l)},i=0;i<r;i++)s(e[i],o,n)}(e,(function(e){a(l,e),t&&a({success:t,error:n},e),i(r,e)}),l)}if(l.returnPromise)return new Promise(c);c()}return r.ready=function(e,t){return function(e,t){e=e.push?e:[e];var i,a,s,r=[],l=e.length,c=l;for(i=function(e,n){n.length&&r.push(e),--c||t(r)};l--;)a=e[l],(s=n[a])?i(a,s):(o[a]=o[a]||[]).push(i)}(e,(function(e){a(t,e)})),r},r.done=function(e){i(e,[])},r.reset=function(){t={},n={},o={}},r.isDefined=function(e){return e in t},r}()),tm.exports),om=Jg(nm);function im(e){return new Promise(((t,n)=>{om(e,{success:t,error:n})}))}function am(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,hg.call(this,this.media,e?"play":"pause"))}const sm={setup(){const e=this;eg(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,Cg.call(e),Dh.object(window.Vimeo)?sm.ready.call(e):im(e.config.urls.vimeo.sdk).then((()=>{sm.ready.call(e)})).catch((t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)}))},ready(){const e=this,t=e.config.vimeo,{premium:n,referrerPolicy:o,...i}=t;let a=e.media.getAttribute("src"),s="";Dh.empty(a)?(a=e.media.getAttribute(e.config.attributes.embed.id),s=e.media.getAttribute(e.config.attributes.embed.hash)):s=function(e){const t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*h=|\/)+([\d,a-f]+)/);return t&&5===t.length?t[4]:null}(a);const r=s?{h:s}:{};n&&Object.assign(i,{controls:!1,sidedock:!1});const l=Fg({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...r,...i}),c=function(e){if(Dh.empty(e))return null;if(Dh.number(Number(e)))return e;const t=e.match(/^.*(vimeo.com\/|video\/)(\d+).*/);return t?t[2]:e}(a),d=qh("iframe"),u=Tg(e.config.urls.vimeo.iframe,c,l);if(d.setAttribute("src",u),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Dh.empty(o)||d.setAttribute("referrerPolicy",o),n||!t.customControls)d.setAttribute("data-poster",e.poster),e.media=Zh(d,e.media);else{const t=qh("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});t.appendChild(d),e.media=Zh(t,e.media)}t.customControls||Bg(Tg(e.config.urls.vimeo.api,u)).then((t=>{!Dh.empty(t)&&t.thumbnail_url&&Zg.setPoster.call(e,t.thumbnail_url).catch((()=>{}))})),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(am.call(e,!0),e.embed.play()),e.media.pause=()=>(am.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:p}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>p,set(t){const{embed:n,media:o,paused:i,volume:a}=e,s=i&&!n.hasPlayed;o.seeking=!0,hg.call(e,o,"seeking"),Promise.resolve(s&&n.setVolume(0)).then((()=>n.setCurrentTime(t))).then((()=>s&&n.pause())).then((()=>s&&n.setVolume(a))).catch((()=>{}))}});let h=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>h,set(t){e.embed.setPlaybackRate(t).then((()=>{h=t,hg.call(e,e.media,"ratechange")})).catch((()=>{e.options.speed=[1]}))}});let{volume:g}=e.config;Object.defineProperty(e.media,"volume",{get:()=>g,set(t){e.embed.setVolume(t).then((()=>{g=t,hg.call(e,e.media,"volumechange")}))}});let{muted:m}=e.config;Object.defineProperty(e.media,"muted",{get:()=>m,set(t){const n=!!Dh.boolean(t)&&t;e.embed.setMuted(!!n||e.config.muted).then((()=>{m=n,hg.call(e,e.media,"volumechange")}))}});let b,{loop:f}=e.config;Object.defineProperty(e.media,"loop",{get:()=>f,set(t){const n=Dh.boolean(t)?t:e.config.loop.active;e.embed.setLoop(n).then((()=>{f=n}))}}),e.embed.getVideoUrl().then((t=>{b=t,zg.setDownloadUrl.call(e)})).catch((e=>{this.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:()=>b}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((t=>{const[n,o]=t;e.embed.ratio=jg(n,o),Cg.call(this)})),e.embed.setAutopause(e.config.autopause).then((t=>{e.config.autopause=t})),e.embed.getVideoTitle().then((t=>{e.config.title=t,Zg.setTitle.call(this)})),e.embed.getCurrentTime().then((t=>{p=t,hg.call(e,e.media,"timeupdate")})),e.embed.getDuration().then((t=>{e.media.duration=t,hg.call(e,e.media,"durationchange")})),e.embed.getTextTracks().then((t=>{e.media.textTracks=t,Hg.setup.call(e)})),e.embed.on("cuechange",(({cues:t=[]})=>{const n=t.map((e=>function(e){const t=document.createDocumentFragment(),n=document.createElement("div");return t.appendChild(n),n.innerHTML=e,t.firstChild.textContent}(e.text)));Hg.updateCues.call(e,n)})),e.embed.on("loaded",(()=>{e.embed.getPaused().then((t=>{am.call(e,!t),t||hg.call(e,e.media,"playing")})),Dh.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)})),e.embed.on("bufferstart",(()=>{hg.call(e,e.media,"waiting")})),e.embed.on("bufferend",(()=>{hg.call(e,e.media,"playing")})),e.embed.on("play",(()=>{am.call(e,!0),hg.call(e,e.media,"playing")})),e.embed.on("pause",(()=>{am.call(e,!1)})),e.embed.on("timeupdate",(t=>{e.media.seeking=!1,p=t.seconds,hg.call(e,e.media,"timeupdate")})),e.embed.on("progress",(t=>{e.media.buffered=t.percent,hg.call(e,e.media,"progress"),1===Number.parseInt(t.percent,10)&&hg.call(e,e.media,"canplaythrough"),e.embed.getDuration().then((t=>{t!==e.media.duration&&(e.media.duration=t,hg.call(e,e.media,"durationchange"))}))})),e.embed.on("seeked",(()=>{e.media.seeking=!1,hg.call(e,e.media,"seeked")})),e.embed.on("ended",(()=>{e.media.paused=!0,hg.call(e,e.media,"ended")})),e.embed.on("error",(t=>{e.media.error=t,hg.call(e,e.media,"error")})),t.customControls&&setTimeout((()=>Zg.build.call(e)),0)}};function rm(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,hg.call(this,this.media,e?"play":"pause"))}function lm(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}
327 +const cm={setup(){if(eg(this.elements.wrapper,this.config.classNames.embed,!0),Dh.object(window.YT)&&Dh.function(window.YT.Player))cm.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{Dh.function(e)&&e(),cm.ready.call(this)},im(this.config.urls.youtube.sdk).catch((e=>{this.debug.warn("YouTube API failed to load",e)}))}},getTitle(e){Bg(Tg(this.config.urls.youtube.api,e)).then((e=>{if(Dh.object(e)){const{title:t,height:n,width:o}=e;this.config.title=t,Zg.setTitle.call(this),this.embed.ratio=jg(o,n)}Cg.call(this)})).catch((()=>{Cg.call(this)}))},ready(){const e=this,t=e.config.youtube,n=e.media&&e.media.getAttribute("id");if(!Dh.empty(n)&&n.startsWith("youtube-"))return;let o=e.media.getAttribute("src");Dh.empty(o)&&(o=e.media.getAttribute(this.config.attributes.embed.id));const i=function(e){if(Dh.empty(e))return null;const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&t[2]?t[2]:e}(o),a=function(e){return`${e}-${Math.floor(1e4*Math.random())}`}(e.provider),s=qh("div",{id:a,"data-poster":t.customControls?e.poster:void 0});if(e.media=Zh(s,e.media),t.customControls){const t=e=>`https://i.ytimg.com/vi/${i}/${e}default.jpg`;Qg(t("maxres"),121).catch((()=>Qg(t("sd"),121))).catch((()=>Qg(t("hq")))).then((t=>Zg.setPoster.call(e,t.src))).then((t=>{t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")})).catch((()=>{}))}e.embed=new window.YT.Player(e.media,{videoId:i,host:lm(t),playerVars:Uh({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(t){if(!e.media.error){const n=t.data,o={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[n]||"An unknown error occurred";e.media.error={code:n,message:o},hg.call(e,e.media,"error")}},onPlaybackRateChange(t){const n=t.target;e.media.playbackRate=n.getPlaybackRate(),hg.call(e,e.media,"ratechange")},onReady(n){if(Dh.function(e.media.play))return;const o=n.target;cm.getTitle.call(e,i),e.media.play=()=>{rm.call(e,!0),o.playVideo()},e.media.pause=()=>{rm.call(e,!1),o.pauseVideo()},e.media.stop=()=>{o.stopVideo()},e.media.duration=o.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(o.getCurrentTime()),set(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,hg.call(e,e.media,"seeking"),o.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>o.getPlaybackRate(),set(e){o.setPlaybackRate(e)}});let{volume:a}=e.config;Object.defineProperty(e.media,"volume",{get:()=>a,set(t){a=t,o.setVolume(100*a),hg.call(e,e.media,"volumechange")}});let{muted:s}=e.config;Object.defineProperty(e.media,"muted",{get:()=>s,set(t){const n=Dh.boolean(t)?t:s;s=n,o[n?"mute":"unMute"](),o.setVolume(100*a),hg.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>o.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const r=o.getAvailablePlaybackRates();e.options.speed=r.filter((t=>e.config.speed.options.includes(t))),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),hg.call(e,e.media,"timeupdate"),hg.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval((()=>{e.media.buffered=o.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&hg.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),hg.call(e,e.media,"canplaythrough"))}),200),t.customControls&&setTimeout((()=>Zg.build.call(e)),50)},onStateChange(n){const o=n.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(n.data)&&(e.media.seeking=!1,hg.call(e,e.media,"seeked")),n.data){case-1:hg.call(e,e.media,"timeupdate"),e.media.buffered=o.getVideoLoadedFraction(),hg.call(e,e.media,"progress");break;case 0:rm.call(e,!1),e.media.loop?(o.stopVideo(),o.playVideo()):hg.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(rm.call(e,!0),hg.call(e,e.media,"playing"),e.timers.playing=setInterval((()=>{hg.call(e,e.media,"timeupdate")}),50),e.media.duration!==o.getDuration()&&(e.media.duration=o.getDuration(),hg.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),rm.call(e,!1);break;case 3:hg.call(e,e.media,"waiting")}hg.call(e,e.elements.container,"statechange",!1,{code:n.data})}}})}},dm={setup(){this.media?(eg(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),eg(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&eg(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=qh("div",{class:this.config.classNames.video}),Gh(this.media,this.elements.wrapper),this.elements.poster=qh("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?$g.setup.call(this):this.isYouTube?cm.setup.call(this):this.isVimeo&&sm.setup.call(this)):this.debug.warn("No media element found!")}};class um{constructor(e){hh(this,"load",(()=>{this.enabled&&(Dh.object(window.google)&&Dh.object(window.google.ima)?this.ready():im(this.player.config.urls.googleIMA.sdk).then((()=>{this.ready()})).catch((()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))})))})),hh(this,"ready",(()=>{var e;this.enabled||((e=this).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then((()=>{this.clearSafetyTimer("onAdsManagerLoaded()")})),this.listeners(),this.setupIMA()})),hh(this,"setupIMA",(()=>{this.elements.container=qh("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(e=>this.onAdsManagerLoaded(e)),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e)),!1),this.requestAds()})),hh(this,"requestAds",(()=>{const{container:e}=this.player.elements;try{const t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(e){this.onAdError(e)}})),hh(this,"pollCountdown",((e=!1)=>{if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text")
328 +;this.countdownTimer=setInterval((()=>{const e=Rg(Math.max(this.manager.getRemainingTime(),0)),t=`${Eg.get("advertisement",this.player.config)} - ${e}`;this.elements.container.setAttribute("data-badge-text",t)}),100)})),hh(this,"onAdsManagerLoaded",(e=>{if(!this.enabled)return;const t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,this.manager=e.getAdsManager(this.player,t),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e))),Object.keys(google.ima.AdEvent.Type).forEach((e=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],(e=>this.onAdEvent(e)))})),this.trigger("loaded")})),hh(this,"addCuePoints",(()=>{Dh.empty(this.cuePoints)||this.cuePoints.forEach((e=>{if(0!==e&&-1!==e&&e<this.player.duration){const t=this.player.elements.progress;if(Dh.element(t)){const n=100/this.player.duration*e,o=qh("span",{class:this.player.config.classNames.cues});o.style.left=`${n.toString()}%`,t.appendChild(o)}}}))})),hh(this,"onAdEvent",(e=>{const{container:t}=this.player.elements,n=e.getAd(),o=e.getAdData();switch((e=>{hg.call(this.player,this.player.media,`ads${e.replace(/_/g,"").toLowerCase()}`)})(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),n.isLinear()||(n.width=t.offsetWidth,n.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:o.adError&&this.player.debug.warn(`Non-fatal ad error: ${o.adError.getMessage()}`)}})),hh(this,"onAdError",(e=>{this.cancel(),this.player.debug.warn("Ads error",e)})),hh(this,"listeners",(()=>{const{container:e}=this.player.elements;let t;this.player.on("canplay",(()=>{this.addCuePoints()})),this.player.on("ended",(()=>{this.loader.contentComplete()})),this.player.on("timeupdate",(()=>{t=this.player.currentTime})),this.player.on("seeked",(()=>{const e=this.player.currentTime;Dh.empty(this.cuePoints)||this.cuePoints.forEach(((n,o)=>{t<n&&n<e&&(this.manager.discardAdBreak(),this.cuePoints.splice(o,1))}))})),window.addEventListener("resize",(()=>{this.manager&&this.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)}))})),hh(this,"play",(()=>{const{container:e}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then((()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(e){this.onAdError(e)}})).catch((()=>{}))})),hh(this,"resumeContent",(()=>{this.elements.container.style.zIndex="",this.playing=!1,bg(this.player.media.play())})),hh(this,"pauseContent",(()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()})),hh(this,"cancel",(()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()})),hh(this,"loadAds",(()=>{this.managerPromise.then((()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise((e=>{this.on("loaded",e),this.player.debug.log(this.manager)})),this.initialized=!1,this.requestAds()})).catch((()=>{}))})),hh(this,"trigger",((e,...t)=>{const n=this.events[e];Dh.array(n)&&n.forEach((e=>{Dh.function(e)&&e.apply(this,t)}))})),hh(this,"on",((e,t)=>(Dh.array(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this))),hh(this,"startSafetyTimer",((e,t)=>{this.player.debug.log(`Safety timer invoked from: ${t}`),this.safetyTimer=setTimeout((()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")}),e)})),hh(this,"clearSafetyTimer",(e=>{Dh.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${e}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)})),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise(((e,t)=>{this.on("loaded",e),this.on("error",t)})),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!Dh.empty(e.publisherId)||Dh.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return Dh.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Fg({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function pm(e=0,t=0,n=255){return Math.min(Math.max(e,t),n)}function hm(e){const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach((e=>{const n={};e.split(/\r\n|\n|\r/).forEach((e=>{if(Dh.number(n.startTime)){if(!Dh.empty(e.trim())&&Dh.empty(n.text)){const t=e.trim().split("#xywh=");[n.text]=t,t[1]&&([n.x,n.y,n.w,n.h]=t[1].split(","))}}else{const t=e.match(/(\d{2})?:?(\d{2}):(\d{2}).(\d{2,3})( ?--> ?)(\d{2})?:?(\d{2}):(\d{2}).(\d{2,3})/);t&&(n.startTime=60*Number(t[1]||0)*60+60*Number(t[2])+Number(t[3])+Number(`0.${t[4]}`),n.endTime=60*Number(t[6]||0)*60+60*Number(t[7])+Number(t[8])+Number(`0.${t[9]}`))}})),n.text&&t.push(n)})),t}function gm(e,t){const n={};return e>t.width/t.height?(n.width=t.width,n.height=1/e*t.width):(n.height=t.height,n.width=e*t.height),n}class mm{constructor(e){hh(this,"load",(()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then((()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)}))})),hh(this,"getThumbnails",(()=>new Promise((e=>{const{src:t}=this.player.config.previewThumbnails;if(Dh.empty(t))throw new Error("Missing previewThumbnails.src config attribute");const n=()=>{this.thumbnails.sort(((e,t)=>e.height-t.height)),this.player.debug.log("Preview thumbnails",this.thumbnails),e()};if(Dh.function(t))t((e=>{this.thumbnails=e,n()}));else{const e=(Dh.string(t)?[t]:t).map((e=>this.getThumbnail(e)));Promise.all(e).then(n)}})))),hh(this,"getThumbnail",(e=>new Promise((t=>{Bg(e,void 0,this.player.config.previewThumbnails.withCredentials).then((n=>{const o={frames:hm(n),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));const i=new Image;i.onload=()=>{o.height=i.naturalHeight,o.width=i.naturalWidth,this.thumbnails.push(o),t()},i.src=o.urlPrefix+o.frames[0].text}))})))),hh(this,"startMove",(e=>{if(this.loaded&&Dh.event(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t,n;const o=this.player.elements.progress.getBoundingClientRect(),i=100/o.width*(e.pageX-o.left);this.seekTime=this.player.media.duration*(i/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.textContent=Rg(this.seekTime);const a=null===(t=this.player.config.markers)||void 0===t||null===(n=t.points)||void 0===n?void 0:n.find((({time:e})=>e===Math.round(this.seekTime)));a&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${a.label}<br>`)}this.showImageAtCurrentTime()}})),hh(this,"endMove",(()=>{this.toggleThumbContainer(!1,!0)})),hh(this,"startScrubbing",(e=>{(Dh.nullOrUndefined(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0,
329 +this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))})),hh(this,"endScrubbing",(()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):pg.call(this.player,this.player.media,"timeupdate",(()=>{this.mouseDown||this.toggleScrubbingContainer(!1)}))})),hh(this,"listeners",(()=>{this.player.on("play",(()=>{this.toggleThumbContainer(!1,!0)})),this.player.on("seeked",(()=>{this.toggleThumbContainer(!1)})),this.player.on("timeupdate",(()=>{this.lastTime=this.player.media.currentTime}))})),hh(this,"render",(()=>{this.elements.thumb.container=qh("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=qh("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const e=qh("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=qh("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(e),Dh.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=qh("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)})),hh(this,"destroy",(()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()})),hh(this,"showImageAtCurrentTime",(()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const e=this.thumbnails[0].frames.findIndex((e=>this.seekTime>=e.startTime&&this.seekTime<=e.endTime)),t=e>=0;let n=0;this.mouseDown||this.toggleThumbContainer(t),t&&(this.thumbnails.forEach(((t,o)=>{this.loadedImages.includes(t.frames[e].text)&&(n=o)})),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(n)))})),hh(this,"loadImage",((e=0)=>{const t=this.showingThumb,n=this.thumbnails[e],{urlPrefix:o}=n,i=n.frames[t],a=n.frames[t].text,s=o+a;if(this.currentImageElement&&this.currentImageElement.dataset.filename===a)this.showImage(this.currentImageElement,i,e,t,a,!1),this.currentImageElement.dataset.index=t,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const n=new Image;n.src=s,n.dataset.index=t,n.dataset.filename=a,this.showingThumbFilename=a,this.player.debug.log(`Loading image: ${s}`),n.onload=()=>this.showImage(n,i,e,t,a,!0),this.loadingImage=n,this.removeOldImages(n)}})),hh(this,"showImage",((e,t,n,o,i,a=!0)=>{this.player.debug.log(`Showing thumb: ${i}. num: ${o}. qual: ${n}. newimg: ${a}`),this.setImageSizeAndOffset(e,t),a&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(i)||this.loadedImages.push(i)),this.preloadNearby(o,!0).then(this.preloadNearby(o,!1)).then(this.getHigherQuality(n,e,t,i))})),hh(this,"removeOldImages",(e=>{Array.from(this.currentImageContainer.children).forEach((t=>{if("img"!==t.tagName.toLowerCase())return;const n=this.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;const{currentImageContainer:e}=this;setTimeout((()=>{e.removeChild(t),this.player.debug.log(`Removing thumb: ${t.dataset.filename}`)}),n)}}))})),hh(this,"preloadNearby",((e,t=!0)=>new Promise((n=>{setTimeout((()=>{const o=this.thumbnails[0].frames[e].text;if(this.showingThumbFilename===o){let i;i=t?this.thumbnails[0].frames.slice(e):this.thumbnails[0].frames.slice(0,e).reverse();let a=!1;i.forEach((e=>{const t=e.text;if(t!==o&&!this.loadedImages.includes(t)){a=!0,this.player.debug.log(`Preloading thumb filename: ${t}`);const{urlPrefix:e}=this.thumbnails[0],o=e+t,i=new Image;i.src=o,i.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${t}`),this.loadedImages.includes(t)||this.loadedImages.push(t),n()}}})),a||n()}}),300)})))),hh(this,"getHigherQuality",((e,t,n,o)=>{if(e<this.thumbnails.length-1){let i=t.naturalHeight;this.usingSprites&&(i=n.h),i<this.thumbContainerHeight&&setTimeout((()=>{this.showingThumbFilename===o&&(this.player.debug.log(`Showing higher quality thumb for: ${o}`),this.loadImage(e+1))}),300)}})),hh(this,"toggleThumbContainer",((e=!1,t=!1)=>{const n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)})),hh(this,"toggleScrubbingContainer",((e=!1)=>{const t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)})),hh(this,"determineContainerAutoSizing",(()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)})),hh(this,"setThumbContainerSizeAndPos",(()=>{const{imageContainer:e}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(e.clientHeight>20&&e.clientWidth<20){const t=Math.floor(e.clientHeight*this.thumbAspectRatio);e.style.width=`${t}px`}else if(e.clientHeight<20&&e.clientWidth>20){const t=Math.floor(e.clientWidth/this.thumbAspectRatio);e.style.height=`${t}px`}}else{const t=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);e.style.height=`${this.thumbContainerHeight}px`,e.style.width=`${t}px`}this.setThumbContainerPos()})),hh(this,"setThumbContainerPos",(()=>{const e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:n}=this.elements.thumb,o=t.left-e.left+10,i=t.right-e.left-n.clientWidth-10,a=this.mousePosX-e.left-n.clientWidth/2,s=pm(a,o,i);n.style.left=`${s}px`,n.style.setProperty("--preview-arrow-offset",a-s+"px")})),hh(this,"setScrubbingContainerSize",(()=>{const{width:e,height:t}=gm(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${e}px`,this.elements.scrubbing.container.style.height=`${t}px`})),hh(this,"setImageSizeAndOffset",((e,t)=>{if(!this.usingSprites)return;const n=this.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*n+"px",e.style.width=e.naturalWidth*n+"px",e.style.left=`-${t.x*n}px`,e.style.top=`-${t.y*n}px`})),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=gm(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const bm={insertElements(e,t){Dh.string(t)?Yh(e,this.media,{src:t}):Dh.array(t)&&t.forEach((t=>{Yh(e,this.media,t)}))},change(e){Wh(e,"sources.length")?($g.cancelRequests.call(this),this.destroy((()=>{this.options.quality=[],Kh(this.media),this.media=null,
330 +Dh.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:t,type:n}=e,[{provider:o=Gg.html5,src:i}]=t,a="html5"===o?n:"div",s="html5"===o?{}:{src:i};Object.assign(this,{provider:o,type:n,supported:rg.check(n,o,this.config.playsinline),media:qh(a,s)}),this.elements.container.appendChild(this.media),Dh.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),Dh.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Zg.addStyleHook.call(this),this.isHTML5&&bm.insertElements.call(this,"source",t),this.config.title=e.title,dm.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&bm.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Zg.build.call(this),this.isHTML5&&this.media.load(),Dh.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new mm(this))),this.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}};class fm{constructor(e,t){if(hh(this,"play",(()=>Dh.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then((()=>this.ads.play())).catch((()=>bg(this.media.play()))),this.media.play()):null)),hh(this,"pause",(()=>this.playing&&Dh.function(this.media.pause)?this.media.pause():null)),hh(this,"togglePlay",(e=>(Dh.boolean(e)?e:!this.playing)?this.play():this.pause())),hh(this,"stop",(()=>{this.isHTML5?(this.pause(),this.restart()):Dh.function(this.media.stop)&&this.media.stop()})),hh(this,"restart",(()=>{this.currentTime=0})),hh(this,"rewind",(e=>{this.currentTime-=Dh.number(e)?e:this.config.seekTime})),hh(this,"forward",(e=>{this.currentTime+=Dh.number(e)?e:this.config.seekTime})),hh(this,"increaseVolume",(e=>{const t=this.media.muted?0:this.volume;this.volume=t+(Dh.number(e)?e:0)})),hh(this,"decreaseVolume",(e=>{this.increaseVolume(-e)})),hh(this,"airplay",(()=>{rg.airplay&&this.media.webkitShowPlaybackTargetPicker()})),hh(this,"toggleControls",(e=>{if(this.supported.ui&&!this.isAudio){const t=tg(this.elements.container,this.config.classNames.hideControls),n=void 0===e?void 0:!e,o=eg(this.elements.container,this.config.classNames.hideControls,n);if(o&&Dh.array(this.config.controls)&&this.config.controls.includes("settings")&&!Dh.empty(this.config.settings)&&zg.toggleMenu.call(this,!1),o!==t){const e=o?"controlshidden":"controlsshown";hg.call(this,this.media,e)}return!o}return!1})),hh(this,"on",((e,t)=>{dg.call(this,this.elements.container,e,t)})),hh(this,"once",((e,t)=>{pg.call(this,this.elements.container,e,t)})),hh(this,"off",((e,t)=>{ug(this.elements.container,e,t)})),hh(this,"destroy",((e,t=!1)=>{if(!this.ready)return;const n=()=>{document.body.style.overflow="",this.embed=null,t?(Object.keys(this.elements).length&&(Kh(this.elements.buttons.play),Kh(this.elements.captions),Kh(this.elements.controls),Kh(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),Dh.function(e)&&e()):(gg.call(this),$g.cancelRequests.call(this),Zh(this.elements.original,this.elements.container),hg.call(this,this.elements.original,"destroyed",!0),Dh.function(e)&&e.call(this.elements.original),this.ready=!1,setTimeout((()=>{this.elements=null,this.media=null}),200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Zg.toggleNativeControls.call(this,!0),n()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&Dh.function(this.embed.destroy)&&this.embed.destroy(),n()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(n),setTimeout(n,200))})),hh(this,"supports",(e=>rg.mime.call(this,e))),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=rg.touch,this.media=e,Dh.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||Dh.nodeList(this.media)||Dh.array(this.media))&&(this.media=this.media[0]),this.config=Uh({},Wg,fm.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Yg(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",rg),Dh.nullOrUndefined(this.media)||!Dh.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!rg.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const o=this.media.tagName.toLowerCase();let i=null,a=null;switch(o){case"div":if(i=this.media.querySelector("iframe"),Dh.element(i)){if(a=Dg(i.getAttribute("src")),this.provider=function(e){return/^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Gg.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Gg.vimeo:null}(a.toString()),this.elements.container=this.media,this.media=i,this.elements.container.className="",a.search.length){const e=["1","true"];e.includes(a.searchParams.get("autoplay"))&&(this.config.autoplay=!0),e.includes(a.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=e.includes(a.searchParams.get("playsinline")),this.config.youtube.hl=a.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Dh.empty(this.provider)||!Object.values(Gg).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Vg;break;case"video":case"audio":this.type=o,this.provider=Gg.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=rg.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new Xg(this),this.storage=new Ag(this),this.media.plyr=this,Dh.element(this.elements.container)||(this.elements.container=qh("div"),Gh(this.media,this.elements.container)),Zg.migrateStyles.call(this),Zg.addStyleHook.call(this),dm.setup.call(this),this.config.debug&&dg.call(this,this.elements.container,this.config.events.join(" "),(e=>{this.debug.log(`event: ${e.type}`)})),this.fullscreen=new Kg(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Zg.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new um(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(()=>bg(this.play()))),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new mm(this))):this.debug.error("Setup failed: no support")}
331 +get isHTML5(){return this.provider===Gg.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Gg.youtube}get isVimeo(){return this.provider===Gg.vimeo}get isVideo(){return this.type===Vg}get isAudio(){return"audio"===this.type}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&0===this.currentTime)}get ended(){return Boolean(this.media.ended)}set currentTime(e){if(!this.duration)return;const t=Dh.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return Dh.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const e=Number.parseFloat(this.config.duration),t=(this.media||{}).duration,n=Dh.number(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;Dh.string(t)&&(t=Number(t)),Dh.number(t)||(t=this.storage.get("volume")),Dh.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!Dh.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;Dh.boolean(t)||(t=this.storage.get("muted")),Dh.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;Dh.number(e)&&(t=e),Dh.number(t)||(t=this.storage.get("speed")),Dh.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:o}=this;t=pm(t,n,o),this.config.speed.selected=t,setTimeout((()=>{this.media&&(this.media.playbackRate=t)}),0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let o=[!Dh.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(Dh.number),i=!0;if(!n.includes(o)){const e=xg(n,o);this.debug.warn(`Unsupported quality option: ${o}, using ${e} instead`),o=e,i=!1}t.selected=o,this.media.quality=o,i&&this.storage.set({quality:o})}get quality(){return this.media.quality}set loop(e){const t=Dh.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(e){bm.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return Dh.url(e)?e:this.source}set download(e){Dh.url(e)&&(this.config.urls.download=e,zg.setDownloadUrl.call(this))}set poster(e){this.isVideo?Zg.setPoster.call(this,e,!1).catch((()=>{})):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=wg(_g.call(this));return Dh.array(e)?e.join(":"):e}set ratio(e){this.isVideo?Dh.string(e)&&kg(e)?(this.config.ratio=wg(e),Cg.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=Dh.boolean(e)?e:this.config.autoplay}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(e){Hg.toggle.call(this,e,!1)}set currentTrack(e){Hg.set.call(this,e,!1),Hg.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Hg.setLanguage.call(this,e,!1)}get language(){return(Hg.getCurrentTrack.call(this)||{}).language}set pip(e){if(!rg.pip)return;const t=Dh.boolean(e)?e:!this.pip;Dh.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Ug:"inline"),Dh.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return rg.pip?Dh.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Ug:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new mm(this))}static supported(e,t){return rg.check(e,t)}static loadSprite(e,t){return Ig(e,t)}static setup(e,t={}){let n=null;return Dh.string(e)?n=Array.from(document.querySelectorAll(e)):Dh.nodeList(e)?n=Array.from(e):Dh.array(e)&&(n=e.filter(Dh.element)),Dh.empty(n)?null:n.map((e=>new fm(e,t)))}}var xm;fm.defaults=(xm=Wg,JSON.parse(JSON.stringify(xm)));var ym=s(5556),vm=s.n(ym);const km=(e,t)=>{const n=new fm(".plyr-react",t.options||{});return t.source&&(n.source=t.source),n},wm=e=>{e&&e.destroy()},_m=()=>{},Cm=e=>e?()=>({plyr:e}):()=>new Proxy({plyr:{source:null}},{get:(e,t)=>"plyr"===t?e[t]:_m});const jm=m.forwardRef(((e,t)=>{const{source:n,options:o=null,...i}=e,a=function(e,t,n=null){return function(e,t,n=[]){const[o,i]=(0,m.useState)(null),a=(0,m.useRef)(null),{instantiate:s,destroy:r,getAPI:l,params:c}=t;(0,m.useEffect)((()=>{const e=s(a.current,c);return i(e),()=>{r&&r(e,c)}}),n);const d=(0,m.useMemo)((()=>l(o,c)),[o]);return(0,m.useImperativeHandle)(e,d,[d]),a}(e,{instantiate:km,getAPI:Cm,destroy:wm,params:t},n||[t.options,t.source])}(t,{source:n,options:o});return(0,l.jsx)("video",{ref:a,className:"plyr-react plyr",...i})}));jm.displayName="Plyr",jm.defaultProps={options:{controls:["rewind","play","fast-forward","progress","current-time","duration","mute","volume","settings","fullscreen"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop"}},source:{type:"video",sources:[{src:"https://cdn.plyr.io/static/blank.mp4",type:"video/mp4",size:720},{src:"https://cdn.plyr.io/static/blank.mp4",type:"video/mp4",size:1080}]}},jm.propTypes={options:vm().object,source:vm().any};const $m=({popup:e})=>{const{type:t="video",content:n="",videoOptions:o={}}=e,{autoplay:i=!1}=o||{};return(0,l.jsx)(jm,{source:{type:t,sources:[{src:n,provider:n.includes("youtube")?"youtube":n.includes("vimeo")?"vimeo":"html5"}]},options:{autoplay:i}})},Sm=(0,m.forwardRef)((({attributes:e,securityPass:t=!0,setSecurityPass:n,isPremium:o,Popup:i,popupContent:a,isBackend:s=!1,children:r,onClick:c=()=>{}},d)=>{const{actionType:u="link",iconPos:p="left"}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("a",{ref:d,...uh(e,t,o,s),onClick:()=>c(!0),children:["right"!==p&&(0,l.jsx)(ph,{attributes:e}),r,"right"===p&&(0,l.jsx)(ph,{attributes:e})]}),o&&"popup"===u&&t&&!s&&(0,l.jsx)(Tm,{attributes:e,Popup:i,popupContent:a,securityPop:t,setSecurityPass:n,btnRef:d})]})})),Tm=({attributes:e,Popup:t,popupContent:n,securityPop:o,setSecurityPass:i})=>{const{actionType:a="link",popup:s={}}=e,{caption:r=""}=s,[c,d]=(0,m.useState)(o);return(0,m.useEffect)((()=>{}),[a]),(0,l.jsx)(t,{isOpen:c,onClose:()=>{d(!1),i(!1)},caption:r,children:(0,l.jsx)(Nm,{popup:s,popupContent:n})})},Nm=({popup:e,popupContent:t})=>{
332 +const{type:n="image",content:o="",caption:i=""}=e;if(!o)return(0,l.jsxs)("p",{className:"warning",children:["Sorry! No ","iframe"===n?"Iframe Source":n," Found. Please Insert..."]});switch(n){case"image":return(0,l.jsx)("img",{className:"image",src:o,alt:i});case"audio":case"video":return(0,l.jsx)($m,{popup:e});case"content":return t;case"document":return(0,l.jsx)("div",{className:"document",children:(0,l.jsx)("iframe",{src:`//docs.google.com/viewer?embedded=true&url=${o}`})});case"iframe":return(0,l.jsx)("div",{className:"iframe",children:(0,l.jsx)("iframe",{src:o})});default:return null}},Mm=({attributes:e,id:t})=>{const{hideOn:n={desktop:!1,tablet:!1,mobile:!1},isFullWidth:i,addCSS:s,alignment:r,typography:c,colors:d,hovColors:u,padding:p,border:h,shadow:g,buttonHover:m}=e,b=`#${t}`,f=`${b} .${dh}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",c)?.googleFontLink}\n\t\t${ps(f,c)?.styles}\n\n\t\t${b}{\n\t\t\ttext-align: ${r};\n\t\t}\n\t\t${f}:not(.btnEditor){\n\t\t\tdisplay: ${n?.desktop?"none":"inline-flex"};\n\t\t}\n\t\t${f}.btnEditor{\n\t\t\topacity: ${n?.desktop?.8:1};\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${f}:not(.btnEditor){\n\t\t\t\tdisplay: ${n?.tablet?"none":"inline-flex"};\n\t\t\t}\n\t\t\t${f}.btnEditor{\n\t\t\t\topacity: ${n?.tablet?.8:1};\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${f}:not(.btnEditor){\n\t\t\t\tdisplay: ${n?.mobile?"none":"inline-flex"};\n\t\t\t}\n\t\t\t${f}.btnEditor{\n\t\t\t\topacity: ${n?.mobile?.8:1};\n\t\t\t}\n\t\t}\n\t\t${f}{\n\t\t\t${ss(d)||`color: #fff; background-color: ${o};`}\n\t\t\twidth: ${i?"100%":"auto"};\n\t\t\tpadding: ${us(p)||"10px 20px"};\n\t\t\t${is(h)||"border-radius: 5px;"}\n\t\t\tbox-shadow: ${ls(g?.shadow||g)||"none"};\n\t\t}\n\t\t${f}:hover{\n\t\t\t${ss(u)||`color: #fff; background-color: ${a};`}\n\t\t\t${jt(m?.shadow)?`box-shadow: ${ls(m?.shadow)};`:""}\n\t\t\t${jt(m?.border)?is(m?.border):""}\n\t\t\t${jt(m?.padding)?`padding: ${us(m?.padding)}`:""}\n\t\t}\n\t\t${s}\n\t\t`.replace(/\s+/g," ")}})},Lm=({popup:e,setAttributes:t})=>{const{ShortcutProvider:n}=wp.keyboardShortcuts,[o,i]=(0,m.useState)([]);(0,m.useEffect)((()=>{i((0,p.parse)(e?.content))}),[]);const a=n=>{const o=n[n.length-1];"core/paragraph"===o.name&&""===o.attributes.content?i(n):i([...n,...(0,p.parse)("\x3c!-- wp:paragraph --\x3e\x3c!-- /wp:paragraph --\x3e")]),t({popup:{...e,content:(0,p.serialize)(n)}})};return(0,l.jsx)(h.BlockEditorProvider,{value:o,onInput:e=>a(e),onChange:e=>a(e),children:(0,l.jsx)(y.SlotFillProvider,{children:(0,l.jsxs)(n,{className:"btnContentArea",children:[(0,l.jsx)(h.BlockEditorKeyboardShortcuts,{}),(0,l.jsxs)("div",{className:"btnContentBox",children:[(0,l.jsxs)("div",{className:"btnContentEditor",children:[(0,l.jsx)(h.BlockTools,{children:(0,l.jsx)(h.WritingFlow,{children:(0,l.jsx)(h.ObserveTyping,{children:(0,l.jsx)(h.BlockList,{})})})}),(0,l.jsx)("div",{className:"popoverSlotOuter",children:(0,l.jsx)(y.Popover.Slot,{})})]}),(0,l.jsx)("div",{className:"btnContentSidebar",children:(0,l.jsx)(h.BlockInspector,{})})]})]})})})},Pm=[{label:(0,x.__)("Link","b-blocks"),value:"link"},{label:(0,x.__)("Popup","b-blocks"),value:"popup"}],Em=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Password Protected","b-blocks"),value:"password"},{label:(0,x.__)("Login Protected","b-blocks"),value:"login"}],Am=((0,x.__)("Alternate","b-blocks"),(0,x.__)("Author","b-blocks"),(0,x.__)("Bookmark","b-blocks"),(0,x.__)("External","b-blocks"),(0,x.__)("Help","b-blocks"),(0,x.__)("License","b-blocks"),(0,x.__)("Next","b-blocks"),(0,x.__)("No Follow","b-blocks"),(0,x.__)("No Opener","b-blocks"),(0,x.__)("No Referrer","b-blocks"),(0,x.__)("Prev","b-blocks"),(0,x.__)("Search","b-blocks"),(0,x.__)("Tag","b-blocks"),(0,x.__)("No Referrer","b-blocks"),(0,x.__)("No Referrer When Downgrade","b-blocks"),(0,x.__)("Origin","b-blocks"),(0,x.__)("Origin When Cross Origin","b-blocks"),(0,x.__)("Same Origin","b-blocks"),(0,x.__)("Strict Origin When Cross Origin","b-blocks"),(0,x.__)("Unsafe Url","b-blocks"),[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Right","b-blocks"),value:"right"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"},{label:(0,x.__)("Left","b-blocks"),value:"left"}]),Bm=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Im=[{label:(0,x.__)("Flat","b-blocks"),value:"flat",icon:"Flat"},{label:(0,x.__)("3D","b-blocks"),value:"3d",icon:"3D"}],Om=[{label:(0,x.__)("Small","b-blocks"),value:"small"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"},{label:(0,x.__)("X Large","b-blocks"),value:"x-large"}],Rm=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Fade Up","b-blocks"),value:"fade-up"},{label:(0,x.__)("Fade Down","b-blocks"),value:"fade-down"},{label:(0,x.__)("Fade Left","b-blocks"),value:"fade-left"},{label:(0,x.__)("Fade Right","b-blocks"),value:"fade-right"},{label:(0,x.__)("Flip Up","b-blocks"),value:"flip-up"},{label:(0,x.__)("Flip Down","b-blocks"),value:"flip-down"},{label:(0,x.__)("Flip Left","b-blocks"),value:"flip-left"},{label:(0,x.__)("Flip Right","b-blocks"),value:"flip-right"},{label:(0,x.__)("Zoom In","b-blocks"),value:"zoom-in"},{label:(0,x.__)("Zoom In Up","b-blocks"),value:"zoom-in-up"},{label:(0,x.__)("Zoom In Down","b-blocks"),value:"zoom-in-down"},{label:(0,x.__)("Zoom In Left","b-blocks"),value:"zoom-in-left"},{label:(0,x.__)("Zoom In Right","b-blocks"),value:"zoom-in-right"}],zm=[{label:(0,x.__)("Image","b-blocks"),value:"image"},{label:(0,x.__)("Audio","b-blocks"),value:"audio"},{label:(0,x.__)("Video","b-blocks"),value:"video"},{label:(0,x.__)("Content","b-blocks"),value:"content"},{label:(0,x.__)("Document","b-blocks"),value:"document"},{label:(0,x.__)("Iframe","b-blocks"),value:"iframe"}],Dm=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"popup",title:(0,x.__)("Popup","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Fm=({attributes:e,setAttributes:t,isPremium:n,setContentPopup:i})=>{const{text:s,actionType:r="link",security:c,url:d,tooltip:u,tooltipPos:p="top",target:g,attrs:b={},hideOn:f={},isDownload:k,downloadFileName:w="",isUpIcon:_,icon:C,upIcon:j,iconPos:$,type:S,isFullWidth:T,size:N,popup:M={},animationType:L,animationDuration:P,addID:E,addCSS:A,alignment:B,typography:I,colors:O,hovColors:R,padding:z,border:D,shadow:F,securityPassword:H,securityRole:W,buttonHover:U}=e,{type:G="image",content:V="",caption:q="",videoOptions:Y}=M,[K,Q]=(0,m.useState)(!1),{roles:Z}=(()=>{const{data:e}=$d("bBlocksUtils"),{data:t=null,refetch:n,isLoading:o=!0}=jd("bBlocksUserRoles",{_wpnonce:e?.nonce},!0),i=null===t?[]:Object.entries(t).map((([e,t])=>({label:t,value:e})));return(0,m.useEffect)((()=>{n()}),[e]),{roles:i,isLoading:o}})(),X={isPremium:n,setIsProModalOpen:Q},J=(n,o,i)=>{t({[n]:{...e[n],[o]:i}})},ee="popup"===r,te={value:V,onChange:e=>J("popup","content",e)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Dm,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/button-block"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:s,onChange:e=>t({text:e})})]}),(0,l.jsx)(Za,{className:"mt20",label:(0,x.__)("Action:","b-blocks"),labelPosition:"left",value:r,onChange:e=>t({actionType:e}),options:Pm,...X,proValues:["popup"]}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Security:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({security:e}),options:Em,...X,Component:y.SelectControl}),"login"==c&&(0,
333 +l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Set User Role:","b-blocks"),labelPosition:"left",value:W,onChange:e=>t({securityRole:e}),options:[{label:"Default",value:"default"},...Z],...X,Component:y.SelectControl})}),"password"==c&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Set Password:","b-blocks"),value:H,onChange:e=>t({securityPassword:e}),...X,Component:y.TextControl})}),!ee&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("URL:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:d,onChange:e=>t({url:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Open link in new tab","b-blocks"),checked:"_blank"===g,onChange:e=>t({target:e?"_blank":"_self"})}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("URL/Link Rel/Relation:","b-blocks"),value:b?.rel,onChange:e=>J("attrs","rel",e),...X,Component:y.TextControl}),(0,l.jsxs)("small",{children:["For more details read the ",(0,l.jsx)("a",{href:"https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel",target:"_blank",rel:"noreferrer",children:"documentation"})]}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Enter Referer Policy:","b-blocks"),value:b?.referrerpolicy,onChange:e=>J("attrs","referrerpolicy",e),...X,Component:y.TextControl}),(0,l.jsxs)("small",{children:["For more details read the ",(0,l.jsx)("a",{href:"https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/referrerPolicy",target:"_blank",rel:"noreferrer",children:"documentation"})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Download Button","b-blocks"),checked:k,onChange:e=>t({isDownload:e})}),k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("small",{children:(0,x.__)("Make sure the URL/link is downloadable!","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Download File Name:","b-blocks"),labelPosition:"left",value:w,onChange:e=>t({downloadFileName:e}),...X,Component:y.TextControl}),(0,l.jsxs)("small",{children:[(0,x.__)("This is an experimental feature, and it may not work reliably every time.","b-blocks")," ",(0,l.jsx)("a",{href:"https://www.w3schools.com/howto/howto_html_download_link.asp",target:"_blank",rel:"noreferrer",children:"Source"})]})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:_,onChange:e=>t({isUpIcon:e})}),_?(0,l.jsx)(ke,{value:j,types:["image"],onChange:e=>t({upIcon:e}),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}):(0,l.jsx)(Un,{value:C,onChange:e=>t({icon:e}),defaults:{class:"fa fa-paper-plane"},isSize:!1,isColor:!1}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Icon Position:","b-blocks"),labelPosition:"left",value:$,onChange:e=>t({iconPos:e}),options:Bm,...X,Component:y.SelectControl}),(0,l.jsx)(v,{children:(0,x.__)("Tooltip Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:u,onChange:e=>t({tooltip:e})}),(0,l.jsx)("small",{children:(0,x.__)("If you want to add tooltip on button, type text rather then leave empty.","b-blocks")}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Tooltip Position:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({tooltipPos:e}),options:Am,...X,Component:y.SelectControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Hide On Desktop","b-blocks"),checked:f?.desktop,onChange:e=>J("hideOn","desktop",e),...X,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Hide On Tablet","b-blocks"),checked:f?.tablet,onChange:e=>J("hideOn","tablet",e),...X,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Hide On Mobile","b-blocks"),checked:f?.mobile,onChange:e=>J("hideOn","mobile",e),...X,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Design","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Button Full Width?","b-blocks"),checked:T,onChange:e=>t({isFullWidth:e})}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Size:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:N,onChange:e=>{t({size:e}),"small"===e&&t({typography:{...I,fontSize:12},padding:{...z,vertical:"8px",horizontal:"16px"}}),"medium"===e&&t({typography:{...I,fontSize:16},padding:{...z,vertical:"12px",horizontal:"24px"}}),"large"===e&&t({typography:{...I,fontSize:20},padding:{...z,vertical:"14px",horizontal:"30px"}}),"x-large"===e&&t({typography:{...I,fontSize:22},padding:{...z,vertical:"16px",horizontal:"46px"}})},options:Om})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Type:","b-blocks")}),(0,l.jsx)(Tn,{value:S,onChange:e=>{t({type:e}),"flat"===e&&t({shadow:[]}),"3d"===e&&t({shadow:[{hOffset:"-5px",vOffset:"6px",blur:"2px",spreed:"0px",color:"#0006",isInset:!1},{hOffset:"3px",vOffset:"-3px",blur:"0px",spreed:"2px",color:"#341b7e",isInset:!0}]})},isTextIcon:!0,options:Im})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:L,onChange:e=>t({animationType:e}),options:Rm})]}),(0,l.jsx)(v,{children:(0,x.__)("Duration (Speed) (s):","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:P,onChange:e=>t({animationDuration:e}),min:0,max:3,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Animation duration of speed in seconds")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Additional","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("ID:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:E,onChange:e=>t({addID:e}),placeholder:(0,x.__)("Enter additional ID","b-blocks")})]}),(0,l.jsx)(v,{children:(0,x.__)("CSS:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:A,onChange:e=>t({addCSS:e}),placeholder:(0,x.__)("Enter additional CSS","b-blocks")})]})]}),"popup"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),children:[!ee&&(0,l.jsx)("div",{className:"mb20",children:(0,l.jsx)("small",{children:(0,x.__)("Please select the popup from the button action to enable these options.","b-blocks")})}),(0,l.jsxs)("div",{className:ee?"":"bPlNoEvent",children:[(0,l.jsx)(Ya,{label:(0,x.__)("Content Type:","b-blocks"),labelPosition:"left",value:G,options:zm,onChange:e=>t({popup:{...M,type:e,content:"content"===e?"\x3c!-- wp:paragraph --\x3e\x3c!-- /wp:paragraph --\x3e":""}}),...X,Component:y.SelectControl}),"image"===G&&(0,l.jsx)(Ya,{label:(0,x.__)("Image:","b-blocks"),type:["image"],...te,placeholder:(0,x.__)("Enter Image URL","b-blocks"),...X,Component:ve}),"audio"===G&&(0,l.jsx)(Ya,{label:(0,x.__)("Audio:","b-blocks"),types:["audio"],...te,placeholder:(0,x.__)("Enter Audio URL","b-blocks"),...X,Component:ve}),"video"===G&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Video:","b-blocks"),types:["video"],...te,placeholder:(0,x.__)("Enter Video URL","b-blocks"),...X,Component:ve}),(0,l.jsx)("span",{children:(0,x.__)("Also support YouTube and Vimeo video.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Autoplay Video","b-blocks"),checked:Y?.autoplay,value:Y?.autoplay,onChange:e=>t({popup:be(M,e,"videoOptions","autoplay")})})]}),"content"===G&&(0,l.jsx)(y.Flex,{className:"mt20",justify:"center",children:(0,l.jsx)(y.Button,{variant:"primary",onClick:()=>i(!0),children:"Add/Update Content"})}),"document"===G&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Document:","b-blocks"),types:["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],...te,placeholder:(0,x.__)("Enter Document URL","b-blocks"),...X,Component:ve}),(0,
334 +l.jsx)("span",{children:(0,x.__)("Supported Document: .pdf, .doc, .docx, .xls, .xlsx","b-blocks")})]}),"iframe"===G&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Iframe Source:","b-blocks"),...te,placeholder:(0,x.__)("Enter Iframe URL","b-blocks"),...X,Component:y.TextControl}),(0,l.jsx)("span",{children:(0,x.__)("Note: Enter only source URL","b-blocks")})]}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Title/Caption:","b-blocks"),value:q,onChange:e=>J("popup","caption",e),...X,Component:y.TextControl})]})]}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),children:[(0,l.jsx)(Oa,{value:I,onChange:e=>t({typography:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16},textDecoration:"none"}}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{value:O,onChange:e=>t({colors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:z,onChange:e=>t({padding:e}),defaults:{vertical:"10px",horizontal:"20px"}}),(0,l.jsx)(ed,{className:"mt20",value:D,onChange:e=>t({border:e}),defaults:{radius:"5px"}}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow:","b-blocks"),value:F?.shadow||F,onChange:e=>t({shadow:e})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{label:(0,x.__)("Colors:","b-blocks"),value:R,onChange:e=>t({hovColors:e}),defaults:{color:"#fff",bg:a}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:U?.padding||{},onChange:e=>t({buttonHover:{...U,padding:e}})}),(0,l.jsx)(ed,{className:"mt20",value:U?.border,onChange:e=>t({buttonHover:{border:e}}),defaults:{radius:"5px"}}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow:","b-blocks"),value:U?.shadow||[],onChange:e=>t({buttonHover:{...U,shadow:e}})})]})]})})]})})]})})}),(0,l.jsxs)(jn,{isProModalOpen:K,setIsProModalOpen:Q,block:"Button",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Button Action: ","b-blocks")}),(0,x.__)("Use the button as a link or popup trigger.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("rel Attribute: ","b-blocks")}),(0,x.__)("Add the rel/relation attribute to the anchor link.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("referrer-policy Attribute: ","b-blocks")}),(0,x.__)("Add the Referrer Policy attribute to the anchor link.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Download File Name: ","b-blocks")}),(0,x.__)("For the download, enter a custom name for the download file. This is an experimental feature, and it may not work reliably every time.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Icon Position: ","b-blocks")}),(0,x.__)("Set the icon position to the left or right.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Tooltip Position: ","b-blocks")}),(0,x.__)("Choose a different position for the tooltip.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Hide on Devices: ","b-blocks")}),(0,x.__)("Hide on various devices (desktop, tablet, and mobile).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Popup Content: ","b-blocks")}),(0,x.__)("Show Image, Audio, Video, Block Content, Document(.pdf, .doc, .docx, .xls, .xlsx), and Iframe.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Security Features: ","b-blocks")}),(0,x.__)("Login, Password Required","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:B,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Button Alignment"),alignmentControls:[{title:(0,x.__)("Button in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Button in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Button in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},Hm=({isOpen:e,onClose:t,caption:n,children:o})=>{if(!e)return null;const i=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const n=i.current;if(n&&e){const e=document.createElement("button");e.className="popupCloseBtn",e.innerHTML="\n\t\t\t\t<svg xmlns='http://www.w3.org/2000/svg' fill='#fff' width='24px' height='24px' viewBox='0 0 32 32'>\n\t\t\t\t\t<path d='M17.769 16l9.016-9.016c0.226-0.226 0.366-0.539 0.366-0.884 0-0.691-0.56-1.251-1.251-1.251-0.346 0-0.658 0.14-0.885 0.367v0l-9.015 9.015-9.016-9.015c-0.226-0.226-0.539-0.366-0.884-0.366-0.69 0-1.25 0.56-1.25 1.25 0 0.345 0.14 0.658 0.366 0.884v0l9.015 9.016-9.015 9.015c-0.227 0.226-0.367 0.539-0.367 0.885 0 0.691 0.56 1.251 1.251 1.251 0.345 0 0.658-0.14 0.884-0.366v0l9.016-9.016 9.015 9.016c0.227 0.228 0.541 0.369 0.888 0.369 0.691 0 1.251-0.56 1.251-1.251 0-0.347-0.141-0.661-0.369-0.887l-0-0z' />\n\t\t\t\t</svg>\n\t\t\t",e.addEventListener("click",(()=>t())),n.appendChild(e)}}),[i.current,e]),(0,l.jsxs)(y.Modal,{onRequestClose:()=>t(),className:"popupContent",overlayClassName:"btnPopupWrap",shouldCloseOnClickOutside:!0,isFullScreen:!1,__experimentalHideHeader:!0,ref:i,children:[(0,l.jsx)("div",{children:o}),n&&(0,l.jsx)("p",{className:"popupCaption",dangerouslySetInnerHTML:{__html:n}})]})};Pl(ch.name)&&(0,p.registerBlockType)(ch,{icon:lr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{text:i,animationType:a,animationDuration:s,popup:r={}}=t,[c,d]=(0,m.useState)(!1),u=(0,m.useRef)(null),p=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{window.AOS?.init()}),[]),(0,m.useEffect)((()=>{const e=u.current?.classList;e.remove("aos-init"),e.remove("aos-animate"),setTimeout((()=>{e.add("aos-init"),e.add("aos-animate")}),500)}),[a,s]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Fm,{attributes:t,setAttributes:n,isPremium:p,setContentPopup:d}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Mm,{attributes:t,id:`block-${o}`}),(0,l.jsx)(Sm,{attributes:t,security:"none",isPremium:p,Popup:Hm,popupContent:(0,l.jsx)(Lm,{popup:r,setAttributes:n}),ref:u,isBackend:!0,children:(0,l.jsx)(h.RichText,{className:"btnText",tagName:"span",value:i,onChange:e=>n({text:e}),placeholder:(0,x.__)("Button Text","b-blocks")})}),c&&(0,l.jsx)(Tm,{attributes:t,Popup:Hm,popupContent:(0,l.jsx)(Lm,{popup:r,setAttributes:n}),securityPop:!0,setSecurityPass:d})]})]})},save:()=>null})
335 +;const Wm=JSON.parse('{"apiVersion":3,"name":"b-blocks/button-group","title":"Button Group","description":"Display Dual Button.","category":"bBlocks","keywords":["buttons","multiple buttons","group of buttons"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"width":{"type":"string","default":"0px"},"layout":{"type":"string","default":"row"},"alignment":{"type":"object","default":{"desktop":{"vertical":"center","horizontal":"center"},"tablet":{"vertical":"","horizontal":""},"mobile":{"vertical":"","horizontal":""}}},"gap":{"type":"object","default":{"desktop":"","tablet":"","mobile":""}},"btnAlign":{"type":"string","default":"center"},"btnType":{"type":"string","default":"fill"},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"btnPadding":{"type":"object","default":{"vertical":"12px","horizontal":"30px"}},"btnOne":{"type":"string","selector":"a.btnOne","default":"First Button"},"btnOneLink":{"type":"string","default":"#"},"btnOneBorder":{"type":"object","default":{"radius":"50px"}},"btnOneColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"btnOneHovColors":{"type":"object","default":{"color":"#fff","bg":"#070127"}},"btnTwo":{"type":"string","selector":"a.btnTwo","default":"Second Button"},"btnTwoLink":{"type":"string","default":"#"},"btnTwoBorder":{"type":"object","default":{"radius":"50px"}},"btnTwoColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"btnTwoHovColors":{"type":"object","default":{"color":"#fff","bg":"#070127"}},"isSep":{"type":"boolean","default":true},"sepType":{"type":"string","default":"icon"},"sepText":{"type":"string","default":"or"},"sepTextTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"sepTextColor":{"type":"string","default":"#333"},"sepIcon":{"type":"object","default":{"class":"fa fa-arrows-alt-h","fontSize":20,"color":"#333"}},"sepBGColor":{"type":"string","default":"#fff"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),Um=[{label:"Icon",value:"icon",icon:"Icon"},{label:"Text",value:"text",icon:"Text"}],Gm=[{name:"btn-one",title:(0,x.__)("Button One","b-blocks")},{name:"btn-two",title:(0,x.__)("Button Two","b-blocks")}],Vm=({attributes:e,setAttributes:t,device:n,updateObj:i})=>{const{width:s,btnAlign:r,btnType:c,btnTypo:d,btnPadding:u,btnOneLink:p,btnOneBorder:g,btnOneColors:m,btnOneHovColors:b,btnTwoLink:f,btnTwoBorder:k,btnTwoColors:w,btnTwoHovColors:C,isSep:j,sepType:$,sepText:S,sepTextTypo:T,sepTextColor:N,sepIcon:M,sepBGColor:L,layout:P="row",alignment:E={},gap:A={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Settings","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Container Width:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Layout","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:P,onChange:e=>t({layout:e}),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"column"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"row"})]})]}),"column"===P&&(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.Flex,{children:(0,l.jsxs)(v,{className:"flex1",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"default",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:E?.[n]?.vertical,onChange:e=>i("alignment",e,n,"vertical"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:"editor-alignleft"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:"editor-aligncenter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:"editor-alignright"})]})]}),"row"===P&&(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.Flex,{children:(0,l.jsxs)(v,{className:"flex1",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"default",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:E?.[n]?.horizontal,onChange:e=>i("alignment",e,n,"horizontal"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:"editor-alignleft"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:"editor-aligncenter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:"editor-alignright"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Space Between",value:"space-between",icon:"editor-justify"})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2",children:[(0,x.__)("Gap:","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:A?.[n]||"",onChange:e=>i("gap",e,n)})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(Tn,{value:c,onChange:e=>{t({btnType:e}),"fill"===e&&t({btnOneColors:{...m,color:"#fff",bg:o,styles:`color: #fff; background: ${o};`},btnOneBorder:{...g,width:"0px",color:"#0000",styles:""},btnTwoColors:{...w,color:"#fff",bg:a,styles:`color: #fff; background: ${a};`},btnTwoBorder:{...k,width:"0px",color:"#0000",styles:""}}),"outline"===e&&t({btnOneColors:{...m,color:o,bg:"#0000",styles:`color: ${o}; background: #0000;`},btnOneBorder:{...g,width:"3px",color:o,styles:`border: 3px solid ${o};`},btnTwoColors:{...w,color:a,bg:"#0000",styles:`color: ${a}; background: #0000;`},btnTwoBorder:{...k,width:"3px",color:a,styles:`border: 3px solid ${a};`}})},options:[{label:(0,x.__)("Fill","b-blocks"),value:"fill",icon:"FILL"},{label:(0,x.__)("Outline","b-blocks"),value:"outline",icon:"OUTLINE"}]})]}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when type will be changed.","b-blocks")}),(0,l.jsx)(Oa,{value:d,onChange:e=>t({btnTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:u,onChange:e=>t({btnPadding:e}),defaults:{vertical:"12px",horizontal:"30px"}}),(0,l.jsx)(v,{children:(0,x.__)("Buttons:","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:Gm,children:e=>(0,l.jsxs)(l.Fragment,{children:["btn-one"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:p,onChange:e=>t({btnOneLink:e})})]}),(0,l.jsx)(ed,{label:(0,x.__)("Border","b-blocks"),value:g,onChange:e=>t({btnOneBorder:e}),defaults:{radius:"50px"}}),(0,l.jsx)(On,{value:m,onChange:e=>t({btnOneColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:b,onChange:e=>t({btnOneHovColors:e}),defaults:{color:"#fff",bg:a}})]}),"btn-two"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:f,onChange:e=>t({btnTwoLink:e})})]}),(0,l.jsx)(ed,{label:(0,x.__)("Border","b-blocks"),value:k,onChange:e=>t({btnTwoBorder:e}),defaults:{radius:"50px"}}),(0,l.jsx)(On,{value:w,onChange:e=>t({btnTwoColors:e}),defaults:{color:"#fff",bg:a}}),(0,l.jsx)(On,{label:(0,
336 +x.__)("Hover Colors:","b-blocks"),value:C,onChange:e=>t({btnTwoHovColors:e}),defaults:{color:"#fff",bg:o}})]})]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:j,onChange:e=>t({isSep:e})}),j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(Tn,{value:$,onChange:e=>t({sepType:e}),options:Um})]}),"text"===$&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Separator Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:S,onChange:e=>t({sepText:e})}),(0,l.jsx)(Oa,{label:(0,x.__)("Text Typography","b-blocks"),value:T,onChange:e=>t({sepTextTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:N,onChange:e=>t({sepTextColor:e}),defaultColor:"#333"})]}),"icon"===$&&(0,l.jsx)(Un,{value:M,onChange:e=>t({sepIcon:e}),defaults:{class:"fa fa fa-arrows-alt-h",fontSize:20,color:"#333"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:L,onChange:e=>t({sepBGColor:e}),defaultColor:"#fff"})]})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:r,onChange:e=>t({btnAlign:e}),describedBy:(0,x.__)("Button Group Align"),alignmentControls:[{title:(0,x.__)("Button Group in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Button Group in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Button Group in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},qm="bBlocksButtonGroup",Ym=({attributes:e,id:t})=>{const{width:n,btnAlign:o,btnTypo:i,btnPadding:a,btnOneBorder:s,btnOneColors:r,btnOneHovColors:c,btnTwoBorder:d,btnTwoColors:u,btnTwoHovColors:p,sepType:h,sepTextTypo:g,sepTextColor:m,sepIcon:b,sepBGColor:f,alignment:x={},layout:y="row",gap:v={}}=e,k=`#${t}`,w=`${k} .${qm}`,_=`${w} .btnSeparator`,C=g?.fontSize?.desktop||g?.fontSize;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",i)?.googleFontLink}\n\t\t${ps("",g)?.googleFontLink}\n\t\t${ps(`${w} .bBlocksBtn a`,i)?.styles}\n\t\t${ps(`${_} span`,g)?.styles}\n\n\t\t${k}{\n\t\t\ttext-align: ${o};\n\t\t\t${"column"===y?ns("text-align",x.desktop.vertical):""}\n\t\t}\n\t\t${w}{\n\t\t\twidth: ${"0px"!==n&&"0%"!==n&&"0em"!==n?n:"auto"};\n\t\t\t${ns("gap",v?.desktop)}\n\t\t}\n\t\t${w}.layout-row{\n\t\t\t${ns("justify-content",x.desktop.horizontal)}\n\t\t}\n\t\t${w}.layout-column{\n\t\t\t${ns("justify-content",x.desktop.vertical)}\n\t\t}\n\t\t${w} .bBlocksBtn{\n\t\t\tmin-width: ${"0px"!==n&&"0%"!==n&&"0em"!==n?"50%":"auto"};\n\t\t}\n\t\t${w} .bBlocksBtn a{\n\t\t\tpadding: ${us(a)};\n\t\t}\n\n\t\t${w} .btnOne{\n\t\t\t${is(s)||"border-radius: 50px;"}\n\t\t\t${ss(r)}\n\t\t\tborder-radius: ${s?.radius||"50px"} 0 0 ${s?.radius||"50px"};\n\t\t}\n\t\t${w} .btnOne:hover{\n\t\t\t${ss(c)}\n\t\t}\n\n\t\t${w} .btnTwo{\n\t\t\t${is(d)||"border-radius: 50px;"}\n\t\t\t${ss(u)}\n\t\t\tborder-radius: 0 ${d?.radius||"50px"} ${d?.radius||"50px"} 0;\n\t\t}\n\t\t${w} .btnTwo:hover{\n\t\t\t${ss(p)}\n\t\t}\n\n\t\t${_}{\n\t\t\twidth: ${"text"===h?1.75*C+"px":1.65*b?.fontSize+"px"};\n\t\t\theight: ${"text"===h?1.75*C+"px":1.65*b?.fontSize+"px"};\n\t\t\tbackground-color: ${f};\n\t\t\t${(()=>{const e=`margin-top: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;\n\t\t\tmargin-bottom: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;`;return"row"===y?`margin-left: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;\n\t\t\tmargin-right: -${"text"===h?1.75*C/2:1.65*b?.fontSize/2}px;`:e})()}\n\t\t}\n\t\t${_} span{\n\t\t\tcolor: ${m};\n\t\t}\n\t\t${_} i{\n\t\t\t${rs(b)}\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},Km=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,device:a}=e,{btnType:s,btnOne:r,btnOneLink:c,btnTwo:d,btnTwoLink:u,isSep:p,sepType:g,sepText:b,sepIcon:f,layout:y="row"}=t;(0,m.useEffect)((()=>me()),[i]);const v=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vm,{attributes:t,setAttributes:n,device:a,updateObj:v}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Ym,{attributes:t,id:`block-${o}`}),(0,l.jsxs)("div",{className:`${qm} layout-${y}`,children:[(0,l.jsx)("div",{className:"bBlocksBtn firstBtn",children:(0,l.jsx)(h.RichText,{className:`btnOne btn-${s}`,tagName:"a",href:$t(c),value:r,onChange:e=>n({btnOne:e}),placeholder:(0,x.__)("First Button","b-blocks"),inlineToolbar:!0})}),p&&(0,l.jsx)("div",{className:"btnSeparator",children:"text"===g?(0,l.jsx)("span",{children:b}):"icon"===g&&f?.class?(0,l.jsx)("i",{className:f?.class}):""}),(0,l.jsx)("div",{className:"bBlocksBtn secondBtn",children:(0,l.jsx)(h.RichText,{className:`btnTwo btn-${s}`,tagName:"a",href:$t(u),value:d,onChange:e=>n({btnTwo:e}),placeholder:(0,x.__)("Second Button","b-blocks"),inlineToolbar:!0})})]})]})]})}));Pl(Wm.name)&&(0,p.registerBlockType)(Wm,{icon:cr,edit:Km,save:()=>null});const Qm=JSON.parse('{"apiVersion":3,"name":"b-blocks/cards","title":"Cards","description":"Provide cards to display anything.","category":"bBlocks","keywords":["card","cards","cards section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"cards":{"type":"array","default":[{"link":"","background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{"radius":"5px"},"cat":"Category 1","catColor":"#0dcaf0","title":"Card Title 1","titleColor":"#ff7500","desc":"This content area describes card 1 descriptions or details.","descColor":"#333"},{"link":"","background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{"radius":"5px"},"cat":"Category 2","catColor":"#0dcaf0","title":"Card Title 2","titleColor":"#ff7500","desc":"This content area describes card 2 descriptions or details.","descColor":"#333"},{"link":"","background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{"radius":"5px"},"cat":"Category 3","catColor":"#0dcaf0","title":"Card Title 3","titleColor":"#ff7500","desc":"This content area describes card 3 descriptions or details.","descColor":"#333"}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"20px"},"rowGap":{"type":"string","default":"30px"},"layout":{"type":"string","default":"vertical"},"link":{"type":"object","default":{"target":"_self","element":"card"}},"textAlign":{"type":"string","default":"left"},"padding":{"type":"object","default":{"vertical":"20px","horizontal":"10px"}},"imgPos":{"type":"string","default":"top"},"imgHeight":{"type":"string","default":"250px"},"imgWidth":{"type":"string","default":"90%"},"imgAlign":{"type":"object","default":"center"},"isCat":{"type":"boolean","default":true},"catTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"catMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isTitle":{"type":"boolean","default":true},"titlePos":{"type":"string","default":"image"},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}');var Zm=Symbol.for("immer-nothing"),Xm=Symbol.for("immer-draftable"),Jm=Symbol.for("immer-state");function eb(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var tb=Object.getPrototypeOf;function nb(e){return!!e&&!!e[Jm]}function ob(e){
337 +return!!e&&(ab(e)||Array.isArray(e)||!!e[Xm]||!!e.constructor?.[Xm]||db(e)||ub(e))}var ib=Object.prototype.constructor.toString();function ab(e){if(!e||"object"!=typeof e)return!1;const t=tb(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===ib}function sb(e,t){0===rb(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,o)=>t(o,n,e)))}function rb(e){const t=e[Jm];return t?t.type_:Array.isArray(e)?1:db(e)?2:ub(e)?3:0}function lb(e,t){return 2===rb(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function cb(e,t,n){const o=rb(e);2===o?e.set(t,n):3===o?e.add(n):e[t]=n}function db(e){return e instanceof Map}function ub(e){return e instanceof Set}function pb(e){return e.copy_||e.base_}function hb(e,t){if(db(e))return new Map(e);if(ub(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=ab(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[Jm];let n=Reflect.ownKeys(t);for(let o=0;o<n.length;o++){const i=n[o],a=t[i];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(tb(e),t)}{const t=tb(e);if(null!==t&&n)return{...e};const o=Object.create(t);return Object.assign(o,e)}}function gb(e,t=!1){return bb(e)||nb(e)||!ob(e)||(rb(e)>1&&(e.set=e.add=e.clear=e.delete=mb),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>gb(t,!0)))),e}function mb(){eb(2)}function bb(e){return Object.isFrozen(e)}var fb,xb={};function yb(e){const t=xb[e];return t||eb(0),t}function vb(){return fb}function kb(e,t){t&&(yb("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wb(e){_b(e),e.drafts_.forEach(jb),e.drafts_=null}function _b(e){e===fb&&(fb=e.parent_)}function Cb(e){return fb={drafts_:[],parent_:fb,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jb(e){const t=e[Jm];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function $b(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Jm].modified_&&(wb(t),eb(4)),ob(e)&&(e=Sb(t,e),t.parent_||Nb(t,e)),t.patches_&&yb("Patches").generateReplacementPatches_(n[Jm].base_,e,t.patches_,t.inversePatches_)):e=Sb(t,n,[]),wb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Zm?e:void 0}function Sb(e,t,n){if(bb(t))return t;const o=t[Jm];if(!o)return sb(t,((i,a)=>Tb(e,o,t,i,a,n))),t;if(o.scope_!==e)return t;if(!o.modified_)return Nb(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let i=t,a=!1;3===o.type_&&(i=new Set(t),t.clear(),a=!0),sb(i,((i,s)=>Tb(e,o,t,i,s,n,a))),Nb(e,t,!1),n&&e.patches_&&yb("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function Tb(e,t,n,o,i,a,s){if(nb(i)){const s=Sb(e,i,a&&t&&3!==t.type_&&!lb(t.assigned_,o)?a.concat(o):void 0);if(cb(n,o,s),!nb(s))return;e.canAutoFreeze_=!1}else s&&n.add(i);if(ob(i)&&!bb(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Sb(e,i),t&&t.scope_.parent_||"symbol"==typeof o||!Object.prototype.propertyIsEnumerable.call(n,o)||Nb(e,i)}}function Nb(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&gb(t,n)}var Mb={get(e,t){if(t===Jm)return e;const n=pb(e);if(!lb(n,t))return function(e,t,n){const o=Eb(t,n);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}(e,n,t);const o=n[t];return e.finalized_||!ob(o)?o:o===Pb(e.base_,t)?(Bb(e),e.copy_[t]=Ib(o,e)):o},has:(e,t)=>t in pb(e),ownKeys:e=>Reflect.ownKeys(pb(e)),set(e,t,n){const o=Eb(pb(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const o=Pb(pb(e),t),s=o?.[Jm];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((i=n)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)&&(void 0!==n||lb(e.base_,t)))return!0;Bb(e),Ab(e)}var i,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Pb(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Bb(e),Ab(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=pb(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:o.enumerable,value:n[t]}:o},defineProperty(){eb(11)},getPrototypeOf:e=>tb(e.base_),setPrototypeOf(){eb(12)}},Lb={};function Pb(e,t){const n=e[Jm];return(n?pb(n):e)[t]}function Eb(e,t){if(!(t in e))return;let n=tb(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=tb(n)}}function Ab(e){e.modified_||(e.modified_=!0,e.parent_&&Ab(e.parent_))}function Bb(e){e.copy_||(e.copy_=hb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Ib(e,t){const n=db(e)?yb("MapSet").proxyMap_(e,t):ub(e)?yb("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),o={type_:n?1:0,scope_:t?t.scope_:vb(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=o,a=Mb;n&&(i=[o],a=Lb);const{revoke:s,proxy:r}=Proxy.revocable(i,a);return o.draft_=r,o.revoke_=s,r}(e,t);return(t?t.scope_:vb()).drafts_.push(n),n}function Ob(e){if(!ob(e)||bb(e))return e;const t=e[Jm];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=hb(e,t.scope_.immer_.useStrictShallowCopy_)}else n=hb(e,!0);return sb(n,((e,t)=>{cb(n,e,Ob(t))})),t&&(t.finalized_=!1),n}sb(Mb,((e,t)=>{Lb[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Lb.deleteProperty=function(e,t){return Lb.set.call(this,e,t,void 0)},Lb.set=function(e,t,n){return Mb.set.call(this,e[0],t,n,e[0])};var Rb=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const o=this;return function(e=n,...i){return o.produce(e,(e=>t.call(this,e,...i)))}}let o;if("function"!=typeof t&&eb(6),void 0!==n&&"function"!=typeof n&&eb(7),ob(e)){const i=Cb(this),a=Ib(e,void 0);let s=!0;try{o=t(a),s=!1}finally{s?wb(i):_b(i)}return kb(i,n),$b(o,i)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===Zm&&(o=void 0),this.autoFreeze_&&gb(o,!0),n){const t=[],i=[];yb("Patches").generateReplacementPatches_(e,o,t,i),n(t,i)}return o}eb(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,o;return[this.produce(e,t,((e,t)=>{n=e,o=t})),n,o]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;ob(e)||eb(8),nb(e)&&(nb(t=e)||eb(10),e=Ob(t));const n=Cb(this),o=Ib(e,void 0);return o[Jm].isManual_=!0,_b(n),o}finishDraft(e,t){const n=e&&e[Jm];n&&n.isManual_||eb(9);const{scope_:o}=n;return kb(o,t),$b(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}n>-1&&(t=t.slice(n+1));const o=yb("Patches").applyPatches_;return nb(e)?o(e,t):this.produce(e,(e=>o(e,t)))}},zb=Rb.produce;Rb.produceWithPatches.bind(Rb),Rb.setAutoFreeze.bind(Rb),Rb.setUseStrictShallowCopy.bind(Rb),Rb.applyPatches.bind(Rb),Rb.createDraft.bind(Rb),Rb.finishDraft.bind(Rb);const Db=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Fb=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",
338 +height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Hb=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Wb=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 16 16",height:"1em",width:"1em",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M2 12.5a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5zm0-3a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5zm0-3a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5zm0-3a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11a.5.5 0 01-.5-.5z",clipRule:"evenodd"})}),Ub=[{label:"Left",value:"left",icon:Db},{label:"Center",value:"center",icon:Fb},{label:"Right",value:"right",icon:Hb}],Gb=e=>{const{attributes:t,setAttributes:n,index:o}=e,{cards:i}=t,a=i[o],{background:s,img:r,imgBorder:c,catColor:d,titleColor:u,descColor:p,cardLink:h}=a,g=(e,t)=>{n({cards:be(i,t,o,e)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:s,onChange:e=>g("background",e)}),(0,l.jsx)(v,{children:(0,x.__)("Image:","b-blocks")}),(0,l.jsx)(ke,{value:r,onChange:e=>g("img",e),placeholder:(0,x.__)("Enter Image URL","b-blocks")}),(0,l.jsx)(ed,{label:(0,x.__)("Image Border:","b-blocks"),value:c,onChange:e=>g("imgBorder",e),defaults:{radius:"5px"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Category Color:","b-blocks"),value:d,onChange:e=>g("catColor",e),defaultColor:"#0dcaf0"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:u,onChange:e=>g("titleColor",e),defaultColor:"#ff7500"}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:p,onChange:e=>g("descColor",e),defaultColor:"#333"}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link:","b-blocks"),value:h,onChange:e=>g("link",e)}),(0,l.jsx)("span",{children:(0,x.__)("Insert the link if you want; otherwise, leave it blank.","b-blocks")})]})},Vb=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,isPremium:i,device:a})=>{const{cards:s=[],columns:r,columnGap:c,rowGap:p,layout:g,link:b={},textAlign:f,padding:k,imgPos:w,imgHeight:C,isCat:j,catTypo:$,catMargin:S,isTitle:T,titlePos:N,titleTypo:M,titleMargin:L,isDesc:P,descTypo:E,imgWidth:A,imgAlign:B}=e,{target:I="_self",element:O="card"}=b,[R,z]=(0,m.useState)(!1),D={background:{color:"#0000"},img:{id:null,url:"",alt:"",title:""},imgBorder:{radius:"5px"},cat:`Category ${s.length+1}`,catColor:"#0dcaf0",title:`Card Title ${s.length+1}`,titleColor:"#ff7500",desc:`This content area describes card ${s.length+1} descriptions/details.`,descColor:"#333"},F={isPremium:i,setIsProModalOpen:z};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:s=>(0,l.jsxs)(l.Fragment,{children:["general"===s.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Add or Remove Cards","b-blocks"),children:[(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,arrKey:"cards",title:"title",ItemSettings:Gb,itemLabel:"Card",newItem:D,design:i?"sortable":"single"}),!i&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(Tn,{value:g,onChange:e=>t({layout:e,columns:{...r,desktop:"vertical"===e?3:2},textAlign:"vertical"===e?"center":"left",imgHeight:"vertical"===e?"250px":"200px",imgWidth:"vertical"===e?"90%":"50%"}),options:[{label:"Vertical",value:"vertical",icon:d},{label:"Horizontal",value:"horizontal",icon:u}],isIcon:!0})]}),(0,l.jsx)("small",{children:(0,x.__)("Some options will be change when you change the layout.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:r[a],onChange:e=>{t({columns:{...r,[a]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Image Position:","b-blocks")}),(0,l.jsx)(Tn,{value:w,onChange:e=>t({imgPos:e}),options:[{label:"vertical"==g?"Top":"Left",value:"top",icon:"vertical"==g?"TOP":"LEFT"},{label:"vertical"==g?"Bottom":"Right",value:"bottom",icon:"vertical"==g?"BOTTOM":"RIGHT"}]})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Category","b-blocks"),checked:j,onChange:e=>t({isCat:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Title","b-blocks"),checked:T,onChange:e=>t({isTitle:e})}),T&&(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title Position:","b-blocks")}),(0,l.jsx)(Tn,{value:N,onChange:e=>t({titlePos:e}),options:[{label:"Image",value:"image",icon:"IMAGE"},{label:"Content",value:"content",icon:"CONTENT"}]})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Description","b-blocks"),checked:P,onChange:e=>t({isDesc:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Link","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Open link in new tab?","b-blocks"),checked:"_blank"===I,onChange:e=>t({link:{...b,target:e?"_blank":"_self"}}),...F,Component:y.ToggleControl}),(0,l.jsx)(Za,{className:"mt20",label:(0,x.__)("Link to:","b-blocks"),labelPosition:"left",value:O,onChange:e=>t({link:{...b,element:e}}),options:[{label:"Card",value:"card"},{label:"Image",value:"image"},{label:"Title",value:"title"}],proValues:["image","title"],...F})]})]}),"style"===s.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Area","b-blocks"),children:(0,l.jsx)(ad,{label:(0,x.__)("Padding:","b-blocks"),value:k,onChange:e=>t({padding:e}),defaults:{vertical:"20px",horizontal:"10px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:C,onChange:e=>t({imgHeight:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:A,onChange:e=>t({imgWidth:e}),units:[Pe(),Ee(),Ae()]}),"vertical"===g&&(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),value:B,onChange:e=>t({imgAlign:e
339 +}),options:Ub,isIcon:!0})]}),j&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Category","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:$,onChange:e=>t({catTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:S,onChange:e=>t({catMargin:e}),defaults:{side:4,bottom:"10px"}})]}),T&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:M,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18}}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:L,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),P&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Oa,{value:E,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}})})]})]})})}),(0,l.jsxs)(jn,{isProModalOpen:R,setIsProModalOpen:z,block:"Cards",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Link Target: ","b-blocks")}),(0,x.__)("Set the card link target.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Link Element: ","b-blocks")}),(0,x.__)("Choose the link element you want to link to.","b-blocks")]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Card","b-blocks"),onClick:()=>t({cards:[...s,D]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:f,onChange:e=>t({textAlign:e})})]})]})})),qb="bBlocksCards",Yb=({attributes:e,id:t})=>{const{cards:n=[],columnGap:o,rowGap:i,textAlign:a,padding:s,imgHeight:r,catTypo:c,catMargin:d,titleTypo:u,titleMargin:p,descTypo:h,imgWidth:g,imgAlign:m,layout:b}=e,f=`#${t}`,x=`${f} .${qb} .${qb}-card`,y=`${x} .cardDetails`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",c)?.googleFontLink}\n\t\t${ps("",u)?.googleFontLink}\n\t\t${ps("",h)?.googleFontLink}\n\t\t${ps(`${y} .${qb}-cardCategory`,c)?.styles}\n\t\t${ps(`${x} .${qb}-cardTitle`,u)?.styles}\n\t\t${ps(`${x} .cardDescription`,h)?.styles}\n\n\t\t${f} .${qb}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t}\n\t\t${x} .${qb}-cardImage{\n\t\t\t${ns("width",g?`calc( ${g} - 30px)`:"")}\n\t\t\t${ns("height",r)}\n\t\t\t${"vertical"===b?(v=m,"left"===v?"margin-inline-end: auto;":"center"===v?"margin-inline: auto;":"margin-inline-start: auto;"):""}\n\t\t}\n\t\t${y}{\n\t\t\ttext-align: ${a};\n\t\t\tpadding: ${us(s)};\n\t\t}\n\t\t${y} .${qb}-cardCategory{\n\t\t\tmargin: ${us(d)};\n\t\t}\n\t\t${x} .${qb}-cardTitle{\n\t\t\tmargin: ${us(p)};\n\t\t}\n\n\t\t${n.map(((e,n)=>{const{background:o,imgBorder:i,catColor:a,titleColor:s,descColor:r}=e,l=`#${t} #${qb}-card-${n}`;return`\n\t\t\t\t${l} .${qb}-card{\n\t\t\t\t\t${os(o)}\n\t\t\t\t}\n\t\t\t\t${l} .${qb}-cardImage{\n\t\t\t\t\t${is(i)}\n\t\t\t\t}\n\t\t\t\t${l} .cardDetails .${qb}-cardCategory{\n\t\t\t\t\tcolor: ${a};\n\t\t\t\t}\n\t\t\t\t${l} .${qb}-cardTitle{\n\t\t\t\t\tcolor: ${s};\n\t\t\t\t}\n\t\t\t\t${l} .${qb}-cardDescription{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}});var v};Pl(Qm.name)&&(0,p.registerBlockType)(Qm,{icon:dr,transforms:{from:[{type:"block",blocks:["crd/cards"],transform:e=>(0,p.createBlock)("b-blocks/cards",e)},{type:"prefix",prefix:"counter",transform:()=>(0,p.createBlock)("b-blocks/cards")}],to:[{type:"block",blocks:["crd/cards"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("crd/cards",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{cards:i=[],columns:a,layout:s,imgPos:r,isCat:c,isTitle:d,titlePos:u,isDesc:p}=t,[g,b]=(0,m.useState)(0),f=bBlocksPremiumChecker,v=(e,t)=>{const o=zb(i,(n=>{n[g][e]=t}));n({cards:o})},k=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vb,{attributes:t,setAttributes:n,activeIndex:g,setActiveIndex:b,updateCard:v,isPremium:f}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Yb,{attributes:t,id:k}),(0,l.jsx)("div",{className:`${qb} ${s||"vertical"} columns-${a?.desktop} columns-tablet-${a?.tablet} columns-mobile-${a?.mobile}`,children:i?.map(((e,t)=>{const{img:n,cat:o,title:i,desc:a}=e,s=d&&(0,l.jsx)(h.RichText,{className:`${qb}-cardTitle`,tagName:"h3",value:i,onChange:e=>v("title",e),placeholder:(0,x.__)("Card title","b-blocks"),inlineToolbar:!0}),m=n?.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("figure",{className:`${qb}-cardImage`,children:[(0,l.jsx)("img",{className:`${qb}-wp-image`,src:n.url,alt:n?.alt||n?.title}),"image"===u&&s]}),(0,td.isBlobURL)(n.url)&&(0,l.jsx)(y.Spinner,{})]}):(0,l.jsx)(od,{label:(0,x.__)(" Card Image:","b-blocks"),value:n,onChange:e=>v("img",e)});return(0,l.jsx)("div",{onClick:()=>b(t),className:t===g?"bPlNowEditing":"",id:`${qb}-card-${t}`,children:(0,l.jsxs)("div",{className:`${qb}-card ${"bottom"===r?"bottomImg":"topImg"}`,children:["top"===r&&m,(0,l.jsxs)("div",{className:"cardDetails",children:[c&&(0,l.jsx)(h.RichText,{className:`${qb}-cardCategory`,tagName:"h6",value:o,onChange:e=>v("cat",e),placeholder:(0,x.__)("Card category","b-blocks"),inlineToolbar:!0}),"content"===u&&s,p&&(0,l.jsx)(h.RichText,{className:`${qb}-cardDescription`,tagName:"p",value:a,onChange:e=>v("desc",e),placeholder:(0,x.__)("Description of the card","b-blocks"),inlineToolbar:!0})]}),"bottom"===r&&m]})},t)}))})]})]})},save:()=>null});const Kb=JSON.parse('{"apiVersion":3,"name":"b-blocks/chart","title":"Chart","description":"Graphical representation for data visualization.","category":"bBlocks","keywords":["charts","line charts","pie charts"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"data":{"type":"object","default":{"labels":["January","February","March","April","May","June"],"datasets":[{"label":"T-Shirts Sell 2021","data":[3,9,10,16,14,16],"backgroundColor":["#ff638433","#36a28733","#ffce5633","#4bc0c033","#9966ff33","#ff9f4033"],"borderColor":["#ff6384","#36a287","#ffce56","#4bc0c0","#9966ff","#ff9f40"],"tension":0.4,"borderWidth":2,"hoverBorderWidth":2,"pointRadius":3,"pointHoverRadius":4,"pointStyle":"triangle"},{"label":"Shoes Sell 2021","data":[5,7,12,14,13,17],"backgroundColor":["#ff638433","#36a28733","#ffce5633","#4bc0c033","#9966ff33","#ff9f4033"],"borderColor":["#ff6384","#36a287","#ffce56","#4bc0c0","#9966ff","#ff9f40"],"tension":0.4,"borderWidth":2,"hoverBorderWidth":2,"pointRadius":3,"pointHoverRadius":4,"pointStyle":"circle"}]}},"type":{"type":"string","default":"line"},"width":{"type":"string","default":"100%"},"height":{"type":"string","default":"450px"},"background":{"type":"object","default":{"color":"#0000"}},"textColor":{"type":"string","default":"#666"},"isXScale":{"type":"boolean","default":true},"isXGridLine":{"type":"boolean","default":true},"isYScale":{"type":"boolean","default":true},"isYGridLine":{"type":"boolean","default":true},"gridLineColor":{"type":"string","default":"#0000001a"},"alignment":{"type":"string","default":"center"},"isTitle":{"type":"boolean","default":true},"title":{"type":"string","default":"Chart Title"},"titleFontSize":{"type":"number","default":22},"titleColor":{"type":"string","default":"#146EF5"},"isSubtitle":{"type":"boolean","default":false},"subtitle":{"type":"string","default":"Chart Subtitle"},"subtitleFontSize":{"type":"number","default":13},"subtitleColor":{"type":"string","default":"#FF7A00"},"isDownload":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","chartJS"]}'),Qb="bBlocksChart",Zb=[{label:(0,x.__)("Line","b-blocks"),value:"line"},{label:(0,x.__)("Bar","b-blocks"),value:"bar"},{label:(0,x.__)("Pie","b-blocks"),value:"pie"},{label:(0,x.__)("Radar","b-blocks"),value:"radar"},{label:(0,
340 +x.__)("Doughnut","b-blocks"),value:"doughnut"},{label:(0,x.__)("Polar Area","b-blocks"),value:"polarArea"}],Xb=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Cross","b-blocks"),value:"cross"},{label:(0,x.__)("Cross Rot","b-blocks"),value:"crossRot"},{label:(0,x.__)("Dash","b-blocks"),value:"dash"},{label:(0,x.__)("Line","b-blocks"),value:"line"},{label:(0,x.__)("Rect","b-blocks"),value:"rect"},{label:(0,x.__)("Rect Rounded","b-blocks"),value:"rectRounded"},{label:(0,x.__)("Rect Rot","b-blocks"),value:"rectRot"},{label:(0,x.__)("Star","b-blocks"),value:"star"},{label:(0,x.__)("Triangle","b-blocks"),value:"triangle"}],Jb=({attributes:e,setAttributes:t})=>{const{data:n,type:s,background:r,textColor:c,isXScale:d,isXGridLine:u,isYScale:p,isYGridLine:g,gridLineColor:m,width:b,height:f,alignment:k,isTitle:w,title:_,titleFontSize:C,titleColor:j,isSubtitle:$,subtitle:S,subtitleFontSize:T,subtitleColor:N,isDownload:M}=e,L=()=>{let e="#";for(let t=0;t<6;t++)e+="0123456789abcdef"[Math.floor(16*Math.random())];return e},P=(e,o,i,a=!1,s=!1)=>{const r={...n};!1!==s&&a?r[e][o][a][s]=i:a?r[e][o][a]=i:r[e][o]=i,t({data:r})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:ln}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems",title:(0,x.__)("Add or Remove Datasets","b-blocks"),children:[n.labels.map(((e,o)=>(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)(`Label ${o+1}:`,"b-blocks")}),(0,l.jsx)(y.TextControl,{value:e,onChange:e=>P("labels",o,e)}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Remove this Dataset","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(y.Button,{className:"removeDataset",onClick:e=>{e.preventDefault(),(e=>{let o=[];for(let t=0;t<n.datasets.length;t++)o.push({label:n.datasets[t].label,data:[...n.datasets[t].data.slice(0,e),...n.datasets[t].data.slice(e+1)],backgroundColor:[...n.datasets[t].backgroundColor.slice(0,e),...n.datasets[t].backgroundColor.slice(e+1)],borderColor:[...n.datasets[t].borderColor.slice(0,e),...n.datasets[t].borderColor.slice(e+1)],tension:n.datasets[t].tension,borderWidth:n.datasets[t].borderWidth,hoverBorderWidth:n.datasets[t].hoverBorderWidth,pointRadius:n.datasets[t].pointRadius,pointHoverRadius:n.datasets[t].pointHoverRadius,pointStyle:n.datasets[t].pointStyle});t({data:{labels:[...n.labels.slice(0,e),...n.labels.slice(e+1)],datasets:[...o]}})})(o)},children:(0,l.jsx)(y.Dashicon,{icon:"no"})})})]},o))),(0,l.jsx)("div",{className:"addItem mt10 mb10",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Dataset","b-blocks"),onClick:()=>{let e=[];for(let t=0;t<n.datasets.length;t++)e.push({label:n.datasets[t].label,data:[...n.datasets[t].data,Math.ceil(20*Math.random())],backgroundColor:[...n.datasets[t].backgroundColor,i],borderColor:[...n.datasets[t].borderColor,o],tension:n.datasets[t].tension,borderWidth:n.datasets[t].borderWidth,hoverBorderWidth:n.datasets[t].hoverBorderWidth,pointRadius:n.datasets[t].pointRadius,pointHoverRadius:n.datasets[t].pointHoverRadius,pointStyle:n.datasets[t].pointStyle});t({data:{labels:[...n.labels,`Data ${n.labels.length+1}`],datasets:[...e]}})},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Dataset","b-blocks")]})}),n.datasets.map(((e,o)=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody editItem",title:(0,x.__)(`Dataset Value ${o+1}:`,"b-blocks"),initialOpen:0===o,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Label:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:e.label,onChange:e=>P("datasets",o,e,"label")})]}),n.labels.map(((t,n)=>(0,l.jsxs)(y.PanelRow,{className:`${Qb}DatasetEdit`,children:[(0,l.jsx)(v,{className:"",children:(0,x.__)(`${t}:`,"b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"chartDataValue",value:e.data[n],onChange:e=>P("datasets",o,parseFloat(e),"data",n)}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Dataset Background Color","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(Ue,{className:"chartBGColor",label:"",value:e.backgroundColor[n],onChange:e=>P("datasets",o,e,"backgroundColor",n)})}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Dataset Border Color","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(Ue,{label:"",value:e.borderColor[n],onChange:e=>P("datasets",o,e,"borderColor",n)})})]},n))),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt20",label:(0,x.__)("Border Width:"),labelPosition:"left",value:e.borderWidth,onChange:e=>{const i={...n};i.datasets[o].borderWidth=parseFloat(e),i.datasets[o].hoverBorderWidth=parseFloat(e),t({data:i})}}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt15",label:(0,x.__)("Point Size:"),labelPosition:"left",value:e.pointRadius,onChange:e=>P("datasets",o,parseFloat(e),"pointRadius")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt15",label:(0,x.__)("Point Hover Size:"),labelPosition:"left",value:e.pointHoverRadius,onChange:e=>P("datasets",o,parseFloat(e),"pointHoverRadius")}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Point Style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:e.pointStyle,onChange:e=>P("datasets",o,e,"pointStyle"),options:Xb})]}),(0,l.jsxs)(y.PanelRow,{className:"itemAction",children:[(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{var i;e.preventDefault(),i=o,t({data:{labels:[...n.labels],datasets:[...n.datasets.slice(0,i),...n.datasets.slice(i+1)]}})},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{var i;e.preventDefault(),i=o,t({data:{labels:[...n.labels],datasets:[...n.datasets,{...n.datasets[i]}]}})},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]},o))),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add Dataset Value","b-blocks"),onClick:()=>{let e=[],o=[],i=[];for(let t=0;t<n.labels.length;t++){const t=L();e.push(Math.ceil(20*Math.random())),o.push(`${t}33`),i.push(t)}t({data:{labels:[...n.labels],datasets:[...n.datasets,{label:`Dataset Value ${n.datasets.length+1}`,data:e,backgroundColor:o,borderColor:i,tension:.4,borderWidth:2,hoverBorderWidth:2,pointRadius:3,pointHoverRadius:4,pointStyle:"rectRounded"}]}})},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add Dataset Value","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Chart Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:s,onChange:e=>t({type:e}),options:Zb})]}),(0,l.jsx)("small",{children:(0,x.__)("Use single dataset value for 'Pie', 'Doughnut', and 'Polar Area'","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:b,onChange:e=>t({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:f,onChange:e=>t({height:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(An,{className:"mt20",label:(0,x.__)("Background:","b-blocks"),value:r,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:c,onChange:e=>t({textColor:e}),defaultColor:"#666"}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show X Scale","b-blocks"),checked:d,onChange:e=>t({isXScale:e})}),d&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show X Grid Line","b-blocks"),checked:u,onChange:e=>t({isXGridLine:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Y Scale","b-blocks"),checked:p,onChange:e=>t({isYScale:e})}),p&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Y Grid Line","b-blocks"),checked:g,onChange:e=>t({isYGridLine:e})}),(u||g)&&(0,l.jsx)(Ue,{label:(0,
341 +x.__)("Grid Line Color:","b-blocks"),value:m,onChange:e=>t({gridLineColor:e}),defaultColor:"#0000001a"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title & Subtitle Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:w,onChange:e=>t({isTitle:e})}),w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:_,onChange:e=>t({title:e})})]}),(0,l.jsx)(v,{children:(0,x.__)("Title Font Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:C,onChange:e=>t({titleFontSize:e}),min:0,max:80,step:1,allowReset:!0,resetFallbackValue:22,initialPosition:22}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:j,onChange:e=>t({titleColor:e}),defaultColor:o})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Subtitle","b-blocks"),checked:$,onChange:e=>t({isSubtitle:e})}),$&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Subtitle:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:S,onChange:e=>t({subtitle:e})})]}),(0,l.jsx)(v,{children:(0,x.__)("Subtitle Font Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:T,onChange:e=>t({subtitleFontSize:e}),min:0,max:80,step:1,allowReset:!0,resetFallbackValue:13,initialPosition:13}),(0,l.jsx)(Ue,{label:(0,x.__)("Subtitle Color:","b-blocks"),value:N,onChange:e=>t({subtitleColor:e}),defaultColor:a})]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Download Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Download Button","b-blocks"),checked:M,onChange:e=>t({isDownload:e})})})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:k,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Chart Alignment"),alignmentControls:[{title:(0,x.__)("Chart in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Chart in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Chart in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},ef=({attributes:e,id:t})=>{const{background:n,width:o,height:i,alignment:a}=e,s=`#${t}`,r=`${s} .${Qb}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${s}{\n\t\t\ttext-align: ${a};\n\t\t}\n\t\t${r}{\n\t\t\theight: ${i};\n\t\t}\n\t\t${r},\n\t\t${s} .downloadArea{\n\t\t\twidth: ${o};\n\t\t}\n\t\t${r} canvas{\n\t\t\t${os(n)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},tf=({attributes:e,id:t,isBackend:n=!1})=>{const{data:o,type:i,textColor:a,isXScale:s,isXGridLine:r,isYScale:c,isYGridLine:d,gridLineColor:u,isTitle:p,title:h,titleFontSize:g,titleColor:b,isSubtitle:f,subtitle:x,subtitleFontSize:y,subtitleColor:v,isDownload:k}=e,w=(0,m.useRef)(null),_=(0,m.useRef)(null),C=n?[o,i,a,s,r,c,d,u,p,h,g,b,f,x,y,v,k,w.current]:[];return(0,m.useEffect)((()=>{n&&(w.current.innerHTML="",w.current.innerHTML="<canvas>Your browser does not support the canvas element.</canvas>");const o=w.current.ownerDocument,i=o.querySelector(`#${t} .${Qb} canvas`),a=i&&new Chart(i,(e=>{const{data:t,type:n,textColor:o,isXScale:i,isXGridLine:a,isYScale:s,isYGridLine:r,gridLineColor:l,isTitle:c,title:d,titleFontSize:u,titleColor:p,isSubtitle:h,subtitle:g,subtitleFontSize:m,subtitleColor:b}=e;return{type:n,data:t,options:{maintainAspectRatio:!1,plugins:{legend:{position:"top",labels:{usePointStyle:!0,color:o}},title:{display:c,text:d,color:p,font:{size:u,family:"Roboto"},padding:{bottom:10}},subtitle:{display:h,text:g,color:b,font:{size:m,family:"Roboto"},padding:{bottom:15}},tooltip:{position:"nearest",usePointStyle:!0}},scales:{x:{display:i,ticks:{color:o},grid:{display:a,color:l}},y:{display:s,beginAtZero:!0,ticks:{color:o},grid:{display:r,color:l}}}}}})(e));k&&_?.current.addEventListener("click",(()=>{const e=o.createElement("a");e.href=a.toBase64Image(),e.download="b-chart.png",e.click()}))}),C),(0,l.jsxs)(l.Fragment,{children:[k&&(0,l.jsx)("div",{className:"downloadArea",children:(0,l.jsx)("div",{className:"downloadChart",ref:_,children:"Download Chart"})}),(0,l.jsx)("div",{className:Qb,ref:w,children:(0,l.jsx)("canvas",{children:"Your browser does not support the canvas element."})})]})};Pl(Kb.name)&&(0,p.registerBlockType)(Kb,{icon:ur,transforms:{from:[{type:"block",blocks:["b-chart/chart"],transform:e=>(0,p.createBlock)("b-blocks/chart",e)},{type:"prefix",prefix:"chart",transform:()=>(0,p.createBlock)("b-blocks/chart")}],to:[{type:"block",blocks:["b-chart/chart"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("b-chart/chart",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e;(0,m.useEffect)((()=>me()),[i]);const a=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Jb,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(ef,{attributes:t,id:a}),(0,l.jsx)(tf,{attributes:t,id:a,isBackend:!0})]})]})},save:()=>null})
342 +;const nf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/content-ticker","version":"1.0.0","title":"Content Ticker","category":"bBlocks","description":"Content Ticker will let you showcase your trending news.","keywords":["content","ticker","content-ticker"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"badge":{"type":"object","default":{"text":"Trending Now","desktop":{"width":"130px","height":"","padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"bRadius":{}},"tablet":{"width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"bRadius":{}},"mobile":{"width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"bRadius":{}},"color":{"bg":{"color":"#595959"},"text":""},"typography":{"fontSize":{"desktop":"16px"},"fontWeight":400},"border":{}}},"content":{"type":"array","default":[{"text":"Ticker custom content","link":"#","toggle":false}]},"style":{"type":"object","default":{"bg":"","color":{"normal":"#222222","hover":"#2D82C9"},"typography":{"fontSize":{"desktop":"16px"},"fontWeight":400},"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}},"bRadius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"options":{"type":"object","default":{"effect":"slide","sliderSpeed":2000,"isAutoplay":true,"autoPlaySpeed":2000,"isPauseOnHover":true,"isLoop":true,"isGrabCursor":true,"isArrows":true,"direction":"right","easing":""}},"arrows":{"type":"object","default":{"left":{"url":""},"right":{"url":""},"icon":"style1","desktop":{"size":22,"alignLeft":25,"alignRight":5,"padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":22,"alignLeft":25,"alignRight":5,"padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":22,"alignLeft":25,"alignRight":5,"padding":{"top":"","right":"","bottom":"","left":""}},"normal":{"bg":"","color":"","border":{},"borderRadius":{}},"hover":{"bg":"","color":"","border":{},"borderRadius":{}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),of={style1:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5303 18.5303C14.2374 18.8232 13.7626 18.8232 13.4697 18.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697L13.4697 5.46967C13.7626 5.17678 14.2374 5.17678 14.5303 5.46967C14.8232 5.76256 14.8232 6.23744 14.5303 6.53033L9.06066 12L14.5303 17.4697C14.8232 17.7626 14.8232 18.2374 14.5303 18.5303Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.46967 5.46967C9.76256 5.17678 10.2374 5.17678 10.5303 5.46967L16.5303 11.4697C16.8232 11.7626 16.8232 12.2374 16.5303 12.5303L10.5303 18.5303C10.2374 18.8232 9.76256 18.8232 9.46967 18.5303C9.17678 18.2374 9.17678 17.7626 9.46967 17.4697L14.9393 12L9.46967 6.53033C9.17678 6.23744 9.17678 5.76256 9.46967 5.46967Z"})})},style2:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4939 20.5644C11.1821 20.8372 10.7083 20.8056 10.4356 20.4939L3.43557 12.4939C3.18814 12.2111 3.18814 11.7889 3.43557 11.5061L10.4356 3.50613C10.7083 3.1944 11.1822 3.16281 11.4939 3.43557C11.8056 3.70834 11.8372 4.18216 11.5644 4.49388L5.65283 11.25L20 11.25C20.4142 11.25 20.75 11.5858 20.75 12C20.75 12.4142 20.4142 12.75 20 12.75L5.65283 12.75L11.5644 19.5061C11.8372 19.8179 11.8056 20.2917 11.4939 20.5644Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5061 3.43557C12.8178 3.16281 13.2917 3.19439 13.5644 3.50612L20.5644 11.5061C20.8119 11.7889 20.8119 12.2111 20.5644 12.4939L13.5644 20.4939C13.2917 20.8056 12.8178 20.8372 12.5061 20.5644C12.1944 20.2917 12.1628 19.8178 12.4356 19.5061L18.3472 12.75H4C3.58579 12.75 3.25 12.4142 3.25 12C3.25 11.5858 3.58579 11.25 4 11.25H18.3472L12.4356 4.49388C12.1628 4.18215 12.1944 3.70833 12.5061 3.43557Z"})})},style3:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{
343 +d:"M11 20.74C10.9012 20.7423 10.803 20.7238 10.7118 20.686C10.6205 20.6481 10.5382 20.5916 10.47 20.52L2.47 12.52C2.32955 12.3794 2.25066 12.1888 2.25066 11.99C2.25066 11.7913 2.32955 11.6007 2.47 11.46L10.47 3.46003C10.576 3.35806 10.7096 3.2895 10.8542 3.26288C10.9989 3.23626 11.1481 3.25274 11.2835 3.31029C11.4188 3.36783 11.5342 3.4639 11.6154 3.58653C11.6966 3.70917 11.7399 3.85296 11.74 4.00003V7.30003H21C21.1981 7.30262 21.3874 7.38247 21.5275 7.52256C21.6676 7.66265 21.7474 7.85192 21.75 8.05003V16.05C21.7474 16.2481 21.6676 16.4374 21.5275 16.5775C21.3874 16.7176 21.1981 16.7974 21 16.8H11.74V19.99C11.7402 20.139 11.6954 20.2845 11.6116 20.4076C11.5277 20.5307 11.4087 20.6257 11.27 20.68C11.1848 20.7175 11.0931 20.7379 11 20.74ZM4.07 12L10.25 18.18V16.05C10.25 15.8511 10.329 15.6603 10.4697 15.5197C10.6103 15.379 10.8011 15.3 11 15.3H20.25V8.80003H11C10.8019 8.79744 10.6126 8.71759 10.4725 8.57749C10.3324 8.4374 10.2526 8.24813 10.25 8.05003V5.82003L4.07 12Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M13 20.74C12.9039 20.7541 12.8062 20.7541 12.71 20.74C12.5724 20.6823 12.4551 20.5849 12.3732 20.4602C12.2912 20.3355 12.2484 20.1892 12.25 20.04V16.7H3.00001C2.81189 16.6956 2.63208 16.6216 2.49538 16.4923C2.35868 16.363 2.27481 16.1876 2.26001 16V8.00002C2.25463 7.89856 2.26965 7.79706 2.30417 7.7015C2.3387 7.60595 2.39204 7.51829 2.46103 7.44371C2.53002 7.36913 2.61326 7.30913 2.70584 7.26727C2.79841 7.22542 2.89844 7.20255 3.00001 7.20002H12.25V4.01002C12.2498 3.86106 12.2946 3.71551 12.3784 3.59241C12.4623 3.4693 12.5813 3.37436 12.72 3.32002C12.8551 3.26039 13.0053 3.24376 13.1502 3.27238C13.2951 3.301 13.4277 3.37349 13.53 3.48002L21.53 11.48C21.6705 11.6206 21.7493 11.8113 21.7493 12.01C21.7493 12.2088 21.6705 12.3994 21.53 12.54L13.53 20.54C13.4601 20.6079 13.377 20.6608 13.2858 20.6952C13.1946 20.7296 13.0973 20.7448 13 20.74ZM3.76001 15.2H13C13.1981 15.2026 13.3874 15.2825 13.5275 15.4226C13.6676 15.5626 13.7474 15.7519 13.75 15.95V18.18L19.93 12L13.75 5.83002V8.00002C13.7477 8.19843 13.6689 8.3883 13.53 8.53002C13.3817 8.65257 13.1919 8.71343 13 8.70002H3.76001V15.2Z"})})},style4:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:"",d:"M1.02698 11.9929L5.26242 16.2426L6.67902 14.8308L4.85766 13.0033L22.9731 13.0012L22.9728 11.0012L4.85309 11.0033L6.6886 9.17398L5.27677 7.75739L1.02698 11.9929Z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:"",d:"M23.0677 11.9929L18.818 7.75739L17.4061 9.17398L19.2415 11.0032L0.932469 11.0012L0.932251 13.0012L19.2369 13.0032L17.4155 14.8308L18.8321 16.2426L23.0677 11.9929Z"})})},style5:{left:(0,l.jsx)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:"",d:"m4.431 12.822 13 9A1 1 0 0 0 19 21V3a1 1 0 0 0-1.569-.823l-13 9a1.003 1.003 0 0 0 0 1.645z"})}),right:(0,l.jsx)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{transform:"",d:"M5.536 21.886a1.004 1.004 0 0 0 1.033-.064l13-9a1 1 0 0 0 0-1.644l-13-9A1 1 0 0 0 5 3v18a1 1 0 0 0 .536.886z"})})},style6:{left:(0,l.jsxs)("svg",{className:"custom-next-btn",id:"cttk-nextBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M16.5 8L13 11.5L16.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M10.5 8L7 11.5L10.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),right:(0,l.jsxs)("svg",{className:"custom-prev-btn",id:"cttk-prevBtn",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M7 8L10.5 11.5L7 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M13 8L16.5 11.5L13 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},af=of;function sf(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function rf(e,t){void 0===e&&(e={}),void 0===t&&(t={});const n=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>n.indexOf(e)<0)).forEach((n=>{void 0===e[n]?e[n]=t[n]:sf(t[n])&&sf(e[n])&&Object.keys(t[n]).length>0&&rf(e[n],t[n])}))}const lf={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function cf(){const e="undefined"!=typeof document?document:{};return rf(e,lf),e}const df={document:lf,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function uf(){const e="undefined"!=typeof window?window:{};return rf(e,df),e}function pf(e){return void 0===e&&(e=""),e.trim().split(" ").filter((e=>!!e.trim()))}function hf(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function gf(){return Date.now()}function mf(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function bf(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let o=1;o<arguments.length;o+=1){const i=o<0||arguments.length<=o?void 0:arguments[o];if(null!=i&&(n=i,!("undefined"!=typeof window&&void 0!==window.HTMLElement?n instanceof HTMLElement:n&&(1===n.nodeType||11===n.nodeType)))){const n=Object.keys(Object(i)).filter((e=>t.indexOf(e)<0));for(let t=0,o=n.length;t<o;t+=1){const o=n[t],a=Object.getOwnPropertyDescriptor(i,o);void 0!==a&&a.enumerable&&(mf(e[o])&&mf(i[o])?i[o].__swiper__?e[o]=i[o]:bf(e[o],i[o]):!mf(e[o])&&mf(i[o])?(e[o]={},i[o].__swiper__?e[o]=i[o]:bf(e[o],i[o])):e[o]=i[o])}}}var n;return e}function ff(e,t,n){e.style.setProperty(t,n)}function xf(e){let{swiper:t,targetPosition:n,side:o}=e;const i=uf(),a=-t.translate;let s,r=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const c=n>a?"next":"prev",d=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{s=(new Date).getTime(),null===r&&(r=s);const e=Math.max(Math.min((s-r)/l,1),0),c=.5-Math.cos(e*Math.PI)/2;let p=a+c*(n-a);if(d(p,n)&&(p=n),t.wrapperEl.scrollTo({[o]:p}),d(p,n))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[o]:p})})),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(u)};u()}function yf(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function vf(e,t){void 0===t&&(t="")
344 +;const n=uf(),o=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&o.push(...e.assignedElements()),t?o.filter((e=>e.matches(t))):o}function kf(e){try{return void console.warn(e)}catch(e){}}function wf(e,t){void 0===t&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:pf(t)),n}function _f(e,t){return uf().getComputedStyle(e,null).getPropertyValue(t)}function Cf(e){let t,n=e;if(n){for(t=0;null!==(n=n.previousSibling);)1===n.nodeType&&(t+=1);return t}}function jf(e,t){const n=[];let o=e.parentElement;for(;o;)t?o.matches(t)&&n.push(o):n.push(o),o=o.parentElement;return n}function $f(e,t,n){const o=uf();return n?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(o.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(o.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}function Sf(e){return(Array.isArray(e)?e:[e]).filter((e=>!!e))}function Tf(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90==0?t+.001:t}function Nf(e,t){void 0===t&&(t=""),"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}function Mf(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const a=uf();let s;n({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let r,l=gf();const c=[];function d(){t.enabled&&(t.mouseEntered=!0)}function u(){t.enabled&&(t.mouseEntered=!1)}function p(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta||t.params.mousewheel.thresholdTime&&gf()-l<t.params.mousewheel.thresholdTime||!(e.delta>=6&&gf()-l<60)&&(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),i("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),i("scroll",e.raw)),l=(new a.Date).getTime(),1))}function h(e){let n=e,o=!0;if(!t.enabled)return;if(e.target.closest(`.${t.params.mousewheel.noMousewheelClass}`))return;const a=t.params.mousewheel;t.params.cssMode&&n.preventDefault();let l=t.el;"container"!==t.params.mousewheel.eventsTarget&&(l=document.querySelector(t.params.mousewheel.eventsTarget));const d=l&&l.contains(n.target);if(!t.mouseEntered&&!d&&!a.releaseOnEdges)return!0;n.originalEvent&&(n=n.originalEvent);let u=0;const h=t.rtlTranslate?-1:1,g=function(e){let t=0,n=0,o=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(o=e.deltaX),e.shiftKey&&!o&&(o=i,i=0),(o||i)&&e.deltaMode&&(1===e.deltaMode?(o*=40,i*=40):(o*=800,i*=800)),o&&!t&&(t=o<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:i}}(n);if(a.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(g.pixelX)>Math.abs(g.pixelY)))return!0;u=-g.pixelX*h}else{if(!(Math.abs(g.pixelY)>Math.abs(g.pixelX)))return!0;u=-g.pixelY}else u=Math.abs(g.pixelX)>Math.abs(g.pixelY)?-g.pixelX*h:-g.pixelY;if(0===u)return!0;a.invert&&(u=-u);let m=t.getTranslate()+u*a.sensitivity;if(m>=t.minTranslate()&&(m=t.minTranslate()),m<=t.maxTranslate()&&(m=t.maxTranslate()),o=!!t.params.loop||!(m===t.minTranslate()||m===t.maxTranslate()),o&&t.params.nested&&n.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:gf(),delta:Math.abs(u),direction:Math.sign(u)},o=r&&e.time<r.time+500&&e.delta<=r.delta&&e.direction===r.direction;if(!o){r=void 0;let l=t.getTranslate()+u*a.sensitivity;const d=t.isBeginning,p=t.isEnd;if(l>=t.minTranslate()&&(l=t.minTranslate()),l<=t.maxTranslate()&&(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!d&&t.isBeginning||!p&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(s),s=void 0,c.length>=15&&c.shift();const n=c.length?c[c.length-1]:void 0,o=c[0];if(c.push(e),n&&(e.delta>n.delta||e.direction!==n.direction))c.splice(0);else if(c.length>=15&&e.time-o.time<500&&o.delta-e.delta>=1&&e.delta<=6){const n=u>0?.8:.2;r=e,c.splice(0),s=hf((()=>{!t.destroyed&&t.params&&t.slideToClosest(t.params.speed,!0,void 0,n)}),0)}s||(s=hf((()=>{!t.destroyed&&t.params&&(r=e,c.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5))}),500))}if(o||i("scroll",n),t.params.autoplay&&t.params.autoplay.disableOnInteraction&&t.autoplay.stop(),a.releaseOnEdges&&(l===t.minTranslate()||l===t.maxTranslate()))return!0}}else{const n={time:gf(),delta:Math.abs(u),direction:Math.sign(u),raw:e};c.length>=2&&c.shift();const o=c.length?c[c.length-1]:void 0;if(c.push(n),o?(n.direction!==o.direction||n.delta>o.delta||n.time>o.time+150)&&p(n):p(n),function(e){const n=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&n.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&n.releaseOnEdges)return!0;return!1}(n))return!0}return n.preventDefault?n.preventDefault():n.returnValue=!1,!1}function g(e){let n=t.el;"container"!==t.params.mousewheel.eventsTarget&&(n=document.querySelector(t.params.mousewheel.eventsTarget)),n[e]("mouseenter",d),n[e]("mouseleave",u),n[e]("wheel",h)}function m(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",h),!0):!t.mousewheel.enabled&&(g("addEventListener"),t.mousewheel.enabled=!0,!0)}function b(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,h),!0):!!t.mousewheel.enabled&&(g("removeEventListener"),t.mousewheel.enabled=!1,!0)}o("init",(()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&b(),t.params.mousewheel.enabled&&m()})),o("destroy",(()=>{t.params.cssMode&&m(),t.mousewheel.enabled&&b()})),Object.assign(t.mousewheel,{enable:m,disable:b})}function Lf(e,t,n,o){return e.params.createElements&&Object.keys(o).forEach((i=>{if(!n[i]&&!0===n.auto){let a=vf(e.el,`.${o[i]}`)[0];a||(a=wf("div",o[i]),a.className=o[i],e.el.append(a)),n[i]=a,t[i]=a}})),n}function Pf(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;function a(e){let n;return e&&"string"==typeof e&&t.isElement&&(n=t.el.querySelector(e)||t.hostEl.querySelector(e),n)?n:(e&&("string"==typeof e&&(n=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&n&&n.length>1&&1===t.el.querySelectorAll(e).length?n=t.el.querySelector(e):n&&1===n.length&&(n=n[0])),e&&!n?e:n)}function s(e,n){const o=t.params.navigation;(e=Sf(e)).forEach((e=>{e&&(e.classList[n?"add":"remove"](...o.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=n),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](o.lockClass))}))}function r(){const{nextEl:e,prevEl:n}=t.navigation;if(t.params.loop)return s(n,!1),void s(e,!1);s(n,t.isBeginning&&!t.params.rewind),s(e,t.isEnd&&!t.params.rewind)}function l(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function c(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function d(){const e=t.params.navigation;if(t.params.navigation=Lf(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let n=a(e.nextEl),o=a(e.prevEl);Object.assign(t.navigation,{nextEl:n,prevEl:o}),n=Sf(n),o=Sf(o);const i=(n,o)=>{n&&n.addEventListener("click","next"===o?c:l),!t.enabled&&n&&n.classList.add(...e.lockClass.split(" "))};n.forEach((e=>i(e,"next"))),o.forEach((e=>i(e,"prev")))}function u(){let{nextEl:e,prevEl:n}=t.navigation;e=Sf(e),n=Sf(n);const o=(e,n)=>{e.removeEventListener("click","next"===n?c:l),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>o(e,"next"))),n.forEach((e=>o(e,"prev")))}n({navigation:{nextEl:null,
345 +prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},o("init",(()=>{!1===t.params.navigation.enabled?p():(d(),r())})),o("toEdge fromEdge lock unlock",(()=>{r()})),o("destroy",(()=>{u()})),o("enable disable",(()=>{let{nextEl:e,prevEl:n}=t.navigation;e=Sf(e),n=Sf(n),t.enabled?r():[...e,...n].filter((e=>!!e)).forEach((e=>e.classList.add(t.params.navigation.lockClass)))})),o("click",((e,n)=>{let{nextEl:o,prevEl:a}=t.navigation;o=Sf(o),a=Sf(a);const s=n.target;let r=a.includes(s)||o.includes(s);if(t.isElement&&!r){const e=n.path||n.composedPath&&n.composedPath();e&&(r=e.find((e=>o.includes(e)||a.includes(e))))}if(t.params.navigation.hideOnClick&&!r){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===s||t.pagination.el.contains(s)))return;let e;o.length?e=o[0].classList.contains(t.params.navigation.hiddenClass):a.length&&(e=a[0].classList.contains(t.params.navigation.hiddenClass)),i(!0===e?"navigationShow":"navigationHide"),[...o,...a].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const p=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),d(),r()},disable:p,update:r,init:d,destroy:u})}function Ef(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/()[\]])/g,"\\$1").replace(/ /g,".")}`}function Af(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const a="swiper-pagination";let s;n({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`,paginationDisabledClass:`${a}-disabled`}}),t.pagination={el:null,bullets:[]};let r=0;function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function c(e,n){const{bulletActiveClass:o}=t.params.pagination;e&&(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${o}-${n}`),(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&e.classList.add(`${o}-${n}-${n}`))}function d(e){const n=e.target.closest(Ef(t.params.pagination.bulletClass));if(!n)return;e.preventDefault();const o=Cf(n)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===o)return;const e=(i=t.realIndex,a=o,(a%=s=t.slides.length)==1+(i%=s)?"next":a===i-1?"previous":void 0);"next"===e?t.slideNext():"previous"===e?t.slidePrev():t.slideToLoop(o)}else t.slideTo(o);var i,a,s}function u(){const e=t.rtl,n=t.params.pagination;if(l())return;let o,a,d=t.pagination.el;d=Sf(d);const u=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,p=t.params.loop?Math.ceil(u/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(a=t.previousRealIndex||0,o=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(o=t.snapIndex,a=t.previousSnapIndex):(a=t.previousIndex||0,o=t.activeIndex||0),"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const i=t.pagination.bullets;let l,u,p;if(n.dynamicBullets&&(s=$f(i[0],t.isHorizontal()?"width":"height",!0),d.forEach((e=>{e.style[t.isHorizontal()?"width":"height"]=s*(n.dynamicMainBullets+4)+"px"})),n.dynamicMainBullets>1&&void 0!==a&&(r+=o-(a||0),r>n.dynamicMainBullets-1?r=n.dynamicMainBullets-1:r<0&&(r=0)),l=Math.max(o-r,0),u=l+(Math.min(i.length,n.dynamicMainBullets)-1),p=(u+l)/2),i.forEach((e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${n.bulletActiveClass}${e}`))].map((e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),d.length>1)i.forEach((e=>{const i=Cf(e);i===o?e.classList.add(...n.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),n.dynamicBullets&&(i>=l&&i<=u&&e.classList.add(...`${n.bulletActiveClass}-main`.split(" ")),i===l&&c(e,"prev"),i===u&&c(e,"next"))}));else{const e=i[o];if(e&&e.classList.add(...n.bulletActiveClass.split(" ")),t.isElement&&i.forEach(((e,t)=>{e.setAttribute("part",t===o?"bullet-active":"bullet")})),n.dynamicBullets){const e=i[l],t=i[u];for(let e=l;e<=u;e+=1)i[e]&&i[e].classList.add(...`${n.bulletActiveClass}-main`.split(" "));c(e,"prev"),c(t,"next")}}if(n.dynamicBullets){const o=Math.min(i.length,n.dynamicMainBullets+4),a=(s*o-s)/2-p*s,r=e?"right":"left";i.forEach((e=>{e.style[t.isHorizontal()?r:"top"]=`${a}px`}))}}d.forEach(((e,a)=>{if("fraction"===n.type&&(e.querySelectorAll(Ef(n.currentClass)).forEach((e=>{e.textContent=n.formatFractionCurrent(o+1)})),e.querySelectorAll(Ef(n.totalClass)).forEach((e=>{e.textContent=n.formatFractionTotal(p)}))),"progressbar"===n.type){let i;i=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const a=(o+1)/p;let s=1,r=1;"horizontal"===i?s=a:r=a,e.querySelectorAll(Ef(n.progressbarFillClass)).forEach((e=>{e.style.transform=`translate3d(0,0,0) scaleX(${s}) scaleY(${r})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===n.type&&n.renderCustom?(Nf(e,n.renderCustom(t,o+1,p)),0===a&&i("paginationRender",e)):(0===a&&i("paginationRender",e),i("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](n.lockClass)}))}function p(){const e=t.params.pagination;if(l())return;const n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let o=t.pagination.el;o=Sf(o);let a="";if("bullets"===e.type){let o=t.params.loop?Math.ceil(n/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&o>n&&(o=n);for(let n=0;n<o;n+=1)e.renderBullet?a+=e.renderBullet.call(t,n,e.bulletClass):a+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(a=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(a=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],o.forEach((n=>{"custom"!==e.type&&Nf(n,a||""),"bullets"===e.type&&t.pagination.bullets.push(...n.querySelectorAll(Ef(e.bulletClass)))})),"custom"!==e.type&&i("paginationRender",o[0])}function h(){t.params.pagination=Lf(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let n;"string"==typeof e.el&&t.isElement&&(n=t.el.querySelector(e.el)),n||"string"!=typeof e.el||(n=[...document.querySelectorAll(e.el)]),n||(n=e.el),n&&0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(n)&&n.length>1&&(n=[...t.el.querySelectorAll(e.el)],n.length>1&&(n=n.find((e=>jf(e,".swiper")[0]===t.el)))),Array.isArray(n)&&1===n.length&&(n=n[0]),Object.assign(t.pagination,{el:n}),n=Sf(n),n.forEach((n=>{"bullets"===e.type&&e.clickable&&n.classList.add(...(e.clickableClass||"").split(" ")),n.classList.add(e.modifierClass+e.type),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(n.classList.add(`${e.modifierClass}${e.type}-dynamic`),r=0,
346 +e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.classList.add(e.progressbarOppositeClass),e.clickable&&n.addEventListener("click",d),t.enabled||n.classList.add(e.lockClass)})))}function g(){const e=t.params.pagination;if(l())return;let n=t.pagination.el;n&&(n=Sf(n),n.forEach((n=>{n.classList.remove(e.hiddenClass),n.classList.remove(e.modifierClass+e.type),n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(n.classList.remove(...(e.clickableClass||"").split(" ")),n.removeEventListener("click",d))}))),t.pagination.bullets&&t.pagination.bullets.forEach((t=>t.classList.remove(...e.bulletActiveClass.split(" "))))}o("changeDirection",(()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:n}=t.pagination;n=Sf(n),n.forEach((n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),o("init",(()=>{!1===t.params.pagination.enabled?m():(h(),p(),u())})),o("activeIndexChange",(()=>{void 0===t.snapIndex&&u()})),o("snapIndexChange",(()=>{u()})),o("snapGridLengthChange",(()=>{p(),u()})),o("destroy",(()=>{g()})),o("enable disable",(()=>{let{el:e}=t.pagination;e&&(e=Sf(e),e.forEach((e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),o("lock unlock",(()=>{u()})),o("click",((e,n)=>{const o=n.target,a=Sf(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&a&&a.length>0&&!o.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&o===t.navigation.nextEl||t.navigation.prevEl&&o===t.navigation.prevEl))return;const e=a[0].classList.contains(t.params.pagination.hiddenClass);i(!0===e?"paginationShow":"paginationHide"),a.forEach((e=>e.classList.toggle(t.params.pagination.hiddenClass)))}}));const m=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=Sf(e),e.forEach((e=>e.classList.add(t.params.pagination.paginationDisabledClass)))),g()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=Sf(e),e.forEach((e=>e.classList.remove(t.params.pagination.paginationDisabledClass)))),h(),p(),u()},disable:m,render:p,update:u,init:h,destroy:g})}function Bf(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const a=cf();let s,r,l,c,d=!1,u=null,p=null;function h(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:n}=t,{dragEl:o,el:i}=e,a=t.params.scrollbar,s=t.params.loop?t.progressLoop:t.progress;let c=r,d=(l-r)*s;n?(d=-d,d>0?(c=r-d,d=0):-d+r>l&&(c=l+d)):d<0?(c=r+d,d=0):d+r>l&&(c=l-d),t.isHorizontal()?(o.style.transform=`translate3d(${d}px, 0, 0)`,o.style.width=`${c}px`):(o.style.transform=`translate3d(0px, ${d}px, 0)`,o.style.height=`${c}px`),a.hide&&(clearTimeout(u),i.style.opacity=1,u=setTimeout((()=>{i.style.opacity=0,i.style.transitionDuration="400ms"}),1e3))}function g(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{dragEl:n,el:o}=e;n.style.width="",n.style.height="",l=t.isHorizontal()?o.offsetWidth:o.offsetHeight,c=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),r="auto"===t.params.scrollbar.dragSize?l*c:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?n.style.width=`${r}px`:n.style.height=`${r}px`,o.style.display=c>=1?"none":"",t.params.scrollbar.hide&&(o.style.opacity=0),t.params.watchOverflow&&t.enabled&&e.el.classList[t.isLocked?"add":"remove"](t.params.scrollbar.lockClass)}function m(e){return t.isHorizontal()?e.clientX:e.clientY}function b(e){const{scrollbar:n,rtlTranslate:o}=t,{el:i}=n;let a;a=(m(e)-function(e){const t=uf(),n=cf(),o=e.getBoundingClientRect(),i=n.body,a=e.clientTop||i.clientTop||0,s=e.clientLeft||i.clientLeft||0,r=e===t?t.scrollY:e.scrollTop,l=e===t?t.scrollX:e.scrollLeft;return{top:o.top+r-a,left:o.left+l-s}}(i)[t.isHorizontal()?"left":"top"]-(null!==s?s:r/2))/(l-r),a=Math.max(Math.min(a,1),0),o&&(a=1-a);const c=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*a;t.updateProgress(c),t.setTranslate(c),t.updateActiveIndex(),t.updateSlidesClasses()}function f(e){const n=t.params.scrollbar,{scrollbar:o,wrapperEl:a}=t,{el:r,dragEl:l}=o;d=!0,s=e.target===l?m(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),a.style.transitionDuration="100ms",l.style.transitionDuration="100ms",b(e),clearTimeout(p),r.style.transitionDuration="0ms",n.hide&&(r.style.opacity=1),t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="none"),i("scrollbarDragStart",e)}function x(e){const{scrollbar:n,wrapperEl:o}=t,{el:a,dragEl:s}=n;d&&(e.preventDefault&&e.cancelable?e.preventDefault():e.returnValue=!1,b(e),o.style.transitionDuration="0ms",a.style.transitionDuration="0ms",s.style.transitionDuration="0ms",i("scrollbarDragMove",e))}function y(e){const n=t.params.scrollbar,{scrollbar:o,wrapperEl:a}=t,{el:s}=o;d&&(d=!1,t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="",a.style.transitionDuration=""),n.hide&&(clearTimeout(p),p=hf((()=>{s.style.opacity=0,s.style.transitionDuration="400ms"}),1e3)),i("scrollbarDragEnd",e),n.snapOnRelease&&t.slideToClosest())}function v(e){const{scrollbar:n,params:o}=t,i=n.el;if(!i)return;const s=i,r=!!o.passiveListeners&&{passive:!1,capture:!1},l=!!o.passiveListeners&&{passive:!0,capture:!1};if(!s)return;const c="on"===e?"addEventListener":"removeEventListener";s[c]("pointerdown",f,r),a[c]("pointermove",x,r),a[c]("pointerup",y,l)}function k(){const{scrollbar:e,el:n}=t;t.params.scrollbar=Lf(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const o=t.params.scrollbar;if(!o.el)return;let i,s;if("string"==typeof o.el&&t.isElement&&(i=t.el.querySelector(o.el)),i||"string"!=typeof o.el)i||(i=o.el);else if(i=a.querySelectorAll(o.el),!i.length)return;t.params.uniqueNavElements&&"string"==typeof o.el&&i.length>1&&1===n.querySelectorAll(o.el).length&&(i=n.querySelector(o.el)),i.length>0&&(i=i[0]),i.classList.add(t.isHorizontal()?o.horizontalClass:o.verticalClass),i&&(s=i.querySelector(Ef(t.params.scrollbar.dragClass)),s||(s=wf("div",t.params.scrollbar.dragClass),i.append(s))),Object.assign(e,{el:i,dragEl:s}),o.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&v("on"),i&&i.classList[t.enabled?"remove":"add"](...pf(t.params.scrollbar.lockClass))}function w(){const e=t.params.scrollbar,n=t.scrollbar.el;n&&n.classList.remove(...pf(t.isHorizontal()?e.horizontalClass:e.verticalClass)),t.params.scrollbar.el&&t.scrollbar.el&&v("off")}n({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null},o("changeDirection",(()=>{if(!t.scrollbar||!t.scrollbar.el)return;const e=t.params.scrollbar;let{el:n}=t.scrollbar;n=Sf(n),n.forEach((n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),o("init",(()=>{!1===t.params.scrollbar.enabled?_():(k(),g(),h())})),o("update resize observerUpdate lock unlock changeDirection",(()=>{g()})),o("setTranslate",(()=>{h()})),o("setTransition",((e,n)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&(t.scrollbar.dragEl.style.transitionDuration=`${e}ms`)}(n)})),o("enable disable",(()=>{const{el:e}=t.scrollbar;e&&e.classList[t.enabled?"remove":"add"](...pf(t.params.scrollbar.lockClass))})),o("destroy",(()=>{w()}));const _=()=>{t.el.classList.add(...pf(t.params.scrollbar.scrollbarDisabledClass)),t.scrollbar.el&&t.scrollbar.el.classList.add(...pf(t.params.scrollbar.scrollbarDisabledClass)),w()};Object.assign(t.scrollbar,{enable:()=>{t.el.classList.remove(...pf(t.params.scrollbar.scrollbarDisabledClass)),
347 +t.scrollbar.el&&t.scrollbar.el.classList.remove(...pf(t.params.scrollbar.scrollbarDisabledClass)),k(),g(),h()},disable:_,updateSize:g,setTranslate:h,init:k,destroy:w})}function If(e){let{swiper:t,extendParams:n,on:o}=e;n({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,containerRole:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null,scrollOnFocus:!0}}),t.a11y={clicked:!1};let i,a,s=null,r=(new Date).getTime();function l(e){const t=s;0!==t.length&&Nf(t,e)}function c(e){(e=Sf(e)).forEach((e=>{e.setAttribute("tabIndex","0")}))}function d(e){(e=Sf(e)).forEach((e=>{e.setAttribute("tabIndex","-1")}))}function u(e,t){(e=Sf(e)).forEach((e=>{e.setAttribute("role",t)}))}function p(e,t){(e=Sf(e)).forEach((e=>{e.setAttribute("aria-roledescription",t)}))}function h(e,t){(e=Sf(e)).forEach((e=>{e.setAttribute("aria-label",t)}))}function g(e){(e=Sf(e)).forEach((e=>{e.setAttribute("aria-disabled",!0)}))}function m(e){(e=Sf(e)).forEach((e=>{e.setAttribute("aria-disabled",!1)}))}function b(e){if(13!==e.keyCode&&32!==e.keyCode)return;const n=t.params.a11y,o=e.target;if(!t.pagination||!t.pagination.el||o!==t.pagination.el&&!t.pagination.el.contains(e.target)||e.target.matches(Ef(t.params.pagination.bulletClass))){if(t.navigation&&t.navigation.prevEl&&t.navigation.nextEl){const e=Sf(t.navigation.prevEl);Sf(t.navigation.nextEl).includes(o)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?l(n.lastSlideMessage):l(n.nextSlideMessage)),e.includes(o)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?l(n.firstSlideMessage):l(n.prevSlideMessage))}t.pagination&&o.matches(Ef(t.params.pagination.bulletClass))&&o.click()}}function f(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function x(){return f()&&t.params.pagination.clickable}const y=(e,t,n)=>{c(e),"BUTTON"!==e.tagName&&(u(e,"button"),e.addEventListener("keydown",b)),h(e,n),function(e,t){(e=Sf(e)).forEach((e=>{e.setAttribute("aria-controls",t)}))}(e,t)},v=e=>{a&&a!==e.target&&!a.contains(e.target)&&(i=!0),t.a11y.clicked=!0},k=()=>{i=!1,requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.destroyed||(t.a11y.clicked=!1)}))}))},w=e=>{r=(new Date).getTime()},_=e=>{if(t.a11y.clicked||!t.params.a11y.scrollOnFocus)return;if((new Date).getTime()-r<100)return;const n=e.target.closest(`.${t.params.slideClass}, swiper-slide`);if(!n||!t.slides.includes(n))return;a=n;const o=t.slides.indexOf(n)===t.activeIndex,s=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(n);o||s||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,requestAnimationFrame((()=>{i||(t.params.loop?t.slideToLoop(t.getSlideIndexWhenGrid(parseInt(n.getAttribute("data-swiper-slide-index"))),0):t.slideTo(t.getSlideIndexWhenGrid(t.slides.indexOf(n)),0),i=!1)})))},C=()=>{const e=t.params.a11y;e.itemRoleDescriptionMessage&&p(t.slides,e.itemRoleDescriptionMessage),e.slideRole&&u(t.slides,e.slideRole);const n=t.slides.length;e.slideLabelMessage&&t.slides.forEach(((o,i)=>{const a=t.params.loop?parseInt(o.getAttribute("data-swiper-slide-index"),10):i;h(o,e.slideLabelMessage.replace(/\{\{index\}\}/,a+1).replace(/\{\{slidesLength\}\}/,n))}))};o("beforeInit",(()=>{s=wf("span",t.params.a11y.notificationClass),s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true")})),o("afterInit",(()=>{t.params.a11y.enabled&&(()=>{const e=t.params.a11y;t.el.append(s);const n=t.el;e.containerRoleDescriptionMessage&&p(n,e.containerRoleDescriptionMessage),e.containerMessage&&h(n,e.containerMessage),e.containerRole&&u(n,e.containerRole);const o=t.wrapperEl,i=e.id||o.getAttribute("id")||`swiper-wrapper-${a=16,void 0===a&&(a=16),"x".repeat(a).replace(/x/g,(()=>Math.round(16*Math.random()).toString(16)))}`;var a;const r=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var l;l=i,Sf(o).forEach((e=>{e.setAttribute("id",l)})),function(e,t){(e=Sf(e)).forEach((e=>{e.setAttribute("aria-live",t)}))}(o,r),C();let{nextEl:c,prevEl:d}=t.navigation?t.navigation:{};c=Sf(c),d=Sf(d),c&&c.forEach((t=>y(t,i,e.nextSlideMessage))),d&&d.forEach((t=>y(t,i,e.prevSlideMessage))),x()&&Sf(t.pagination.el).forEach((e=>{e.addEventListener("keydown",b)})),cf().addEventListener("visibilitychange",w),t.el.addEventListener("focus",_,!0),t.el.addEventListener("focus",_,!0),t.el.addEventListener("pointerdown",v,!0),t.el.addEventListener("pointerup",k,!0)})()})),o("slidesLengthChange snapGridLengthChange slidesGridLengthChange",(()=>{t.params.a11y.enabled&&C()})),o("fromEdge toEdge afterInit lock unlock",(()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{nextEl:e,prevEl:n}=t.navigation;n&&(t.isBeginning?(g(n),d(n)):(m(n),c(n))),e&&(t.isEnd?(g(e),d(e)):(m(e),c(e)))}()})),o("paginationUpdate",(()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;f()&&t.pagination.bullets.forEach((n=>{t.params.pagination.clickable&&(c(n),t.params.pagination.renderBullet||(u(n,"button"),h(n,e.paginationBulletMessage.replace(/\{\{index\}\}/,Cf(n)+1)))),n.matches(Ef(t.params.pagination.bulletActiveClass))?n.setAttribute("aria-current","true"):n.removeAttribute("aria-current")}))}()})),o("destroy",(()=>{t.params.a11y.enabled&&function(){s&&s.remove();let{nextEl:e,prevEl:n}=t.navigation?t.navigation:{};e=Sf(e),n=Sf(n),e&&e.forEach((e=>e.removeEventListener("keydown",b))),n&&n.forEach((e=>e.removeEventListener("keydown",b))),x()&&Sf(t.pagination.el).forEach((e=>{e.removeEventListener("keydown",b)})),cf().removeEventListener("visibilitychange",w),t.el&&"string"!=typeof t.el&&(t.el.removeEventListener("focus",_,!0),t.el.removeEventListener("pointerdown",v,!0),t.el.removeEventListener("pointerup",k,!0))}()}))}function Of(e){let t,n,{swiper:o,extendParams:i,on:a,emit:s,params:r}=e;o.autoplay={running:!1,paused:!1,timeLeft:0},i({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,c,d,u,p,h,g,m,b=r&&r.autoplay?r.autoplay.delay:3e3,f=r&&r.autoplay?r.autoplay.delay:3e3,x=(new Date).getTime();function y(e){o&&!o.destroyed&&o.wrapperEl&&e.target===o.wrapperEl&&(o.wrapperEl.removeEventListener("transitionend",y),m||e.detail&&e.detail.bySwiperTouchMove||j())}const v=()=>{if(o.destroyed||!o.autoplay.running)return;o.autoplay.paused?c=!0:c&&(f=l,c=!1);const e=o.autoplay.paused?l:x+f-(new Date).getTime();o.autoplay.timeLeft=e,s("autoplayTimeLeft",e,e/b),n=requestAnimationFrame((()=>{v()}))},k=e=>{if(o.destroyed||!o.autoplay.running)return;cancelAnimationFrame(n),v();let i=void 0===e?o.params.autoplay.delay:e;b=o.params.autoplay.delay,f=o.params.autoplay.delay;const a=(()=>{let e;if(e=o.virtual&&o.params.virtual.enabled?o.slides.find((e=>e.classList.contains("swiper-slide-active"))):o.slides[o.activeIndex],e)return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(a)&&a>0&&void 0===e&&(i=a,b=a,f=a),l=i;const r=o.params.speed,c=()=>{o&&!o.destroyed&&(o.params.autoplay.reverseDirection?!o.isBeginning||o.params.loop||o.params.rewind?(o.slidePrev(r,!0,!0),s("autoplay")):o.params.autoplay.stopOnLastSlide||(o.slideTo(o.slides.length-1,r,!0,!0),s("autoplay")):!o.isEnd||o.params.loop||o.params.rewind?(o.slideNext(r,!0,!0),s("autoplay")):o.params.autoplay.stopOnLastSlide||(o.slideTo(0,r,!0,!0),s("autoplay")),o.params.cssMode&&(x=(new Date).getTime(),requestAnimationFrame((()=>{k()}))))};return i>0?(clearTimeout(t),t=setTimeout((()=>{c()}),i)):requestAnimationFrame((()=>{c()})),i},w=()=>{x=(new Date).getTime(),o.autoplay.running=!0,k(),s("autoplayStart")},_=()=>{o.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(n),s("autoplayStop")
348 +},C=(e,n)=>{if(o.destroyed||!o.autoplay.running)return;clearTimeout(t),e||(g=!0);const i=()=>{s("autoplayPause"),o.params.autoplay.waitForTransition?o.wrapperEl.addEventListener("transitionend",y):j()};if(o.autoplay.paused=!0,n)return h&&(l=o.params.autoplay.delay),h=!1,void i();const a=l||o.params.autoplay.delay;l=a-((new Date).getTime()-x),o.isEnd&&l<0&&!o.params.loop||(l<0&&(l=0),i())},j=()=>{o.isEnd&&l<0&&!o.params.loop||o.destroyed||!o.autoplay.running||(x=(new Date).getTime(),g?(g=!1,k(l)):k(),o.autoplay.paused=!1,s("autoplayResume"))},$=()=>{if(o.destroyed||!o.autoplay.running)return;const e=cf();"hidden"===e.visibilityState&&(g=!0,C(!0)),"visible"===e.visibilityState&&j()},S=e=>{"mouse"===e.pointerType&&(g=!0,m=!0,o.animating||o.autoplay.paused||C(!0))},T=e=>{"mouse"===e.pointerType&&(m=!1,o.autoplay.paused&&j())};a("init",(()=>{o.params.autoplay.enabled&&(o.params.autoplay.pauseOnMouseEnter&&(o.el.addEventListener("pointerenter",S),o.el.addEventListener("pointerleave",T)),cf().addEventListener("visibilitychange",$),w())})),a("destroy",(()=>{o.el&&"string"!=typeof o.el&&(o.el.removeEventListener("pointerenter",S),o.el.removeEventListener("pointerleave",T)),cf().removeEventListener("visibilitychange",$),o.autoplay.running&&_()})),a("_freeModeStaticRelease",(()=>{(u||g)&&j()})),a("_freeModeNoMomentumRelease",(()=>{o.params.autoplay.disableOnInteraction?_():C(!0,!0)})),a("beforeTransitionStart",((e,t,n)=>{!o.destroyed&&o.autoplay.running&&(n||!o.params.autoplay.disableOnInteraction?C(!0,!0):_())})),a("sliderFirstMove",(()=>{!o.destroyed&&o.autoplay.running&&(o.params.autoplay.disableOnInteraction?_():(d=!0,u=!1,g=!1,p=setTimeout((()=>{g=!0,u=!0,C(!0)}),200)))})),a("touchEnd",(()=>{if(!o.destroyed&&o.autoplay.running&&d){if(clearTimeout(p),clearTimeout(t),o.params.autoplay.disableOnInteraction)return u=!1,void(d=!1);u&&o.params.cssMode&&j(),u=!1,d=!1}})),a("slideChange",(()=>{!o.destroyed&&o.autoplay.running&&(h=!0)})),Object.assign(o.autoplay,{start:w,stop:_,pause:C,resume:j})}function Rf(e){const{effect:t,swiper:n,on:o,setTranslate:i,setTransition:a,overwriteParams:s,perspective:r,recreateShadows:l,getEffectParams:c}=e;let d;o("beforeInit",(()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),r&&r()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const e=s?s():{};Object.assign(n.params,e),Object.assign(n.originalParams,e)})),o("setTranslate _virtualUpdated",(()=>{n.params.effect===t&&i()})),o("setTransition",((e,o)=>{n.params.effect===t&&a(o)})),o("transitionEnd",(()=>{if(n.params.effect===t&&l){if(!c||!c().slideShadows)return;n.slides.forEach((e=>{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=>e.remove()))})),l()}})),o("virtualUpdate",(()=>{n.params.effect===t&&(n.slides.length||(d=!0),requestAnimationFrame((()=>{d&&n.slides&&n.slides.length&&(i(),d=!1)})))}))}function zf(e,t){const n=yf(t);return n!==t&&(n.style.backfaceVisibility="hidden",n.style["-webkit-backface-visibility"]="hidden"),n}function Df(e){let{swiper:t,duration:n,transformElements:o,allSlides:i}=e;const{activeIndex:a}=t;if(t.params.virtualTranslate&&0!==n){let e,n=!1;e=i?o:o.filter((e=>{const n=e.classList.contains("swiper-slide-transform")?(e=>e.parentElement?e.parentElement:t.slides.find((t=>t.shadowRoot&&t.shadowRoot===e.parentNode)))(e):e;return t.getSlideIndex(n)===a})),e.forEach((e=>{!function(e,t){t&&e.addEventListener("transitionend",(function n(o){o.target===e&&(t.call(e,o),e.removeEventListener("transitionend",n))}))}(e,(()=>{if(n)return;if(!t||t.destroyed)return;n=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)}))}))}}function Ff(e){let{swiper:t,extendParams:n,on:o}=e;n({fadeEffect:{crossFade:!1}}),Rf({effect:"fade",swiper:t,on:o,setTranslate:()=>{const{slides:e}=t;t.params.fadeEffect;for(let n=0;n<e.length;n+=1){const e=t.slides[n];let o=-e.swiperSlideOffset;t.params.virtualTranslate||(o-=t.translate);let i=0;t.isHorizontal()||(i=o,o=0);const a=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e.progress),0):1+Math.min(Math.max(e.progress,-1),0),s=zf(0,e);s.style.opacity=a,s.style.transform=`translate3d(${o}px, ${i}px, 0px)`}},setTransition:e=>{const n=t.slides.map((e=>yf(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`})),Df({swiper:t,duration:e,transformElements:n,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}function Hf(e){let{swiper:t,extendParams:n,on:o}=e;n({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(e,t,n)=>{let o=n?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=n?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");o||(o=wf("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(n?"left":"top")).split(" ")),e.append(o)),i||(i=wf("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(n?"right":"bottom")).split(" ")),e.append(i)),o&&(o.style.opacity=Math.max(-t,0)),i&&(i.style.opacity=Math.max(t,0))};Rf({effect:"cube",swiper:t,on:o,setTranslate:()=>{const{el:e,wrapperEl:n,slides:o,width:a,height:s,rtlTranslate:r,size:l,browser:c}=t,d=Tf(t),u=t.params.cubeEffect,p=t.isHorizontal(),h=t.virtual&&t.params.virtual.enabled;let g,m=0;u.shadow&&(p?(g=t.wrapperEl.querySelector(".swiper-cube-shadow"),g||(g=wf("div","swiper-cube-shadow"),t.wrapperEl.append(g)),g.style.height=`${a}px`):(g=e.querySelector(".swiper-cube-shadow"),g||(g=wf("div","swiper-cube-shadow"),e.append(g))));for(let e=0;e<o.length;e+=1){const t=o[e];let n=e;h&&(n=parseInt(t.getAttribute("data-swiper-slide-index"),10));let a=90*n,s=Math.floor(a/360);r&&(a=-a,s=Math.floor(-a/360));const c=Math.max(Math.min(t.progress,1),-1);let g=0,b=0,f=0;n%4==0?(g=4*-s*l,f=0):(n-1)%4==0?(g=0,f=4*-s*l):(n-2)%4==0?(g=l+4*s*l,f=l):(n-3)%4==0&&(g=-l,f=3*l+4*l*s),r&&(g=-g),p||(b=g,g=0);const x=`rotateX(${d(p?0:-a)}deg) rotateY(${d(p?a:0)}deg) translate3d(${g}px, ${b}px, ${f}px)`;c<=1&&c>-1&&(m=90*n+90*c,r&&(m=90*-n-90*c)),t.style.transform=x,u.slideShadows&&i(t,c,p)}if(n.style.transformOrigin=`50% 50% -${l/2}px`,n.style["-webkit-transform-origin"]=`50% 50% -${l/2}px`,u.shadow)if(p)g.style.transform=`translate3d(0px, ${a/2+u.shadowOffset}px, ${-a/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${u.shadowScale})`;else{const e=Math.abs(m)-90*Math.floor(Math.abs(m)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),n=u.shadowScale,o=u.shadowScale/t,i=u.shadowOffset;g.style.transform=`scale3d(${n}, 1, ${o}) translate3d(0px, ${s/2+i}px, ${-s/2/o}px) rotateX(-89.99deg)`}const b=(c.isSafari||c.isWebView)&&c.needPerspectiveFix?-l/2:0;n.style.transform=`translate3d(0px,0,${b}px) rotateX(${d(t.isHorizontal()?0:m)}deg) rotateY(${d(t.isHorizontal()?-m:0)}deg)`,n.style.setProperty("--swiper-cube-translate-z",`${b}px`)},setTransition:e=>{const{el:n,slides:o}=t;if(o.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),t.params.cubeEffect.shadow&&!t.isHorizontal()){const t=n.querySelector(".swiper-cube-shadow");t&&(t.style.transitionDuration=`${e}ms`)}},recreateShadows:()=>{const e=t.isHorizontal();t.slides.forEach((t=>{const n=Math.max(Math.min(t.progress,1),-1);i(t,n,e)}))},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}function Wf(e,t,n){const o=`swiper-slide-shadow${n?`-${n}`:""}${e?` swiper-slide-shadow-${e}`:""}`,i=yf(t);let a=i.querySelector(`.${o.split(" ").join(".")}`);return a||(a=wf("div",o.split(" ")),i.append(a)),a}
349 +function Uf(e){let{swiper:t,extendParams:n,on:o}=e;n({flipEffect:{slideShadows:!0,limitRotation:!0}});const i=(e,n)=>{let o=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");o||(o=Wf("flip",e,t.isHorizontal()?"left":"top")),i||(i=Wf("flip",e,t.isHorizontal()?"right":"bottom")),o&&(o.style.opacity=Math.max(-n,0)),i&&(i.style.opacity=Math.max(n,0))};Rf({effect:"flip",swiper:t,on:o,setTranslate:()=>{const{slides:e,rtlTranslate:n}=t,o=t.params.flipEffect,a=Tf(t);for(let s=0;s<e.length;s+=1){const r=e[s];let l=r.progress;t.params.flipEffect.limitRotation&&(l=Math.max(Math.min(r.progress,1),-1));const c=r.swiperSlideOffset;let d=-180*l,u=0,p=t.params.cssMode?-c-t.translate:-c,h=0;t.isHorizontal()?n&&(d=-d):(h=p,p=0,u=-d,d=0),r.style.zIndex=-Math.abs(Math.round(l))+e.length,o.slideShadows&&i(r,l);const g=`translate3d(${p}px, ${h}px, 0px) rotateX(${a(u)}deg) rotateY(${a(d)}deg)`;zf(0,r).style.transform=g}},setTransition:e=>{const n=t.slides.map((e=>yf(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Df({swiper:t,duration:e,transformElements:n})},recreateShadows:()=>{t.params.flipEffect,t.slides.forEach((e=>{let n=e.progress;t.params.flipEffect.limitRotation&&(n=Math.max(Math.min(e.progress,1),-1)),i(e,n)}))},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})}function Gf(e){let{swiper:t,extendParams:n,on:o}=e;n({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),Rf({effect:"coverflow",swiper:t,on:o,setTranslate:()=>{const{width:e,height:n,slides:o,slidesSizesGrid:i}=t,a=t.params.coverflowEffect,s=t.isHorizontal(),r=t.translate,l=s?e/2-r:n/2-r,c=s?a.rotate:-a.rotate,d=a.depth,u=Tf(t);for(let e=0,t=o.length;e<t;e+=1){const t=o[e],n=i[e],r=(l-t.swiperSlideOffset-n/2)/n,p="function"==typeof a.modifier?a.modifier(r):r*a.modifier;let h=s?c*p:0,g=s?0:c*p,m=-d*Math.abs(p),b=a.stretch;"string"==typeof b&&-1!==b.indexOf("%")&&(b=parseFloat(a.stretch)/100*n);let f=s?0:b*p,x=s?b*p:0,y=1-(1-a.scale)*Math.abs(p);Math.abs(x)<.001&&(x=0),Math.abs(f)<.001&&(f=0),Math.abs(m)<.001&&(m=0),Math.abs(h)<.001&&(h=0),Math.abs(g)<.001&&(g=0),Math.abs(y)<.001&&(y=0);const v=`translate3d(${x}px,${f}px,${m}px) rotateX(${u(g)}deg) rotateY(${u(h)}deg) scale(${y})`;if(zf(0,t).style.transform=v,t.style.zIndex=1-Math.abs(Math.round(p)),a.slideShadows){let e=s?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),n=s?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=Wf("coverflow",t,s?"left":"top")),n||(n=Wf("coverflow",t,s?"right":"bottom")),e&&(e.style.opacity=p>0?p:0),n&&(n.style.opacity=-p>0?-p:0)}}},setTransition:e=>{t.slides.map((e=>yf(e))).forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=>{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}function Vf(e){let{swiper:t,extendParams:n,on:o}=e;n({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const i=e=>"string"==typeof e?e:`${e}px`;Rf({effect:"creative",swiper:t,on:o,setTranslate:()=>{const{slides:e,wrapperEl:n,slidesSizesGrid:o}=t,a=t.params.creativeEffect,{progressMultiplier:s}=a,r=t.params.centeredSlides,l=Tf(t);if(r){const e=o[0]/2-t.params.slidesOffsetBefore||0;n.style.transform=`translateX(calc(50% - ${e}px))`}for(let n=0;n<e.length;n+=1){const o=e[n],c=o.progress,d=Math.min(Math.max(o.progress,-a.limitProgress),a.limitProgress);let u=d;r||(u=Math.min(Math.max(o.originalProgress,-a.limitProgress),a.limitProgress));const p=o.swiperSlideOffset,h=[t.params.cssMode?-p-t.translate:-p,0,0],g=[0,0,0];let m=!1;t.isHorizontal()||(h[1]=h[0],h[0]=0);let b={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};d<0?(b=a.next,m=!0):d>0&&(b=a.prev,m=!0),h.forEach(((e,t)=>{h[t]=`calc(${e}px + (${i(b.translate[t])} * ${Math.abs(d*s)}))`})),g.forEach(((e,t)=>{let n=b.rotate[t]*Math.abs(d*s);g[t]=n})),o.style.zIndex=-Math.abs(Math.round(c))+e.length;const f=h.join(", "),x=`rotateX(${l(g[0])}deg) rotateY(${l(g[1])}deg) rotateZ(${l(g[2])}deg)`,y=u<0?`scale(${1+(1-b.scale)*u*s})`:`scale(${1-(1-b.scale)*u*s})`,v=u<0?1+(1-b.opacity)*u*s:1-(1-b.opacity)*u*s,k=`translate3d(${f}) ${x} ${y}`;if(m&&b.shadow||!m){let e=o.querySelector(".swiper-slide-shadow");if(!e&&b.shadow&&(e=Wf("creative",o)),e){const t=a.shadowPerProgress?d*(1/a.limitProgress):d;e.style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const w=zf(0,o);w.style.transform=k,w.style.opacity=v,b.origin&&(w.style.transformOrigin=b.origin)}},setTransition:e=>{const n=t.slides.map((e=>yf(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Df({swiper:t,duration:e,transformElements:n,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}function qf(e){let{swiper:t,extendParams:n,on:o}=e;n({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),Rf({effect:"cards",swiper:t,on:o,setTranslate:()=>{const{slides:e,activeIndex:n,rtlTranslate:o}=t,i=t.params.cardsEffect,{startTranslate:a,isTouched:s}=t.touchEventsData,r=o?-t.translate:t.translate;for(let l=0;l<e.length;l+=1){const c=e[l],d=c.progress,u=Math.min(Math.max(d,-4),4);let p=c.swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&(t.wrapperEl.style.transform=`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(p-=e[0].swiperSlideOffset);let h=t.params.cssMode?-p-t.translate:-p,g=0;const m=-100*Math.abs(u);let b=1,f=-i.perSlideRotate*u,x=i.perSlideOffset-.75*Math.abs(u);const y=t.virtual&&t.params.virtual.enabled?t.virtual.from+l:l,v=(y===n||y===n-1)&&u>0&&u<1&&(s||t.params.cssMode)&&r<a,k=(y===n||y===n+1)&&u<0&&u>-1&&(s||t.params.cssMode)&&r>a;if(v||k){const e=(1-Math.abs((Math.abs(u)-.5)/.5))**.5;f+=-28*u*e,b+=-.5*e,x+=96*e,g=-25*e*Math.abs(u)+"%"}if(h=u<0?`calc(${h}px ${o?"-":"+"} (${x*Math.abs(u)}%))`:u>0?`calc(${h}px ${o?"-":"+"} (-${x*Math.abs(u)}%))`:`${h}px`,!t.isHorizontal()){const e=g;g=h,h=e}const w=u<0?""+(1+(1-b)*u):""+(1-(1-b)*u),_=`\n translate3d(${h}, ${g}, ${m}px)\n rotateZ(${i.rotate?o?-f:f:0}deg)\n scale(${w})\n `;if(i.slideShadows){let e=c.querySelector(".swiper-slide-shadow");e||(e=Wf("cards",c)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(u)-.5)/.5,0),1))}c.style.zIndex=-Math.abs(Math.round(d))+e.length,zf(0,c).style.transform=_}},setTransition:e=>{const n=t.slides.map((e=>yf(e)));n.forEach((t=>{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=>{t.style.transitionDuration=`${e}ms`}))})),Df({swiper:t,duration:e,transformElements:n})},perspective:()=>!0,overwriteParams:()=>({_loopSwapReset:!1,watchSlidesProgress:!0,loopAdditionalSlides:t.params.cardsEffect.rotate?3:2,centeredSlides:!0,virtualTranslate:!t.params.cssMode})})}let Yf,Kf,Qf;function Zf(){return Yf||(Yf=function(){const e=uf(),t=cf();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),Yf}function Xf(e){return void 0===e&&(e={}),Kf||(Kf=function(e){
350 +let{userAgent:t}=void 0===e?{}:e;const n=Zf(),o=uf(),i=o.navigator.platform,a=t||o.navigator.userAgent,s={ios:!1,android:!1},r=o.screen.width,l=o.screen.height,c=a.match(/(Android);?[\s\/]+([\d.]+)?/);let d=a.match(/(iPad).*OS\s([\d_]+)/);const u=a.match(/(iPod)(.*OS\s([\d_]+))?/),p=!d&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i;let g="MacIntel"===i;return!d&&g&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${r}x${l}`)>=0&&(d=a.match(/(Version)\/([\d.]+)/),d||(d=[0,1,"13_0_0"]),g=!1),c&&!h&&(s.os="android",s.android=!0),(d||p||u)&&(s.os="ios",s.ios=!0),s}(e)),Kf}function Jf(){return Qf||(Qf=function(){const e=uf(),t=Xf();let n=!1;function o(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(o()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,o]=t.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));n=e<16||16===e&&o<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),a=o();return{isSafari:n||a,needPerspectiveFix:n,need3dFix:a||i&&t.ios,isWebView:i}}()),Qf}var ex={on(e,t,n){const o=this;if(!o.eventsListeners||o.destroyed)return o;if("function"!=typeof t)return o;const i=n?"unshift":"push";return e.split(" ").forEach((e=>{o.eventsListeners[e]||(o.eventsListeners[e]=[]),o.eventsListeners[e][i](t)})),o},once(e,t,n){const o=this;if(!o.eventsListeners||o.destroyed)return o;if("function"!=typeof t)return o;function i(){o.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];t.apply(o,a)}return i.__emitterProxy=t,o.on(e,i,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const o=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[o](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach(((o,i)=>{(o===t||o.__emitterProxy&&o.__emitterProxy===t)&&n.eventsListeners[e].splice(i,1)}))})),n):n},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,n,o;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return"string"==typeof a[0]||Array.isArray(a[0])?(t=a[0],n=a.slice(1,a.length),o=e):(t=a[0].events,n=a[0].data,o=a[0].context||e),n.unshift(o),(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(o,[t,...n])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(o,n)}))})),e}};const tx=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)},nx=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)},ox=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{n.shadowRoot&&(t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},ix=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},ax=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const o="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const n=i,a=[n-t];return a.push(...Array.from({length:t}).map(((e,t)=>n+o+t))),void e.slides.forEach(((t,n)=>{a.includes(t.column)&&ix(e,n)}))}const a=i+o-1;if(e.params.rewind||e.params.loop)for(let o=i-t;o<=a+t;o+=1){const t=(o%n+n)%n;(t<i||t>a)&&ix(e,t)}else for(let o=Math.max(i-t,0);o<=Math.min(a+t,n-1);o+=1)o!==i&&(o>a||o<i)&&ix(e,o)};var sx={updateSize:function(){const e=this;let t,n;const o=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:o.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:o.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(_f(o,"padding-left")||0,10)-parseInt(_f(o,"padding-right")||0,10),n=n-parseInt(_f(o,"padding-top")||0,10)-parseInt(_f(o,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||0)}const n=e.params,{wrapperEl:o,slidesEl:i,size:a,rtlTranslate:s,wrongRTL:r}=e,l=e.virtual&&n.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,d=vf(i,`.${e.params.slideClass}, swiper-slide`),u=l?e.virtual.slides.length:d.length;let p=[];const h=[],g=[];let m=n.slidesOffsetBefore;"function"==typeof m&&(m=n.slidesOffsetBefore.call(e));let b=n.slidesOffsetAfter;"function"==typeof b&&(b=n.slidesOffsetAfter.call(e));const f=e.snapGrid.length,x=e.slidesGrid.length;let y=n.spaceBetween,v=-m,k=0,w=0;if(void 0===a)return;"string"==typeof y&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*a:"string"==typeof y&&(y=parseFloat(y)),e.virtualSize=-y,d.forEach((e=>{s?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),n.centeredSlides&&n.cssMode&&(ff(o,"--swiper-centered-offset-before",""),ff(o,"--swiper-centered-offset-after",""));const _=n.grid&&n.grid.rows>1&&e.grid;let C;_?e.grid.initSlides(d):e.grid&&e.grid.unsetSlides();const j="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter((e=>void 0!==n.breakpoints[e].slidesPerView)).length>0;for(let o=0;o<u;o+=1){let i;if(C=0,d[o]&&(i=d[o]),_&&e.grid.updateSlide(o,i,d),!d[o]||"none"!==_f(i,"display")){if("auto"===n.slidesPerView){j&&(d[o].style[e.getDirectionLabel("width")]="");const a=getComputedStyle(i),s=i.style.transform,r=i.style.webkitTransform;if(s&&(i.style.transform="none"),r&&(i.style.webkitTransform="none"),n.roundLengths)C=e.isHorizontal()?$f(i,"width",!0):$f(i,"height",!0);else{const e=t(a,"width"),n=t(a,"padding-left"),o=t(a,"padding-right"),s=t(a,"margin-left"),r=t(a,"margin-right"),l=a.getPropertyValue("box-sizing");if(l&&"border-box"===l)C=e+s+r;else{const{clientWidth:t,offsetWidth:a}=i;C=e+n+o+s+r+(a-t)}}s&&(i.style.transform=s),r&&(i.style.webkitTransform=r),n.roundLengths&&(C=Math.floor(C))}else C=(a-(n.slidesPerView-1)*y)/n.slidesPerView,n.roundLengths&&(C=Math.floor(C)),d[o]&&(d[o].style[e.getDirectionLabel("width")]=`${C}px`);d[o]&&(d[o].swiperSlideSize=C),g.push(C),n.centeredSlides?(v=v+C/2+k/2+y,0===k&&0!==o&&(v=v-a/2-y),0===o&&(v=v-a/2-y),Math.abs(v)<.001&&(v=0),n.roundLengths&&(v=Math.floor(v)),w%n.slidesPerGroup==0&&p.push(v),h.push(v)):(n.roundLengths&&(v=Math.floor(v)),(w-Math.min(e.params.slidesPerGroupSkip,w))%e.params.slidesPerGroup==0&&p.push(v),h.push(v),v=v+C+y),e.virtualSize+=C+y,k=C,w+=1}}if(e.virtualSize=Math.max(e.virtualSize,a)+b,s&&r&&("slide"===n.effect||"coverflow"===n.effect)&&(o.style.width=`${e.virtualSize+y}px`),n.setWrapperSize&&(o.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),_&&e.grid.updateWrapperSize(C,p),!n.centeredSlides){const t=[];for(let o=0;o<p.length;o+=1){let i=p[o];n.roundLengths&&(i=Math.floor(i)),p[o]<=e.virtualSize-a&&t.push(i)}p=t,Math.floor(e.virtualSize-a)-Math.floor(p[p.length-1])>1&&p.push(e.virtualSize-a)}if(l&&n.loop){const t=g[0]+y
351 +;if(n.slidesPerGroup>1){const o=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),i=t*n.slidesPerGroup;for(let e=0;e<o;e+=1)p.push(p[p.length-1]+i)}for(let o=0;o<e.virtual.slidesBefore+e.virtual.slidesAfter;o+=1)1===n.slidesPerGroup&&p.push(p[p.length-1]+t),h.push(h[h.length-1]+t),e.virtualSize+=t}if(0===p.length&&(p=[0]),0!==y){const t=e.isHorizontal()&&s?"marginLeft":e.getDirectionLabel("marginRight");d.filter(((e,t)=>!(n.cssMode&&!n.loop)||t!==d.length-1)).forEach((e=>{e.style[t]=`${y}px`}))}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;g.forEach((t=>{e+=t+(y||0)})),e-=y;const t=e>a?e-a:0;p=p.map((e=>e<=0?-m:e>t?t+b:e))}if(n.centerInsufficientSlides){let e=0;g.forEach((t=>{e+=t+(y||0)})),e-=y;const t=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(e+t<a){const n=(a-e-t)/2;p.forEach(((e,t)=>{p[t]=e-n})),h.forEach(((e,t)=>{h[t]=e+n}))}}if(Object.assign(e,{slides:d,snapGrid:p,slidesGrid:h,slidesSizesGrid:g}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){ff(o,"--swiper-centered-offset-before",-p[0]+"px"),ff(o,"--swiper-centered-offset-after",e.size/2-g[g.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+n))}if(u!==c&&e.emit("slidesLengthChange"),p.length!==f&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==x&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,o=e.el.classList.contains(t);u<=n.maxBackfaceHiddenSlides?o||e.el.classList.add(t):o&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],o=t.virtual&&t.params.virtual.enabled;let i,a=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const s=e=>o?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{n.push(e)}));else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e>t.slides.length&&!o)break;n.push(s(e))}else n.push(s(t.activeIndex));for(i=0;i<n.length;i+=1)if(void 0!==n[i]){const e=n[i].offsetHeight;a=e>a?e:a}(a||0===a)&&(t.wrapperEl.style.height=`${a}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let o=0;o<t.length;o+=1)t[o].swiperSlideOffset=(e.isHorizontal()?t[o].offsetLeft:t[o].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:o,rtlTranslate:i,snapGrid:a}=t;if(0===o.length)return;void 0===o[0].swiperSlideOffset&&t.updateSlidesOffset();let s=-e;i&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let r=n.spaceBetween;"string"==typeof r&&r.indexOf("%")>=0?r=parseFloat(r.replace("%",""))/100*t.size:"string"==typeof r&&(r=parseFloat(r));for(let e=0;e<o.length;e+=1){const l=o[e];let c=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(c-=o[0].swiperSlideOffset);const d=(s+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+r),u=(s-a[0]+(n.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+r),p=-(s-c),h=p+t.slidesSizesGrid[e],g=p>=0&&p<=t.size-t.slidesSizesGrid[e],m=p>=0&&p<t.size-1||h>1&&h<=t.size||p<=0&&h>=t.size;m&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),tx(l,m,n.slideVisibleClass),tx(l,g,n.slideFullyVisibleClass),l.progress=i?-d:d,l.originalProgress=i?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,o=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:a,isEnd:s,progressLoop:r}=t;const l=a,c=s;if(0===o)i=0,a=!0,s=!0;else{i=(e-t.minTranslate())/o;const n=Math.abs(e-t.minTranslate())<1,r=Math.abs(e-t.maxTranslate())<1;a=n||i<=0,s=r||i>=1,n&&(i=0),r&&(i=1)}if(n.loop){const n=t.getSlideIndexByData(0),o=t.getSlideIndexByData(t.slides.length-1),i=t.slidesGrid[n],a=t.slidesGrid[o],s=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);r=l>=i?(l-i)/s:(l+s-a)/s,r>1&&(r-=1)}Object.assign(t,{progress:i,progressLoop:r,isBeginning:a,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),a&&!l&&t.emit("reachBeginning toEdge"),s&&!c&&t.emit("reachEnd toEdge"),(l&&!a||c&&!s)&&t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:o,activeIndex:i}=e,a=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,r=e=>vf(o,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let l,c,d;if(a)if(n.loop){let t=i-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=r(`[data-swiper-slide-index="${t}"]`)}else l=r(`[data-swiper-slide-index="${i}"]`);else s?(l=t.find((e=>e.column===i)),d=t.find((e=>e.column===i+1)),c=t.find((e=>e.column===i-1))):l=t[i];l&&(s||(d=function(e,t){const n=[];for(;e.nextElementSibling;){const o=e.nextElementSibling;t?o.matches(t)&&n.push(o):n.push(o),e=o}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!d&&(d=t[0]),c=function(e,t){const n=[];for(;e.previousElementSibling;){const o=e.previousElementSibling;t?o.matches(t)&&n.push(o):n.push(o),e=o}return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&0===!c&&(c=t[t.length-1]))),t.forEach((e=>{nx(e,e===l,n.slideActiveClass),nx(e,e===d,n.slideNextClass),nx(e,e===c,n.slidePrevClass)})),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:o,params:i,activeIndex:a,realIndex:s,snapIndex:r}=t;let l,c=e;const d=e=>{let n=e-t.virtual.slidesBefore;return n<0&&(n=t.virtual.slides.length+n),n>=t.virtual.slides.length&&(n-=t.virtual.slides.length),n};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:n}=e,o=e.rtlTranslate?e.translate:-e.translate;let i;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?o>=t[e]&&o<t[e+1]-(t[e+1]-t[e])/2?i=e:o>=t[e]&&o<t[e+1]&&(i=e+1):o>=t[e]&&(i=e);return n.normalizeSlideIndex&&(i<0||void 0===i)&&(i=0),i}(t)),o.indexOf(n)>=0)l=o.indexOf(n);else{const e=Math.min(i.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/i.slidesPerGroup)}if(l>=o.length&&(l=o.length-1),c===a&&!t.params.loop)return void(l!==r&&(t.snapIndex=l,t.emit("snapIndexChange")));if(c===a&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=d(c));const u=t.grid&&i.grid&&i.grid.rows>1;let p;if(t.virtual&&i.virtual.enabled&&i.loop)p=d(c);else if(u){const e=t.slides.find((e=>e.column===c));let n=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(n)&&(n=Math.max(t.slides.indexOf(e),0)),p=Math.floor(n/i.grid.rows)}else if(t.slides[c]){const e=t.slides[c].getAttribute("data-swiper-slide-index");p=e?parseInt(e,10):c}else p=c;Object.assign(t,{previousSnapIndex:r,snapIndex:l,previousRealIndex:s,realIndex:p,previousIndex:a,activeIndex:c}),t.initialized&&ax(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==p&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const n=this,o=n.params;let i=e.closest(`.${o.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!i&&e.matches&&e.matches(`.${o.slideClass}, swiper-slide`)&&(i=e)}));let a,s=!1;if(i)for(let e=0;e<n.slides.length;e+=1)if(n.slides[e]===i){s=!0,a=e;break}if(!i||!s)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=i,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(i.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=a,o.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}},rx={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y")
352 +;const{params:t,rtlTranslate:n,translate:o,wrapperEl:i}=this;if(t.virtualTranslate)return n?-o:o;if(t.cssMode)return o;let a=function(e,t){void 0===t&&(t="x");const n=uf();let o,i,a;const s=function(e){const t=uf();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map((e=>e.replace(",","."))).join(", ")),a=new n.WebKitCSSMatrix("none"===i?"":i)):(a=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),o=a.toString().split(",")),"x"===t&&(i=n.WebKitCSSMatrix?a.m41:16===o.length?parseFloat(o[12]):parseFloat(o[4])),"y"===t&&(i=n.WebKitCSSMatrix?a.m42:16===o.length?parseFloat(o[13]):parseFloat(o[5])),i||0}(i,e);return a+=this.cssOverflowAdjustment(),n&&(a=-a),a||0},setTranslate:function(e,t){const n=this,{rtlTranslate:o,params:i,wrapperEl:a,progress:s}=n;let r,l=0,c=0;n.isHorizontal()?l=o?-e:e:c=e,i.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:c,i.cssMode?a[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-c:i.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():c-=n.cssOverflowAdjustment(),a.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const d=n.maxTranslate()-n.minTranslate();r=0===d?0:(e-n.minTranslate())/d,r!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,o,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===o&&(o=!0);const a=this,{params:s,wrapperEl:r}=a;if(a.animating&&s.preventInteractionOnTransition)return!1;const l=a.minTranslate(),c=a.maxTranslate();let d;if(d=o&&e>l?l:o&&e<c?c:e,a.updateProgress(d),s.cssMode){const e=a.isHorizontal();if(0===t)r[e?"scrollLeft":"scrollTop"]=-d;else{if(!a.support.smoothScroll)return xf({swiper:a,targetPosition:-d,side:e?"left":"top"}),!0;r.scrollTo({[e?"left":"top"]:-d,behavior:"smooth"})}return!0}return 0===t?(a.setTransition(0),a.setTranslate(d),n&&(a.emit("beforeTransitionStart",t,i),a.emit("transitionEnd"))):(a.setTransition(t),a.setTranslate(d),n&&(a.emit("beforeTransitionStart",t,i),a.emit("transitionStart")),a.animating||(a.animating=!0,a.onTranslateToWrapperTransitionEnd||(a.onTranslateToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.wrapperEl.removeEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.onTranslateToWrapperTransitionEnd=null,delete a.onTranslateToWrapperTransitionEnd,a.animating=!1,n&&a.emit("transitionEnd"))}),a.wrapperEl.addEventListener("transitionend",a.onTranslateToWrapperTransitionEnd))),!0}};function lx(e){let{swiper:t,runCallbacks:n,direction:o,step:i}=e;const{activeIndex:a,previousIndex:s}=t;let r=o;r||(r=a>s?"next":a<s?"prev":"reset"),t.emit(`transition${i}`),n&&"reset"===r?t.emit(`slideResetTransition${i}`):n&&a!==s&&(t.emit(`slideChangeTransition${i}`),"next"===r?t.emit(`slideNextTransition${i}`):t.emit(`slidePrevTransition${i}`))}var cx={slideTo:function(e,t,n,o,i){void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const a=this;let s=e;s<0&&(s=0);const{params:r,snapGrid:l,slidesGrid:c,previousIndex:d,activeIndex:u,rtlTranslate:p,wrapperEl:h,enabled:g}=a;if(!g&&!o&&!i||a.destroyed||a.animating&&r.preventInteractionOnTransition)return!1;void 0===t&&(t=a.params.speed);const m=Math.min(a.params.slidesPerGroupSkip,s);let b=m+Math.floor((s-m)/a.params.slidesPerGroup);b>=l.length&&(b=l.length-1);const f=-l[b];if(r.normalizeSlideIndex)for(let e=0;e<c.length;e+=1){const t=-Math.floor(100*f),n=Math.floor(100*c[e]),o=Math.floor(100*c[e+1]);void 0!==c[e+1]?t>=n&&t<o-(o-n)/2?s=e:t>=n&&t<o&&(s=e+1):t>=n&&(s=e)}if(a.initialized&&s!==u){if(!a.allowSlideNext&&(p?f>a.translate&&f>a.minTranslate():f<a.translate&&f<a.minTranslate()))return!1;if(!a.allowSlidePrev&&f>a.translate&&f>a.maxTranslate()&&(u||0)!==s)return!1}let x;s!==(d||0)&&n&&a.emit("beforeSlideChangeStart"),a.updateProgress(f),x=s>u?"next":s<u?"prev":"reset";const y=a.virtual&&a.params.virtual.enabled;if((!y||!i)&&(p&&-f===a.translate||!p&&f===a.translate))return a.updateActiveIndex(s),r.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),"slide"!==r.effect&&a.setTranslate(f),"reset"!==x&&(a.transitionStart(n,x),a.transitionEnd(n,x)),!1;if(r.cssMode){const e=a.isHorizontal(),n=p?f:-f;if(0===t)y&&(a.wrapperEl.style.scrollSnapType="none",a._immediateVirtual=!0),y&&!a._cssModeVirtualInitialSet&&a.params.initialSlide>0?(a._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{h[e?"scrollLeft":"scrollTop"]=n}))):h[e?"scrollLeft":"scrollTop"]=n,y&&requestAnimationFrame((()=>{a.wrapperEl.style.scrollSnapType="",a._immediateVirtual=!1}));else{if(!a.support.smoothScroll)return xf({swiper:a,targetPosition:n,side:e?"left":"top"}),!0;h.scrollTo({[e?"left":"top"]:n,behavior:"smooth"})}return!0}const v=Jf().isSafari;return y&&!i&&v&&a.isElement&&a.virtual.update(!1,!1,s),a.setTransition(t),a.setTranslate(f),a.updateActiveIndex(s),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,o),a.transitionStart(n,x),0===t?a.transitionEnd(n,x):a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.wrapperEl.removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(n,x))}),a.wrapperEl.addEventListener("transitionend",a.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,n,o){void 0===e&&(e=0),void 0===n&&(n=!0),"string"==typeof e&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;void 0===t&&(t=i.params.speed);const a=i.grid&&i.params.grid&&i.params.grid.rows>1;let s=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)s+=i.virtual.slidesBefore;else{let e;if(a){const t=s*i.params.grid.rows;e=i.slides.find((e=>1*e.getAttribute("data-swiper-slide-index")===t)).column}else e=i.getSlideIndexByData(s);const t=a?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:n}=i.params;let r=i.params.slidesPerView;"auto"===r?r=i.slidesPerViewDynamic():(r=Math.ceil(parseFloat(i.params.slidesPerView,10)),n&&r%2==0&&(r+=1));let l=t-e<r;if(n&&(l=l||e<Math.ceil(r/2)),o&&n&&"auto"!==i.params.slidesPerView&&!a&&(l=!1),l){const o=n?e<i.activeIndex?"prev":"next":e-i.activeIndex-1<i.params.slidesPerView?"next":"prev";i.loopFix({direction:o,slideTo:!0,activeSlideIndex:"next"===o?e+1:e-t+1,slideRealIndex:"next"===o?i.realIndex:void 0})}if(a){const e=s*i.params.grid.rows;s=i.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)).column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame((()=>{i.slideTo(s,t,n,o)})),i},slideNext:function(e,t,n){void 0===t&&(t=!0);const o=this,{enabled:i,params:a,animating:s}=o;if(!i||o.destroyed)return o;void 0===e&&(e=o.params.speed);let r=a.slidesPerGroup;"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(r=Math.max(o.slidesPerViewDynamic("current",!0),1));const l=o.activeIndex<a.slidesPerGroupSkip?1:r,c=o.virtual&&a.virtual.enabled;if(a.loop){if(s&&!c&&a.loopPreventsSliding)return!1;if(o.loopFix({direction:"next"}),o._clientLeft=o.wrapperEl.clientLeft,o.activeIndex===o.slides.length-1&&a.cssMode)return requestAnimationFrame((()=>{o.slideTo(o.activeIndex+l,e,t,n)})),!0}return a.rewind&&o.isEnd?o.slideTo(0,e,t,n):o.slideTo(o.activeIndex+l,e,t,n)},slidePrev:function(e,t,n){void 0===t&&(t=!0);const o=this,{params:i,snapGrid:a,slidesGrid:s,rtlTranslate:r,enabled:l,animating:c}=o;if(!l||o.destroyed)return o;void 0===e&&(e=o.params.speed);const d=o.virtual&&i.virtual.enabled;if(i.loop){if(c&&!d&&i.loopPreventsSliding)return!1;o.loopFix({direction:"prev"}),
353 +o._clientLeft=o.wrapperEl.clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const p=u(r?o.translate:-o.translate),h=a.map((e=>u(e))),g=i.freeMode&&i.freeMode.enabled;let m=a[h.indexOf(p)-1];if(void 0===m&&(i.cssMode||g)){let e;a.forEach(((t,n)=>{p>=t&&(e=n)})),void 0!==e&&(m=g?a[e]:a[e>0?e-1:e])}let b=0;if(void 0!==m&&(b=s.indexOf(m),b<0&&(b=o.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(b=b-o.slidesPerViewDynamic("previous",!0)+1,b=Math.max(b,0))),i.rewind&&o.isBeginning){const i=o.params.virtual&&o.params.virtual.enabled&&o.virtual?o.virtual.slides.length-1:o.slides.length-1;return o.slideTo(i,e,t,n)}return i.loop&&0===o.activeIndex&&i.cssMode?(requestAnimationFrame((()=>{o.slideTo(b,e,t,n)})),!0):o.slideTo(b,e,t,n)},slideReset:function(e,t,n){void 0===t&&(t=!0);const o=this;if(!o.destroyed)return void 0===e&&(e=o.params.speed),o.slideTo(o.activeIndex,e,t,n)},slideToClosest:function(e,t,n,o){void 0===t&&(t=!0),void 0===o&&(o=.5);const i=this;if(i.destroyed)return;void 0===e&&(e=i.params.speed);let a=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,a),r=s+Math.floor((a-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[r]){const e=i.snapGrid[r];l-e>(i.snapGrid[r+1]-e)*o&&(a+=i.params.slidesPerGroup)}else{const e=i.snapGrid[r-1];l-e<=(i.snapGrid[r]-e)*o&&(a-=i.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,i.slidesGrid.length-1),i.slideTo(a,e,t,n)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,o="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,a=e.getSlideIndexWhenGrid(e.clickedIndex);const s=e.isElement?"swiper-slide":`.${t.slideClass}`,r=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(i):a>(r?(e.slides.length-o)/2-(e.params.grid.rows-1):e.slides.length-o)?(e.loopFix(),a=e.getSlideIndex(vf(n,`${s}[data-swiper-slide-index="${i}"]`)[0]),hf((()=>{e.slideTo(a)}))):e.slideTo(a)}else e.slideTo(a)}},dx={loopCreate:function(e,t){const n=this,{params:o,slidesEl:i}=n;if(!o.loop||n.virtual&&n.params.virtual.enabled)return;const a=()=>{vf(i,`.${o.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)}))},s=n.grid&&o.grid&&o.grid.rows>1;o.loopAddBlankSlides&&(o.slidesPerGroup>1||s)&&(()=>{const e=vf(i,`.${o.slideBlankClass}`);e.forEach((e=>{e.remove()})),e.length>0&&(n.recalcSlides(),n.updateSlides())})();const r=o.slidesPerGroup*(s?o.grid.rows:1),l=n.slides.length%r!=0,c=s&&n.slides.length%o.grid.rows!=0,d=e=>{for(let t=0;t<e;t+=1){const e=n.isElement?wf("swiper-slide",[o.slideBlankClass]):wf("div",[o.slideClass,o.slideBlankClass]);n.slidesEl.append(e)}};l?(o.loopAddBlankSlides?(d(r-n.slides.length%r),n.recalcSlides(),n.updateSlides()):kf("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),a()):c?(o.loopAddBlankSlides?(d(o.grid.rows-n.slides.length%o.grid.rows),n.recalcSlides(),n.updateSlides()):kf("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)"),a()):a(),n.loopFix({slideRealIndex:e,direction:o.centeredSlides?void 0:"next",initial:t})},loopFix:function(e){let{slideRealIndex:t,slideTo:n=!0,direction:o,setTranslate:i,activeSlideIndex:a,initial:s,byController:r,byMousewheel:l}=void 0===e?{}:e;const c=this;if(!c.params.loop)return;c.emit("beforeLoopFix");const{slides:d,allowSlidePrev:u,allowSlideNext:p,slidesEl:h,params:g}=c,{centeredSlides:m,initialSlide:b}=g;if(c.allowSlidePrev=!0,c.allowSlideNext=!0,c.virtual&&g.virtual.enabled)return n&&(g.centeredSlides||0!==c.snapIndex?g.centeredSlides&&c.snapIndex<g.slidesPerView?c.slideTo(c.virtual.slides.length+c.snapIndex,0,!1,!0):c.snapIndex===c.snapGrid.length-1&&c.slideTo(c.virtual.slidesBefore,0,!1,!0):c.slideTo(c.virtual.slides.length,0,!1,!0)),c.allowSlidePrev=u,c.allowSlideNext=p,void c.emit("loopFix");let f=g.slidesPerView;"auto"===f?f=c.slidesPerViewDynamic():(f=Math.ceil(parseFloat(g.slidesPerView,10)),m&&f%2==0&&(f+=1));const x=g.slidesPerGroupAuto?f:g.slidesPerGroup;let y=m?Math.max(x,Math.ceil(f/2)):x;y%x!=0&&(y+=x-y%x),y+=g.loopAdditionalSlides,c.loopedSlides=y;const v=c.grid&&g.grid&&g.grid.rows>1;d.length<f+y||"cards"===c.params.effect&&d.length<f+2*y?kf("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):v&&"row"===g.grid.fill&&kf("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const k=[],w=[],_=v?Math.ceil(d.length/g.grid.rows):d.length,C=s&&_-b<f&&!m;let j=C?b:c.activeIndex;void 0===a?a=c.getSlideIndex(d.find((e=>e.classList.contains(g.slideActiveClass)))):j=a;const $="next"===o||!o,S="prev"===o||!o;let T=0,N=0;const M=(v?d[a].column:a)+(m&&void 0===i?-f/2+.5:0);if(M<y){T=Math.max(y-M,x);for(let e=0;e<y-M;e+=1){const t=e-Math.floor(e/_)*_;if(v){const e=_-t-1;for(let t=d.length-1;t>=0;t-=1)d[t].column===e&&k.push(t)}else k.push(_-t-1)}}else if(M+f>_-y){N=Math.max(M-(_-2*y),x),C&&(N=Math.max(N,f-_+b+1));for(let e=0;e<N;e+=1){const t=e-Math.floor(e/_)*_;v?d.forEach(((e,n)=>{e.column===t&&w.push(n)})):w.push(t)}}if(c.__preventObserver__=!0,requestAnimationFrame((()=>{c.__preventObserver__=!1})),"cards"===c.params.effect&&d.length<f+2*y&&(w.includes(a)&&w.splice(w.indexOf(a),1),k.includes(a)&&k.splice(k.indexOf(a),1)),S&&k.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.prepend(d[e]),d[e].swiperLoopMoveDOM=!1})),$&&w.forEach((e=>{d[e].swiperLoopMoveDOM=!0,h.append(d[e]),d[e].swiperLoopMoveDOM=!1})),c.recalcSlides(),"auto"===g.slidesPerView?c.updateSlides():v&&(k.length>0&&S||w.length>0&&$)&&c.slides.forEach(((e,t)=>{c.grid.updateSlide(t,e,c.slides)})),g.watchSlidesProgress&&c.updateSlidesOffset(),n)if(k.length>0&&S){if(void 0===t){const e=c.slidesGrid[j],t=c.slidesGrid[j+T]-e;l?c.setTranslate(c.translate-t):(c.slideTo(j+Math.ceil(T),0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else if(i){const e=v?k.length/g.grid.rows:k.length;c.slideTo(c.activeIndex+e,0,!1,!0),c.touchEventsData.currentTranslate=c.translate}}else if(w.length>0&&$)if(void 0===t){const e=c.slidesGrid[j],t=c.slidesGrid[j-N]-e;l?c.setTranslate(c.translate-t):(c.slideTo(j-N,0,!1,!0),i&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else{const e=v?w.length/g.grid.rows:w.length;c.slideTo(c.activeIndex-e,0,!1,!0)}if(c.allowSlidePrev=u,c.allowSlideNext=p,c.controller&&c.controller.control&&!r){const e={slideRealIndex:t,direction:o,setTranslate:i,activeSlideIndex:a,byController:!0};Array.isArray(c.controller.control)?c.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===g.slidesPerView&&n})})):c.controller.control instanceof c.constructor&&c.controller.control.params.loop&&c.controller.control.loopFix({...e,slideTo:c.controller.control.params.slidesPerView===g.slidesPerView&&n})}c.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const o=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;o[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),o.forEach((e=>{n.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function ux(e,t,n){
354 +const o=uf(),{params:i}=e,a=i.edgeSwipeDetection,s=i.edgeSwipeThreshold;return!a||!(n<=s||n>=o.innerWidth-s)||"prevent"===a&&(t.preventDefault(),!0)}function px(e){const t=this,n=cf();let o=e;o.originalEvent&&(o=o.originalEvent);const i=t.touchEventsData;if("pointerdown"===o.type){if(null!==i.pointerId&&i.pointerId!==o.pointerId)return;i.pointerId=o.pointerId}else"touchstart"===o.type&&1===o.targetTouches.length&&(i.touchId=o.targetTouches[0].identifier);if("touchstart"===o.type)return void ux(t,o,o.targetTouches[0].pageX);const{params:a,touches:s,enabled:r}=t;if(!r)return;if(!a.simulateTouch&&"mouse"===o.pointerType)return;if(t.animating&&a.preventInteractionOnTransition)return;!t.animating&&a.cssMode&&a.loop&&t.loopFix();let l=o.target;if("wrapper"===a.touchEventsTarget&&!function(e,t){const n=uf();let o=t.contains(e);return!o&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(o=[...t.assignedElements()].includes(e),o||(o=function(e,t){const n=[t];for(;n.length>0;){const t=n.shift();if(e===t)return!0;n.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}}(e,t))),o}(l,t.wrapperEl))return;if("which"in o&&3===o.which)return;if("button"in o&&o.button>0)return;if(i.isTouched&&i.isMoved)return;const c=!!a.noSwipingClass&&""!==a.noSwipingClass,d=o.composedPath?o.composedPath():o.path;c&&o.target&&o.target.shadowRoot&&d&&(l=d[0]);const u=a.noSwipingSelector?a.noSwipingSelector:`.${a.noSwipingClass}`,p=!(!o.target||!o.target.shadowRoot);if(a.noSwiping&&(p?function(e,t){return void 0===t&&(t=this),function t(n){if(!n||n===cf()||n===uf())return null;n.assignedSlot&&(n=n.assignedSlot);const o=n.closest(e);return o||n.getRootNode?o||t(n.getRootNode().host):null}(t)}(u,l):l.closest(u)))return void(t.allowClick=!0);if(a.swipeHandler&&!l.closest(a.swipeHandler))return;s.currentX=o.pageX,s.currentY=o.pageY;const h=s.currentX,g=s.currentY;if(!ux(t,o,h))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=h,s.startY=g,i.touchStartTime=gf(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,a.threshold>0&&(i.allowThresholdMove=!1);let m=!0;l.matches(i.focusableElements)&&(m=!1,"SELECT"===l.nodeName&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&("mouse"===o.pointerType||"mouse"!==o.pointerType&&!l.matches(i.focusableElements))&&n.activeElement.blur();const b=m&&t.allowTouchMove&&a.touchStartPreventDefault;!a.touchStartForcePreventDefault&&!b||l.isContentEditable||o.preventDefault(),a.freeMode&&a.freeMode.enabled&&t.freeMode&&t.animating&&!a.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",o)}function hx(e){const t=cf(),n=this,o=n.touchEventsData,{params:i,touches:a,rtlTranslate:s,enabled:r}=n;if(!r)return;if(!i.simulateTouch&&"mouse"===e.pointerType)return;let l,c=e;if(c.originalEvent&&(c=c.originalEvent),"pointermove"===c.type){if(null!==o.touchId)return;if(c.pointerId!==o.pointerId)return}if("touchmove"===c.type){if(l=[...c.changedTouches].find((e=>e.identifier===o.touchId)),!l||l.identifier!==o.touchId)return}else l=c;if(!o.isTouched)return void(o.startMoving&&o.isScrolling&&n.emit("touchMoveOpposite",c));const d=l.pageX,u=l.pageY;if(c.preventedByNestedSwiper)return a.startX=d,void(a.startY=u);if(!n.allowTouchMove)return c.target.matches(o.focusableElements)||(n.allowClick=!1),void(o.isTouched&&(Object.assign(a,{startX:d,startY:u,currentX:d,currentY:u}),o.touchStartTime=gf()));if(i.touchReleaseOnEdges&&!i.loop)if(n.isVertical()){if(u<a.startY&&n.translate<=n.maxTranslate()||u>a.startY&&n.translate>=n.minTranslate())return o.isTouched=!1,void(o.isMoved=!1)}else{if(s&&(d>a.startX&&-n.translate<=n.maxTranslate()||d<a.startX&&-n.translate>=n.minTranslate()))return;if(!s&&(d<a.startX&&n.translate<=n.maxTranslate()||d>a.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(o.focusableElements)&&t.activeElement!==c.target&&"mouse"!==c.pointerType&&t.activeElement.blur(),t.activeElement&&c.target===t.activeElement&&c.target.matches(o.focusableElements))return o.isMoved=!0,void(n.allowClick=!1);o.allowTouchCallbacks&&n.emit("touchMove",c),a.previousX=a.currentX,a.previousY=a.currentY,a.currentX=d,a.currentY=u;const p=a.currentX-a.startX,h=a.currentY-a.startY;if(n.params.threshold&&Math.sqrt(p**2+h**2)<n.params.threshold)return;if(void 0===o.isScrolling){let e;n.isHorizontal()&&a.currentY===a.startY||n.isVertical()&&a.currentX===a.startX?o.isScrolling=!1:p*p+h*h>=25&&(e=180*Math.atan2(Math.abs(h),Math.abs(p))/Math.PI,o.isScrolling=n.isHorizontal()?e>i.touchAngle:90-e>i.touchAngle)}if(o.isScrolling&&n.emit("touchMoveOpposite",c),void 0===o.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(o.startMoving=!0)),o.isScrolling||"touchmove"===c.type&&o.preventTouchMoveFromPointerMove)return void(o.isTouched=!1);if(!o.startMoving)return;n.allowClick=!1,!i.cssMode&&c.cancelable&&c.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&c.stopPropagation();let g=n.isHorizontal()?p:h,m=n.isHorizontal()?a.currentX-a.previousX:a.currentY-a.previousY;i.oneWayMovement&&(g=Math.abs(g)*(s?1:-1),m=Math.abs(m)*(s?1:-1)),a.diff=g,g*=i.touchRatio,s&&(g=-g,m=-m);const b=n.touchesDirection;n.swipeDirection=g>0?"prev":"next",n.touchesDirection=m>0?"prev":"next";const f=n.params.loop&&!i.cssMode,x="next"===n.touchesDirection&&n.allowSlideNext||"prev"===n.touchesDirection&&n.allowSlidePrev;if(!o.isMoved){if(f&&x&&n.loopFix({direction:n.swipeDirection}),o.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(e)}o.allowMomentumBounce=!1,!i.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",c)}if((new Date).getTime(),!1!==i._loopSwapReset&&o.isMoved&&o.allowThresholdMove&&b!==n.touchesDirection&&f&&x&&Math.abs(g)>=1)return Object.assign(a,{startX:d,startY:u,currentX:d,currentY:u,startTranslate:o.currentTranslate}),o.loopSwapReset=!0,void(o.startTranslate=o.currentTranslate);n.emit("sliderMove",c),o.isMoved=!0,o.currentTranslate=g+o.startTranslate;let y=!0,v=i.resistanceRatio;if(i.touchReleaseOnEdges&&(v=0),g>0?(f&&x&&o.allowThresholdMove&&o.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-("auto"!==i.slidesPerView&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),o.currentTranslate>n.minTranslate()&&(y=!1,i.resistance&&(o.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+o.startTranslate+g)**v))):g<0&&(f&&x&&o.allowThresholdMove&&o.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+("auto"!==i.slidesPerView&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===i.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),o.currentTranslate<n.maxTranslate()&&(y=!1,i.resistance&&(o.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-o.startTranslate-g)**v))),y&&(c.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&o.currentTranslate<o.startTranslate&&(o.currentTranslate=o.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&o.currentTranslate>o.startTranslate&&(o.currentTranslate=o.startTranslate),n.allowSlidePrev||n.allowSlideNext||(o.currentTranslate=o.startTranslate),i.threshold>0){if(!(Math.abs(g)>i.threshold||o.allowThresholdMove))return void(o.currentTranslate=o.startTranslate);if(!o.allowThresholdMove)return o.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,
355 +o.currentTranslate=o.startTranslate,void(a.diff=n.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}i.followFinger&&!i.cssMode&&((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(o.currentTranslate),n.setTranslate(o.currentTranslate))}function gx(e){const t=this,n=t.touchEventsData;let o,i=e;if(i.originalEvent&&(i=i.originalEvent),"touchend"===i.type||"touchcancel"===i.type){if(o=[...i.changedTouches].find((e=>e.identifier===n.touchId)),!o||o.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(i.pointerId!==n.pointerId)return;o=i}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(i.type)&&(!["pointercancel","contextmenu"].includes(i.type)||!t.browser.isSafari&&!t.browser.isWebView))return;n.pointerId=null,n.touchId=null;const{params:a,touches:s,rtlTranslate:r,slidesGrid:l,enabled:c}=t;if(!c)return;if(!a.simulateTouch&&"mouse"===i.pointerType)return;if(n.allowTouchCallbacks&&t.emit("touchEnd",i),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&a.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);a.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const d=gf(),u=d-n.touchStartTime;if(t.allowClick){const e=i.path||i.composedPath&&i.composedPath();t.updateClickedSlide(e&&e[0]||i.target,e),t.emit("tap click",i),u<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",i)}if(n.lastClickTime=gf(),hf((()=>{t.destroyed||(t.allowClick=!0)})),!n.isTouched||!n.isMoved||!t.swipeDirection||0===s.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let p;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,p=a.followFinger?r?t.translate:-t.translate:-n.currentTranslate,a.cssMode)return;if(a.freeMode&&a.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:p});const h=p>=-t.maxTranslate()&&!t.params.loop;let g=0,m=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<a.slidesPerGroupSkip?1:a.slidesPerGroup){const t=e<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;void 0!==l[e+t]?(h||p>=l[e]&&p<l[e+t])&&(g=e,m=l[e+t]-l[e]):(h||p>=l[e])&&(g=e,m=l[l.length-1]-l[l.length-2])}let b=null,f=null;a.rewind&&(t.isBeginning?f=a.virtual&&a.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(b=0));const x=(p-l[g])/m,y=g<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(u>a.longSwipesMs){if(!a.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(x>=a.longSwipesRatio?t.slideTo(a.rewind&&t.isEnd?b:g+y):t.slideTo(g)),"prev"===t.swipeDirection&&(x>1-a.longSwipesRatio?t.slideTo(g+y):null!==f&&x<0&&Math.abs(x)>a.longSwipesRatio?t.slideTo(f):t.slideTo(g))}else{if(!a.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||i.target!==t.navigation.nextEl&&i.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(null!==b?b:g+y),"prev"===t.swipeDirection&&t.slideTo(null!==f?f:g)):i.target===t.navigation.nextEl?t.slideTo(g+y):t.slideTo(g)}}function mx(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:o,allowSlidePrev:i,snapGrid:a}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const r=s&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||r?e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=i,e.allowSlideNext=o,e.params.watchOverflow&&a!==e.snapGrid&&e.checkOverflow()}function bx(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function fx(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:o}=e;if(!o)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const a=e.maxTranslate()-e.minTranslate();i=0===a?0:(e.translate-e.minTranslate())/a,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function xx(e){const t=this;ox(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function yx(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const vx=(e,t)=>{const n=cf(),{params:o,el:i,wrapperEl:a,device:s}=e,r=!!o.nested,l="on"===t?"addEventListener":"removeEventListener",c=t;i&&"string"!=typeof i&&(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:r}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:r}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:r}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(o.preventClicks||o.preventClicksPropagation)&&i[l]("click",e.onClick,!0),o.cssMode&&a[l]("scroll",e.onScroll),o.updateOnWindowResize?e[c](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",mx,!0):e[c]("observerUpdate",mx,!0),i[l]("load",e.onLoad,{capture:!0}))},kx=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var wx={addClasses:function(){const e=this,{classNames:t,params:n,rtl:o,el:i,device:a}=e,s=function(e,t){const n=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((o=>{e[o]&&n.push(t+o)})):"string"==typeof e&&n.push(t+e)})),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:o},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:a.android},{ios:a.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),i.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}},Cx={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,
356 +watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function jx(e,t){return function(n){void 0===n&&(n={});const o=Object.keys(n)[0],i=n[o];"object"==typeof i&&null!==i?(!0===e[o]&&(e[o]={enabled:!0}),"navigation"===o&&e[o]&&e[o].enabled&&!e[o].prevEl&&!e[o].nextEl&&(e[o].auto=!0),["pagination","scrollbar"].indexOf(o)>=0&&e[o]&&e[o].enabled&&!e[o].el&&(e[o].auto=!0),o in e&&"enabled"in i?("object"!=typeof e[o]||"enabled"in e[o]||(e[o].enabled=!0),e[o]||(e[o]={enabled:!1}),bf(t,n)):bf(t,n)):bf(t,n)}}const $x={eventsEmitter:ex,update:sx,translate:rx,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const n=this,{params:o}=n;o.cssMode||(o.autoHeight&&n.updateAutoHeight(),lx({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const n=this,{params:o}=n;n.animating=!1,o.cssMode||(n.setTransition(0),lx({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:cx,loop:dx,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=px.bind(e),e.onTouchMove=hx.bind(e),e.onTouchEnd=gx.bind(e),e.onDocumentTouchStart=yx.bind(e),t.cssMode&&(e.onScroll=fx.bind(e)),e.onClick=bx.bind(e),e.onLoad=xx.bind(e),vx(e,"on")},detachEvents:function(){vx(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:o,el:i}=e,a=o.breakpoints;if(!a||a&&0===Object.keys(a).length)return;const s=cf(),r="window"!==o.breakpointsBase&&o.breakpointsBase?"container":o.breakpointsBase,l=["window","container"].includes(o.breakpointsBase)||!o.breakpointsBase?e.el:s.querySelector(o.breakpointsBase),c=e.getBreakpoint(a,r,l);if(!c||e.currentBreakpoint===c)return;const d=(c in a?a[c]:void 0)||e.originalParams,u=kx(e,o),p=kx(e,d),h=e.params.grabCursor,g=d.grabCursor,m=o.enabled;u&&!p?(i.classList.remove(`${o.containerModifierClass}grid`,`${o.containerModifierClass}grid-column`),e.emitContainerClasses()):!u&&p&&(i.classList.add(`${o.containerModifierClass}grid`),(d.grid.fill&&"column"===d.grid.fill||!d.grid.fill&&"column"===o.grid.fill)&&i.classList.add(`${o.containerModifierClass}grid-column`),e.emitContainerClasses()),h&&!g?e.unsetGrabCursor():!h&&g&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===d[t])return;const n=o[t]&&o[t].enabled,i=d[t]&&d[t].enabled;n&&!i&&e[t].disable(),!n&&i&&e[t].enable()}));const b=d.direction&&d.direction!==o.direction,f=o.loop&&(d.slidesPerView!==o.slidesPerView||b),x=o.loop;b&&n&&e.changeDirection(),bf(e.params,d);const y=e.params.enabled,v=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!y?e.disable():!m&&y&&e.enable(),e.currentBreakpoint=c,e.emit("_beforeBreakpoint",d),n&&(f?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!x&&v?(e.loopCreate(t),e.updateSlides()):x&&!v&&e.loopDestroy()),e.emit("breakpoint",d)},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),!e||"container"===t&&!n)return;let o=!1;const i=uf(),a="window"===t?i.innerHeight:n.clientHeight,s=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:a*t,point:e}}return{value:e,point:e}}));s.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<s.length;e+=1){const{point:a,value:r}=s[e];"window"===t?i.matchMedia(`(min-width: ${r}px)`).matches&&(o=a):r<=n.clientWidth&&(o=a)}return o||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:o}=n;if(o){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*o;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:wx},Sx={};class Tx{constructor(){let e,t;for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];1===o.length&&o[0].constructor&&"Object"===Object.prototype.toString.call(o[0]).slice(8,-1)?t=o[0]:[e,t]=o,t||(t={}),t=bf({},t),e&&!t.el&&(t.el=e);const a=cf();if(t.el&&"string"==typeof t.el&&a.querySelectorAll(t.el).length>1){const e=[];return a.querySelectorAll(t.el).forEach((n=>{const o=bf({},t,{el:n});e.push(new Tx(o))})),e}const s=this;s.__swiper__=!0,s.support=Zf(),s.device=Xf({userAgent:t.userAgent}),s.browser=Jf(),s.eventsListeners={},s.eventsAnyListeners=[],s.modules=[...s.__modules__],t.modules&&Array.isArray(t.modules)&&s.modules.push(...t.modules);const r={};s.modules.forEach((e=>{e({params:t,swiper:s,extendParams:jx(t,r),on:s.on.bind(s),once:s.once.bind(s),off:s.off.bind(s),emit:s.emit.bind(s)})}));const l=bf({},Cx,r);return s.params=bf({},l,Sx,t),s.originalParams=bf({},s.params),s.passedParams=bf({},t),s.params&&s.params.on&&Object.keys(s.params.on).forEach((e=>{s.on(e,s.params.on[e])})),s.params&&s.params.onAny&&s.onAny(s.params.onAny),Object.assign(s,{enabled:s.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===s.params.direction,isVertical:()=>"vertical"===s.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:s.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.emit("_swiper"),s.params.init&&s.init(),s}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,o=Cf(vf(t,`.${n.slideClass}, swiper-slide`)[0]);return Cf(e)-o}getSlideIndexByData(e){
357 +return this.getSlideIndex(this.slides.find((t=>1*t.getAttribute("data-swiper-slide-index")===e)))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=vf(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const o=n.minTranslate(),i=(n.maxTranslate()-o)*e+o;n.translateTo(i,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((n=>{const o=e.getSlideClasses(n);t.push({slideEl:n,classNames:o}),e.emit("_slideClass",n,o)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:n,slides:o,slidesGrid:i,slidesSizesGrid:a,size:s,activeIndex:r}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(n.centeredSlides){let e,t=o[r]?Math.ceil(o[r].swiperSlideSize):0;for(let n=r+1;n<o.length;n+=1)o[n]&&!e&&(t+=Math.ceil(o[n].swiperSlideSize),l+=1,t>s&&(e=!0));for(let n=r-1;n>=0;n-=1)o[n]&&!e&&(t+=o[n].swiperSlideSize,l+=1,t>s&&(e=!0))}else if("current"===e)for(let e=r+1;e<o.length;e+=1)(t?i[e]+a[e]-i[r]<s:i[e]-i[r]<s)&&(l+=1);else for(let e=r-1;e>=0;e-=1)i[r]-i[e]<s&&(l+=1);return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function o(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let i;if(n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&ox(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)o(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;i=e.slideTo(t.length-1,0,!1,!0)}else i=e.slideTo(e.activeIndex,0,!1,!0);i||o()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const n=this,o=n.params.direction;return e||(e="horizontal"===o?"vertical":"horizontal"),e===o||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${o}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const o=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(o()):vf(n,o())[0];return!i&&t.params.createElements&&(i=wf("div",t.params.wrapperClass),n.append(i),vf(n,`.${t.params.slideClass}`).forEach((e=>{i.append(e)}))),Object.assign(t,{el:n,wrapperEl:i,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:i,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===_f(n,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===_f(n,"direction")),wrongRTL:"-webkit-box"===_f(i,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const n=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&n.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach((e=>{e.complete?ox(t,e):e.addEventListener("load",(e=>{ox(t,e.target)}))})),ax(t),t.initialized=!0,ax(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const n=this,{params:o,el:i,wrapperEl:a,slides:s}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),o.loop&&n.loopDestroy(),t&&(n.removeClasses(),i&&"string"!=typeof i&&i.removeAttribute("style"),a&&a.removeAttribute("style"),s&&s.length&&s.forEach((e=>{e.classList.remove(o.slideVisibleClass,o.slideFullyVisibleClass,o.slideActiveClass,o.slideNextClass,o.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((e=>{n.off(e)})),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(n)),n.destroyed=!0),null}static extendDefaults(e){bf(Sx,e)}static get extendedDefaults(){return Sx}static get defaults(){return Cx}static installModule(e){Tx.prototype.__modules__||(Tx.prototype.__modules__=[]);const t=Tx.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>Tx.installModule(e))),Tx):(Tx.installModule(e),Tx)}}Object.keys($x).forEach((e=>{Object.keys($x[e]).forEach((t=>{Tx.prototype[t]=$x[e][t]}))})),Tx.use([function(e){let{swiper:t,on:n,emit:o}=e;const i=uf();let a=null,s=null;const r=()=>{t&&!t.destroyed&&t.initialized&&(o("beforeResize"),o("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&o("orientationchange")};n("init",(()=>{t.params.resizeObserver&&void 0!==i.ResizeObserver?t&&!t.destroyed&&t.initialized&&(a=new ResizeObserver((e=>{s=i.requestAnimationFrame((()=>{const{width:n,height:o}=t;let i=n,a=o;e.forEach((e=>{let{contentBoxSize:n,contentRect:o,target:s}=e;s&&s!==t.el||(i=o?o.width:(n[0]||n).inlineSize,a=o?o.height:(n[0]||n).blockSize)})),i===n&&a===o||r()}))})),a.observe(t.el)):(i.addEventListener("resize",r),i.addEventListener("orientationchange",l))})),n("destroy",(()=>{s&&i.cancelAnimationFrame(s),a&&a.unobserve&&t.el&&(a.unobserve(t.el),a=null),i.removeEventListener("resize",r),i.removeEventListener("orientationchange",l)}))},function(e){let{swiper:t,extendParams:n,on:o,emit:i}=e;const a=[],s=uf(),r=function(e,n){void 0===n&&(n={});const o=new(s.MutationObserver||s.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void i("observerUpdate",e[0]);const n=function(){i("observerUpdate",e[0])};s.requestAnimationFrame?s.requestAnimationFrame(n):s.setTimeout(n,0)}));o.observe(e,{
358 +attributes:void 0===n.attributes||n.attributes,childList:t.isElement||(void 0===n.childList||n).childList,characterData:void 0===n.characterData||n.characterData}),a.push(o)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),o("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=jf(t.hostEl);for(let t=0;t<e.length;t+=1)r(e[t])}r(t.hostEl,{childList:t.params.observeSlideChildren}),r(t.wrapperEl,{attributes:!1})}})),o("destroy",(()=>{a.forEach((e=>{e.disconnect()})),a.splice(0,a.length)}))}]);const Nx=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Mx(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!e.__swiper__}function Lx(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter((e=>n.indexOf(e)<0)).forEach((n=>{void 0===e[n]?e[n]=t[n]:Mx(t[n])&&Mx(e[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?e[n]=t[n]:Lx(e[n],t[n]):e[n]=t[n]}))}function Px(e){return void 0===e&&(e={}),e.navigation&&void 0===e.navigation.nextEl&&void 0===e.navigation.prevEl}function Ex(e){return void 0===e&&(e={}),e.pagination&&void 0===e.pagination.el}function Ax(e){return void 0===e&&(e={}),e.scrollbar&&void 0===e.scrollbar.el}function Bx(e){void 0===e&&(e="");const t=e.split(" ").map((e=>e.trim())).filter((e=>!!e)),n=[];return t.forEach((e=>{n.indexOf(e)<0&&n.push(e)})),n.join(" ")}function Ix(e){return void 0===e&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Ox(){return Ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ox.apply(this,arguments)}function Rx(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function zx(e){const t=[];return m.Children.toArray(e).forEach((e=>{Rx(e)?t.push(e):e.props&&e.props.children&&zx(e.props.children).forEach((e=>t.push(e)))})),t}function Dx(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return m.Children.toArray(e).forEach((e=>{if(Rx(e))t.push(e);else if(e.props&&e.props.slot&&n[e.props.slot])n[e.props.slot].push(e);else if(e.props&&e.props.children){const o=zx(e.props.children);o.length>0?o.forEach((e=>t.push(e))):n["container-end"].push(e)}else n["container-end"].push(e)})),{slides:t,slots:n}}function Fx(e,t){return"undefined"==typeof window?(0,m.useEffect)(e,t):(0,m.useLayoutEffect)(e,t)}const Hx=(0,m.createContext)(null),Wx=(0,m.createContext)(null),Ux=(0,m.forwardRef)((function(e,t){let{className:n,tag:o="div",wrapperTag:i="div",children:a,onSwiper:s,...r}=void 0===e?{}:e,l=!1;const[c,d]=(0,m.useState)("swiper"),[u,p]=(0,m.useState)(null),[h,g]=(0,m.useState)(!1),b=(0,m.useRef)(!1),f=(0,m.useRef)(null),x=(0,m.useRef)(null),y=(0,m.useRef)(null),v=(0,m.useRef)(null),k=(0,m.useRef)(null),w=(0,m.useRef)(null),_=(0,m.useRef)(null),C=(0,m.useRef)(null),{params:j,passedParams:$,rest:S,events:T}=function(e,t){void 0===e&&(e={}),void 0===t&&(t=!0);const n={on:{}},o={},i={};Lx(n,Cx),n._emitClasses=!0,n.init=!1;const a={},s=Nx.map((e=>e.replace(/_/,""))),r=Object.assign({},e);return Object.keys(r).forEach((r=>{void 0!==e[r]&&(s.indexOf(r)>=0?Mx(e[r])?(n[r]={},i[r]={},Lx(n[r],e[r]),Lx(i[r],e[r])):(n[r]=e[r],i[r]=e[r]):0===r.search(/on[A-Z]/)&&"function"==typeof e[r]?t?o[`${r[2].toLowerCase()}${r.substr(3)}`]=e[r]:n.on[`${r[2].toLowerCase()}${r.substr(3)}`]=e[r]:a[r]=e[r])})),["navigation","pagination","scrollbar"].forEach((e=>{!0===n[e]&&(n[e]={}),!1===n[e]&&delete n[e]})),{params:n,passedParams:i,rest:a,events:o}}(r),{slides:N,slots:M}=Dx(a),L=()=>{g(!h)};Object.assign(j.on,{_containerClasses(e,t){d(t)}});const P=()=>{Object.assign(j.on,T),l=!0;const e={...j};if(delete e.wrapperClass,x.current=new Tx(e),x.current.virtual&&x.current.params.virtual.enabled){x.current.virtual.slides=N;const e={cache:!1,slides:N,renderExternal:p,renderExternalUpdate:!1};Lx(x.current.params.virtual,e),Lx(x.current.originalParams.virtual,e)}};return f.current||P(),x.current&&x.current.on("_beforeBreakpoint",L),(0,m.useEffect)((()=>()=>{x.current&&x.current.off("_beforeBreakpoint",L)})),(0,m.useEffect)((()=>{!b.current&&x.current&&(x.current.emitSlidesClasses(),b.current=!0)})),Fx((()=>{if(t&&(t.current=f.current),f.current)return x.current.destroyed&&P(),function(e,t){let{el:n,nextEl:o,prevEl:i,paginationEl:a,scrollbarEl:s,swiper:r}=e;Px(t)&&o&&i&&(r.params.navigation.nextEl=o,r.originalParams.navigation.nextEl=o,r.params.navigation.prevEl=i,r.originalParams.navigation.prevEl=i),Ex(t)&&a&&(r.params.pagination.el=a,r.originalParams.pagination.el=a),Ax(t)&&s&&(r.params.scrollbar.el=s,r.originalParams.scrollbar.el=s),r.init(n)}({el:f.current,nextEl:k.current,prevEl:w.current,paginationEl:_.current,scrollbarEl:C.current,swiper:x.current},j),s&&!x.current.destroyed&&s(x.current),()=>{x.current&&!x.current.destroyed&&x.current.destroy(!0,!1)}}),[]),Fx((()=>{!l&&T&&x.current&&Object.keys(T).forEach((e=>{x.current.on(e,T[e])}));const e=function(e,t,n,o,i){const a=[];if(!t)return a;const s=e=>{a.indexOf(e)<0&&a.push(e)};if(n&&o){const e=o.map(i),t=n.map(i);e.join("")!==t.join("")&&s("children"),o.length!==n.length&&s("children")}return Nx.filter((e=>"_"===e[0])).map((e=>e.replace(/_/,""))).forEach((n=>{if(n in e&&n in t)if(Mx(e[n])&&Mx(t[n])){const o=Object.keys(e[n]),i=Object.keys(t[n]);o.length!==i.length?s(n):(o.forEach((o=>{e[n][o]!==t[n][o]&&s(n)})),i.forEach((o=>{e[n][o]!==t[n][o]&&s(n)})))}else e[n]!==t[n]&&s(n)})),a}($,y.current,N,v.current,(e=>e.key));return y.current=$,v.current=N,e.length&&x.current&&!x.current.destroyed&&function(e){let{swiper:t,slides:n,passedParams:o,changedParams:i,nextEl:a,prevEl:s,scrollbarEl:r,paginationEl:l}=e;const c=i.filter((e=>"children"!==e&&"direction"!==e&&"wrapperClass"!==e)),{params:d,pagination:u,navigation:p,scrollbar:h,virtual:g,thumbs:m}=t;let b,f,x,y,v,k,w,_;i.includes("thumbs")&&o.thumbs&&o.thumbs.swiper&&!o.thumbs.swiper.destroyed&&d.thumbs&&(!d.thumbs.swiper||d.thumbs.swiper.destroyed)&&(b=!0),
359 +i.includes("controller")&&o.controller&&o.controller.control&&d.controller&&!d.controller.control&&(f=!0),i.includes("pagination")&&o.pagination&&(o.pagination.el||l)&&(d.pagination||!1===d.pagination)&&u&&!u.el&&(x=!0),i.includes("scrollbar")&&o.scrollbar&&(o.scrollbar.el||r)&&(d.scrollbar||!1===d.scrollbar)&&h&&!h.el&&(y=!0),i.includes("navigation")&&o.navigation&&(o.navigation.prevEl||s)&&(o.navigation.nextEl||a)&&(d.navigation||!1===d.navigation)&&p&&!p.prevEl&&!p.nextEl&&(v=!0);const C=e=>{t[e]&&(t[e].destroy(),"navigation"===e?(t.isElement&&(t[e].prevEl.remove(),t[e].nextEl.remove()),d[e].prevEl=void 0,d[e].nextEl=void 0,t[e].prevEl=void 0,t[e].nextEl=void 0):(t.isElement&&t[e].el.remove(),d[e].el=void 0,t[e].el=void 0))};i.includes("loop")&&t.isElement&&(d.loop&&!o.loop?k=!0:!d.loop&&o.loop?w=!0:_=!0),c.forEach((e=>{if(Mx(d[e])&&Mx(o[e]))Object.assign(d[e],o[e]),"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e||!("enabled"in o[e])||o[e].enabled||C(e);else{const t=o[e];!0!==t&&!1!==t||"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e?d[e]=o[e]:!1===t&&C(e)}})),c.includes("controller")&&!f&&t.controller&&t.controller.control&&d.controller&&d.controller.control&&(t.controller.control=d.controller.control),i.includes("children")&&n&&g&&d.virtual.enabled?(g.slides=n,g.update(!0)):i.includes("virtual")&&g&&d.virtual.enabled&&(n&&(g.slides=n),g.update(!0)),i.includes("children")&&n&&d.loop&&(_=!0),b&&m.init()&&m.update(!0),f&&(t.controller.control=d.controller.control),x&&(!t.isElement||l&&"string"!=typeof l||(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(d.pagination.el=l),u.init(),u.render(),u.update()),y&&(!t.isElement||r&&"string"!=typeof r||(r=document.createElement("div"),r.classList.add("swiper-scrollbar"),r.part.add("scrollbar"),t.el.appendChild(r)),r&&(d.scrollbar.el=r),h.init(),h.updateSize(),h.setTranslate()),v&&(t.isElement&&(a&&"string"!=typeof a||(a=document.createElement("div"),a.classList.add("swiper-button-next"),Nf(a,t.hostEl.constructor.nextButtonSvg),a.part.add("button-next"),t.el.appendChild(a)),s&&"string"!=typeof s||(s=document.createElement("div"),s.classList.add("swiper-button-prev"),Nf(s,t.hostEl.constructor.prevButtonSvg),s.part.add("button-prev"),t.el.appendChild(s))),a&&(d.navigation.nextEl=a),s&&(d.navigation.prevEl=s),p.init(),p.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=o.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=o.allowSlidePrev),i.includes("direction")&&t.changeDirection(o.direction,!1),(k||_)&&t.loopDestroy(),(w||_)&&t.loopCreate(),t.update()}({swiper:x.current,slides:N,passedParams:$,changedParams:e,nextEl:k.current,prevEl:w.current,scrollbarEl:C.current,paginationEl:_.current}),()=>{T&&x.current&&Object.keys(T).forEach((e=>{x.current.off(e,T[e])}))}})),Fx((()=>{var e;!(e=x.current)||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())}),[u]),m.createElement(o,Ox({ref:f,className:Bx(`${c}${n?` ${n}`:""}`)},S),m.createElement(Wx.Provider,{value:x.current},M["container-start"],m.createElement(i,{className:Ix(j.wrapperClass)},M["wrapper-start"],j.virtual?function(e,t,n){if(!n)return null;const o=e=>{let n=e;return e<0?n=t.length+e:n>=t.length&&(n-=t.length),n},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:a,to:s}=n,r=e.params.loop?-t.length:0,l=e.params.loop?2*t.length:t.length,c=[];for(let e=r;e<l;e+=1)e>=a&&e<=s&&c.push(t[o(e)]);return c.map(((t,n)=>m.cloneElement(t,{swiper:e,style:i,key:t.props.virtualIndex||t.key||`slide-${n}`})))}(x.current,N,u):N.map(((e,t)=>m.cloneElement(e,{swiper:x.current,swiperSlideIndex:t}))),M["wrapper-end"]),Px(j)&&m.createElement(m.Fragment,null,m.createElement("div",{ref:w,className:"swiper-button-prev"}),m.createElement("div",{ref:k,className:"swiper-button-next"})),Ax(j)&&m.createElement("div",{ref:C,className:"swiper-scrollbar"}),Ex(j)&&m.createElement("div",{ref:_,className:"swiper-pagination"}),M["container-end"]))}));Ux.displayName="Swiper";const Gx=(0,m.forwardRef)((function(e,t){let{tag:n="div",children:o,className:i="",swiper:a,zoom:s,lazy:r,virtualIndex:l,swiperSlideIndex:c,...d}=void 0===e?{}:e;const u=(0,m.useRef)(null),[p,h]=(0,m.useState)("swiper-slide"),[g,b]=(0,m.useState)(!1);function f(e,t,n){t===u.current&&h(n)}Fx((()=>{if(void 0!==c&&(u.current.swiperSlideIndex=c),t&&(t.current=u.current),u.current&&a){if(!a.destroyed)return a.on("_slideClass",f),()=>{a&&a.off("_slideClass",f)};"swiper-slide"!==p&&h("swiper-slide")}})),Fx((()=>{a&&u.current&&!a.destroyed&&h(a.getSlideClasses(u.current))}),[a]);const x={isActive:p.indexOf("swiper-slide-active")>=0,isVisible:p.indexOf("swiper-slide-visible")>=0,isPrev:p.indexOf("swiper-slide-prev")>=0,isNext:p.indexOf("swiper-slide-next")>=0},y=()=>"function"==typeof o?o(x):o;return m.createElement(n,Ox({ref:u,className:Bx(`${p}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:()=>{b(!0)}},d),s&&m.createElement(Hx.Provider,{value:x},m.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof s?s:void 0},y(),r&&!g&&m.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&m.createElement(Hx.Provider,{value:x},y(),r&&!g&&m.createElement("div",{className:"swiper-lazy-preloader"})))}));Gx.displayName="SwiperSlide";const Vx=({attributes:e})=>{const{content:t,options:n}=e,o={"--swiper-wrapper-transition-timing-function":n?.easing},i=()=>(0,l.jsxs)(Ux,{style:o,modules:[Pf,Af,Bf,If,Of,Ff],slidesPerView:1,loop:n.isLoop,loopAddBlankSlides:!0,autoplay:!!n.isAutoplay&&{delay:n.autoPlaySpeed,reverseDirection:"slide"!==n.effect||"right"!==n.direction,pauseOnMouseEnter:n.isPauseOnHover},..."fade"===n.effect?{effect:"fade"}:{},speed:n.sliderSpeed,grabCursor:n.isGrabCursor,navigation:!!n.isArrows&&{prevEl:".custom-prev-btn",nextEl:".custom-next-btn"},className:"cttk-ticker-content-wrapper",children:[t?.map(((e,t)=>(0,l.jsx)(Gx,{children:(0,l.jsx)("a",{className:"cttk-ticker-link",...e.link.length>2?{href:e.link}:{},...e.link.length>2?{target:"_blank"}:{},children:e.text})},t))),!(t.length>1)&&(0,l.jsx)(Gx,{})]});return(0,l.jsx)(i,{})},qx=({attributes:e})=>{const{options:t,arrows:n,badge:o}=e;return(0,l.jsx)("div",{className:"cttk-ticker-wrapper",children:(0,l.jsxs)("div",{className:"cttk-ticker-swiper-wrapper",children:[(0,l.jsx)("div",{className:"cttk-ticker-badge",children:o.text}),(0,l.jsx)(Vx,{attributes:e}),t.isArrows&&(0,l.jsxs)(l.Fragment,{children:[of[n.icon].left,of[n.icon].right]})]})})},Yx=e=>{const{top:t,right:n,bottom:o,left:i}=e;return`${t?"border-top-left-radius:"+t+";":""}\n\t${n?"border-top-right-radius:"+n+";":""}\n\t${o?"border-bottom-right-radius:"+o+";":""}\n\t${i?"border-bottom-left-radius:"+i+";":""}\n\t`.replace(/\s+/g," ").trim()},Kx=({attributes:e,id:t})=>{const{badge:n,style:o,arrows:i,advanced:a}=e,s=`#${t} .cttk-ticker-wrapper .cttk-ticker-swiper-wrapper`,r=`${s} .cttk-ticker-badge`,c=`${s} .cttk-ticker-content-wrapper`,d=`${s} #cttk-nextBtn`,u=`${s} #cttk-prevBtn`,p=e=>`\n\t\t${ns("height",jt(i[e].size)?i[e].size+"px":"")}\n\t\t${ns("width",jt(i[e].size)?i[e].size+"px":"")}\n\t\t${ns("font-size",jt(i[e].size)?i[e].size+"px":"")}\n\t\t${ns("padding",hs(i[e].padding))}\n\t\t${ns("color",i.normal.color)}\n\t\t${ns("fill",i.normal.color)}\n\t\t${ns("background",i.normal.bg)}\n\t\t${as(i.normal.border)}\n\t\t${Yx(i.normal.borderRadius)}\n`,h=`\n\t\t${ns("color",i.hover.color)}\n\t\t${ns("fill",i.hover.color)}\n\t\t${ns("background",i.hover.bg)}\n\t\t${as(i.hover.border)}\n\t\t${Yx(i.hover.borderRadius)}\n`;return(0,l.jsx)("style",{
360 +children:`\n\t\t${Cs(t,a)}\n\t\t${ps(r,n.typography)?.googleFontLink}\n\t\t${ps(`${c} a.cttk-ticker-link`,o.typography)?.googleFontLink}\n\t\t${ps(r,n.typography)?.styles}\n\t\t${r}{\n\t\t\t${ns("width",n.desktop.width)}\n\t\t\t${ns("height",n.desktop.height)}\n\t\t\t${ns("color",n.color.text)}\n\t\t\t${ns("padding",hs(n.desktop.padding))}\n\t\t\t${ns("margin",hs(n.desktop.margin))}\n\t\t\t${as(n.border)}\n\t\t\t${ns("border-radius",hs(n.desktop.bRadius))}\n\t\t\t${os(n.color.bg)}\n\t\t}\n\t\t${c}{\n\t\t\t${ns("background-color",o.bg)}\n\t\t\t${ns("padding",hs(o.padding.desktop))}\n\t\t\t${Yx(o.bRadius)}\n\t\t\twidth:calc(100% - ${jt(n.desktop.width)?n.desktop.width:"0px"});\n\t\t}\n\t\t${c} a.cttk-ticker-link{\n\t\t\t${ns("color",o.color.normal)}\n\t\t\ttransition:all 0.2s ease-in-out;\n\t\t}\n\t\t${c} a.cttk-ticker-link:hover{\n\t\t\t${ns("color",o.color.hover)}\n\t\t}\n\t\t${d}{\n\t\t\t${p("desktop")}\n\t\t\tright:${i.desktop.alignLeft}px;\n\t\t}\n\t\t${d}:hover{\n\t\t\t${h}\n\t\t}\n\t\t${u}{\n\t\t\t${p("desktop")}\n\t\t\tright:${i.desktop.alignRight}px;\n\t\t}\n\t\t${u}:hover{\n\t\t\t${h}\n\t\t}\n\n\t\t${ps(`${c} .cttk-ticker-link`,o.typography)?.styles}\n\n\t\t@media only screen and (min-width:641px) and (max-width: 1024px){\n\t\t\t${r}{\n\t\t\t\t${ns("width",n.tablet.width)}\n\t\t\t\t${ns("height",n.tablet.height)}\n\t\t\t\t${ns("padding",hs(n.tablet.padding))}\n\t\t\t\t${ns("margin",hs(n.tablet.margin))}\n\t\t\t\t${Yx(n.tablet.bRadius)}\n\t\t\t}\n\t\t\t${c}{\n\t\t\t\t${ns("padding",hs(o.padding.tablet))}\n\t\t\t\twidth:calc(100% - ${jt(n.tablet.width)?n.tablet.width:"0px"});\n\t\t\t}\n\t\t\t${d}{\n\t\t\t\t${p("tablet")}\n\t\t\t\tright:${i.tablet.alignLeft}px;\n\t\t\t}\n\t\t\t${u}{\n\t\t\t\t${p("tablet")}\n\t\t\t\tright:${i.tablet.alignRight}px;\n\t\t\t}\n\t\t}\n\n\t\t@media only screen and (max-width: 640px){\n\t\t\t${r}{\n\t\t\t\t${ns("width",n.mobile.width)}\n\t\t\t\t${ns("height",n.mobile.height)}\n\t\t\t\t${ns("padding",hs(n.mobile.padding))}\n\t\t\t\t${ns("margin",hs(n.mobile.margin))}\n\t\t\t\t${Yx(n.mobile.bRadius)}\n\t\t\t}\n\t\t\t${c}{\n\t\t\t\t${ns("padding",hs(o.padding.mobile))}\n\t\t\t\twidth:calc(100% - ${jt(n.mobile.width)?n.mobile.width:"0px"});\n\t\t\t}\n\t\t\t${d}{\n\t\t\t${p("mobile")}\n\t\t\t\tright:${i.mobile.alignLeft}px;\n\t\t\t}\n\t\t\t${u}{\n\t\t\t${p("mobile")}\n\t\t\t\tright:${i.mobile.alignRight}px;\n\t\t\t}\n\t\t}\n\t`})},Qx=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Zx=[{label:(0,x.__)("Style 1","b-blocks"),value:"style1",icon:af.style1.right},{label:(0,x.__)("Style 2","b-blocks"),value:"style2",icon:af.style2.right},{label:(0,x.__)("Style 3","b-blocks"),value:"style3",icon:af.style3.right},{label:(0,x.__)("Style 4","b-blocks"),value:"style4",icon:af.style4.right},{label:(0,x.__)("Style 5","b-blocks"),value:"style5",icon:af.style5.right},{label:(0,x.__)("Style 6","b-blocks"),value:"style6",icon:af.style6.right}],Xx=[{value:"slide",label:"Slide"},{value:"fade",label:"Fade"}],Jx=[{value:"left",label:"Left"},{value:"right",label:"Right"}],ey=[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Step Start","b-blocks"),value:"step-start"},{label:(0,x.__)("Step End","b-blocks"),value:"step-end"}],ty=({options:e,value:t,tooltipPosition:n="top",label:o,onChange:i,...a})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:o}),(0,l.jsx)(y.ButtonGroup,{className:"bPlBtnGroup",children:Object.values(e).map((e=>(0,l.jsx)(y.Tooltip,{text:e.label,position:n,children:(0,l.jsx)(y.Button,{icon:e?.icon,isPrimary:t===e.value,"aria-pressed":t===e.value,isMedium:!0,onClick:()=>i(e.value),...a})},e.value)))})]}),ny=({attributes:e,setAttributes:t,index:n})=>{const{content:o}=e,i=o[n];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalInputControl,{label:(0,x.__)("Content","b-blocks"),className:"mt5",value:i.text,onChange:e=>t({content:be(o,e,n,"text")})}),(0,l.jsx)(y.__experimentalInputControl,{label:(0,x.__)("Link","b-blocks"),className:"mt10",value:i.link,onChange:e=>t({content:be(o,e,n,"link")})})]})},oy=({attributes:e,updateObj:t})=>{const{options:n}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Ticker Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{className:"mb10",label:(0,x.__)("Effect","b-blocks"),labelPosition:"edge",value:n.effect,options:Xx,onChange:e=>t("options",e,"effect")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Slider Speed(ms)","b-blocks"),value:n.sliderSpeed,onChange:e=>t("options",e,"sliderSpeed"),min:0,max:1e4}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Autoplay","b-blocks"),checked:n.isAutoplay,value:n.isAutoplay,onChange:e=>t("options",e,"isAutoplay")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:n.easing,options:ey,onChange:e=>t("options",e,"easing")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Autoplay Speed(ms)","b-blocks"),value:n.autoPlaySpeed,onChange:e=>t("options",e,"autoPlaySpeed"),min:0,max:1e4}),n.isAutoplay&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pause On Hover","b-blocks"),checked:n.isPauseOnHover,value:n.isPauseOnHover,onChange:e=>t("options",e,"isPauseOnHover")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Infinite Loop","b-blocks"),checked:n.isLoop,value:n.isLoop,onChange:e=>t("options",e,"isLoop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Grab Cursor","b-blocks"),checked:n.isGrabCursor,value:n.isGrabCursor,onChange:e=>t("options",e,"isGrabCursor")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Navigation Arrows","b-blocks"),checked:n.isArrows,value:n.isArrows,onChange:e=>t("options",e,"isArrows")}),"slide"===n.effect&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",value:n.direction,options:Jx,onChange:e=>t("options",e,"direction")})]})})},iy=({attributes:e,setAttributes:t,updateObj:n})=>{const{badge:o,content:i,arrows:a}=e,s={text:`Ticker custom content ${i.length+1}`,link:"#",toggle:!1};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalInputControl,{label:(0,x.__)("Badge Text","b-blocks"),className:"mt5",value:o.text,onChange:e=>n("badge",e,"text")}),(0,l.jsx)(_a,{attributes:e,setAttributes:t,newItem:s,design:"sortable",itemLabel:"Item",arrKey:"content",title:"text",ItemSettings:ny})]}),(0,l.jsx)(oy,{attributes:e,updateObj:n}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Arrows","b-blocks"),initialOpen:!1,children:(0,l.jsx)(ty,{label:(0,x.__)("Arrow Style:","slider"),value:a.icon,onChange:e=>n("arrows",e,"icon"),options:Zx})})]})},ay=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{arrows:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Arrows","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Arrows Size","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o[t].size,onChange:e=>n("arrows",e,t,"size")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Align Left Arrow","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o[t].alignLeft,onChange:e=>n("arrows",e,t,"alignLeft"),min:-50,max:200}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Align Right Arrow","b-blocks")," ",(0,l.jsx)(_,{})]}),
361 +value:o[t].alignRight,onChange:e=>n("arrows",e,t,"alignRight"),min:-50,max:200}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[t].padding,onChange:e=>n("arrows",e,"padding",t)}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:o[e.name].bg,onChange:t=>n("arrows",t,e.name,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o[e.name].color,onChange:t=>n("arrows",t,e.name,"color")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e.name].border,onChange:t=>n("arrows",t,e.name,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:o[e.name].borderRadius,onChange:t=>n("arrows",t,e.name,"borderRadius")})]})})]})})),sy=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{badge:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",value:o[n].width,onChange:e=>t("badge",e,n,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o[n].height,labelPosition:"edge",onChange:e=>t("badge",e,n,"height")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:o.color.bg,onChange:e=>t("badge",e,"color","bg"),defaults:{color:"#0e0e0e"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color.text,onChange:e=>t("badge",e,"color","text"),default:"#00F"}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("badge",e,"typography")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[n].padding,onChange:e=>t("badge",e,n,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[n].margin,onChange:e=>t("badge",e,n,"margin")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("badge",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[n].bRadius,onChange:e=>t("badge",e,n,"bRadius")})]})})),ry=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{style:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Style","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.padding[n],resetValues:{top:"0px",right:"0px",bottom:"0px",left:"0px"},onChange:e=>t("style",e,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:o.bRadius,resetValues:{top:"0px",right:"0px",bottom:"0px",left:"0px"},onChange:e=>t("style",e,"bRadius")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:o.bg,onChange:e=>t("style",e,"bg")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("style",e,"typography")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt10",activeClass:"activeTab",tabs:en,onSelect:me,children:e=>(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:o.color[e.name],onChange:n=>t("style",n,"color",e.name)})})]})})),ly=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(sy,{...e}),(0,l.jsx)(ry,{...e}),(0,l.jsx)(ay,{...e})]}),cy=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,a=fe(t,n);return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡"," ",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:"bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Qx,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(iy,{...e,updateObj:a}),"style"===t.name&&(0,l.jsx)(ly,{...e,updateObj:a}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},dy=(0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,selectBlock:i}=e,a=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(cy,{attributes:t,setAttributes:n,isPremium:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),onClick:()=>i(o),children:[(0,l.jsx)(Kx,{attributes:t,id:`block-${o}`}),(0,l.jsx)(qx,{attributes:t})]})]})}));Pl(nf.name)&&(0,p.registerBlockType)(nf,{icon:pr,edit:dy})
362 +;const uy=JSON.parse('{"apiVersion":3,"name":"b-blocks/countdown","title":"Countdown","description":"Display events date into a timer.","category":"bBlocks","keywords":["countdown timer","countdown events","set timer"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"destDate":{"type":"string","default":""},"layout":{"type":"string","default":"default"},"isResponsive":{"type":"boolean","default":true},"boxIsInline":{"type":"boolean","default":false},"boxPosition":{"type":"string","default":"center"},"isLabels":{"type":"boolean","default":true},"isDays":{"type":"boolean","default":true},"daysLabel":{"type":"string","default":"Days"},"isHours":{"type":"boolean","default":true},"hoursLabel":{"type":"string","default":"Hours"},"isMinutes":{"type":"boolean","default":true},"minutesLabel":{"type":"string","default":"Minutes"},"isSeconds":{"type":"boolean","default":true},"secondsLabel":{"type":"string","default":"Seconds"},"isExpired":{"type":"boolean","default":false},"hideOn0":{"type":"boolean","default":false},"hideOnMobile":{"type":"boolean","default":false},"hideOnTablet":{"type":"boolean","default":false},"prefixSuffixDirection":{"type":"string","default":"row"},"prefixText":{"type":"string","default":""},"suffixButtonText":{"type":"string","default":""},"suffixButtonUrl":{"type":"string","default":"#"},"addID":{"type":"string","default":""},"addClass":{"type":"string","default":""},"addCSS":{"type":"string","default":""},"width":{"type":"string","default":"0px"},"background":{"type":"object","default":{"color":"#0000"}},"padding":{"type":"object","default":{"vertical":"10px","horizontal":"15px"}},"shadow":{"type":"object","default":{}},"alignment":{"type":"string","default":"center"},"boxBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"boxWidth":{"type":"string","default":"170px"},"boxHeight":{"type":"string","default":"120px"},"boxSpace":{"type":"string","default":"30px"},"boxBorder":{"type":"object","default":{"radius":"5%"}},"boxShadow":{"type":"object","default":{}},"digitTypo":{"type":"object","default":{"fontSize":{"desktop":"48px","tablet":"40px","mobile":"32px"}}},"digitColor":{"type":"string","default":"#fff"},"labelTypo":{"type":"object","default":{"fontSize":{"desktop":"18px","tablet":"17px","mobile":"16px"}}},"labelColor":{"type":"string","default":"#fff"},"isDaysSingleStyle":{"type":"boolean","default":false},"daysBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"daysDigitColor":{"type":"string","default":"#fff"},"daysLabelColor":{"type":"string","default":"#fff"},"isHoursSingleStyle":{"type":"boolean","default":false},"hoursBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"hoursDigitColor":{"type":"string","default":"#fff"},"hoursLabelColor":{"type":"string","default":"#fff"},"isMinutesSingleStyle":{"type":"boolean","default":false},"minutesBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"minutesDigitColor":{"type":"string","default":"#fff"},"minutesLabelColor":{"type":"string","default":"#fff"},"isSecondsSingleStyle":{"type":"boolean","default":false},"secondsBG":{"type":"object","default":{"type":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg, #0040E3, #18D4FD)"}},"secondsDigitColor":{"type":"string","default":"#fff"},"secondsLabelColor":{"type":"string","default":"#fff"},"isSep":{"type":"boolean","default":false},"sepType":{"type":"string","default":":"},"sepSize":{"type":"number","default":52},"sepColor":{"type":"string","default":"#146EF5"},"prefixTextTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"prefixTextColor":{"type":"string","default":"#222"},"suffixButtonTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"suffixButtonColors":{"type":"object","default":{"color":"#fff","bg":"#222"}},"suffixButtonPadding":{"type":"object","default":{"vertical":"14px","horizontal":"28px"}},"isDismiss":{"type":"boolean","default":false},"dismissColor":{"type":"string","default":"#333"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"boxWidth":"120px","boxHeight":"100px","boxSpace":"15px","destDate":""}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),py=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Layout 1","b-blocks"),value:"layout1"},{label:(0,x.__)("Layout 2","b-blocks"),value:"layout2"},{label:(0,x.__)("Layout 3","b-blocks"),value:"layout3"}],hy=[{label:(0,x.__)("Dotted","b-blocks"),value:":"},{label:(0,x.__)("Dashed","b-blocks"),value:"-"},{label:(0,x.__)("Solid","b-blocks"),value:"|"}],gy=[{label:(0,x.__)("Row","b-blocks"),value:"row"},{label:(0,x.__)("Column","b-blocks"),value:"column"}],my=({attributes:e,setAttributes:t,isPremium:n})=>{const{destDate:i,layout:a,isResponsive:s,boxIsInline:c,boxPosition:d,isLabels:u,isDays:p,isHours:g,isMinutes:b,isSeconds:f,isExpired:k=!1,hideOn0:w=!1,hideOnMobile:_=!1,hideOnTablet:C=!1,prefixSuffixDirection:j="row",prefixText:$="",suffixButtonText:S="",suffixButtonUrl:T="#",addID:N="",addClass:M="",addCSS:L="",width:P,background:E,padding:A,shadow:B,alignment:I,boxBG:O,boxWidth:R,boxHeight:z,boxSpace:D,boxBorder:F,boxShadow:H,digitTypo:W,digitColor:U,labelTypo:G,labelColor:V,isDaysSingleStyle:q=!1,daysBG:Y={type:"gradient",gradient:r},daysDigitColor:K="#fff",daysLabelColor:Q="#fff",isHoursSingleStyle:Z=!1,hoursBG:X={type:"gradient",gradient:r},hoursDigitColor:J="#fff",hoursLabelColor:ee="#fff",isMinutesSingleStyle:te=!1,minutesBG:ne={type:"gradient",gradient:r},minutesDigitColor:oe="#fff",minutesLabelColor:ie="#fff",isSecondsSingleStyle:ae=!1,secondsBG:se={type:"gradient",gradient:r},secondsDigitColor:re="#fff",secondsLabelColor:le="#fff",isSep:ce,sepType:de,sepSize:ue,sepColor:pe,prefixTextTypo:he={fontSize:{desktop:15}},prefixTextColor:ge="#222",suffixButtonTypo:be={fontSize:{desktop:16}},suffixButtonColors:fe={color:"#fff",bg:"#222"},suffixButtonPadding:xe={vertical:"14px",horizontal:"28px"},isDismiss:ye=!1,dismissColor:ve="#333"}=e,[ke,we]=(0,m.useState)(!1),_e={isPremium:n,setIsProModalOpen:we};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:()=>me(),children:e=>(0,l.jsxs)(l.Fragment,{children:["general"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:cn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Countdown Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Destination Date:","b-blocks")}),(0,l.jsx)(y.DateTimePicker,{currentDate:i,onChange:e=>t({destDate:e}),is12Hour:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:a,onChange:e=>{t({layout:e}),"default"===e&&t({boxIsInline:!1,background:{type:"solid",color:"#0000"},shadow:{hOffset:"0px",vOffset:"0px",color:"#0000"},boxBG:{type:"gradient",color:o,gradient:r},boxSpace:"30px",boxBorder:{width:"0px",type:"solid",color:"#0000",radius:"5%"},digitColor:"#fff",labelColor:"#fff",isSep:!1,sepColor:o}),"layout1"===e&&t({boxIsInline:!1,background:{type:"gradient",gradient:r},shadow:{hOffset:"5px",vOffset:"5px",color:o},boxBG:{type:"solid",color:"#0000"},boxSpace:"0px",boxBorder:{width:"0px",type:"solid",color:"#0000",radius:"5%"},digitColor:"#fff",labelColor:"#fff",isSep:!0,sepColor:"#fff"}),"layout2"===e&&t({boxIsInline:!1,background:{type:"solid",color:"#0000"},shadow:{hOffset:"0px",vOffset:"0px",color:"#0000"},boxBG:{type:"solid",
363 +color:"#0000"},boxSpace:"30px",boxBorder:{width:"2px",type:"solid",color:o,radius:"5%"},digitColor:o,labelColor:o,isSep:!0,sepColor:o}),"layout3"===e&&t({boxIsInline:!0,background:{type:"solid",color:"#0000"},shadow:{hOffset:"0px",vOffset:"8px",blur:"15px",color:o},boxBG:{type:"solid",color:"#0000"},boxSpace:"30px",boxBorder:{width:"0px",type:"solid",color:"#0000",radius:"5%"},digitColor:o,labelColor:o,isSep:!0,sepColor:o})},options:py})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Responsive on Mobile","b-blocks"),checked:s,onChange:e=>t({isResponsive:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Box Inline?","b-blocks"),checked:c,onChange:e=>t({boxIsInline:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Labels","b-blocks"),checked:u,onChange:e=>t({isLabels:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Days","b-blocks"),checked:p,onChange:e=>t({isDays:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Hours","b-blocks"),checked:g,onChange:e=>t({isHours:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Minutes","b-blocks"),checked:b,onChange:e=>t({isMinutes:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Seconds","b-blocks"),checked:f,onChange:e=>t({isSeconds:e})}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show expired content on expire","b-blocks"),checked:k,onChange:e=>t({isExpired:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Hide box if value is 0","b-blocks"),checked:w,onChange:e=>t({hideOn0:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Hide Countdown on Mobile","b-blocks"),checked:_,onChange:e=>t({hideOnMobile:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Hide Countdown on Tablet","b-blocks"),checked:C,onChange:e=>t({hideOnTablet:e}),..._e,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix & Suffix","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Prefix Suffix Direction:","b-blocks"),labelPosition:"left",value:j,onChange:e=>t({prefixSuffixDirection:e}),options:gy,..._e,Component:y.SelectControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Prefix Text:","b-blocks"),value:$,onChange:e=>t({prefixText:e}),placeholder:(0,x.__)("Prefix/Before Text","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter prefix text to show a message before countdown","b-blocks")}),(0,l.jsx)("hr",{}),(0,l.jsx)(Ya,{label:(0,x.__)("Suffix Button Text:","b-blocks"),value:S,onChange:e=>t({suffixButtonText:e}),placeholder:(0,x.__)("Suffix/After Button Text","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter suffix button text to display a button after countdown","b-blocks")}),S&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Suffix Button Url:","b-blocks"),value:T,onChange:e=>t({suffixButtonUrl:e}),placeholder:(0,x.__)("Button url","b-blocks"),..._e,Component:y.TextControl})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Additional","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("ID:","b-blocks"),value:N,onChange:e=>t({addID:e}),placeholder:(0,x.__)("Enter additional ID","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Class:","b-blocks"),value:M,onChange:e=>t({addClass:e}),placeholder:(0,x.__)("Enter additional Class","b-blocks"),..._e,Component:y.TextControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("CSS:","b-blocks"),value:L,onChange:e=>t({addCSS:e}),placeholder:(0,x.__)("Enter additional CSS","b-blocks"),..._e,Component:y.TextareaControl})]})]}),"style"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Countdown","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:P,onChange:e=>t({width:e}),units:[Pe(900),Ee(100),Ae(56)],isResetValueOnUnitChange:!0}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:E,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:A,onChange:e=>t({padding:e}),defaults:{vertical:"10px",horizontal:"15px"}}),(0,l.jsx)(id,{label:(0,x.__)("Shadow:","b-blocks"),value:B,onChange:e=>t({shadow:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Boxes","b-blocks"),initialOpen:!1,children:[["0px","0%","0em"].includes(P)?"":(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Box Position:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:d,onChange:e=>t({boxPosition:e}),options:tn})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:O,onChange:e=>t({boxBG:e}),defaults:{type:"gradient",color:o,gradient:r}}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:R,onChange:e=>t({boxWidth:e}),units:[Pe(170),Ae(10.5),Be(10.5)],isResetValueOnUnitChange:!0}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:z,onChange:e=>t({boxHeight:e}),units:[Pe(120),Ae(7.5),Be(7.5)],isResetValueOnUnitChange:!0}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Space Between Boxes:","b-blocks"),labelPosition:"left",value:D,onChange:e=>t({boxSpace:e}),units:[Pe(30),Ae(2),Be(2)],isResetValueOnUnitChange:!0}),(0,l.jsx)(ed,{label:(0,x.__)("Border","b-blocks"),value:F,onChange:e=>t({boxBorder:e}),defaults:{radius:"5%"}}),(0,l.jsx)(id,{label:(0,x.__)("Shadow:","b-blocks"),value:H,onChange:e=>t({boxShadow:e})})]}),p||g||b||f?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Digit Typography:","b-blocks"),value:W,onChange:e=>t({digitTypo:e}),defaults:{fontSize:{desktop:48,tablet:40,mobile:32}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Digit Color:","b-blocks"),value:U,onChange:e=>t({digitColor:e}),defaultColor:"#fff"}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Oa,{className:"mt20",label:(0,x.__)("Label Typography:","b-blocks"),value:G,onChange:e=>t({labelTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Label Color:","b-blocks"),value:V,onChange:e=>t({labelColor:e}),defaultColor:"#fff"})]})]}):null,p&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Days Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:q,onChange:e=>t({isDaysSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({daysBG:O,daysDigitColor:U,daysLabelColor:V}),..._e,Component:y.Button})]}),q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Box Background:","b-blocks"),value:Y,onChange:e=>t({daysBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ya,{label:(0,x.__)("Digit Color:","b-blocks"),value:K,onChange:e=>t({daysDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ya,{label:(0,x.__)("Label Color:","b-blocks"),value:Q,onChange:e=>t({daysLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),g&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hours Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:Z,onChange:e=>t({isHoursSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"bPlResetVal",
364 +icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({hoursBG:O,hoursDigitColor:U,hoursLabelColor:V}),..._e,Component:y.Button})]}),Z&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Box Background:","b-blocks"),value:X,onChange:e=>t({hoursBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ya,{label:(0,x.__)("Digit Color:","b-blocks"),value:J,onChange:e=>t({hoursDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ya,{label:(0,x.__)("Label Color:","b-blocks"),value:ee,onChange:e=>t({hoursLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),b&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Minutes Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:te,onChange:e=>t({isMinutesSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({minutesBG:O,minutesDigitColor:U,minutesLabelColor:V}),..._e,Component:y.Button})]}),te&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Box Background:","b-blocks"),value:ne,onChange:e=>t({minutesBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ya,{label:(0,x.__)("Digit Color:","b-blocks"),value:oe,onChange:e=>t({minutesDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ya,{label:(0,x.__)("Label Color:","b-blocks"),value:ie,onChange:e=>t({minutesLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),f&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Seconds Style","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Enable Single Style","b-blocks"),checked:ae,onChange:e=>t({isSecondsSingleStyle:e}),..._e,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"bPlResetVal",icon:"image-rotate",label:(0,x.__)("Reset style according to parent","b-blocks"),tooltipPosition:"top right",onClick:()=>t({secondsBG:O,secondsDigitColor:U,secondsLabelColor:V}),..._e,Component:y.Button})]}),ae&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{label:(0,x.__)("Box Background:","b-blocks"),value:se,onChange:e=>t({secondsBG:e}),defaults:{type:"gradient",color:o,gradient:r},..._e,Component:An}),(0,l.jsx)(Ya,{label:(0,x.__)("Digit Color:","b-blocks"),value:re,onChange:e=>t({secondsDigitColor:e}),defaultColor:"#fff",..._e,Component:Ue}),u&&(0,l.jsx)(Ya,{label:(0,x.__)("Label Color:","b-blocks"),value:le,onChange:e=>t({secondsLabelColor:e}),defaultColor:"#fff",..._e,Component:Ue})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:ce,onChange:e=>t({isSep:e})}),ce&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:de,onChange:e=>t({sepType:e}),options:hy})]}),(0,l.jsx)(v,{children:(0,x.__)("Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:ue,onChange:e=>t({sepSize:e}),min:0,max:160,step:1,allowReset:!0,resetFallbackValue:48,initialPosition:48}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:pe,onChange:e=>t({sepColor:e}),defaultColor:o})]})]}),$&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Prefix Text","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Typography:","b-blocks"),value:he,onChange:e=>t({prefixTextTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}},..._e,Component:Oa}),(0,l.jsx)(Ya,{label:(0,x.__)("Color:","b-blocks"),value:ge,onChange:e=>t({prefixTextColor:e}),defaultColor:"#222",..._e,Component:Ue})]}),S&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Suffix Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Typography:","b-blocks"),value:be,onChange:e=>t({suffixButtonTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}},..._e,Component:Oa}),(0,l.jsx)(Ya,{value:fe,onChange:e=>t({suffixButtonColors:e}),defaults:{color:"#fff",bg:"#222"},..._e,Component:On}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:xe,onChange:e=>t({suffixButtonPadding:e}),defaults:{vertical:"14px",horizontal:"28px"},..._e,Component:ad})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Dismiss Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Countdown Dismissible?","b-blocks"),checked:ye,onChange:e=>t({isDismiss:e}),..._e,Component:y.ToggleControl}),ye&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{label:(0,x.__)("Color:","b-blocks"),value:ve,onChange:e=>t({dismissColor:e}),defaultColor:"#333",..._e,Component:Ue})})]})]})]})})}),(0,l.jsxs)(jn,{isProModalOpen:ke,setIsProModalOpen:we,block:"Countdown",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Expired Display: ","b-blocks")}),(0,x.__)("Show content that has expired after the countdown timer has elapsed.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Hide at Zero: ","b-blocks")}),(0,x.__)("Conceal the box when the countdown timer reaches 0.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Mobile Visibility: ","b-blocks")}),(0,x.__)("Toggle visibility of the countdown timer on mobile devices.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Tablet Visibility: ","b-blocks")}),(0,x.__)("Toggle visibility of the countdown timer on tablet devices.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Prefix Text: ","b-blocks")}),(0,x.__)("Display text before the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Prefix Style: ","b-blocks")}),(0,x.__)("Implement typography settings and adjust the color for the prefix text.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Suffix Button: ","b-blocks")}),(0,x.__)("Show a button after the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Suffix Button Style: ","b-blocks")}),(0,x.__)("Apply typography, colors(text and background) and padding for the suffix button.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Prefix Suffix Direction: ","b-blocks")}),(0,x.__)("Direction of the content displayed before and after the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Single Style: ","b-blocks")}),(0,x.__)("Apply different styles to each box, including variations in background, digit color, and label color.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Dismiss Button: ","b-blocks")}),(0,x.__)("Provide a button to dismiss/hide the countdown timer.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Patterns: ","b-blocks")}),(0,x.__)("Additional patterns for expanding the variety of countdown styles.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Shortcode Integration: ","b-blocks")}),(0,x.__)("Shortcode for flexible use across various locations.","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:I,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Countdown Alignment"),alignmentControls:[{title:(0,x.__)("Countdown in left","b-blocks"),align:"flex-start",icon:"align-left"},{title:(0,x.__)("Countdown in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Countdown in right","b-blocks"),align:"flex-end",icon:"align-right"}]})})]})
365 +},by="bBlocksCountdown",fy=({attributes:e,id:t})=>{const{boxPosition:n,prefixSuffixDirection:o="row",prefixText:i="",suffixButtonText:a="",addCSS:s="",width:c,background:d,padding:u,shadow:p,alignment:h,boxBG:g,boxWidth:m,boxHeight:b,boxSpace:f,boxBorder:x,boxShadow:y,digitTypo:v,digitColor:k,labelTypo:w,labelColor:_,isDaysSingleStyle:C=!1,daysBG:j={type:"gradient",gradient:r},daysDigitColor:$="#fff",daysLabelColor:S="#fff",isHoursSingleStyle:T=!1,hoursBG:N={type:"gradient",gradient:r},hoursDigitColor:M="#fff",hoursLabelColor:L="#fff",isMinutesSingleStyle:P=!1,minutesBG:E={type:"gradient",gradient:r},minutesDigitColor:A="#fff",minutesLabelColor:B="#fff",isSecondsSingleStyle:I=!1,secondsBG:O={type:"gradient",gradient:r},secondsDigitColor:R="#fff",secondsLabelColor:z="#fff",sepType:D,sepSize:F,sepColor:H,prefixTextTypo:W={fontSize:{desktop:15}},prefixTextColor:U="#222",suffixButtonTypo:G={fontSize:{desktop:16}},suffixButtonColors:V={color:"#fff",bg:"#222"},suffixButtonPadding:q={vertical:"14px",horizontal:"28px"},dismissColor:Y="#333"}=e,K=`#${t}`,Q=`${K} .countdownItems`,Z=`${Q} .countdownItem`,X=`${K} .${by}`,J=(e,t,n,o,i)=>e?`${Q} .${t}{\n\t\t${os(n)}\n\t}\n\t${Q} .${t} .digit{\n\t\tcolor: ${o};\n\t}\n\t${Q} .${t} .label{\n\t\tcolor: ${i};\n\t}`:"";return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",v)?.googleFontLink}\n\t\t${ps("",w)?.googleFontLink}\n\t\t${ps("",W)?.googleFontLink}\n\t\t${ps("",G)?.googleFontLink}\n\t\t${ps(`${Z} .digit`,v)?.styles}\n\t\t${ps(`${Z} .label`,w)?.styles}\n\t\t${ps(`${X} .prefixText`,W)?.styles}\n\t\t${ps(`${X} .suffixButton`,G)?.styles}\n\n\t\t${K}{\n\t\t\talign-items: ${h};\n\t\t\tjustify-content: ${h};\n\t\t}\n\t\t${X}{\n\t\t\tflex-direction: ${o};\n\t\t\tjustify-content: ${i||a?"space-between":"center"};\n\t\t\twidth: ${["0px","0%","0em"].includes(c)?"auto":c};\n\t\t\t${os(d)}\n\t\t\tpadding: ${us(u)};\n\t\t\tbox-shadow: ${ds(p)};\n\t\t}\n\t\t${Q}{\n\t\t\tjustify-content: ${n};\n\t\t\tgap: ${f};\n\t\t\tmargin: ${i||a?"column"===o?"20px 0":"0 20px":"0"}\n\t\t}\n\t\t${Z}{\n\t\t\t${os(g)}\n\t\t\twidth: ${m};\n\t\t\theight: ${b};\n\t\t\t${is(x)}\n\t\t\tbox-shadow: ${ds(y)};\n\t\t}\n\t\t${Z} .digit{\n\t\t\tcolor: ${k};\n\t\t}\n\t\t${Z} .label{\n\t\t\tcolor: ${_};\n\t\t}\n\t\t${J(C,"countdownDays",j,$,S)}\n\t\t${J(T,"countdownHours",N,M,L)}\n\t\t${J(P,"countdownMinutes",E,A,B)}\n\t\t${J(I,"countdownSeconds",O,R,z)}\n\n\t\t${Q} .separator::before{\n\t\t\tcontent: '${D}';\n\t\t\tfont-size: ${F}px;\n\t\t\tcolor: ${H};\n\t\t}\n\t\t${X} .prefixText{\n\t\t\tcolor: ${U};\n\t\t}\n\t\t${X} .suffixButton{\n\t\t\t${ss(V)}\n\t\t\tpadding: ${us(q)};\n\t\t}\n\t\t${X} .countdownClose{\n\t\t\tfill: ${Y};\n\t\t}\n\t\t${s}\n\t\t`.replace(/\s+/g," ")}})},xy=e=>e>(new Date).getTime()?(e-(new Date).getTime())/1e3:0,yy=e=>Math.floor(e%86400/3600),vy=e=>Math.floor(e%3600/60),ky=e=>Math.floor(e%60),wy=e=>e<10?("0"+e).slice(-2):e,_y=(window.matchMedia("(max-width: 640px)"),window.matchMedia("(max-width: 1024px)"),(e,t=!0,n=!0,o=!0)=>{const i=(a=e,Math.floor(a/86400));var a;const s=t?yy(e):24*i+yy(e),r=n?vy(e):60*s+vy(e),l=o?ky(e):60*r+ky(e);return{days:i,hours:s,minutes:r,seconds:l,expired:!(i+s+r+l>0)}}),Cy=(e,t=!0,n=!0,o=!0)=>{const[i,a]=(0,m.useState)(xy(e));return(0,m.useEffect)((()=>{const t=setInterval((()=>{a(xy(e))}),1e3);return()=>clearInterval(t)}),[e]),_y(i,t,n,o)},jy=({attributes:e,Box:t,isBackend:n=!1,custom:o={}})=>{const{destDate:i,boxIsInline:a,isLabels:s,isDays:r,daysLabel:c,isHours:d,hoursLabel:u,isMinutes:p,minutesLabel:h,isSeconds:g,secondsLabel:m,hideOn0:b,isSep:f}=e,x=new Date(i).getTime(),{days:y,hours:v,minutes:k,seconds:w}=Cy(x,r,d,p),_=a?"inline":"",C=b&&0===y,j=b&&0===y+v,$=b&&0===y+v+k,S=b&&0===y+v+k+w;return(0,l.jsxs)(l.Fragment,{children:[!C&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t,{is:r,boxClass:`countdownDays ${_}`,digit:wy(y),isLabels:s,label:c,onChange:e=>n&&o.setAttributes({daysLabel:e})}),f&&r&&(d||p||g)&&(0,l.jsx)("span",{className:"separator"})]}),!j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t,{is:d,boxClass:`countdownHours ${_}`,digit:wy(v),isLabels:s,label:u,onChange:e=>n&&o.setAttributes({hoursLabel:e})}),f&&d&&(p||g)&&(0,l.jsx)("span",{className:"separator"})]}),!$&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t,{is:p,boxClass:`countdownMinutes ${_}`,digit:wy(k),isLabels:s,label:h,onChange:e=>n&&o.setAttributes({minutesLabel:e})}),f&&p&&g&&(0,l.jsx)("span",{className:"separator"})]}),!S&&(0,l.jsx)(t,{is:g,boxClass:`countdownSeconds ${_}`,digit:wy(w),isLabels:s,label:m,onChange:e=>n&&o.setAttributes({secondsLabel:e})})]})},$y=({attributes:e,Box:t,closeEl:n,isBackend:o=!1,custom:i={},children:a})=>{const{destDate:s,isResponsive:r,isExpired:c,prefixText:d,suffixButtonText:u,suffixButtonUrl:p,addID:h,addClass:g,isDismiss:m}=e,b=new Date(s).getTime(),{expired:f}=Cy(b);return(0,l.jsxs)("div",{className:`${by} ${g}`,id:h,children:[c&&f?a:(0,l.jsxs)(l.Fragment,{children:[d&&(0,l.jsx)("p",{className:"prefixText",dangerouslySetInnerHTML:{__html:St(d)}}),(0,l.jsx)("div",{className:"countdownItems "+(r?`${by}Responsive`:""),children:(0,l.jsx)(jy,{attributes:e,Box:t,isBackend:o,custom:i})}),u&&(0,l.jsx)("a",{className:"suffixButton",href:$t(p),children:u})]}),m&&n]})},Sy=(0,l.jsx)("svg",{className:"countdownClose",xmlns:"http://www.w3.org/2000/svg",width:22,height:22,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M256,31C131.7,31,31,131.7,31,256s100.7,225,225,225s225-100.7,225-225S380.3,31,256,31z M366.3,315.1 c4.3,4.3,4.3,11.2,0,15.4l-35.9,35.8c-4.3,4.3-11.2,4.3-15.4,0l-59-59.5l-59.1,59.5c-4.3,4.3-11.2,4.3-15.4,0l-35.8-35.9 c-4.3-4.3-4.3-11.2,0-15.4l59.5-59l-59.5-59.1c-4.3-4.3-4.3-11.2,0-15.4l35.9-35.9c4.3-4.3,11.2-4.3,15.4,0l59,59.6l59.1-59.5 c4.3-4.3,11.2-4.3,15.4,0l35.9,35.9c4.3,4.3,4.3,11.2,0,15.4l-59.6,59L366.3,315.1z"})}),Ty=e=>{const{is:t,boxClass:n,digit:o,isLabels:i,label:a,onChange:s}=e;return t&&(0,l.jsxs)("div",{className:`countdownItem ${n}`,children:[(0,l.jsx)("span",{className:"digit",children:o}),i&&(0,l.jsx)(h.RichText,{className:"label",tagName:"span",value:a,onChange:e=>s(e),placeholder:(0,x.__)("Label","countdown-time")})]})};Pl(uy.name)&&(0,p.registerBlockType)(uy,{icon:hr,transforms:{from:[{type:"block",blocks:["ctb/countdown-time"],transform:e=>(0,p.createBlock)("b-blocks/countdown",e)},{type:"prefix",prefix:"count",transform:()=>(0,p.createBlock)("b-blocks/countdown")}],to:[{type:"block",blocks:["ctb/countdown-time"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("ctb/countdown-time",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{destDate:i}=t,a=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{""===i&&n({destDate:new Date((new Date).setDate((new Date).getDate()+2))})}),[i]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(my,{attributes:t,setAttributes:n,isPremium:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(fy,{attributes:t,id:`block-${o}`}),(0,l.jsx)($y,{attributes:t,Box:Ty,closeEl:(0,l.jsx)(y.Tooltip,{text:"Hide will only work in frontend",placement:"top",position:"top",children:Sy}),isBackend:!0,custom:{setAttributes:n},children:(0,l.jsx)("div",{className:"countdownExpired",children:(0,l.jsx)(h.InnerBlocks,{template:[["core/heading",{content:"Oops! the offers just expired!",textAlign:"center",level:3,style:{color:{text:"#dc3545"}}}],["core/paragraph",{content:"But don't worry! we will announce next offer as soon as possible. Stay with us.",style:{color:{text:"#222"}}}]]})})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})})
366 +;const Ny=JSON.parse('{"apiVersion":3,"name":"b-blocks/counters","title":"Counters","description":"Display Number as animated counter.","category":"bBlocks","keywords":["counter","number counter","at a glance"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"counters":{"type":"array","default":[{"background":{"color":"#146EF5"},"icon":{"class":"fa fa-puzzle-piece","fontSize":50,"color":"#fff"},"number":{"start":0,"end":30,"prefix":"","suffix":"+","color":"#fff"},"label":{"text":"Products","color":"#fff"}},{"background":{"color":"#146EF5"},"icon":{"class":"fa fa-thumbs-up","fontSize":50,"color":"#fff"},"number":{"start":0,"end":380,"prefix":"","suffix":"K+","color":"#fff"},"label":{"text":"Customers","color":"#fff"}},{"background":{"color":"#146EF5"},"icon":{"class":"fa fa-award","fontSize":50,"color":"#fff"},"number":{"start":0,"end":90,"prefix":"","suffix":"","color":"#fff"},"label":{"text":"Awards","color":"#fff"}}]},"theme":{"type":"string","default":"default"},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"20px"},"rowGap":{"type":"string","default":"30px"},"duration":{"type":"number","default":2000},"separator":{"type":"object","default":{"char":""}},"background":{"type":"object","default":{"color":"#0000"}},"padding":{"type":"object","default":{"vertical":"20px","horizontal":"0px"}},"textAlign":{"type":"string","default":"center"},"counterWidth":{"type":"string","default":"250px"},"counterHeight":{"type":"string","default":"250px"},"isIcon":{"type":"boolean","default":true},"iconSize":{"type":"number","default":50},"iconPosition":{"type":"string","default":"top"},"numberTypo":{"type":"object","default":{"fontSize":{"desktop":"48px","tablet":"40px","mobile":"32px"}}},"isLabel":{"type":"boolean","default":true},"labelTypo":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"}}},"counterPadding":{"type":"object","default":{"vertical":"20px","horizontal":"20px"}},"counterBorder":{"type":"object","default":{"radius":"50%"}},"counterShadow":{"type":"object","default":{}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),My=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Theme 1","b-blocks"),value:"theme1"},{label:(0,x.__)("Theme 2","b-blocks"),value:"theme2"},{label:(0,x.__)("Theme 3","b-blocks"),value:"theme3"}],Ly=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Label","b-blocks"),value:"label"}],Py=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Coma (1,000)","b-blocks"),value:","},{label:(0,x.__)("Space (1 000)","b-blocks"),value:" "}],Ey=e=>{const{attributes:t,setAttributes:n,index:o}=e,{counters:i}=t,a=i[o],{background:s,icon:r,number:c,label:d}=a,u=(e,t,...a)=>{n({counters:be(i,t,o,e,...a)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:s,onChange:e=>u("background",e),defaults:{color:"#0000"}}),(0,l.jsx)(Un,{label:(0,x.__)("Icon:","b-blocks"),value:r,onChange:e=>u("icon",e),defaults:{class:"fa fa-award",fontSize:50,color:"#fff"},isSize:!1}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Start Number:","b-blocks"),labelPosition:"left",className:"mt20",value:c.start,onChange:e=>u("number",parseFloat(e),"start")}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("End Number:","b-blocks"),labelPosition:"left",className:"mt20",value:c.end,onChange:e=>u("number",parseFloat(e),"end")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Prefix:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:c.prefix,onChange:e=>u("number",e,"prefix")})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Suffix:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:c.suffix,onChange:e=>u("number",e,"suffix")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Number Color:","b-blocks"),value:c.color,onChange:e=>u("number",e,"color"),defaultColor:"#fff"}),(0,l.jsx)(Ue,{label:(0,x.__)("Label Color:","b-blocks"),value:d.color,onChange:e=>u("label",e,"color"),defaultColor:"#fff"})]})},Ay=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:i,isPremium:a,device:s})=>{const{counters:r=[],theme:c,columns:d,columnGap:u,rowGap:p,duration:g,separator:m,background:b,padding:f,counterWidth:k,counterHeight:w,textAlign:C,isIcon:j,iconSize:$,iconPosition:S,numberTypo:T,isLabel:N,labelTypo:M,counterPadding:L,counterBorder:P,counterShadow:E}=e,A={background:{color:o},icon:{class:"fa fa-award",fontSize:50,color:"#fff"},number:{start:0,end:300,prefix:"",suffix:"",color:"#fff"},label:{text:"Awards",color:"#fff"}},B=e=>{const n=zb(r,(t=>{t.map(((n,o)=>{for(const n of e){const e=n[0],i=n[1];t[o][e]=i}}))}));t({counters:n})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:h=>(0,l.jsxs)(l.Fragment,{children:["general"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:dn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove counters","b-blocks"),children:[(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:i,arrKey:"counters",ItemSettings:Ey,itemLabel:"Counter",newItem:A,design:a?"sortable":"single"}),!a&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>{t({theme:e}),"default"===e&&t({background:{...b,type:"solid",color:"#0000"},padding:{...f,vertical:"20px",horizontal:"0px"},counterHeight:"250px",counterBorder:{...P,width:"0px",color:"#0000",radius:"50%"},iconPosition:"top",iconSize:50}),"theme1"===e&&t({background:{...b,type:"solid",color:"#0000"},padding:{...f,vertical:"20px",horizontal:"0px"},counterHeight:"175px",counterBorder:{...P,width:"0px",color:"#0000",radius:"5px"},iconPosition:"label",iconSize:M?.fontSize}),"theme2"===e&&t({background:{...b,type:"solid",color:"#0000"},padding:{...f,vertical:"20px",horizontal:"0px"},counterHeight:"175px",counterBorder:{...P,width:"2px",color:o,radius:"5px"},iconPosition:"label",iconSize:M?.fontSize}),"theme3"===e&&t({background:{...b,type:"image",image:{url:"https://i.imgur.com/n8bbzIE.jpeg"},overlayColor:"#000000b3"},padding:{...f,vertical:"140px",horizontal:"0px"},counterHeight:"250px",counterBorder:{...P,width:"0px",color:"#0000",radius:"50%"},iconPosition:"top",iconSize:50}),r?.map((t=>{const{background:n,icon:i,number:a,label:s}=t,r=[["background",{...n,type:"solid",color:o}],["icon",{...i,color:"#fff"}],["number",{...a,color:"#fff"}],["label",{...s,color:"#fff"}]],l=[["background",{...n,type:"solid",color:o}],["icon",{...i,color:"#fff"}],["number",{...a,color:"#fff"}],["label",{...s,color:"#fff"}]],c=[["background",{...n,type:"solid",color:"#0000"}],["icon",{...i,color:o}],["number",{...a,color:o}],["label",{...s,color:o}]],d=[["background",{...n,type:"solid",color:"#0000"}],["icon",{...i,color:"#fff"}],["number",{...a,color:"#fff"}],["label",{...s,color:"#fff"}]];"default"===e&&B(r),"theme1"===e&&B(l),"theme2"===e&&B(c),"theme3"===e&&B(d)}))},options:My})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:d[s],onChange:e=>{t({columns:{
367 +...d,[s]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Counters Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Duration:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({duration:parseFloat(e)})}),(0,l.jsx)("small",{children:(0,x.__)("Duration in milliseconds:","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Separator","b-blocks"),labelPosition:"left",value:m.char,onChange:e=>t({separator:{...m,char:e}}),options:Py})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Counter Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:j,onChange:e=>t({isIcon:e})}),(0,l.jsx)(v,{children:(0,x.__)("Icon Size:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:$,onChange:e=>t({iconSize:e}),min:0,max:400,step:1,allowReset:!0,resetFallbackValue:50,initialPosition:50}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Icon Position:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:S,onChange:e=>{t({iconPosition:e}),"top"===e&&t({iconSize:50}),"label"===e&&t({iconSize:M?.fontSize})},options:Ly})]}),(0,l.jsx)(Oa,{className:"mt20",label:(0,x.__)("Number Typography:","b-blocks"),value:T,onChange:e=>t({numberTypo:e}),defaults:{fontSize:{desktop:48,tablet:40,mobile:32}}}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Label","b-blocks"),checked:N,onChange:e=>t({isLabel:e})}),N&&(0,l.jsx)(Oa,{label:(0,x.__)("Label Typography:","b-blocks"),value:M,onChange:e=>t({labelTypo:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18}}})]})]}),"style"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Counters","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:b,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:f,onChange:e=>t({padding:e}),defaults:{vertical:"20px",horizontal:"0px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Single Counter","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:k,onChange:e=>t({counterWidth:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:w,onChange:e=>t({counterHeight:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:L,onChange:e=>t({counterPadding:e}),defaults:{vertical:"20px",horizontal:"20px"}}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:P,onChange:e=>t({counterBorder:e}),defaults:{radius:"50%"}}),(0,l.jsx)(id,{label:(0,x.__)("Shadow:","b-blocks"),value:E,onChange:e=>t({counterShadow:e})})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Counter","b-blocks"),onClick:()=>t({counters:[...r,A]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:C,onChange:e=>t({textAlign:e})})]})]})})),By="bBlocksCounters",Iy=({attributes:e,id:t})=>{const{counters:n=[],columnGap:o,rowGap:i,background:a,padding:s,textAlign:r,counterWidth:c,counterHeight:d,iconSize:u,numberTypo:p,labelTypo:h,counterPadding:g,counterBorder:m,counterShadow:b}=e,f=`#${t}`,x=`${f} .${By}`,y=`${x} .counter`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",p)?.googleFontLink}\n\t\t${ps("",h)?.googleFontLink}\n\t\t${ps(`${y} .counterNumber`,p)?.styles}\n\t\t${ps(`${y} .counterLabel`,h)?.styles}\n\t\t\n\t\t${x}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t\t${os(a)}\n\t\t\tpadding: ${us(s)};\n\t\t}\n\t\t${y}{\n\t\t\ttext-align: ${r};\n\t\t\twidth: ${"0px"===c||"0%"===c||"0em"===c?"250px":c};\n\t\t\theight: ${"0px"===d||"0%"===d||"0em"===d?"250px":d};\n\t\t\tpadding: ${us(g)};\n\t\t\t${is(m)}\n\t\t\tbox-shadow: ${ds(b)};\n\t\t}\n\t\t${y} .counterIcon,\n\t\t${y} .counterIconLabel{\n\t\t\tfont-size: ${u||50}px;\n\t\t}\n\n\t\t${n?.map(((e,t)=>{const{background:n,icon:o,number:i,label:a}=e,s=`${f} #counter-${t}`;return`\n\t\t\t\t${s} .counter{\n\t\t\t\t\t${os(n)}\n\t\t\t\t}\n\t\t\t\t${s} .counterIcon i,\n\t\t\t\t${s} .counterIconLabel i{\n\t\t\t\t\t${rs(o)}\n\t\t\t\t\tfont-size: inherit;\n\t\t\t\t}\n\t\t\t\t${s} .counterNumber{\n\t\t\t\t\tcolor: ${i.color};\n\t\t\t\t}\n\t\t\t\t${s} .counterLabel{\n\t\t\t\t\tcolor: ${a.color};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},Oy=({attributes:e,counter:t,index:n,labelEl:o,isBackend:i=!1,custom:a={}})=>{const{isIcon:s,iconPosition:r}=e,{icon:c,number:d}=t,{start:u,end:p,prefix:h,suffix:g}=d,m=c?.class&&(0,l.jsx)("i",{className:c.class});return(0,l.jsx)("div",{onClick:()=>i?a.setActiveIndex(n):null,className:i&&n===a.activeIndex?"bPlNowEditing":"",id:`counter-${n}`,children:(0,l.jsxs)("div",{className:"counter",children:[s&&"top"===r&&(0,l.jsx)("div",{className:"counterIcon",children:m}),(0,l.jsxs)("div",{className:"counterNumber",children:[(0,l.jsx)("span",{className:"prefix",children:h}),(0,l.jsx)("span",{className:"number","data-count-start":u,"data-count-end":p,children:u}),(0,l.jsx)("span",{className:"suffix",children:g})]}),"label"===r?(0,l.jsxs)("div",{className:"counterIconLabel",children:[m,o]}):o]})})},Ry=(e,t)=>{const{char:n=""}=t;return n?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,n):e};Pl(Ny.name)&&(0,p.registerBlockType)(Ny,{icon:gr,transforms:{from:[{type:"block",blocks:["ctrb/counters"],transform:e=>(0,p.createBlock)("b-blocks/counters",e)},{type:"prefix",prefix:"counter",transform:()=>(0,p.createBlock)("b-blocks/counters")}],to:[{type:"block",blocks:["ctrb/counters"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("ctrb/counters",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{counters:i=[],columns:a,duration:s,separator:r={},isLabel:c}=t,d=(0,m.useRef)(),[u,p]=(0,m.useState)(0),g=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{d.current&&((e,t,n={})=>{e?.forEach((e=>{const o=parseInt(e.dataset.countStart),i=parseInt(e.dataset.countEnd),a=Date.now(),s=setInterval((()=>{const r=Date.now()-a;r>=t?clearInterval(s):e.innerText=Ry(parseInt(r/(t/(i-o))+o),n)}),20);setTimeout((()=>{e.innerText=Ry(i,n)}),t)}))})(d.current.ownerDocument.querySelectorAll(`.${By} .counterNumber .number`),s,r)}),[i,s,r,d]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ay,{attributes:t,setAttributes:n,activeIndex:u,setActiveIndex:p,isPremium:g}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:d}),children:[(0,l.jsx)(Iy,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:`${By} columns-${a.desktop} columns-tablet-${a.tablet} columns-mobile-${a.mobile}`,children:i?.map(((e,o)=>{const{text:a}=e.label,s=c&&(0,l.jsx)(h.RichText,{className:"counterLabel",tagName:"p",value:a,onChange:e=>((e,t,o=!1)=>{const a=zb(i,(n=>{o?n[u][e][o]=t:n[u][e]=t}));n({counters:a})})("label",e,"text"),placeholder:(0,x.__)("Label","b-blocks"),inlineToolbar:!0});return(0,l.jsx)(Oy,{attributes:t,counter:e,index:o,labelEl:s,isBackend:!0,custom:{activeIndex:u,setActiveIndex:p}},o)}))})]})]})},save:()=>null})
368 +;const zy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/carousel","title":"Carousel","category":"bBlocks","description":"Modern carousel for showcasing content. Supports unlimited slides with complete block flexibility inside.","keywords":["carousel","slider","swiper","slide","carousel-block","slider","slideshow","gallery","carousel","slide","rotator"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"clientId":{"type":"string","default":""},"pagination":{"type":"object","default":{"pagination":true,"showOnTablet":true,"showOnMobile":true,"type":"bullets","clickable":true,"hideOnClick":false,"dynamicPagination":false,"dynamicBullets":false,"dynamicMainBullets":1}},"navigation":{"type":"object","default":{"navigation":true,"iconType":"library","nextIcon":{"library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'chevron-right\'><path fill-rule=\'evenodd\' d=\'M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708\'/></svg>","upload":""},"prevIcon":{"library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'chevron-left\'><path fill-rule=\'evenodd\' d=\'M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0\'/></svg>","upload":""}}},"autoplay":{"type":"object","default":{"autoplay":true,"direction":"right","delay":1.5,"isPauseOnHover":false,"easing":""}},"layout":{"type":"object","default":{"slideView":{"desktop":3,"tablet":2,"mobile":1},"space":{"desktop":30,"tablet":25,"mobile":15},"direction":"horizontal"}},"options":{"type":"object","default":{"speed":1,"loop":true,"touchMove":true,"autoHeight":false}},"styles":{"type":"object","default":{"pagination":{"desktop":{"positionY":"","positionX":""},"tablet":{"positionY":"","positionX":""},"mobile":{"positionY":"","positionX":""},"normal":{"color":"","width":"","height":"","border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"active":{"color":"","width":"","height":"","border":{},"radius":{"top":"","right":"","bottom":"","left":""},"transition":0.2}},"navigation":{"desktop":{"arrow":{"size":"","positionX":{"prev":"","next":""},"positionY":{"prev":"","next":""}},"padding":{"top":"6px","right":"6px","bottom":"6px","left":"6px"}},"tablet":{"arrow":{"size":"","positionX":{"prev":"","next":""},"positionY":{"prev":"","next":""}},"padding":{"top":"","bottom":"","left":"","right":""}},"mobile":{"arrow":{"size":"","positionX":{"prev":"","next":""},"positionY":{"prev":"","next":""}},"padding":{"top":"","bottom":"","left":"","right":""}},"normal":{"bg":{},"color":"rgba(140, 140, 140, 1)","border":{"color":"#8c8c8c","style":"solid","width":"2px"},"desktop":{"radius":{"top":"50%","right":"50%","bottom":"50%","left":"50%"}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{},"color":"","border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"container":{"desktop":{"height":"","width":"","alignItems":"center"},"tablet":{"height":"","width":"","alignItems":""},"mobile":{"height":"","width":"","alignItems":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"bottom":"","top":"","right":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"x":"","y":"","z":""},"tablet":{"x":"","y":"","z":""},"mobile":{"x":"","y":"","z":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b0","isInset":false}],"border":{"width":"","style":"none"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"visibility":{"zIndex":{"desktop":""},"overflow":""},"responsive":{"desktop":false,"tablet":false,"mobile":false}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","swiper"],"script":"swiper","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Dy=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Fy=[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Step Start","b-blocks"),value:"step-start"},{label:(0,x.__)("Step End","b-blocks"),value:"step-end"}],Hy=({attributes:e,updateObj:t})=>{const{autoplay:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Autoplay","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Autoplay","b-blocks"),value:n.autoplay,checked:n.autoplay,onChange:e=>t("autoplay",e,"autoplay")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",value:n.direction,onChange:e=>t("autoplay",e,"direction"),options:[{label:(0,x.__)("Left To Right","b-blocks"),value:"left"},{label:(0,x.__)("Right To Left","b-blocks"),value:"right"}]}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Delay (s)","b-blocks"),value:n.delay,onChange:e=>t("autoplay",e,"delay"),min:0,step:.01,max:10}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pause On Hover","b-blocks"),value:n.isPauseOnHover,checked:n.isPauseOnHover,onChange:e=>t("autoplay",e,"isPauseOnHover")})]})},Wy=({attributes:e,updateObj:t})=>{const{options:n,autoplay:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Basic Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Direction","b-blocks"),value:n?.direction,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],labelPosition:"edge",onChange:e=>t("options",e,"direction")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:o.easing,options:Fy,
369 +onChange:e=>t("autoplay",e,"easing")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Loop","b-blocks"),value:n.loop,checked:n.loop,onChange:e=>t("options",e,"loop"),help:"This feature will work on frontend only."}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Touch Move","b-blocks"),value:n.touchMove,checked:n.touchMove,onChange:e=>t("options",e,"touchMove"),help:"This feature will work on frontend only."}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Speed (s)","b-blocks"),value:n.speed,onChange:e=>t("options",e,"speed"),min:0,step:.01,max:10}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Auto Height","b-blocks"),value:n.autoHeight,checked:n.autoHeight,onChange:e=>t("options",e,"autoHeight")})]})},Uy=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),Gy=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),Vy=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),qy=({attributes:e,updateObj:t,device:n})=>{const{layout:o,styles:i}=e,{container:a}=i,{direction:s="horizontal"}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s,onChange:e=>t("layout",e,"direction"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"horizontal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"vertical"})]})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Slide View","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o.slideView[n],onChange:e=>t("layout",e,"slideView",n),beforeIcon:"grid-view",min:1,max:12}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Slide Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),value:o.space[n],onChange:e=>t("layout",e,"space",n),min:0,max:250}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Width","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:a[n].width,onChange:e=>t("styles",e,"container",n,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Height","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:a[n].height,onChange:e=>t("styles",e,"container",n,"height")})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Align Items ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a[n]?.alignItems,onChange:e=>t("styles",e,"container",n,"alignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(Uy,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(Gy,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(Vy,{})})]})]})]})},Yy=({attributes:e,updateObj:t,device:n})=>{const{navigation:o,styles:i}=e,{navigation:a}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Navigation","b-blocks"),value:o.navigation,checked:o.navigation,onChange:e=>t("navigation",e,"navigation")}),o.navigation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Prev Icon","b-blocks"),value:o.prevIcon.library,onChange:e=>t("navigation",e,"prevIcon","library")}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Next Icon","b-blocks"),value:o.nextIcon.library,onChange:e=>t("navigation",e,"nextIcon","library")}),(0,l.jsx)("br",{}),(0,l.jsx)("b",{children:"Position X"}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Prev Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].arrow.positionX.prev,onChange:e=>t("styles",e,"navigation",n,"arrow","positionX","prev")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Next Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].arrow.positionX.next,onChange:e=>t("styles",e,"navigation",n,"arrow","positionX","next")})]}),(0,l.jsx)("b",{children:"Position Y"}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Prev Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].arrow.positionY.prev,onChange:e=>t("styles",e,"navigation",n,"arrow","positionY","prev")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Next Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].arrow.positionY.next,onChange:e=>t("styles",e,"navigation",n,"arrow","positionY","next")})]})]})]})},Ky=({attributes:e,updateObj:t,device:n})=>{const{pagination:o,styles:i}=e,{pagination:a}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Pagination","b-blocks"),value:o.pagination,checked:o.pagination,onChange:e=>t("pagination",e,"pagination")}),o.pagination&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Clickable","b-blocks"),value:o.clickable,checked:o.clickable,onChange:e=>t("pagination",e,"clickable")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Position X","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].positionX,min:-50,max:150,onChange:e=>t("styles",e,"pagination",n,"positionX")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Position Y","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a[n].positionY,min:-50,max:150,onChange:e=>t("styles",e,"pagination",n,"positionY")})]})]})]})},Qy=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qy,{...e}),(0,l.jsx)(Wy,{...e}),(0,l.jsx)(Hy,{...e}),(0,l.jsx)(Yy,{...e}),(0,l.jsx)(Ky,{...e})]}),Zy=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{navigation:i}=o,[a,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex3",
370 +children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i[n].arrow.size,onChange:e=>t("styles",e,"navigation",n,"arrow","size")})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[n].padding,onChange:e=>t("styles",e,"navigation",n,"padding")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a,onChange:s,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i[a].color,onChange:e=>t("styles",e,"navigation",a,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[a].bg,onChange:e=>t("styles",e,"navigation",a,"bg"),isImage:!1}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i[a].border,onChange:e=>t("styles",e,"navigation",a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:i[a][n].radius,onChange:e=>t("styles",e,"navigation",a,n,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:i.hover.transition,onChange:e=>t("styles",e,"navigation","hover","transition"),min:0,max:10,step:.01})]})},Xy=({attributes:e,updateObj:t})=>{const{styles:n}=e,{pagination:o}=n,[i,a]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i,onChange:a,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o[i].color,onChange:e=>t("styles",e,"pagination",i,"color")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex3",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o[i].width,onChange:e=>t("styles",e,"pagination",i,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex3",children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o[i].height,onChange:e=>t("styles",e,"pagination",i,"height")})]}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o[i].border,onChange:e=>t("styles",e,"pagination",i,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),value:o[i].radius,onChange:e=>t("styles",e,"pagination",i,"radius")}),"active"===i&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:o.active.transition,onChange:e=>t("styles",e,"pagination","active","transition"),min:0,max:10,step:.01})]})},Jy=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zy,{...e}),(0,l.jsx)(Xy,{...e})]}),ev=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:Dy,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qy,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Jy,{...e})}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})})},tv=({attributes:e,id:t,isBackend:n=!1})=>{const{styles:o,advanced:i,layout:a}=e,{container:s,navigation:r,pagination:c}=o,d="vertical"===a?.direction,u=`${t} .bBlock-carousel-main-wrapper`,p=`#${t} .bBlocks-carousel-wrapper`,h=`${p} .swiper`,g=`${h} .swiper-wrapper`,m=`${p} .swiper-button-prev`,b=`${p} .swiper-button-next`,f=`${p} .swiper-pagination`,x=`${f} .swiper-pagination-bullet`,y=`${f} .swiper-pagination-bullet-active`,v=(e="normal")=>`\n\t\t${os(r[e].bg)}\n\t\t${as(r[e].border)}\n\t\t${"normal"===e?ns("transition",jt(r.hover.transition)?`all ${r.hover.transition}s ease-in-out`:""):""}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${h}{\n\t\t\t\t${ns("height",s.desktop.height)}\n\t\t\t\t${ns("width",s.desktop.width)}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${ns("align-items",s.desktop.alignItems)}\n\t\t\t}\n\t\t\t${d?`${g} .swiper-slide{\n\t\t\t\theight: auto;\n\t\t\t}`:""}\n\t\t\t${m}{\n\t\t\t${ns("height","unset")}\n\t\t\t\t${ns("left",r.desktop.arrow.positionX.prev)}\n\t\t\t\t${ns("top",r.desktop.arrow.positionY.prev)}\n\t\t\t\t${ns("padding",hs(r.desktop.padding))}\n\t\t\t\t${ns("color",r.normal.color)}\n\t\t\t\t${ns("border-radius",hs(r.normal.desktop.radius))}\n\t\t\t\t${v("normal")}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t${ns("height","unset")}\n\t\t\t\t${ns("right",r.desktop.arrow.positionX.next)}\n\t\t\t\t${ns("top",r.desktop.arrow.positionY.next)}\n\t\t\t\t${ns("padding",hs(r.desktop.padding))}\n\t\t\t\t${ns("color",r.normal.color)}\n\t\t\t\t${ns("border-radius",hs(r.normal.desktop.radius))}\n\t\t\t\t${v("normal")}\n\t\t\t}\n\t\t\t${m}:hover{\n\t\t\t\t${ns("color",r.hover.color)}\n\t\t\t\t${ns("border-radius",hs(r.hover.desktop.radius))}\n\t\t\t\t${v("hover")}\n\t\t\t}\n\t\t\t${b}:hover{\n\t\t\t\t${ns("color",r.hover.color)}\n\t\t\t\t${ns("border-radius",hs(r.hover.desktop.radius))}\n\t\t\t\t${v("hover")}\n\t\t\t}\n\t\t\t${m}:hover>svg{\n\t\t\t\t${ns("color",r.hover.color)}\n\t\t\t\t${ns("fill",r.hover.color)}\n\t\t\t}\n\t\t\t${b}:hover>svg{\n\t\t\t\t${ns("color",r.hover.color)}\n\t\t\t\t${ns("fill",r.hover.color)}\n\t\t\t}\n\t\t\t${m}>svg{\n\t\t\t\t${ns("height",r.desktop.arrow.size)}\n\t\t\t\t${ns("width",r.desktop.arrow.size)}\n\t\t\t\t${ns("color",r.normal.color)}\n\t\t\t\t${ns("fill",r.normal.color)}\n\t\t\t\t${ns("transition",jt(r.hover.transition)?`all ${r.hover.transition}s ease-in-out`:"")}\n\t\t\t}\n\n\t\t\t${b}>svg{\n\t\t\t\t${ns("height",r.desktop.arrow.size)}\n\t\t\t\t${ns("width",r.desktop.arrow.size)}\n\t\t\t\t${ns("color",r.normal.color)}\n\t\t\t\t${ns("fill",r.normal.color)}\n\t\t\t\t${ns("transition",jt(r.hover.transition)?`all ${r.hover.transition}s ease-in-out`:"")}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${ns("bottom",c.desktop.positionY)}\n\t\t\t\t${ns("left",c.desktop.positionX)}\n\t\t\t}\n\t\t\t\n\t\t\t${x}{\n\t\t\t\t${ns("background-color",c.normal.color)}\n\t\t\t\t${ns("width",c.normal.width)}\n\t\t\t\t${ns("height",c.normal.height)}\n\t\t\t\t${as(c.normal.border)}\n\t\t\t\t${ns("border-radius",hs(c.normal.radius))}\n\t\t\t\t${ns("transition",jt(c.active.transition)?`all ${c.active.transition}s ease-in-out`:"")}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${ns("background-color",c.active.color)}\n\t\t\t\t${ns("width",c.active.width)}\n\t\t\t\t${ns("height",c.active.height)}\n\t\t\t\t${as(c.active.border)}\n\t\t\t\t${ns("border-radius",hs(c.active.radius))}\n\t\t\t}\n\n\t\t\t${Cs(n?u:t,i,n,!1)}\n\n\t`}})},nv=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{innerBlocks:o(t),device:n()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{navigation:a,layout:s,options:r,autoplay:c,pagination:d,styles:u}=t,g="vertical"===s?.direction,b=u?.container?.desktop?.height,x=["desktop","tablet","mobile"].includes(i)?i:"desktop",v=s?.slideView?.[x]??s?.slideView?.desktop??1,k=s?.space?.[x]??s?.space?.desktop??0,w=(0,m.useRef)(null),_=(0,m.useRef)(null),C=(0,m.useRef)(null),j="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,$="b-blocks/carousel-slide",S=[[$,{}],[$,{}],[$,{}]],T=(0,
371 +h.useInnerBlocksProps)({className:"swiper-wrapper"},{template:S,templateLock:!1,renderAppender:!1}),{insertBlock:N,selectBlock:M}=(0,f.useDispatch)("core/block-editor"),L=(0,f.useSelect)((e=>e("core/block-editor").getBlockOrder(o)?.length||0),[o]);(0,m.useLayoutEffect)((()=>{const e=w.current,t=C.current;if(!e||!t)return;const n=e.querySelector(".swiper-wrapper"),o=n?.querySelectorAll(".swiper-slide");if(n&&o&&0!==o.length){if(_.current&&(_.current.destroy(!0,!0),_.current=null),g&&!b){const t=((e,t,n)=>{const o=Array.from(e.querySelectorAll(".swiper-slide"));if(!o.length)return 0;o.forEach((e=>{e.style.height=""}));const i=Math.max(1,Math.min(Math.round(t)||1,o.length)),a=Number(n)||0,s=o.slice(0,i).reduce(((e,t)=>e+t.getBoundingClientRect().height),0);return Math.round(s+a*(i-1))})(e,v,k);e.style.height=t?`${t}px`:""}else e.style.height="";return _.current=new Tx(e,{modules:[If,Of,Pf,Af],slidesPerView:g?"auto":v,spaceBetween:k,loop:!1,speed:1e3*r.speed,autoHeight:!g&&r.autoHeight,direction:g?"vertical":"horizontal",autoplay:!1,navigation:{nextEl:t.querySelector(".swiper-button-next"),prevEl:t.querySelector(".swiper-button-prev")},pagination:!!d.pagination&&{el:t.querySelector(".swiper-pagination"),clickable:d.clickable,dynamicBullets:d.dynamicPagination},scrollbar:{el:e.querySelector(".swiper-scrollbar"),draggable:!1},allowTouchMove:!1,simulateTouch:!1,preventClicks:!0,preventClicksPropagation:!1,touchStartPreventDefault:!1,touchStartForcePreventDefault:!1}),_.current.navigation?.init(),_.current.navigation?.update(),()=>{_.current&&(_.current.destroy(!0,!0),_.current=null)}}}),[o,L,v,k,JSON.stringify(r),JSON.stringify(c),JSON.stringify(d),g,b,s?.direction,s?.slideView[i],_?.current]),(0,m.useEffect)((()=>{n({clientId:o})}),[]);const P=fe(t,n),E={"--swiper-wrapper-transition-timing-function":c?.easing};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ev,{attributes:t,setAttributes:n,updateObj:P,device:i,isPremium:j}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(tv,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:"swiper-editor__controls",style:{marginBottom:10},children:(0,l.jsx)(y.Button,{variant:"primary",onClick:()=>{const e=(0,p.createBlock)($,{className:"swiper-slide"});N(e,L,o),M(o)},children:"+ Add Slide"})}),(0,l.jsx)("div",{className:"bBlock-carousel-main-wrapper",children:(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"bBlocks-carousel-wrapper",style:E,ref:C,children:[(0,l.jsx)("div",{className:"swiper",ref:w,children:(0,l.jsx)("div",{...T})}),a.navigation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"swiper-button-prev",dangerouslySetInnerHTML:{__html:a.prevIcon.library}}),(0,l.jsx)("div",{className:"swiper-button-next",dangerouslySetInnerHTML:{__html:a.nextIcon.library}})]}),d.pagination&&(0,l.jsx)("div",{className:"swiper-pagination swiper-pagination-horizontal"})]})})})]})]})}));Pl(zy.name)&&(0,p.registerBlockType)(zy,{icon:ll,edit:nv,save:h.InnerBlocks.Content});const ov=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/carousel-slide","title":"Carousel Slide","category":"bBlocks","description":"Individual slide for a carousel. Add images, text, buttons, videos — anything you need.","keywords":["slide","carousel-slide","slide-block","carousel-item"],"parent":["b-blocks/carousel"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"type":"flex","padding":{},"desktop":{"direction":"column","justify":"","alignItems":"","wrap":"wrap","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"tablet":{"direction":"","justify":"","alignItems":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""},"mobile":{"direction":"","justify":"","alignItems":"","wrap":"","alignContent":"","gridJustify":"","gridAlignItems":"","gridColumns":"","gridRows":""}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),iv=()=>(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n\t"}}),av=(0,w.compose)((0,f.withSelect)(((e,{clientId:t})=>{const{getBlocks:n}=e("core/block-editor");return{innerBlocks:n(t)}})),(0,f.withDispatch)((e=>{const{removeBlock:t}=e("core/block-editor");return{removeBlock:t}})))((e=>{const{attributes:t,clientId:n,innerBlocks:o,removeBlock:i}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{...(0,h.useBlockProps)({className:"swiper-slide"}),children:[(0,l.jsx)(iv,{attributes:t,id:`block-${n}`}),(0,l.jsx)("div",{className:"bBlocksRemoveSlideWrapper",onClick:()=>i(n),children:(0,l.jsx)(y.Dashicon,{icon:"no-alt"})}),(0,l.jsx)(h.InnerBlocks,{renderAppender:()=>o?.length?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{})})]})})}));Pl("b-blocks/carousel")&&(0,p.registerBlockType)(ov,{icon:ll,edit:av,save:h.InnerBlocks.Content})
372 +;const sv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/code-highlight","title":"Code Highlight","category":"bBlocks","description":"Show a syntax-highlighted code snippet with themes, line numbers and a copy button.","keywords":["code","snippet","syntax","highlight","prism","pre"],"textdomain":"b-blocks","supports":{"html":false,"align":["wide","full"]},"attributes":{"blockId":{"type":"string","default":""},"align":{"type":"string","default":""},"content":{"type":"object","default":{"code":"function greet(name) {\\n\\tconsole.log(`Hello, ${name}!`);\\n}\\n\\ngreet(\'World\');","language":"javascript","filename":"example.js","caption":""}},"options":{"type":"object","default":{"header":true,"showLanguage":false,"windowDots":false,"lineNumbers":true,"startLine":1,"highlightLines":"","wordWrap":false,"tabSize":2,"maxLines":0,"collapsible":false,"expandLabel":"Show all","collapseLabel":"Show less","copyButton":true,"copyPosition":"header","copyLabel":"Copy","copiedLabel":"Copied!","captionPosition":"bottom"}},"theme":{"type":"string","default":"porple"},"box":{"type":"object","default":{"desktop":{"align":"center","width":"100%","height":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"align":"","width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"align":"","width":"","height":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"background":{},"border":{},"shadow":{"normal":[],"hover":[]}}},"codeTypo":{"type":"object","default":{"fontSize":{"desktop":15,"tablet":14,"mobile":13}}},"headerStyle":{"type":"object","default":{"background":{},"filenameColor":"","filenameTypo":{"fontSize":{"desktop":12,"tablet":"","mobile":""}},"badgeColor":"","badgeBackground":{}}},"lineNumber":{"type":"object","default":{"color":"","background":{},"borderColor":""}},"highlight":{"type":"object","default":{"background":{},"borderColor":""}},"copyBtn":{"type":"object","default":{"normal":{"color":"","background":{},"border":{}},"hover":{"color":"","background":{},"border":{}},"copied":{"color":"","background":{},"border":{}},"typo":{"fontSize":{"desktop":12,"tablet":"","mobile":""}},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"buttonIcon":{"type":"object","default":{"enable":true,"icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\' fill=\'none\' stroke=\'currentColor\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'><rect x=\'9\' y=\'9\' width=\'13\' height=\'13\' rx=\'2\'></rect><path d=\'M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\'></path></svg>","position":"left","size":"13px","spacing":"6px","desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"normal":{"color":"","background":{},"border":{},"rotate":"0deg"},"hover":{"color":"","background":{},"border":{},"rotate":"0deg"}}},"caption":{"type":"object","default":{"color":"","typo":{"fontSize":{"desktop":13,"tablet":"","mobile":""}},"align":"center"}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),rv="b-blocks-code-highlight",lv=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],cv=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")}],dv=[...cv,{name:"copied",title:(0,x.__)("Copied","b-blocks")}],uv=[{label:(0,x.__)("Plain Text","b-blocks"),value:"none"},{label:"Bash / Shell",value:"bash"},{label:"C",value:"c"},{label:"C++",value:"cpp"},{label:"C#",value:"csharp"},{label:"CSS",value:"css"},{label:"Dart",value:"dart"},{label:"Diff",value:"diff"},{label:"Go",value:"go"},{label:"GraphQL",value:"graphql"},{label:"Haskell",value:"haskell"},{label:"HTML / XML",value:"markup"},{label:"Java",value:"java"},{label:"JavaScript",value:"javascript"},{label:"JSON",value:"json"},{label:"JSX",value:"jsx"},{label:"Julia",value:"julia"},{label:"Kotlin",value:"kotlin"},{label:"Less",value:"less"},{label:"Markdown",value:"markdown"},{label:"Perl",value:"perl"},{label:"PHP",value:"php"},{label:"Python",value:"python"},{label:"Ruby",value:"ruby"},{label:"Rust",value:"rust"},{label:"SCSS",value:"scss"},{label:"SQL",value:"sql"},{label:"Swift",value:"swift"},{label:"TypeScript",value:"typescript"},{label:"TSX",value:"tsx"},{label:"YAML",value:"yaml"}],pv=[{label:(0,x.__)("Solid","b-blocks"),value:"default"},{label:(0,x.__)("Dark","b-blocks"),value:"dark"},{label:(0,x.__)("Tomorrow","b-blocks"),value:"tomorrow"},{label:(0,x.__)("Solarized Light","b-blocks"),value:"solarized-light"},{label:(0,x.__)("Twilight","b-blocks"),value:"twilight"},{label:(0,x.__)("Porple","b-blocks"),value:"porple"},{label:"Dracula",value:"dracula"},{label:"One Dark",value:"one-dark"},{label:"One Light",value:"one-light"},{label:"Nord",value:"nord"},{label:"Night Owl",value:"night-owl"},{label:"Material Oceanic",value:"material-oceanic"},{label:"VS Code Dark+",value:"vsc-dark-plus"},{label:"Gruvbox Dark",value:"gruvbox-dark"},{label:"Atom Dark",value:"atom-dark"},{label:"Solarized Dark",value:"solarized-dark-atom"},{label:"GitHub Light",value:"ghcolors"},{label:"Coldark Cold",
373 +value:"coldark-cold"},{label:"Shades of Purple",value:"shades-of-purple"},{label:"Laserwave",value:"laserwave"}],hv=[{label:(0,x.__)("In Header","b-blocks"),value:"header"},{label:(0,x.__)("Top Right","b-blocks"),value:"top-right"},{label:(0,x.__)("Bottom Right","b-blocks"),value:"bottom-right"}],gv=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],mv=(e=0)=>({value:"deg",label:"deg",default:e}),bv=[{label:(0,x.__)("Above","b-blocks"),value:"top"},{label:(0,x.__)("Below","b-blocks"),value:"bottom"}],fv=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],xv=pv.map((({value:e})=>e)),yv=uv.map((({value:e})=>e)),vv=(e={},t,n,o="")=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},a=i("desktop")??o;if("desktop"===t)return a;const s=i("tablet")??a;return"tablet"===t?s:i("mobile")??s},kv=(e,t="")=>{if(null==e||""===e)return t;const n=parseFloat(e);return isNaN(n)?t:/[a-z%]$/i.test(String(e).trim())?String(e).trim():`${n}px`},wv=(e,t)=>"normal"===e?t:`${e.charAt(0).toUpperCase()}${e.slice(1)} ${t.charAt(0).toLowerCase()}${t.slice(1)}`,_v=e=>{const{theme:t,options:n={}}=e,o=0<(parseInt(n.maxLines,10)||0);return[rv,`${rv}-theme-${i=t,xv.includes(i)?i:"porple"}`,n.wordWrap?`${rv}-is-wrapped`:"",n.lineNumbers?`${rv}-has-line-numbers`:"",n.header?`${rv}-has-header`:"",o?`${rv}-is-capped`:"",o&&n.collapsible?`${rv}-is-collapsible`:"",n.copyButton?`${rv}-copy-at-${n.copyPosition||"header"}`:""].filter(Boolean).join(" ");var i},Cv=(e="")=>String(e).replace(/\n$/,"").split("\n"),jv=(e="")=>{const t=new Set;return String(e).split(",").forEach((e=>{const n=e.trim();if(!n)return;const[o,i]=n.split("-"),a=parseInt(o,10),s=void 0===i?a:parseInt(i,10);if(!isNaN(a)&&!isNaN(s))for(let e=Math.min(a,s);e<=Math.max(a,s);e++)0<e&&t.add(e)})),[...t].sort(((e,t)=>e-t))},$v=e=>{const{options:t={},content:n={}}=e;if(t.wordWrap||!t.highlightLines)return[];const o=Cv(n.code).length,i=parseInt(t.startLine,10)||1;return jv(t.highlightLines).map((e=>e-i)).filter((e=>0<=e&&e<o))};var Sv=s(1983),Tv=s.n(Sv);s(5624),s(4312),s(1113),s(5723),s(9587),s(5903),s(2769),s(2514),s(7022),s(271),s(2415),s(5651),s(869),s(7839),s(6378),s(4619),s(554),s(6976),s(463),s(9913),s(8713),s(5545),s(2821),s(9700),s(3554),s(2342),s(1648),s(5342),s(4604),s(6966),s(4793),s(83);const Nv=({attributes:e})=>{const{content:t={},options:n={},buttonIcon:o={}}=e,{code:i="",filename:a="",caption:s=""}=t,r=(c=t.language,yv.includes(c)?c:"none");var c;const d=Cv(i),u=parseInt(n.startLine,10)||1,p=$v(e),h=n.copyButton&&"header"===(n.copyPosition||"header"),g=uv.find((({value:e})=>e===r))?.label,b=0<(parseInt(n.maxLines,10)||0),f=(0,m.useRef)(null),[x,y]=(0,m.useState)(!1),[v,k]=(0,m.useState)(!1);(0,m.useEffect)((()=>{f.current&&((e,t)=>{e&&t&&"none"!==t&&Tv().languages[t]&&Tv().highlightElement(e)})(f.current,r)}),[i,r]),(0,m.useEffect)((()=>{if(!x)return;const e=setTimeout((()=>y(!1)),2e3);return()=>clearTimeout(e)}),[x]);const w=async()=>{try{await navigator.clipboard.writeText(i)}catch(e){const t=document.createElement("textarea");t.value=i,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}y(!0)},_=o.enable&&o.icon,C=e=>(0,l.jsxs)("button",{type:"button",className:["b-blocks-code-highlight-copy",e?"b-blocks-code-highlight-copy-floating":"",_?"b-blocks-code-highlight-has-icon b-blocks-code-highlight-icon-"+("right"===o.position?"right":"left"):"",x?"is-copied":""].filter(Boolean).join(" "),onClick:w,children:[_&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-btn-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:o.icon}}),(0,l.jsx)("span",{className:"b-blocks-code-highlight-copy-text",children:x?n.copiedLabel||"Copied!":n.copyLabel||"Copy"})]}),j=s?(0,l.jsx)("figcaption",{className:"b-blocks-code-highlight-caption",children:s}):null;return(0,l.jsx)("div",{children:(0,l.jsxs)("figure",{className:`${_v(e)}${v?" is-expanded":""}`,children:["top"===n.captionPosition&&j,n.header&&(0,l.jsxs)("div",{className:"b-blocks-code-highlight-header",children:[n.windowDots&&(0,l.jsxs)("span",{className:"b-blocks-code-highlight-dots","aria-hidden":"true",children:[(0,l.jsx)("i",{}),(0,l.jsx)("i",{}),(0,l.jsx)("i",{})]}),(0,l.jsx)("span",{className:"b-blocks-code-highlight-filename",children:a}),n.showLanguage&&"none"!==r&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-badge",children:g}),h&&C(!1)]}),(0,l.jsxs)("div",{className:"b-blocks-code-highlight-body",children:[(0,l.jsxs)("pre",{className:"b-blocks-code-highlight-pre",tabIndex:0,children:[0<p.length&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-marks","aria-hidden":"true",children:p.map((e=>(0,l.jsx)("span",{style:{"--bbChMark":e}},e)))}),n.lineNumbers&&(0,l.jsx)("span",{className:"b-blocks-code-highlight-gutter","aria-hidden":"true",children:d.map(((e,t)=>(0,l.jsx)("span",{children:u+t},t)))}),(0,l.jsx)("code",{ref:f,className:`b-blocks-code-highlight-code language-${r}`,children:i})]}),n.copyButton&&!h&&C(!0)]}),b&&n.collapsible&&(0,l.jsx)("button",{type:"button",className:"b-blocks-code-highlight-toggle",onClick:()=>k((e=>!e)),"aria-expanded":v,children:v?n.collapseLabel||"Show less":n.expandLabel||"Show all"}),"top"!==n.captionPosition&&j]})})},Mv=({attributes:e,id:o,isBackend:i=!1})=>{const{options:a={},box:s={},codeTypo:r={},headerStyle:c={},copyBtn:d={},buttonIcon:u={},lineNumber:p={},highlight:h={},caption:g={},advanced:b={}}=e,f=`#${o} .${rv}`,x=`${f} .${rv}-header`,y=`${f} .${rv}-filename`,v=`${f} .${rv}-copy`,k=`${f} .${rv}-pre`,w=`${f} .${rv}-code`,_=`${f} .${rv}-gutter`,C=`${f} .${rv}-badge`,j=`${f} .${rv}-marks span`,$=`${f} .${rv}-caption`,S=`${f} .${rv}-btn-icon`,T=`${f} .${rv}-toggle`,N=(e,...t)=>{const n=t.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return n?`${e}{ ${n} }`:""},M=e=>Object.keys(e||{}).length?as(e):"",L=(e,t)=>N(e,ns("color",t?.color),os(t?.background),M(t?.border),ns("rotate",t?.rotate)),P=(e,t)=>N(e,ns("color",t?.color),os(t?.background),M(t?.border)),E={left:"margin-left: 0; margin-right: auto;",right:"margin-left: auto; margin-right: 0;",center:"margin-left: auto; margin-right: auto;"},A=e=>`\n\t\t${N(f,E[vv(s,e,"align","center")]||E.center,ns("width",kv(vv(s,e,"width","100%"),"100%")),ns("height",kv(vv(s,e,"height"))),ns("padding",hs(s?.[e]?.padding)),ns("border-radius",hs(s?.[e]?.radius)))}\n\t\t${N(S,ns("padding",hs(u?.[e]?.padding)),ns("margin",hs(u?.[e]?.margin)),ns("border-radius",hs(u?.[e]?.radius)))}`,B=(0,
374 +m.useMemo)((()=>`\n\t\t${ps("",r)?.googleFontLink}\n\t\t${ps("",c.filenameTypo)?.googleFontLink}\n\t\t${ps("",d.typo)?.googleFontLink}\n\t\t${ps("",g.typo)?.googleFontLink}\n\t\t${ps(`${k}, ${w}, ${_}`,r)?.styles}\n\t\t${ps(y,c.filenameTypo)?.styles}\n\t\t${ps(v,d.typo)?.styles}\n\t\t${ps($,g.typo)?.styles}\n\n\t\t${N(f,os(s.background),M(s.border),ns("box-shadow",ls(s.shadow?.normal)))}\n\t\t${N(`${f}:hover`,ns("box-shadow",ls(s.shadow?.hover)))}\n\n\t\t${N(k,ns("max-height",0<(parseInt(a.maxLines,10)||0)?`calc(${parseInt(a.maxLines,10)} * var(--bbCodeLine, 1.6em) + 2 * var(--bbChPreY, 14px))`:""))}\n\t\t${0<(parseInt(a.maxLines,10)||0)?N(`${f}.is-expanded .${rv}-pre`,"max-height: none;"):""}\n\t\t${N(w,ns("tab-size",parseInt(a.tabSize,10)||""))}\n\n\t\t${N(x,os(c.background))}\n\t\t${N(y,ns("color",c.filenameColor))}\n\t\t${N(C,ns("color",c.badgeColor),os(c.badgeBackground))}\n\n\t\t${N(j,os(h.background))}\n\t\t${N(`${j}::after`,ns("background",h.borderColor))}\n\n\t\t${N($,ns("color",g.color),ns("text-align",g.align))}\n\t\t${N(T,ns("color",d.normal?.color))}\n\n\t\t${N(_,ns("color",p.color),os(p.background),ns("border-right-color",p.borderColor))}\n\n\t\t${N(v,ns("padding",hs(d.padding)),ns("border-radius",hs(d.radius)))}\n\t\t${P(v,d.normal)}\n\t\t${P(`${v}:hover`,d.hover)}\n\t\t${P(`${v}:focus-visible`,d.hover)}\n\t\t${P(`${v}.is-copied`,d.copied)}\n\n\t\t${N(v,ns("gap",kv(u.spacing,"")))}\n\t\t${L(S,u.normal)}\n\t\t${L(`${v}:hover .${rv}-btn-icon`,u.hover)}\n\t\t${N(`${S} svg, ${S} img`,ns("width",kv(u.size,"")),ns("height",kv(u.size,"")))}\n\n\t\t${A("desktop")}\n\n\t\t${t}{\n\t\t\t${A("tablet")}\n\t\t}\n\n\t\t${n}{\n\t\t\t${A("mobile")}\n\t\t}\n\n\t\t${_s(o,b,i,!1)}\n\t\t`),[e,o,i]);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:B}})},Lv=({attributes:e,updateObj:t})=>{const{buttonIcon:n={},options:o={}}=e;return o.copyButton?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:n.enable,onChange:e=>t("buttonIcon",e,"enable"),__nextHasNoMarginBottom:!0}),n.enable&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{className:"mt10",value:n.icon,onChange:e=>t("buttonIcon",e,"icon")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.position||"left",onChange:e=>t("buttonIcon",e,"position"),children:gv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]}),(0,l.jsx)("small",{children:(0,x.__)("Which side of the label the icon sits on.","b-blocks")})]})]}):null},Pv=({attributes:e,updateObj:t})=>{const{content:n={},options:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Caption","b-blocks"),value:n.caption||"",onChange:e=>t("content",e,"caption"),help:(0,x.__)("A short line describing the snippet. Left empty, nothing is rendered.","b-blocks"),__nextHasNoMarginBottom:!0}),n.caption&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.captionPosition||"bottom",onChange:e=>t("options",e,"captionPosition"),children:bv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]})]})},Ev=({attributes:e,updateObj:t})=>{const{content:n={},options:o={},theme:i}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Code","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Snippet","b-blocks"),value:n.code||"",rows:6,onChange:e=>t("content",e,"code"),help:(0,x.__)("Pasted exactly as typed — indentation and blank lines are kept.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Language","b-blocks"),labelPosition:"edge",value:n.language||"none",options:uv,onChange:e=>t("content",e,"language"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Theme","b-blocks"),labelPosition:"edge",value:i||"porple",options:pv,onChange:e=>t("theme",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Word Wrap","b-blocks"),checked:o.wordWrap,onChange:e=>t("options",e,"wordWrap"),help:(0,x.__)("Off, a long line scrolls sideways. On, it folds onto the next line.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Tab Size","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",labelPosition:"edge",min:1,max:8,value:o.tabSize||2,onChange:e=>t("options",parseInt(e,10)||2,"tabSize")})]})]})},Av=({attributes:e,updateObj:t})=>{const{options:n={}}=e,o=(e,n)=>t("options",e,n);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Copy Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Copy Button","b-blocks"),checked:n.copyButton,onChange:e=>o(e,"copyButton"),__nextHasNoMarginBottom:!0}),n.copyButton&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Position","b-blocks"),labelPosition:"edge",value:n.copyPosition||"header",options:hv,onChange:e=>o(e,"copyPosition"),__nextHasNoMarginBottom:!0}),"header"===(n.copyPosition||"header")&&!n.header&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("The header is switched off, so the button has no bar to sit in. Pick a floating position, or switch the header back on.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Copy Label","b-blocks"),value:n.copyLabel||"",onChange:e=>o(e,"copyLabel"),placeholder:"Copy",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Copied Label","b-blocks"),value:n.copiedLabel||"",onChange:e=>o(e,"copiedLabel"),placeholder:"Copied!",__nextHasNoMarginBottom:!0})]})]})},Bv=({attributes:e,updateObj:t})=>{const{content:n={},options:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Header","b-blocks"),checked:o.header,onChange:e=>t("options",e,"header"),__nextHasNoMarginBottom:!0}),o.header?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Filename","b-blocks"),value:n.filename||"",onChange:e=>t("content",e,"filename"),placeholder:"example.js",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Language Badge","b-blocks"),checked:o.showLanguage,onChange:e=>t("options",e,"showLanguage"),help:(0,x.__)("Shows the language name on the right of the bar.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Window Dots","b-blocks"),checked:o.windowDots,onChange:e=>t("options",e,"windowDots"),help:(0,x.__)("The three traffic-light dots of a desktop window.","b-blocks"),__nextHasNoMarginBottom:!0})]}):(0,l.jsx)("small",{children:(0,x.__)("With the header off, the filename, badge and dots have nowhere to sit.","b-blocks")})]})},Iv=({attributes:e,updateObj:t})=>{const{options:n={}}=e,o=jv(n.highlightLines).length,i=$v(e).length;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line Numbers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Line Numbers","b-blocks"),checked:n.lineNumbers,onChange:e=>t("options",e,"lineNumbers"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{
375 +className:"mb0 flex2",children:(0,x.__)("Start At","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",labelPosition:"edge",min:1,value:n.startLine||1,onChange:e=>t("options",parseInt(e,10)||1,"startLine")})]}),(0,l.jsx)("small",{children:(0,x.__)("Numbering starts here — useful when the snippet is an extract.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Highlight Lines","b-blocks"),value:n.highlightLines||"",onChange:e=>t("options",e,"highlightLines"),placeholder:"2, 5-7",help:(0,x.__)("Single lines and ranges, separated by commas. Counted from Start At.","b-blocks"),__nextHasNoMarginBottom:!0}),n.wordWrap&&0<o&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("Word Wrap is on, so highlighting is switched off — a wrapped line changes the height of every row beneath it and the marks would drift.","b-blocks")}),!n.wordWrap&&o>i&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("Some of those lines fall outside the snippet and are ignored.","b-blocks")})]})},Ov=({attributes:e,updateObj:t})=>{const{options:n={},content:o={}}=e,i=parseInt(n.maxLines,10)||0,a=Cv(o.code).length;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Overflow","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Max Lines","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",labelPosition:"edge",min:0,value:i,onChange:e=>t("options",parseInt(e,10)||0,"maxLines")})]}),(0,l.jsx)("small",{children:(0,x.__)("Zero shows the whole snippet. Any other number caps the height.","b-blocks")}),0<i&&i>=a&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.__)("This snippet is shorter than the cap, so nothing is hidden yet.","b-blocks")}),0<i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Expandable","b-blocks"),checked:n.collapsible,onChange:e=>t("options",e,"collapsible"),help:(0,x.__)("Adds a button that opens the snippet to its full height. Off, the rest simply scrolls.","b-blocks"),__nextHasNoMarginBottom:!0}),n.collapsible&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Expand Label","b-blocks"),value:n.expandLabel||"",onChange:e=>t("options",e,"expandLabel"),placeholder:"Show all",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Collapse Label","b-blocks"),value:n.collapseLabel||"",onChange:e=>t("options",e,"collapseLabel"),placeholder:"Show less",__nextHasNoMarginBottom:!0})]})]})]})},Rv=({attributes:e,updateObj:t,device:n="desktop"})=>{const{box:o={}}=e,i=(e,i,a)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.[i]||"",onChange:e=>t("box",e,n,i),units:a})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Box","b-blocks"),initialOpen:!0,children:[i((0,x.__)("Width","b-blocks"),"width",[Pe(),Ee(),Oe()]),i((0,x.__)("Height","b-blocks"),"height",[Pe(),Ee(),Oe()]),(0,l.jsx)("small",{children:(0,x.__)("Leave Height empty to let the snippet set it.","b-blocks")}),(0,l.jsxs)(v,{className:"mb0 mt10 flex1",children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o?.[n]?.align||"",onChange:e=>t("box",e,n,"align"),children:fv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("box",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("box",e,n,"radius")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.background,onChange:e=>t("box",e,"background")}),(0,l.jsx)("small",{children:(0,x.__)("Left empty, the theme paints the background.","b-blocks")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("box",e,"border")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:o.shadow,onChange:e=>t("box",e,"shadow")})]})},zv=({attributes:e,updateObj:t,device:n="desktop"})=>{const{buttonIcon:o={},options:i={}}=e;if(!i.copyButton||!o.enable)return null;const a=(e,n,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:e}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o[n]||"",onChange:e=>t("buttonIcon",e,n),units:i})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Icon","b-blocks"),initialOpen:!1,children:[a((0,x.__)("Size","b-blocks"),"size",[Pe(),Ae(),Be()]),a((0,x.__)("Spacing","b-blocks"),"spacing",[Pe(),Ae()]),(0,l.jsx)("small",{children:(0,x.__)("The gap between the icon and the label.","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:cv,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:wv(e.name,(0,x.__)("Color","b-blocks")),value:o?.[e.name]?.color,onChange:n=>t("buttonIcon",n,e.name,"color")}),(0,l.jsx)(An,{className:"mt10",label:wv(e.name,(0,x.__)("Background","b-blocks")),value:o?.[e.name]?.background,onChange:n=>t("buttonIcon",n,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:wv(e.name,(0,x.__)("Border","b-blocks")),value:o?.[e.name]?.border,onChange:n=>t("buttonIcon",n,e.name,"border")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:wv(e.name,(0,x.__)("Rotate","b-blocks"))}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[e.name]?.rotate||"",onChange:n=>t("buttonIcon",n,e.name,"rotate"),units:[mv()]})]}),"hover"===e.name&&(0,l.jsx)("small",{children:(0,x.__)("A different angle here turns the icon when the pointer is over the button.","b-blocks")})]})}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("buttonIcon",e,n,"radius")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("buttonIcon",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.margin||{},onChange:e=>t("buttonIcon",e,n,"margin")})]})},Dv=({attributes:e,updateObj:t})=>{const{caption:n={},content:o={}}=e;return o.caption?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("caption",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("caption",e,"typo"),defaults:{fontSize:{desktop:13}}}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:10,children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.align||"center",onChange:e=>t("caption",e,"align"),children:fv.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{style:{padding:"0px 10px"},label:e,value:t},t)))})]})]}):null},Fv=({attributes:e,updateObj:t})=>{const{copyBtn:n={},options:o={}}=e;return o.copyButton?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Copy Button","b-blocks"),initialOpen:!1,
376 +children:[(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:dv,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:wv(e.name,(0,x.__)("Color","b-blocks")),value:n?.[e.name]?.color,onChange:n=>t("copyBtn",n,e.name,"color")}),(0,l.jsx)(An,{className:"mt10",label:wv(e.name,(0,x.__)("Background","b-blocks")),value:n?.[e.name]?.background,onChange:n=>t("copyBtn",n,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:wv(e.name,(0,x.__)("Border","b-blocks")),value:n?.[e.name]?.border,onChange:n=>t("copyBtn",n,e.name,"border")}),"copied"===e.name&&(0,l.jsx)("small",{children:(0,x.__)("Shown for two seconds after the button is clicked. Left empty, it keeps the Normal styling.","b-blocks")})]})}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("copyBtn",e,"typo"),defaults:{fontSize:{desktop:12}}}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:n.padding||{},onChange:e=>t("copyBtn",e,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:n.radius||{},onChange:e=>t("copyBtn",e,"radius")})]}):null},Hv=({attributes:e,updateObj:t})=>{const{headerStyle:n={},options:o={}}=e;return o.header?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.background,onChange:e=>t("headerStyle",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Filename Color","b-blocks"),value:n.filenameColor,onChange:e=>t("headerStyle",e,"filenameColor")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Filename Typography","b-blocks"),value:n.filenameTypo,onChange:e=>t("headerStyle",e,"filenameTypo"),defaults:{fontSize:{desktop:12}}}),o.showLanguage&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Badge Color","b-blocks"),value:n.badgeColor,onChange:e=>t("headerStyle",e,"badgeColor")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Badge Background","b-blocks"),value:n.badgeBackground,onChange:e=>t("headerStyle",e,"badgeBackground")})]})]}):null},Wv=({attributes:e,updateObj:t})=>{const{highlight:n={}}=e;return $v(e).length?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Highlighted Lines","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.background,onChange:e=>t("highlight",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Edge Color","b-blocks"),value:n.borderColor,onChange:e=>t("highlight",e,"borderColor"),help:(0,x.__)("The bar down the left of each highlighted line.","b-blocks")})]}):null},Uv=({attributes:e,updateObj:t})=>{const{lineNumber:n={},options:o={}}=e;return o.lineNumbers?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line Numbers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Number Color","b-blocks"),value:n.color,onChange:e=>t("lineNumber",e,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Gutter Background","b-blocks"),value:n.background,onChange:e=>t("lineNumber",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Divider Color","b-blocks"),value:n.borderColor,onChange:e=>t("lineNumber",e,"borderColor")})]}):null},Gv=({attributes:e,updateObj:t})=>{const{codeTypo:n={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Code Text","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:n,onChange:e=>t("codeTypo",e),defaults:{fontSize:{desktop:15,tablet:14,mobile:13}}})})},Vv=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Rv,{...e}),(0,l.jsx)(Hv,{...e}),(0,l.jsx)(Uv,{...e}),(0,l.jsx)(Gv,{...e}),(0,l.jsx)(Wv,{...e}),(0,l.jsx)(Fv,{...e}),(0,l.jsx)(zv,{...e}),(0,l.jsx)(Dv,{...e})]}),qv=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:lv,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ev,{...e}),(0,l.jsx)(Bv,{...e}),(0,l.jsx)(Iv,{...e}),(0,l.jsx)(Av,{...e}),(0,l.jsx)(Lv,{...e}),(0,l.jsx)(Ov,{...e}),(0,l.jsx)(Pv,{...e})]}),"style"===t.name&&(0,l.jsx)(Vv,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},Yv=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i}=t,a="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,s=fe(t,n),r=o.slice(0,12);(0,m.useEffect)((()=>{i!==r&&n({blockId:r})}),[r]);const c=`block-${o}`,d=(0,h.useBlockProps)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qv,{...e,updateObj:s,isPremium:a}),(0,l.jsxs)("div",{...d,children:[(0,l.jsx)(Mv,{attributes:t,id:c,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(Nv,{attributes:t})})]})]})}));Pl(sv.name)&&(0,p.registerBlockType)(sv,{icon:gl,edit:Yv,save:()=>null})
377 +;const Kv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/comparison-table","title":"Comparison Table","category":"bBlocks","description":"Compare plans side by side with check, cross, or text cells and a highlighted featured column.","keywords":["comparison","compare","table","feature matrix","pricing","plan","versus"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"content":{"type":"object","default":{"caption":"Feature comparison across plans","captionPosition":"hidden","captionColor":"","captionTypo":{},"featuredLabel":"Most Popular"}},"table":{"type":"object","default":{"theme":"default","alignment":"center","cellBorderType":"collapse","stackOnMobile":false,"stickyHeader":false,"stickyFirstColumn":true,"showRowStripes":true,"desktop":{"width":"900px","radius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"iconPosition":"top"},"tablet":{"width":"","radius":{},"iconPosition":""},"mobile":{"width":"","radius":{},"iconPosition":""},"borderColor":"#e2e8f0","border":{},"shadow":[],"bg":{}}},"header":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#1e293b"},"color":"#ffffff"},"hover":{"bg":{},"color":""},"typo":{}}},"body":{"type":"object","default":{"bg":{"type":"solid","color":"#ffffff"},"color":"#1f2937","typo":{},"desktop":{"padding":{"top":"12px","right":"16px","bottom":"12px","left":"16px"}},"tablet":{"padding":{}},"mobile":{"padding":{}}}},"rowLabel":{"type":"object","default":{"bg":{"type":"solid","color":"transparent"},"color":"","typo":{}}},"rowColors":{"type":"object","default":{"odd":{"color":"","bg":""},"even":{"color":"","bg":""},"hover":{"color":"","bg":""},"stripe":{"type":"solid","color":"#f8fafc"},"transition":0.2}},"featured":{"type":"object","default":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","columnBg":{"type":"solid","color":"#eff6ff"},"labelBg":{"type":"solid","color":"#f59e0b"},"labelColor":"#ffffff"}},"icons":{"type":"object","default":{"check":"check","cross":"times","checkSvg":"","crossSvg":"","checkColor":"#16a34a","crossColor":"#dc2626","desktop":{"size":"18px","headerSize":"32px"},"tablet":{"size":"","headerSize":""},"mobile":{"size":"","headerSize":""}}},"tooltip":{"type":"object","default":{"bg":{},"color":"","typo":{},"arrow":true,"underline":true,"shadow":[],"desktop":{"width":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"width":"","padding":{},"radius":{}},"mobile":{"width":"","padding":{},"radius":{}}}},"columns":{"type":"array","default":[{"_key":"col-feature","isFeatureColumn":true,"label":"Features","iconSize":{"desktop":"","tablet":"","mobile":""},"cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}}},{"_key":"col-default-1","label":"Basic","isFeatured":false,"icon":"","iconColor":"","cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}},{"_key":"col-default-2","label":"Pro","isFeatured":true,"icon":"","iconColor":"","cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}},{"_key":"col-default-3","label":"Enterprise","isFeatured":false,"icon":"","iconColor":"","cta":{"normal":{"bg":{},"color":""},"hover":{"bg":{},"color":""},"typo":{},"border":{},"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"transition":"","alignment":{"desktop":"","tablet":"","mobile":""}},"iconSize":{"desktop":"","tablet":"","mobile":""}}]},"rows":{"type":"array","default":[{"_key":"row-default-1","label":"Feature One","cells":[{"value":true,"type":"icon","text":""},{"value":true,"type":"icon","text":""},{"value":true,"type":"icon","text":""}]},{"_key":"row-default-2","label":"Feature Two","cells":[{"value":false,"type":"icon","text":""},{"value":true,"type":"icon","text":""},{"value":true,"type":"icon","text":""}]},{"_key":"row-default-3","label":"Feature Three","cells":[{"value":false,"type":"icon","text":""},{"value":false,"type":"icon","text":""},{"value":true,"type":"icon","text":""}]}]},"cta":{"type":"object","default":{"position":"top","normal":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff"},"hover":{"bg":{},"color":""},"typo":{},"border":{},"desktop":{"padding":{"top":"8px","right":"18px","bottom":"8px","left":"18px"},"radius":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"alignment":"center","margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{},"radius":{},"alignment":"","margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{},"radius":{},"alignment":"","margin":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"linear","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"angel":90},"img":{"url":""}}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true,"className":true},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),Qv="b-blocks-comparison-table",Zv=["default","cards","ribbon","stacked"],Xv=["left","center","right"],Jv=(e="ct")=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,ek=e=>Xv.includes(e)?e:"center",tk=(e,t="")=>{if(!e)return t;if("string"==typeof e)return e||t;const{type:n="solid",color:o="",gradient:i="",image:a={}}=e;return"gradient"===n?i||t:"image"===n?a?.url?`url('${a.url}') center center / cover no-repeat`:t:o||t},nk=(e,t)=>void 0!==e&&""!==e&&null!==e?e:t,ok=e=>e?{type:"solid",color:e}:void 0,ik=(e,t)=>e||t?{top:e,right:t,bottom:e,left:t}:void 0,ak=e=>e||0===e?`${parseInt(e,10)}px`:"",sk=(e={})=>{const t=e;if(!["headerBg","cellPaddingV","tooltipColor","tableMaxWidth","theme"].some((e=>void 0!==t[e]&&""!==t[e]&&null!==t[e])))return t;const n=t.table||{},o=t.header||{},i=t.body||{};return{...t,columns:lk(t.columns),content:{...t.content||{},caption:nk(t.content?.caption,t.caption),captionPosition:nk(t.content?.captionPosition,t.captionPosition),captionColor:nk(t.content?.captionColor,t.captionColor),captionTypo:t.content?.captionTypo||t.captionTypo,featuredLabel:nk(t.content?.featuredLabel,t.featuredLabel)},table:{...n,theme:nk(n.theme,t.theme),alignment:nk(n.alignment,t.tableAlignment),cellBorderType:nk(n.cellBorderType,t.cellBorderType),stackOnMobile:nk(n.stackOnMobile,t.stackOnMobile),stickyHeader:nk(n.stickyHeader,t.stickyHeader),stickyFirstColumn:nk(n.stickyFirstColumn,t.stickyFirstColumn),showRowStripes:nk(n.showRowStripes,t.showRowStripes),borderColor:nk(n.borderColor,t.borderColor),border:n.border||t.tableBorder,shadow:n.shadow?.length?n.shadow:t.tableShadow,bg:n.bg||t.tableBg,desktop:{...n.desktop||{},iconPosition:nk(n.desktop?.iconPosition,{
378 +above:"top",inline:"left",hidden:"hidden"}[t.headerIconPosition]),width:nk(n.desktop?.width,t.tableWidth?.desktop||ak(t.tableMaxWidth)),radius:n.desktop?.radius?.top?n.desktop.radius:t.tableRadius?.desktop||ik(ak(t.borderRadius),ak(t.borderRadius))}},header:{...o,normal:{bg:o.normal?.bg||t.headerBackground||ok(t.headerBg),color:nk(o.normal?.color,t.headerTextColor)},hover:{bg:o.hover?.bg||ok(t.headerHoverBg),color:nk(o.hover?.color,t.headerHoverColor)},typo:o.typo||t.headerTypo},body:{...i,bg:i.bg||t.bodyBackground||ok(t.bodyBg),color:nk(i.color,t.bodyTextColor),typo:i.typo||t.bodyTypo,desktop:{padding:i.desktop?.padding?.top?i.desktop.padding:t.cellPadding?.desktop||ik(ak(t.cellPaddingV),ak(t.cellPaddingH))}},rowLabel:{...t.rowLabel||{},bg:t.rowLabel?.bg||t.rowLabelBackground||ok(t.rowLabelBg),color:nk(t.rowLabel?.color,t.rowLabelColor),typo:t.rowLabel?.typo||t.rowLabelTypo},rowColors:{...t.rowColors||{},odd:t.rowColors?.odd||t.rowOdd,even:t.rowColors?.even||t.rowEven,hover:t.rowColors?.hover||t.rowHover,stripe:t.rowColors?.stripe||t.rowStripeBackground||ok(t.rowStripeBg),transition:nk(t.rowColors?.transition,t.transition)},featured:{...t.featured||{},bg:t.featured?.bg||t.featuredBackground||ok(t.featuredBg),color:nk(t.featured?.color,t.featuredTextColor),columnBg:t.featured?.columnBg||t.featuredColBackground||ok(t.featuredColBg),labelBg:t.featured?.labelBg||t.featuredLabelBackground||ok(t.featuredLabelBg),labelColor:nk(t.featured?.labelColor,t.featuredLabelColor)},icons:{...t.icons||{},check:nk(t.icons?.check,t.checkIcon),cross:nk(t.icons?.cross,t.crossIcon),checkSvg:nk(t.icons?.checkSvg,t.checkIconSvg),crossSvg:nk(t.icons?.crossSvg,t.crossIconSvg),checkColor:nk(t.icons?.checkColor,t.checkColor),crossColor:nk(t.icons?.crossColor,t.crossColor),desktop:{size:nk(t.icons?.desktop?.size,t.iconSizes?.desktop||ak(t.iconSize))}},tooltip:{...t.tooltip||{},bg:t.tooltip?.bg||t.tooltipBackground,color:nk(t.tooltip?.color,t.tooltipColor),typo:t.tooltip?.typo||t.tooltipTypo,arrow:nk(t.tooltip?.arrow,t.tooltipArrow),underline:nk(t.tooltip?.underline,t.tooltipUnderline),shadow:t.tooltip?.shadow?.length?t.tooltip.shadow:t.tooltipShadow,desktop:{width:nk(t.tooltip?.desktop?.width,t.tooltipWidth?.desktop),padding:t.tooltip?.desktop?.padding?.top?t.tooltip.desktop.padding:t.tooltipPadding?.desktop,radius:t.tooltip?.desktop?.radius?.top?t.tooltip.desktop.radius:t.tooltipRadius?.desktop}}}},rk=(e=[])=>({feature:e.find((e=>e?.isFeatureColumn))||null,plans:e.filter((e=>!e?.isFeatureColumn))}),lk=(e=[],t="Features")=>e.some((e=>e?.isFeatureColumn))?e:[{_key:"col-feature",isFeatureColumn:!0,label:t||"Features"},...e],ck=(e={})=>{const t=sk(e).table||{};return[`${Qv}-block`,`${Qv}-theme--${n=t.theme,Zv.includes(n)?n:"default"}`,`${Qv}-align--${ek(t.alignment)}`,t.showRowStripes?"has-row-stripes":"",t.stickyHeader?"has-sticky-header":"",!1===t.stickyFirstColumn?"":"has-sticky-first-col",t.stackOnMobile?"is-stacked-mobile":""].filter(Boolean).join(" ");var n},dk=({attributes:e,id:o,isBackend:i=!1})=>{const a=sk(e),{feature:s,plans:r}=rk(a.columns||[]),c=[...s?[{column:s,key:"feature"}]:[],...r.map(((e,t)=>({column:e,key:t})))],{advanced:d,content:u={},table:p={},header:h={},body:g={},rowLabel:m={},rowColors:b={},featured:f={},icons:x={},tooltip:y={},cta:v={}}=a,k=p.cellBorderType||"collapse",w=p.border||{},_=p.shadow||[],C=p.bg||{},j=h.typo||{},$=tk(h.hover?.bg),S=h.hover?.color||"",T=g.typo||{},N=b.odd||{},M=b.even||{},L=b.hover||{},P=b.transition??.2,E=u.captionPosition||"hidden",A=u.captionTypo||{},B=u.captionColor||"",I=y.bg||{},O=y.color||"",R=y.typo||{},z=y.shadow||[],D=y.arrow,F=y.underline,H=m.typo||{},W={top:"column",bottom:"column-reverse",left:"row",right:"row-reverse"},U=`#${o}`,G=`${U} .${Qv}-scroll`,V=`${U} .${Qv}-table`,q=`${V} thead th`,Y=`${V} tbody td, ${V} tbody th, ${V} tfoot td, ${V} tfoot th`,K=`${V} tbody tr`,Q=`${V} caption`,Z=`${V} tbody th.${Qv}-row-label`,X=`${U} .${Qv}-col__cta`,J={left:"margin-left: 0; margin-right: auto;",center:"margin-left: auto; margin-right: auto;",right:"margin-left: auto; margin-right: 0;"},ee=`${U} .${Qv}-tooltip`,te=`${U} .${Qv}-tooltip-bubble`,ne=`${U} .${Qv}-tooltip-arrow`,oe={headerBg:tk(h.normal?.bg),headerText:h.normal?.color,featuredBg:tk(f.bg),featuredText:f.color,featuredColBg:tk(f.columnBg),labelBg:tk(f.labelBg),labelText:f.labelColor,rowLabelBg:tk(m.bg),rowLabelText:m.color,stripeBg:tk(b.stripe),bodyBg:tk(g.bg),bodyText:g.color,checkColor:x.checkColor,crossColor:x.crossColor,borderColor:p.borderColor},ie=`${U}.${Qv}-theme--${p.theme||"default"}`,ae=oe.borderColor||"#e2e8f0",se=oe.featuredBg||"#2563eb",re=(e,t)=>`color-mix(in srgb, ${e} ${t}%, transparent)`,le=({cards:()=>`\n\t\t\t${ie} ${V} tbody td,\n\t\t\t${ie} ${V} tbody th{\n\t\t\t\tborder-bottom: 1px solid ${ae} !important;\n\t\t\t\tborder-bottom-color: ${re(ae,70)} !important;\n\t\t\t\tbox-shadow: 0 0 0 1px ${ae};\n\t\t\t\tbox-shadow: 0 0 0 1px ${re(ae,45)};\n\t\t\t}\n\t\t\t${ie} ${V} thead th.is-featured{ box-shadow: 0 10px 26px ${re(se,24)} !important; }\n\t\t\t${ie} ${V} td.is-featured{\n\t\t\t\tbox-shadow: 0 0 0 1px ${se} !important;\n\t\t\t\tbox-shadow: 0 0 0 1px ${re(se,35)} !important;\n\t\t\t}`}[p.theme]||(()=>""))(),ce=c.map((({column:e,key:t})=>{const n=e?.cta;if(!n)return"";const o=`${U} [data-col="${t}"] .${Qv}-col__cta`,i=n.transition,a=[ns("background",tk(n.normal?.bg||n.bg)),ns("color",n.normal?.color||n.color),as(n.border),ns("padding",hs(n.padding)),ns("border-radius",hs(n.radius)),""===i||null==i?"":`transition: background ${i}s ease, color ${i}s ease, border-color ${i}s ease;`].filter(Boolean).join(""),s=[ns("background",tk(n.hover?.bg)),ns("color",n.hover?.color)].filter(Boolean).join("");return`${a?`${o}{ ${a} }`:""}${s?`${o}:hover, ${o}:focus-visible{ ${s} }`:""}${Object.keys(n.typo||{}).length?ps(o,n.typo).styles:""}`})).join(""),de=c.map((({column:e,key:t})=>e?.iconColor?`${U} [data-col="${t}"] .${Qv}-col__icon{ color: ${e.iconColor}; }`:"")).join(""),ue=e=>`\n\t\t${G}{\n\t\t\t${ns("max-width",p?.[e]?.width)}\n\t\t\t${ns("border-radius",hs(p?.[e]?.radius))}\n\t\t}\n\n\t\t${q}, ${Y}{ ${ns("padding",hs(g?.[e]?.padding))} }\n\n\t\t${U} .${Qv}-cell-icon{\n\t\t\t${ns("width",x?.[e]?.size)}\n\t\t\t${ns("height",x?.[e]?.size)}\n\t\t}\n\n\t\t${U} .${Qv}-col__icon{\n\t\t\t${ns("width",x?.[e]?.headerSize)}\n\t\t\t${ns("height",x?.[e]?.headerSize)}\n\t\t\t${"hidden"===p?.[e]?.iconPosition?"display: none;":""}\n\t\t}\n\n\t\t${c.map((({column:t,key:n})=>t?.iconSize?.[e]?`${U} [data-col="${n}"] .${Qv}-col__icon{ width: ${t.iconSize[e]}; height: ${t.iconSize[e]}; }`:"")).join("")}\n\n\t\t${X}{\n\t\t\t${ns("padding",hs(v?.[e]?.padding))}\n\t\t\t${ns("border-radius",hs(v?.[e]?.radius))}\n\t\t\t${ns("margin",hs(v?.[e]?.margin))}\n\t\t\t\n\t\t\t${J[v?.[e]?.alignment]||""}\n\t\t}\n\n\t\t${c.map((({column:t,key:n})=>J[t?.cta?.alignment?.[e]]?`${U} [data-col="${n}"] .${Qv}-col__cta{ ${J[t.cta.alignment[e]]} }`:"")).join("")}\n\n\t\t${U} .${Qv}-col__head{\n\t\t\t${ns("flex-direction",W[p?.[e]?.iconPosition])}\n\t\t}\n\n\t\t${te}{\n\t\t\t${ns("padding",hs(y?.[e]?.padding))}\n\t\t\t${ns("border-radius",hs(y?.[e]?.radius))}\n\t\t\t${ns("max-width",y?.[e]?.width)}\n\t\t}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
379 +__html:`\n\t\t\t${ps("",j).googleFontLink}\n\t\t\t${ps("",T).googleFontLink}\n\t\t\t${ps("",A).googleFontLink}\n\t\t\t${ps("",R).googleFontLink}\n\t\t\t${ps("",H).googleFontLink}\n\t\t\t${ps("",v.typo).googleFontLink}\n\n\t\t\t${G}{\n\t\t\t\t${ns("border-color",oe.borderColor)}\n\t\t\t\t${ns("background",oe.bodyBg)}\n\t\t\t}\n\n\t\t\t${V}{\n\t\t\t\t${ns("color",oe.bodyText)}\n\t\t\t\t${ns("background",oe.bodyBg)}\n\t\t\t}\n\n\t\t\t${q}{\n\t\t\t\t${ns("background",oe.headerBg)}\n\t\t\t\t${ns("color",oe.headerText)}\n\t\t\t}\n\n\t\t\t${q}.is-featured{\n\t\t\t\t${ns("background",oe.featuredBg)}\n\t\t\t\t${ns("color",oe.featuredText)}\n\t\t\t}\n\n\t\t\t${U} .${Qv}-col__featured-badge{\n\t\t\t\t${ns("background",oe.labelBg)}\n\t\t\t\t${ns("color",oe.labelText)}\n\t\t\t}\n\n\t\t\t${Y}{\n\t\t\t\t${ns("border-color",oe.borderColor)}\n\t\t\t}\n\n\t\t\t${V} tbody td.is-featured{ ${ns("background",oe.featuredColBg)} }\n\n\t\t\t${Z}{\n\t\t\t\t${ns("background",oe.rowLabelBg)}\n\t\t\t\t${ns("color",oe.rowLabelText)}\n\t\t\t}\n\t\t\t${ps(Z,H).styles}\n\n\t\t\t${X}{\n\t\t\t\t${ns("background",tk(v.normal?.bg))}\n\t\t\t\t${ns("color",v.normal?.color)}\n\t\t\t\t${as(v.border)}\n\t\t\t\t${ns("transition",`background ${v.transition??.2}s ease, color ${v.transition??.2}s ease, border-color ${v.transition??.2}s ease`)}\n\t\t\t}\n\t\t\t${ps(X,v.typo).styles}\n\n\t\t\t${X}:hover, ${X}:focus-visible{\n\t\t\t\t${ns("background",tk(v.hover?.bg))}\n\t\t\t\t${ns("color",v.hover?.color)}\n\t\t\t}\n\n\t\t\t${U}.has-sticky-first-col ${V} tbody th.${Qv}-row-label{ ${ns("background",oe.bodyBg)} }\n\t\t\t${U}.has-sticky-first-col ${V} thead th:first-child{ ${ns("background",oe.headerBg)} }\n\n\t\t\t${U}.has-row-stripes ${V} tbody tr:nth-child(even) td,\n\t\t\t${U}.has-row-stripes ${V} tbody tr:nth-child(even) th{ ${ns("background",oe.stripeBg)} }\n\n\t\t\t${U} .${Qv}-cell-icon.is-yes svg{ ${ns("color",oe.checkColor)} }\n\t\t\t${U} .${Qv}-cell-icon.is-no svg{ ${ns("color",oe.crossColor)} }\n\n\t\t\t${V}{\n\t\t\t\t${ns("border-collapse","separate"===k?"separate":"collapse")}\n\t\t\t}\n\n\t\t\t${le}\n\t\t\t${ce}\n\t\t\t${de}\n\n\t\t\t${G}{\n\t\t\t\t${as(w)}\n\t\t\t\t${ns("box-shadow",ls(_))}\n\t\t\t\t${os(C)}\n\t\t\t}\n\n\t\t\t${ps(q,j).styles}\n\t\t\t${ps(Y,T).styles}\n\n\t\t\t${q}:hover{\n\t\t\t\t${ns("background",$)}\n\t\t\t\t${ns("color",S)}\n\t\t\t}\n\n\t\t\t${K}:nth-child(odd) td, ${K}:nth-child(odd) th{\n\t\t\t\t${ns("background",tk(N?.bg))}\n\t\t\t\t${ns("color",N?.color)}\n\t\t\t}\n\n\t\t\t${K}:nth-child(even) td, ${K}:nth-child(even) th{\n\t\t\t\t${ns("background",tk(M?.bg))}\n\t\t\t\t${ns("color",M?.color)}\n\t\t\t}\n\n\t\t\t${tk(L?.bg)||L?.color?`${K}:hover td, ${K}:hover th{\n\t\t\t\t${ns("background",tk(L?.bg))}\n\t\t\t\t${ns("color",L?.color)}\n\t\t\t}`:""}\n\n\t\t\t${q}, ${Y}{\n\t\t\t\t${ns("transition",`background ${P}s, color ${P}s`)}\n\t\t\t}\n\t\t\t${te}{\n\t\t\t\t${ns("background",tk(I))}\n\t\t\t\t${ns("color",O)}\n\t\t\t\t${ns("box-shadow",ls(z))}\n\t\t\t}\n\t\t\t${ps(te,R).styles}\n\n\t\t\t${ne}{\n\t\t\t\t${ns("background",tk(I))}\n\t\t\t\t${!1===D?"display: none;":""}\n\t\t\t}\n\n\t\t\t${!1===F?`${ee}{ text-decoration: none; }`:""}\n\n\t\t\t${"hidden"!==E?`${Q}{\n\t\t\t\tposition: static;\n\t\t\t\twidth: auto;\n\t\t\t\theight: auto;\n\t\t\t\tmargin: 0;\n\t\t\t\tclip: auto;\n\t\t\t\tclip-path: none;\n\t\t\t\toverflow: visible;\n\t\t\t\tcaption-side: ${"top"===E?"top":"bottom"};\n\t\t\t\tpadding: 8px 0;\n\t\t\t\t${ns("color",B)}\n\t\t\t}`:""}\n\t\t\t${ps(Q,A).styles}\n\n\t\t\t${ue("desktop")}\n\t\t\t${t}{ ${ue("tablet")} }\n\t\t\t${n}{ ${ue("mobile")} }\n\n\t\t\t${_s(o,d,i,!1)}\n\t\t\t`}})},uk={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"},pk={check:(0,l.jsx)("svg",{...uk,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})}),"check-circle":(0,l.jsx)("svg",{...uk,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm141.6 192.2L235.7 360.6c-3.1 3.1-8.2 3.1-11.3 0L150.4 287c-3.1-3.1-3.1-8.2 0-11.3l24.5-24.5c3.1-3.1 8.2-3.1 11.3 0l43.5 43.5 132.2-131.3c3.1-3.1 8.2-3.1 11.3 0l24.5 24.5c3 3.1 3 8.2-.1 11.3z"})})},hk={times:(0,l.jsx)("svg",{...uk,viewBox:"0 0 352 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})}),"times-circle":(0,l.jsx)("svg",{...uk,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"currentColor",d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"})})},gk={stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},mk=e=>(0,l.jsxs)("svg",{...gk,...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),bk=e=>(0,l.jsxs)("svg",{...gk,...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),fk=e=>(0,l.jsxs)("svg",{...gk,...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),xk=({attributes:e,isBackend:t=!1})=>{const{content:n={},icons:o={},cta:i={},columns:a=[],rows:s=[]}=sk(e),{feature:r,plans:c}=rk(a),d=i.position||"top",u=e=>e?.ctaLabel?t||!e.ctaUrl?(0,l.jsx)("span",{className:`${Qv}-col__cta`,"aria-hidden":t?"true":void 0,children:e.ctaLabel}):(0,l.jsx)("a",{className:`${Qv}-col__cta`,href:e.ctaUrl,rel:"noopener",children:e.ctaLabel}):null,p=n.caption,h=n.featuredLabel,g=o.check||"check",b=o.cross||"times",f=o.checkSvg||"",x=o.crossSvg||"",y=e=>{const t=e?f:x;return t?(0,l.jsx)("span",{className:`${Qv}-cell-glyph`,dangerouslySetInnerHTML:{__html:t}}):e?((e="check")=>pk[e]||pk.check)(g):((e="times")=>hk[e]||hk.times)(b)},[v,k]=(0,m.useState)(null),w=(0,m.useCallback)(((e,t)=>{const n=e.currentTarget.getBoundingClientRect(),o=window.innerHeight-n.bottom>140;k({text:t,x:n.left+n.width/2,y:o?n.bottom+8:n.top-8,flipped:!o})}),[]),_=(0,m.useCallback)((()=>k(null)),[]),C=(e,t)=>(0,l.jsxs)(l.Fragment,{children:[t&&(e?.badge||h)?(0,l.jsx)("span",{className:`${Qv}-col__featured-badge`,"aria-hidden":"true",children:e?.badge||h}):null,e?.icon||e?.label?(0,l.jsxs)("span",{className:`${Qv}-col__head`,children:[e?.icon?(0,l.jsx)("span",{className:`${Qv}-col__icon`,dangerouslySetInnerHTML:{__html:e.icon}}):null,e?.label?(0,l.jsx)("span",{className:`${Qv}-col__label`,children:e.label}):null]}):null,e?.subtitle?(0,l.jsx)("span",{className:`${Qv}-col__subtitle`,children:e.subtitle}):null,"top"===d?u(e):null]}),j=c.findIndex((e=>e?.isFeatured)),$=p||"Feature comparison across plans";if(!(c.length>0&&s.length>0))return(0,l.jsx)("p",{className:`${Qv}-empty`,children:"No comparison data to display. Add columns and rows in the block sidebar."});const S=v?(0,l.jsxs)("div",{className:`${Qv}-tooltip-bubble${v.flipped?" is-flipped":""}`,style:{left:`${v.x}px`,top:`${v.y}px`},role:"tooltip",
380 +children:[v.text,(0,l.jsx)("span",{className:`${Qv}-tooltip-arrow`,"aria-hidden":"true"})]}):null;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:`${Qv}-scroll`,role:"region","aria-label":`${$}. Scroll horizontally to see all columns.`,tabIndex:0,children:(0,l.jsxs)("table",{className:`${Qv}-table`,children:[(0,l.jsx)("caption",{className:`${Qv}-caption screen-reader-text`,children:$}),(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{scope:"col","data-col":"feature",className:`${Qv}-feature-col`,children:r?.label||r?.icon?C(r,!!r?.isFeatured):(0,l.jsx)("span",{className:"screen-reader-text",children:"Feature"})}),c.map(((e,t)=>{const n=!!e?.isFeatured;return(0,l.jsx)("th",{scope:"col","data-col":t,className:`${Qv}-col${n?" is-featured":""}`,children:C(e,n)},e?._key||`col-${t}`)}))]})}),(0,l.jsx)("tbody",{children:s.map(((e,t)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{scope:"row",className:`${Qv}-row-label`,children:e?.tooltip?(0,l.jsxs)("span",{className:`${Qv}-tooltip`,tabIndex:0,onMouseEnter:t=>w(t,e.tooltip),onMouseLeave:_,onFocus:t=>w(t,e.tooltip),onBlur:_,children:[e?.label||(0,l.jsx)("span",{className:"screen-reader-text",children:"Feature"}),(0,l.jsx)("span",{className:"screen-reader-text",children:e.tooltip})]}):e?.label||(0,l.jsx)("span",{className:"screen-reader-text",children:"Feature"})}),c.map(((t,n)=>{const o=e?.cells?.[n]||{type:"icon",value:!1,text:""},i=`${Qv}-cell${n===j?" is-featured":""}`;return"text"===o.type?(0,l.jsx)("td",{"data-col":n,"data-label":c[n]?.label||"",className:i,children:o.text||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{"aria-hidden":"true",children:"—"}),(0,l.jsx)("span",{className:"screen-reader-text",children:"Not specified"})]})},n):(0,l.jsx)("td",{"data-col":n,"data-label":c[n]?.label||"",className:i,children:(0,l.jsxs)("span",{className:`${Qv}-cell-icon ${o.value?"is-yes":"is-no"}`,children:[y(!!o.value),(0,l.jsx)("span",{className:"screen-reader-text",children:o.value?"Yes":"No"})]})},n)}))]},e?._key||`row-${t}`)))}),"bottom"===d&&c.some((e=>e?.ctaLabel))?(0,l.jsx)("tfoot",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{scope:"row","data-col":"feature",className:`${Qv}-row-label`,children:u(r)}),c.map(((e,t)=>(0,l.jsx)("td",{"data-col":t,className:`${Qv}-cell ${Qv}-cta-cell${t===j?" is-featured":""}`,children:u(e)},e?._key||`cta-${t}`)))]})}):null]})}),S]})},yk=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],vk=[{label:(0,x.__)("Default — classic grid","b-blocks"),value:"default"},{label:(0,x.__)("Cards — columns as cards","b-blocks"),value:"cards"},{label:(0,x.__)("Ribbon — tabbed headers on a panel","b-blocks"),value:"ribbon"},{label:(0,x.__)("Stacked — elevated coloured cards","b-blocks"),value:"stacked"}],kk=((0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),(0,x.__)("Check","b-blocks"),(0,x.__)("Check in circle","b-blocks"),(0,x.__)("Cross","b-blocks"),(0,x.__)("Cross in circle","b-blocks"),(0,x.__)("Icon","b-blocks"),(0,x.__)("Text","b-blocks"),[{label:(0,x.__)("Icon (yes/no)","b-blocks"),value:"icon"},{label:(0,x.__)("Text","b-blocks"),value:"text"}]),wk=e=>({_key:e("col"),label:(0,x.__)("New Plan","b-blocks"),subtitle:"",badge:"",isFeatured:!1,icon:"",iconColor:"",iconSize:{desktop:"",tablet:"",mobile:""},ctaUrl:"",ctaLabel:"",cta:{normal:{bg:{},color:""},hover:{bg:{},color:""},typo:{},border:{},transition:"",alignment:{desktop:"",tablet:"",mobile:""},padding:{top:"",right:"",bottom:"",left:""},radius:{top:"",right:"",bottom:"",left:""}}}),_k=(e,t=0)=>({_key:e("row"),label:(0,x.__)("New feature","b-blocks"),tooltip:"",cells:Array.from({length:t},(()=>({type:"icon",value:!0,text:""})))}),Ck={top:"",right:"",bottom:"",left:""},jk=e=>({type:"solid",color:e}),$k=e=>({desktop:{top:e,right:e,bottom:e,left:e},tablet:{},mobile:{}}),Sk=(e,t)=>({desktop:{top:e,right:t,bottom:e,left:t},tablet:{},mobile:{}}),Tk={default:{header:{normal:{bg:jk("#1e293b"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:jk("#ffffff"),color:"#1f2937"},featured:{bg:jk("#2563eb"),color:"#ffffff",columnBg:jk("#eff6ff"),labelBg:jk("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:jk("transparent"),color:""},rowColorsPart:{odd:{color:"",bg:""},even:{color:"",bg:""}},tablePart:{borderColor:"#e2e8f0"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},radiusPart:$k("8px"),paddingPart:Sk("12px","16px"),shadowPart:[]},cards:{header:{normal:{bg:jk("#1e293b"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:jk("#ffffff"),color:"#1f2937"},featured:{bg:jk("#2563eb"),color:"#ffffff",columnBg:jk("#eff6ff"),labelBg:jk("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:jk("transparent"),color:"#0f172a"},rowColorsPart:{odd:{color:"",bg:""},even:{color:"",bg:""}},tablePart:{borderColor:"#e2e8f0"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},tableRadius:$k("8px"),cellPadding:Sk("14px","16px"),tableShadow:[{hOffset:"0px",vOffset:"4px",blur:"18px",spreed:"0px",color:"#0f172a1f",isInset:!1}]},ribbon:{header:{normal:{bg:jk("#2563eb"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:jk(""),color:"#0f172a"},featured:{bg:jk("#e0574f"),color:"#ffffff",columnBg:jk("#ffffff"),labelBg:jk("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:jk("transparent"),color:"#0f172a"},rowColorsPart:{odd:{color:"",bg:"#ffffff"},even:{color:"",bg:"#f1f5f9"}},tablePart:{borderColor:"transparent"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},radiusPart:$k("8px"),paddingPart:Sk("12px","16px"),shadowPart:[]},stacked:{header:{normal:{bg:jk("#1e293b"),color:"#ffffff"},hover:{bg:{},color:""}},body:{bg:jk(""),color:"#1f2937"},featured:{bg:jk("#e0574f"),color:"#ffffff",columnBg:jk("#ffffff"),labelBg:jk("#f59e0b"),labelColor:"#ffffff"},rowLabel:{bg:jk("transparent"),color:"#0f172a"},rowColorsPart:{odd:{color:"",bg:"#ffffff"},even:{color:"",bg:"#f3f4f6"}},tablePart:{borderColor:"transparent"},icons:{checkColor:"#16a34a",crossColor:"#dc2626"},radiusPart:$k("8px"),paddingPart:Sk("14px","16px"),shadowPart:[]}},Nk={cards:"separate",ribbon:"separate",stacked:"separate"},Mk=["cards","ribbon","stacked"],Lk=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{table:i={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Visual theme","b-blocks"),value:i.theme||"default",options:vk,onChange:n=>t(((e,t={})=>{const n=Tk[e]||{};return{table:{...t.table||{},theme:e,borderColor:n.tablePart?.borderColor,shadow:n.shadowPart||[],desktop:{...t.table?.desktop||{},radius:n.radiusPart?.desktop}},header:n.header,body:{...t.body||{},...n.body||{},desktop:{...t.body?.desktop||{},padding:n.paddingPart?.desktop}},rowLabel:n.rowLabel,rowColors:{...t.rowColors||{},...n.rowColorsPart||{}},featured:n.featured,icons:{...t.icons||{},...n.icons||{}}}})(n,e)),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Table alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.alignment||"center",onChange:e=>n("table",e||"center","alignment"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(mk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:(0,l.jsx)(bk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(fk,{style:{rotate:"-90deg"}})})]})]}),(0,l.jsx)(v,{className:"mt10 mb5",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Header icon position","b-blocks")," ",(0,l.jsx)(_,{})]})
381 +}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i?.[o]?.iconPosition,onChange:e=>n("table",e,o,"iconPosition"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Top","b-blocks"),value:"top"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Left","b-blocks"),value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Right","b-blocks"),value:"right"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hide","b-blocks"),value:"hidden"})]}),(0,l.jsx)("small",{className:"mb10",style:{display:"block",opacity:.7},children:(0,x.__)("Set each column’s icon under Columns (Plans). Leave tablet and mobile unset to inherit.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Row stripes","b-blocks"),checked:!!i.showRowStripes,onChange:e=>n("table",e,"showRowStripes")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Sticky header row","b-blocks"),checked:!!i.stickyHeader,onChange:e=>n("table",e,"stickyHeader"),help:(0,x.__)("Pin the header row while the user scrolls vertically.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Sticky first column","b-blocks"),checked:!1!==i.stickyFirstColumn,onChange:e=>n("table",e,"stickyFirstColumn"),help:(0,x.__)("Pin the feature-name column while the user scrolls horizontally.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Stack columns on mobile","b-blocks"),checked:!!i.stackOnMobile,onChange:e=>n("table",e,"stackOnMobile"),help:(0,x.__)("Below 640px each row becomes a card and every value is labelled with its plan name, instead of scrolling sideways.","b-blocks"),__nextHasNoMarginBottom:!0})]})},Pk=({attributes:e,updateObj:t})=>{const{content:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Accessible caption","b-blocks"),value:n.caption||"",onChange:e=>t("content",e,"caption"),help:(0,x.__)("Visually hidden but read by screen readers. Describe what is being compared.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Featured badge text","b-blocks"),value:n.featuredLabel||"",onChange:e=>t("content",e,"featuredLabel"),placeholder:(0,x.__)("e.g. Most Popular","b-blocks"),__nextHasNoMarginBottom:!0})]})},Ek=({value:e=[],onChange:t,index:n,featuredLabel:o="",device:i="desktop"})=>{const[a,s]=(0,m.useState)("normal"),r=e[n];if(!r)return null;const c=(o,i,a)=>t(e.map(((e,t)=>t===n?{...e||{},cta:{...e?.cta||{},[o]:{...e?.cta?.[o]||{},[i]:a}}}:e))),d=(o,i)=>t(e.map(((e,t)=>t===n?{...e||{},cta:{...e?.cta||{},[o]:i}}:e))),u=(o,i)=>{let a=e.map(((e,t)=>t===n?{...e||{},[o]:i}:e));"isFeatured"===o&&!0===i&&(a=a.map(((e,t)=>t===n?e:{...e||{},isFeatured:!1}))),t(a)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Column label","b-blocks"),value:r.label||"",onChange:e=>u("label",e),placeholder:(0,x.__)("e.g. Pro","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Subtitle (optional)","b-blocks"),value:r.subtitle||"",onChange:e=>u("subtitle",e),placeholder:(0,x.__)("e.g. $19/mo","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Header Icon","b-blocks"),value:r.icon,onChange:e=>u("icon",e)}),r.icon?(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Icon Color:","b-blocks"),value:r.iconColor,onChange:e=>u("iconColor",e)}):null,r.icon?(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.iconSize?.[i],onChange:e=>u("iconSize",{...r.iconSize||{},[i]:e}),__next40pxDefaultSize:!0})]}):null,(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("CTA URL (optional)","b-blocks"),value:r.ctaUrl||"",onChange:e=>u("ctaUrl",e),placeholder:"https://",type:"url",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("CTA button label","b-blocks"),value:r.ctaLabel||"",onChange:e=>u("ctaLabel",e),placeholder:(0,x.__)("e.g. Choose Plan","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Featured column (highlight)","b-blocks"),checked:!!r.isFeatured,onChange:e=>u("isFeatured",e),help:(0,x.__)("Only one column can be featured at a time.","b-blocks"),__nextHasNoMarginBottom:!0}),!!r.isFeatured&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Badge text","b-blocks"),value:r.badge||"",onChange:e=>u("badge",e),placeholder:o||(0,x.__)("Most Popular","b-blocks"),help:(0,x.__)("Leave empty to use the Featured Label from the Content panel.","b-blocks"),__nextHasNoMarginBottom:!0}),r.ctaLabel?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{}),(0,l.jsx)(v,{children:(0,x.__)("CTA overrides for this column","b-blocks")}),(0,l.jsx)("small",{style:{display:"block",opacity:.7,marginBottom:8},children:(0,x.__)("Anything left empty inherits Style → CTA Button.","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:s,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:r.cta?.[a]?.bg||{},onChange:e=>c(a,"bg",e)}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:r.cta?.[a]?.color,onChange:e=>c(a,"color",e)}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.cta?.typo||{},onChange:e=>d("typo",e)}),(0,l.jsx)(v,{className:"mt10 mb5",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:r.cta?.alignment?.[i],onChange:e=>d("alignment",{...r.cta?.alignment||{},[i]:e}),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(mk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:(0,l.jsx)(bk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(fk,{style:{rotate:"-90deg"}})})]}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:r.cta?.border||{},onChange:e=>d("border",e)}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:r.cta?.padding,onChange:e=>d("padding",e)}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:r.cta?.radius,onChange:e=>d("radius",e)}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:""===r.cta?.transition||void 0===r.cta?.transition?"":r.cta.transition,min:0,max:2,step:.05,allowReset:!0,onChange:e=>d("transition",void 0===e?"":e),help:(0,x.__)("Leave unset to inherit Style → CTA Button.","b-blocks"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}):null]})},Ak=({attributes:e,setAttributes:t,device:n="desktop"})=>{const o=lk(e.columns||[]),{plans:i}=rk(o),a=e=>e-(o.findIndex((e=>e?.isFeatureColumn))<e?1:0),s=e.rows||[],r=e=>s.map((t=>({...t||{},
382 +cells:e(Array.isArray(t?.cells)?t.cells:[])}))),c=(0,m.useCallback)((e=>{i.length>=6||t({columns:e,rows:r((e=>[...e,{type:"icon",value:!1,text:""}]))})}),[JSON.stringify(o),JSON.stringify(s)]),d=(0,m.useCallback)((e=>{if(o[e]?.isFeatureColumn||i.length>=6)return;const n={...o[e]||{},_key:Jv("col"),isFeatured:!1};t({columns:[...o.slice(0,e+1),n,...o.slice(e+1)],rows:r((t=>{const n=a(e),o=t.slice();return o.splice(n+1,0,{...t[n]||{type:"icon",value:!1,text:""}}),o}))})}),[JSON.stringify(o),JSON.stringify(s)]),u=(0,m.useCallback)((e=>{o[e]?.isFeatureColumn||i.length<=2||t({columns:o.filter(((t,n)=>n!==e)),rows:r((t=>t.filter(((t,n)=>n!==a(e)))))})}),[JSON.stringify(o),JSON.stringify(s)]),p=(0,m.useCallback)((t=>(0,l.jsx)(Ek,{...t,featuredLabel:e.content?.featuredLabel,device:n})),[e.content?.featuredLabel,n]);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Columns (Plans)","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(_a,{value:o,onChange:e=>{const n=o.map((e=>e?._key)),a=e.map((e=>e?._key));if(n.length===a.length&&a.every((e=>n.includes(e)))&&a.join("|")!==n.join("|")){if(0!==e.findIndex((e=>e?.isFeatureColumn)))return void t({columns:o});const n=i.map((e=>e?._key)),a=e.filter((e=>!e?.isFeatureColumn)).map((e=>e?._key)).map((e=>n.indexOf(e)));t({columns:e,rows:r((e=>a.map((t=>e[t]||{type:"icon",value:!1,text:""}))))})}else t({columns:e})},arrKey:"columns",itemLabel:"Column",title:"label",design:"sortable",minItem:3,ItemSettings:p,newItem:wk(Jv),handleAdd:c,handleCopy:d,handleDelete:u}),i.length>=6&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Maximum of 6 columns reached.","b-blocks")})]})},Bk=({value:e=[],onChange:t,index:n,columns:o=[]})=>{const i=e[n];if(!i)return null;const a=(o,i)=>t(e.map(((e,t)=>t===n?{...e||{},[o]:i}:e))),s=(i,a,s)=>t(e.map(((e,t)=>{if(t!==n)return e;const r=Array.isArray(e?.cells)?e.cells.slice():[];for(;r.length<o.length;)r.push({type:"icon",value:!1,text:""});return r[i]={...r[i]||{type:"icon",value:!1,text:""},[a]:s},{...e||{},cells:r}}))),r=Array.isArray(i.cells)?i.cells:[];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Feature name","b-blocks"),value:i.label||"",onChange:e=>a("label",e),placeholder:(0,x.__)("e.g. Unlimited storage","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Tooltip (optional)","b-blocks"),value:i.tooltip||"",onChange:e=>a("tooltip",e),placeholder:(0,x.__)("Extra explanation shown on hover/focus","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.BaseControl,{className:"mt10",label:(0,x.__)("Cells","b-blocks"),__nextHasNoMarginBottom:!0,children:[!o.length&&(0,l.jsx)("p",{style:{marginTop:4,fontSize:12,opacity:.7},children:(0,x.__)("Add at least one column to edit cells.","b-blocks")}),o.map(((e,t)=>{const n=r[t]||{type:"icon",value:!1,text:""};return(0,l.jsxs)("div",{className:"b-blocks-comparison-table-cell-editor",children:[(0,l.jsxs)("div",{className:"b-blocks-comparison-table-cell-editor__head",children:[(0,l.jsx)("span",{children:e?.label||(0,x.__)("Column","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:"text"===n.type?"text":"icon",options:kk,onChange:e=>s(t,"type",e),__nextHasNoMarginBottom:!0})]}),"text"===n.type?(0,l.jsx)(y.TextControl,{label:(0,x.__)("Text value","b-blocks"),hideLabelFromVision:!0,value:n.text||"",onChange:e=>s(t,"text",e),placeholder:(0,x.__)("e.g. 10 GB, Unlimited, $9/mo","b-blocks"),__nextHasNoMarginBottom:!0}):(0,l.jsx)(y.ToggleControl,{className:"mt10",label:n.value?(0,x.__)("Yes (green check)","b-blocks"):(0,x.__)("No (red X)","b-blocks"),checked:!!n.value,onChange:e=>s(t,"value",e),__nextHasNoMarginBottom:!0})]},e?._key||t)}))]})]})},Ik=({attributes:e,setAttributes:t})=>{const n=e.columns||[],o=e.rows||[],i=(0,m.useCallback)((e=>{o.length>=30||t({rows:e})}),[JSON.stringify(o)]),a=(0,m.useCallback)((e=>{if(o.length>=30)return;const n=o[e]||{},i={...n,_key:Jv("row"),cells:(n.cells||[]).map((e=>({...e})))};t({rows:[...o.slice(0,e+1),i,...o.slice(e+1)]})}),[JSON.stringify(o)]),s=(0,m.useCallback)((e=>(0,l.jsx)(Bk,{...e,columns:n})),[JSON.stringify(n)]);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Feature Rows","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(_a,{value:o,onChange:e=>t({rows:e}),arrKey:"rows",itemLabel:"Row",title:"label",design:"sortable",minItem:0,ItemSettings:s,newItem:_k(Jv,n.length),handleAdd:i,handleCopy:a}),o.length>=30&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Maximum of 30 rows reached.","b-blocks")})]})},Ok=({attributes:e,updateObj:t})=>{const{icons:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Positive (yes) icon","b-blocks"),value:n.check||"check",options:[{label:(0,x.__)("Check mark","b-blocks"),value:"check"},{label:(0,x.__)("Check inside circle","b-blocks"),value:"check-circle"}],onChange:e=>t("icons",e,"check"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Negative (no) icon","b-blocks"),value:n.cross||"times",options:[{label:(0,x.__)("Cross / X","b-blocks"),value:"times"},{label:(0,x.__)("X inside circle","b-blocks"),value:"times-circle"}],onChange:e=>t("icons",e,"cross"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("hr",{}),(0,l.jsx)(Zn,{label:(0,x.__)("Custom “Yes” Icon","b-blocks"),value:n.checkSvg,onChange:e=>t("icons",e,"checkSvg")}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Custom “No” Icon","b-blocks"),value:n.crossSvg,onChange:e=>t("icons",e,"crossSvg")}),(n.checkSvg||n.crossSvg)&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("A library icon overrides the built-in shape above. Clear it to go back.","b-blocks")})]})},Rk=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Lk,{...e}),(0,l.jsx)(Pk,{...e}),(0,l.jsx)(Ak,{...e}),(0,l.jsx)(Ik,{...e}),(0,l.jsx)(Ok,{...e})]}),zk=({attributes:e,updateObj:t})=>{const{body:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Body","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.bg||{},onChange:e=>t("body",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:n.color,onChange:e=>t("body",e,"color")})]})},Dk=({attributes:e,updateObj:t})=>{const{content:n={}}=e,o=n.captionPosition||"hidden";return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Position","b-blocks"),value:o,options:[{label:(0,x.__)("Screen readers only","b-blocks"),value:"hidden"},{label:(0,x.__)("Above the table","b-blocks"),value:"top"},{label:(0,x.__)("Below the table","b-blocks"),value:"bottom"}],onChange:e=>t("content",e,"captionPosition"),__nextHasNoMarginBottom:!0}),"hidden"===o&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("The caption is still read by screen readers — set a position to show it on the page too.","b-blocks")}),"hidden"!==o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color:","b-blocks"),value:n.captionColor,onChange:e=>t("content",e,"captionColor")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.captionTypo||{},onChange:e=>t("content",e,"captionTypo")})]})]})},Fk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{body:o={},rowColors:i={}}=e,[a,s]=(0,m.useState)("normal"),r="hover"===a;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Cells","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding,resetValues:Ck,onChange:e=>t("body",e,n,"padding")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typo||{},onChange:e=>t("body",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",
383 +__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:s,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Row Text Color:","b-blocks"),value:i.hover?.color,onChange:e=>t("rowColors",e,"hover","color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Row Background","b-blocks"),value:i.hover?.bg,onChange:e=>t("rowColors",e,"hover","bg")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:i.transition??.2,min:0,max:5,step:.05,onChange:e=>t("rowColors",e,"transition"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Odd Row Text:","b-blocks"),value:i.odd?.color,onChange:e=>t("rowColors",e,"odd","color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Odd Row Background","b-blocks"),value:i.odd?.bg,onChange:e=>t("rowColors",e,"odd","bg")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Stripe Background","b-blocks"),value:i.stripe||{},onChange:e=>t("rowColors",e,"stripe")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Even Row Text:","b-blocks"),value:i.even?.color,onChange:e=>t("rowColors",e,"even","color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Even Row Background","b-blocks"),value:i.even?.bg,onChange:e=>t("rowColors",e,"even","bg")})]})]})},Hk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{cta:o={},columns:i=[]}=e,[a,s]=(0,m.useState)("normal"),r=i.some((e=>e?.ctaLabel));return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA Button","b-blocks"),initialOpen:!1,children:[!r&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("No column has a CTA yet — add a button label under Columns (Plans) to see these styles.","b-blocks")}),(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.position||"top",onChange:e=>t("cta",e||"top","position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("In header","b-blocks"),value:"top"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Column bottom","b-blocks"),value:"bottom"})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:o?.[n]?.alignment,onChange:e=>t("cta",e,n,"alignment"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Left","b-blocks"),value:"left",icon:(0,l.jsx)(mk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Center","b-blocks"),value:"center",icon:(0,l.jsx)(bk,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:(0,x.__)("Right","b-blocks"),value:"right",icon:(0,l.jsx)(fk,{style:{rotate:"-90deg"}})})]})]}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typo||{},onChange:e=>t("cta",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:s,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o?.[a]?.bg||{},onChange:e=>t("cta",e,a,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:o?.[a]?.color,onChange:e=>t("cta",e,a,"color")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border||{},onChange:e=>t("cta",e,"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.margin,resetValues:Ck,onChange:e=>t("cta",e,n,"margin")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding,resetValues:Ck,onChange:e=>t("cta",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius,resetValues:Ck,onChange:e=>t("cta",e,n,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:o.transition??.2,min:0,max:2,step:.05,onChange:e=>t("cta",e,"transition"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})},Wk=({attributes:e,updateObj:t})=>{const{featured:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Featured Column","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Header Background","b-blocks"),value:n.bg||{},onChange:e=>t("featured",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Header Text:","b-blocks"),value:n.color,onChange:e=>t("featured",e,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Column Background","b-blocks"),value:n.columnBg||{},onChange:e=>t("featured",e,"columnBg")}),(0,l.jsx)("hr",{}),(0,l.jsx)(An,{label:(0,x.__)("Badge Background","b-blocks"),value:n.labelBg||{},onChange:e=>t("featured",e,"labelBg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Badge Text:","b-blocks"),value:n.labelColor,onChange:e=>t("featured",e,"labelColor")})]})},Uk=({attributes:e,updateObj:t})=>{const{header:n={}}=e,[o,i]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:n.typo||{},onChange:e=>t("header",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:i,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:n[o]?.color,onChange:e=>t("header",e,o,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:n[o]?.bg||{},onChange:e=>t("header",e,o,"bg")})]})},Gk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{icons:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("“Yes” Color:","b-blocks"),value:o.checkColor,onChange:e=>t("icons",e,"checkColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("“No” Color:","b-blocks"),value:o.crossColor,onChange:e=>t("icons",e,"crossColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o?.[n]?.size,onChange:e=>t("icons",e,n,"size"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Header Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o?.[n]?.headerSize,
384 +onChange:e=>t("icons",e,n,"headerSize"),__next40pxDefaultSize:!0})]})]})},Vk=({attributes:e,updateObj:t})=>{const{rowLabel:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Row Labels","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:n.bg||{},onChange:e=>t("rowLabel",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:n.color,onChange:e=>t("rowLabel",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo||{},onChange:e=>t("rowLabel",e,"typo")})]})},qk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{table:o={}}=e,i=Nk[o.theme],a=Mk.includes(o.theme);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table Style","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o?.[n]?.width,onChange:e=>t("table",e,n,"width"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Cell Border Type","b-blocks"),value:i||o.cellBorderType||"collapse",labelPosition:"edge",disabled:!!i,options:[{label:(0,x.__)("Collapse","b-blocks"),value:"collapse"},{label:(0,x.__)("Separate","b-blocks"),value:"separate"}],onChange:e=>t("table",e,"cellBorderType"),__nextHasNoMarginBottom:!0}),i&&(0,l.jsxs)(ja,{status:"info",isIcon:!0,children:[(0,x.__)("The selected theme needs this set to","b-blocks")," ",(0,l.jsx)("b",{children:i})," ",(0,x.__)("for its layout, so this control is inactive. Switch to Default or Striped to change it.","b-blocks")]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Grid Line Color:","b-blocks"),value:o.borderColor,onChange:e=>t("table",e,"borderColor")}),a&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("This theme removes the outer frame so its cards stand free, so the border below has no effect. Grid Line Color still applies to the cells.","b-blocks")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border||{},onChange:e=>t("table",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius,resetValues:Ck,onChange:e=>t("table",e,n,"radius")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.bg||{},onChange:e=>t("table",e,"bg")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:o.shadow||[],onChange:e=>t("table",e,"shadow")})]})},Yk=({attributes:e,updateObj:t,device:n="desktop"})=>{const{rows:o=[],tooltip:i={}}=e,a=o.some((e=>e?.tooltip));return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tooltip","b-blocks"),initialOpen:!1,children:[!a&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("No row has a tooltip yet — add one under General → Feature Rows to see these styles.","b-blocks")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:i.bg||{},onChange:e=>t("tooltip",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:i.color,onChange:e=>t("tooltip",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typo||{},onChange:e=>t("tooltip",e,"typo")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i?.[n]?.width,onChange:e=>t("tooltip",e,n,"width"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:void 0,values:i?.[n]?.padding,resetValues:Ck,onChange:e=>t("tooltip",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i?.[n]?.radius,resetValues:Ck,onChange:e=>t("tooltip",e,n,"radius")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:i.shadow||[],onChange:e=>t("tooltip",e,"shadow")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show arrow","b-blocks"),checked:!1!==i.arrow,onChange:e=>t("tooltip",!!e,"arrow"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Underline the label","b-blocks"),checked:!1!==i.underline,onChange:e=>t("tooltip",!!e,"underline"),help:(0,x.__)("The dotted underline is the only cue that a tooltip exists.","b-blocks"),__nextHasNoMarginBottom:!0})]})},Kk=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qk,{...e}),(0,l.jsx)(Uk,{...e}),(0,l.jsx)(zk,{...e}),(0,l.jsx)(Fk,{...e}),(0,l.jsx)(Vk,{...e}),(0,l.jsx)(Wk,{...e}),(0,l.jsx)(Hk,{...e}),(0,l.jsx)(Gk,{...e}),(0,l.jsx)(Yk,{...e}),(0,l.jsx)(Dk,{...e})]}),Qk=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:yk,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(Rk,{...e}),"style"===t.name&&(0,l.jsx)(Kk,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},Zk=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,a=fe(t,n),s=(0,h.useBlockProps)({id:`block-${o}`,className:ck(t)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Qk,{...e,updateObj:a,isPremium:i}),(0,l.jsxs)("div",{...s,children:[(0,l.jsx)(dk,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(xk,{attributes:t,isBackend:!0})})]})]})}));Pl(Kv.name)&&(0,p.registerBlockType)(Kv,{icon:xl,edit:Zk})
385 +;const Xk=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table","version":"1.0.0","title":"Table","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","keywords":["table","b-blocks","b-table"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"content":{"type":"object","default":{"cellBorderType":"collapse"}},"options":{"type":"object","default":{"isEnableHeader":true,"isEnableFooter":true,"isEnableCaption":true,"isStickyHeader":false}},"styles":{"type":"object","default":{"content":{"width":{"desktop":"","tablet":"","mobile":""},"align":{"desktop":"","tablet":"","mobile":""},"normal":{"border":{"color":"#acacac","style":"solid","width":"1px"},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2},"hover":{"border":{},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"header":{"typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"normal":{"color":"","bg":{"color":"#d4d4d4"},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2},"hover":{"color":"","bg":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"body":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"normal":{"bg":{},"oddBg":{},"evenBg":{},"transition":0.2},"hover":{"bg":{},"oddBg":{},"evenBg":{}}},"column":[{"type":"","color":"","bg":{}}],"cells":{"typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}},"oddCell":{"normal":{"color":"","bg":{},"transition":0.2},"hover":{"color":"","bg":{}}},"evenCell":{"normal":{"color":"","bg":{},"transition":0.2},"hover":{"color":"","bg":{}}}},"footer":{"typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"normal":{"bg":{"color":"#d4d4d4"},"color":"","transition":0.2},"hover":{"bg":{},"color":""}},"caption":{"position":"bottom","typography":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"color":"","bg":{},"border":{},"desktop":{"alignment":"right","radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"alignment":"right","radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"alignment":"right","radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}}}},"datatables":{"type":"object","default":{"enabled":false,"paging":{"enabled":true,"pageLength":10,"pagingType":"simple_numbers"},"searching":{"enabled":true,"smart":true,"regex":false,"caseInsensitive":true},"ordering":{"enabled":true,"multiColumn":false},"info":true,"layout":{"topStart":"pageLength","topEnd":"search","bottomStart":"info","bottomEnd":"paging"},"stateSave":false,"autoWidth":true,"searchDelay":400,"responsive":true,"fixedHeader":false,"select":{"enabled":false,"style":"single"},"buttons":{"enabled":false,"copy":false,"csv":false,"excel":false,"pdf":false,"print":false,"colvis":false},"serverSide":{"enabled":false,"endpoint":""},"language":{"search":"Search:","lengthMenu":"Show _MENU_ entries","info":"Showing _START_ to _END_ of _TOTAL_ entries","emptyTable":"No data available in table","zeroRecords":"No matching records found","paginate":{"first":"First","last":"Last","next":"Next","previous":"Previous"}}}},"datatableStyles":{"type":"object","default":{"search":{"label":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"color":"","bg":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"input":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"normal":{"color":"","bg":{},"transition":0.2,"border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"hover":{"color":"","bg":{},"transition":0.2,"border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"focus":{"color":"","bg":{},"transition":0.2,"border":{},"radius":{"top":"","right":"","bottom":"","left":""}}}},"recordInfo":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"color":"","bg":{},"desktop":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"tablet":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"mobile":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}}},"pageLength":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"color":"","bg":{},"desktop":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"tablet":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}},"mobile":{"padding":{"top":"","left":"","bottom":"","right":""},"margin":{"top":"","left":"","bottom":"","right":""}}},"column":[{"typo":"","color":"","bg":{}}],"pagination":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""}},"normal":{"color":"","bg":{},"border":{},"radius":{"top":"","right":"","bottom":"","left":""},"transition":0.2},"hover":{"color":"","bg":{},"border":{},"radius":{"top":"","right":"","bottom":"","left":""}},"active":{"color":"","bg":{},"border":{},"radius":{"top":"","right":"","bottom":"","left":""}}},"buttons":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"desktop":{"padding":{"top":"","left":"","bottom":"","right":""}},"tablet":{"padding":{"top":"","left":"","bottom":"","right":""}},"mobile":{"padding":{"top":"","left":"","bottom":"","right":""}},"normal":{"bg":{},"color":"","border":{},"radius":{},"transition":0.2},"hover":{"bg":{},"color":"","border":{},"radius":{}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Jk=window.wp.primitives
386 +;var ew=(0,l.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Jk.Path,{d:"M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z"})}),tw=(0,l.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Jk.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z"})}),nw=(0,l.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Jk.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z"})}),ow=(0,l.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Jk.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z"})}),iw=(0,l.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Jk.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})}),aw=(0,l.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Jk.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})});const sw=[{value:"none",label:(0,x.__)("None","b-blocks")},{value:"pageLength",label:(0,x.__)("Page Length","b-blocks")},{value:"search",label:(0,x.__)("Search","b-blocks")},{value:"info",label:(0,x.__)("Info","b-blocks")},{value:"paging",label:(0,x.__)("Paging","b-blocks")}],rw=[{value:"simple",label:"Simple"},{value:"simple_numbers",label:"Simple Numbers"},{value:"full",label:"Full"},{value:"full_numbers",label:"Full Numbers"},{value:"first_last_numbers",label:"First Last Numbers"}],lw=[{value:"single",label:(0,x.__)("Single row","b-blocks")},{value:"multi",label:(0,x.__)("Multi row","b-blocks")},{value:"os",label:(0,x.__)("OS-style (Ctrl/Shift)","b-blocks")}],cw=({attributes:e,setAttributes:t})=>{const{datatables:n}=e,o=e=>t({datatables:{...n,...e}}),i=e=>o({paging:{...n.paging,...e}}),a=e=>o({searching:{...n.searching,...e}}),s=e=>o({ordering:{...n.ordering,...e}}),r=e=>o({layout:{...n.layout,...e}}),c=e=>o({buttons:{...n.buttons,...e}}),d=e=>o({select:{...n.select,...e}}),u=e=>o({serverSide:{...n.serverSide,...e}}),p=e=>o({language:{...n.language,...e}}),h=e=>p({paginate:{...n.language.paginate,...e}}),g=n.buttons.copy||n.buttons.csv||n.buttons.excel||n.buttons.pdf||n.buttons.print||n.buttons.colvis;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("DataTables","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable DataTables","b-blocks"),checked:n.enabled,onChange:e=>o({enabled:e}),help:(0,x.__)("Turn this on to enable DataTables library features for the table.","b-blocks")}),n.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"mt10",title:(0,x.__)("Core Features","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pagination","b-blocks"),checked:n.paging.enabled,onChange:e=>i({enabled:e})}),n.paging.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Default Page Length","b-blocks"),value:n.paging.pageLength,onChange:e=>i({pageLength:Math.max(1,Number(e)||10)}),min:1,max:500}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Pagination Style","b-blocks"),value:n.paging.pagingType,onChange:e=>i({pagingType:e}),options:rw})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Search","b-blocks"),checked:n.searching.enabled,onChange:e=>a({enabled:e})}),n.searching.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Smart Search","b-blocks"),checked:n.searching.smart,onChange:e=>a({smart:e}),help:(0,x.__)("Matches keywords in any order across the row.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Case Insensitive","b-blocks"),checked:n.searching.caseInsensitive,onChange:e=>a({caseInsensitive:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Regex Search","b-blocks"),checked:n.searching.regex,onChange:e=>a({regex:e}),help:(0,x.__)("Let visitors enter regular expressions in the search box.","b-blocks")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Column Sorting","b-blocks"),checked:n.ordering.enabled,onChange:e=>s({enabled:e})}),n.ordering.enabled&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Multi-Column Sort","b-blocks"),checked:n.ordering.multiColumn,onChange:e=>s({multiColumn:e}),help:(0,x.__)("Shift+click column headers to sort by multiple columns simultaneously.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Record Info","b-blocks"),checked:n.info,onChange:e=>o({info:e}),help:(0,x.__)('Shows "Showing X to Y of Z entries" text.',"b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Layout & Toolbar","b-blocks"),initialOpen:!1,children:[(0,l.jsx)("p",{style:{fontSize:11,color:"#757575",marginBottom:8},children:(0,x.__)("Choose which control appears in each toolbar position.","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Top Left","b-blocks"),value:n.layout.topStart,onChange:e=>r({topStart:e}),options:sw}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Top Right","b-blocks"),value:n.layout.topEnd,onChange:e=>r({topEnd:e}),options:sw}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Bottom Left","b-blocks"),value:n.layout.bottomStart,
387 +onChange:e=>r({bottomStart:e}),options:sw}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Bottom Right","b-blocks"),value:n.layout.bottomEnd,onChange:e=>r({bottomEnd:e}),options:sw}),n.buttons.enabled&&g&&(0,l.jsx)(y.Notice,{status:"info",isDismissible:!1,style:{marginTop:8},children:(0,x.__)("Export buttons are placed in an additional row above the toolbar automatically.","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Extensions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Responsive","b-blocks"),checked:n.responsive,onChange:e=>o({responsive:e}),help:(0,x.__)("Collapses overflow columns on small screens with expandable child rows.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fixed Header","b-blocks"),checked:n.fixedHeader,onChange:e=>o({fixedHeader:e}),help:(0,x.__)("Keeps the header row visible when the user scrolls down.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Row Selection","b-blocks"),checked:n.select.enabled,onChange:e=>d({enabled:e})}),n.select.enabled&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Selection Style","b-blocks"),value:n.select.style,onChange:e=>d({style:e}),options:lw}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Export Buttons","b-blocks"),checked:n.buttons.enabled,onChange:e=>c({enabled:e})}),n.buttons.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{style:{fontSize:11,color:"#757575",margin:"4px 0 6px"},children:(0,x.__)("Select which export actions to display:","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Copy","b-blocks"),checked:n.buttons.copy,onChange:e=>c({copy:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("CSV","b-blocks"),checked:n.buttons.csv,onChange:e=>c({csv:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Excel","b-blocks"),checked:n.buttons.excel,onChange:e=>c({excel:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("PDF","b-blocks"),checked:n.buttons.pdf,onChange:e=>c({pdf:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Print","b-blocks"),checked:n.buttons.print,onChange:e=>c({print:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Column Visibility","b-blocks"),checked:n.buttons.colvis,onChange:e=>c({colvis:e})})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Performance","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Save Table State","b-blocks"),checked:n.stateSave,onChange:e=>o({stateSave:e}),help:(0,x.__)("Persists the user's search, sort, and page in localStorage between visits.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Auto Column Width","b-blocks"),checked:n.autoWidth,onChange:e=>o({autoWidth:e})}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Search Delay (ms)","b-blocks"),value:n.searchDelay,onChange:e=>o({searchDelay:Math.max(0,Number(e)||400)}),min:0,max:2e3,help:(0,x.__)("Milliseconds to wait after the user types before triggering a search redraw.","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Server-Side Processing","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Server-Side Processing","b-blocks"),checked:n.serverSide.enabled,onChange:e=>u({enabled:e}),help:(0,x.__)("Sends search, sort, and page requests to a server endpoint. Required for very large datasets.","b-blocks")}),n.serverSide.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("API Endpoint URL","b-blocks"),value:n.serverSide.endpoint,onChange:e=>u({endpoint:e}),placeholder:"https://your-site.com/wp-json/b-blocks/v1/table-data",help:(0,x.__)("Must return the DataTables server-side JSON contract: draw, recordsTotal, recordsFiltered, data.","b-blocks")}),(0,l.jsx)(y.Notice,{status:"warning",isDismissible:!1,children:(0,x.__)("When server-side mode is active, the table's HTML content is ignored — data comes entirely from the endpoint.","b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Language / Labels","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Search Label","b-blocks"),value:n.language.search,onChange:e=>p({search:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Length Menu Label","b-blocks"),value:n.language.lengthMenu,onChange:e=>p({lengthMenu:e}),help:(0,x.__)("Use _MENU_ as placeholder for the page-size dropdown.","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Info Label","b-blocks"),value:n.language.info,onChange:e=>p({info:e}),help:(0,x.__)("Placeholders: _START_, _END_, _TOTAL_","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Empty Table","b-blocks"),value:n.language.emptyTable,onChange:e=>p({emptyTable:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("No Results","b-blocks"),value:n.language.zeroRecords,onChange:e=>p({zeroRecords:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Previous Button","b-blocks"),value:n.language.paginate.previous,onChange:e=>h({previous:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Next Button","b-blocks"),value:n.language.paginate.next,onChange:e=>h({next:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("First Button","b-blocks"),value:n.language.paginate.first,onChange:e=>h({first:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Last Button","b-blocks"),value:n.language.paginate.last,onChange:e=>h({last:e})})]})]})]})},dw=e=>{const{attributes:t,setAttributes:n,updateObj:o,handleToggleHeader:i,handleToggleFooter:a}=e,{content:s,options:r}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table","b-blocks"),children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Cell Border Type","b-blocks"),labelPosition:"edge",value:s?.cellBorderType,onChange:e=>o("content",e,"cellBorderType"),options:[{label:(0,x.__)("Collapse","b-blocks"),value:"collapse"},{label:(0,x.__)("Separate","b-blocks"),value:"separate"}]})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Header","b-blocks"),checked:r?.isEnableHeader,onChange:i}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Footer","b-blocks"),checked:r?.isEnableFooter,onChange:a})]}),(0,l.jsx)(cw,{attributes:t,setAttributes:n})]})},uw=({attributes:e,updateObj:t})=>{const[n,o]=(0,m.useState)("normal"),{styles:i}=e,{body:a}=i;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Body","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n,onChange:e=>{o(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a[n].bg,onChange:e=>t("styles",e,"body",n,"bg")}),"hover"===n&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:a.normal.transition,onChange:e=>t("styles",e,"body","normal","transition"),step:.05,min:0,max:5})]})})},pw=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),{styles:a}=e,{cells:s}=a;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Cells","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:s[n].padding,onChange:e=>t("styles",e,"cells",n,"padding")}),(0,l.jsx)(Oa,{value:s.typography,onChange:e=>t("styles",e,"cells","typography")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),onChange:e=>t("styles",e,"cells","border"),values:s.border}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,
388 +x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:s[n].radius,onChange:e=>t("styles",e,"cells",n,"radius")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Odd Row Text Color","b-blocks"),value:s.oddCell[o].color,onChange:e=>t("styles",e,"cells","oddCell",o,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Odd Row Background","b-blocks"),value:s.oddCell[o].bg,onChange:e=>t("styles",e,"cells","oddCell",o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Even Row Text Color","b-blocks"),value:s.evenCell[o].color,onChange:e=>t("styles",e,"cells","evenCell",o,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Even Row Background","b-blocks"),value:s.evenCell[o].bg,onChange:e=>t("styles",e,"cells","evenCell",o,"bg")}),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:s.oddCell.normal.transition,step:.05,min:0,max:5,onChange:e=>t("styles",e,"cells","oddCell","normal","transition")})]})},hw=({value:e,index:t,updateObj:n})=>{const o=e[t];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color,onChange:e=>n("datatableStyles",e,"column",t,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:o.bg,onChange:e=>n("datatableStyles",e,"column",t,"bg")})]})},gw=({attributes:e,setAttributes:t,updateObj:n,device:o})=>{const[i,a]=(0,m.useState)("normal"),[s,r]=(0,m.useState)("normal"),[c,d]=(0,m.useState)("normal"),{datatableStyles:u}=e,{search:p,recordInfo:h,pageLength:g,pagination:b,buttons:f,column:v}=u,w={typo:"",color:"",bg:{}};return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Data Table Styles","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Column Styles","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{value:u.column,handleAdd:()=>{t({datatableStyles:{...u,column:[...v,w]}})},handleDelete:e=>{t({datatableStyles:{...u,column:v.filter(((t,n)=>n!==e))}})},newItem:w,design:"sortable",itemLabel:"Column",arrKey:"column",title:"title",ItemSettings:hw,handleCopy:e=>{t({datatableStyles:{...u,column:[...v,v[e]]}})},minItem:0,updateObj:n})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Search","b-blocks"),initialOpen:!1,children:[(0,l.jsx)("b",{className:"mt10 mb10",children:(0,x.__)("Label","b-blocks")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.label[o].padding,onChange:e=>n("datatableStyles",e,"search","label",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.label[o].margin,onChange:e=>n("datatableStyles",e,"search","label",o,"margin")}),(0,l.jsx)(Oa,{value:p.label.typo,onChange:e=>n("datatableStyles",e,"search","label","typo")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:p.label.color,onChange:e=>n("datatableStyles",e,"search","label","color")}),(0,l.jsx)(An,{className:"mt10",value:p.label.bg,onChange:e=>n("datatableStyles",e,"search","label","bg")}),(0,l.jsx)("b",{className:"mt10 mb10",children:(0,x.__)("Input Field","b-blocks")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.input[o].padding,onChange:e=>n("datatableStyles",e,"search","input",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p.input[o].margin,onChange:e=>n("datatableStyles",e,"search","input",o,"margin")}),(0,l.jsx)(Oa,{value:p.input.typo,onChange:e=>n("datatableStyles",e,"search","input","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>{a(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Focus",value:"focus"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:p.input[i].color,onChange:e=>n("datatableStyles",e,"search","input",i,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:p.input[i].bg,onChange:e=>n("datatableStyles",e,"search","input",i,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:p.input[i].border,onChange:e=>n("datatableStyles",e,"search","input",i,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:p.input[i].radius,onChange:e=>n("datatableStyles",e,"search","input",i,"radius")}),"hover"===i&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:p.input.normal.transition,onChange:e=>n("datatableStyles",e,"search","input","normal","transition")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Record Info","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:h[o].padding,onChange:e=>n("datatableStyles",e,"recordInfo",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:h[o].margin,onChange:e=>n("datatableStyles",e,"recordInfo",o,"margin")}),(0,l.jsx)(Oa,{value:h.typo,onChange:e=>n("datatableStyles",e,"recordInfo","typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:h.color,onChange:e=>n("datatableStyles",e,"recordInfo","color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:h.bg,onChange:e=>n("datatableStyles",e,"recordInfo","bg")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Page Length","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:g[o].padding,onChange:e=>n("datatableStyles",e,"pageLength",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:g[o].margin,onChange:e=>n("datatableStyles",e,"pageLength",o,"margin")}),(0,l.jsx)(Oa,{value:g.typo,onChange:e=>n("datatableStyles",e,"pageLength","typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:g.color,onChange:e=>n("datatableStyles",e,"pageLength","color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:g.bg,onChange:e=>n("datatableStyles",e,"pageLength","bg")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:b[o].padding,onChange:e=>n("datatableStyles",e,"pagination",o,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:b[o].margin,onChange:e=>n("datatableStyles",e,"pagination",o,"margin")}),(0,l.jsx)(Oa,{value:b.typo,onChange:e=>n("datatableStyles",e,"pagination","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:c,onChange:e=>{d(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]
389 +}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:b[c].color,onChange:e=>n("datatableStyles",e,"pagination",c,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:b[c].bg,onChange:e=>n("datatableStyles",e,"pagination",c,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:b[c].border,onChange:e=>n("datatableStyles",e,"pagination",c,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:b[c].radius,onChange:e=>n("datatableStyles",e,"pagination",c,"radius")}),"hover"===c&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:b.normal.transition,onChange:e=>n("datatableStyles",e,"pagination","normal","transition")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Export Buttons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:f[o].padding,onChange:e=>n("datatableStyles",e,"buttons",o,"padding")}),(0,l.jsx)(Oa,{value:f.typo,onChange:e=>n("datatableStyles",e,"buttons","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>{r(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:f[s].color,onChange:e=>n("datatableStyles",e,"buttons",s,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:f[s].bg,onChange:e=>n("datatableStyles",e,"buttons",s,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:f[s].border,onChange:e=>n("datatableStyles",e,"buttons",s,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:f[s].radius,onChange:e=>n("datatableStyles",e,"buttons",s,"radius")}),"hover"===s&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:f.normal.transition,onChange:e=>n("datatableStyles",e,"buttons","normal","transition")})]})]})})},mw=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("normal"),{styles:a}=e,{footer:s}=a;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Footer","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:s.typography,onChange:e=>t("styles",e,"footer","typography")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),value:s.padding[n],onChange:e=>t("styles",e,"footer","padding",n)}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:s[o].color,onChange:e=>t("styles",e,"footer",o,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:s[o].bg,onChange:e=>t("styles",e,"footer",o,"bg")}),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:s.normal.transition,step:.05,min:0,max:5,onChange:e=>t("styles",e,"footer","normal","transition")})]})},bw=e=>{const{attributes:t,device:n,updateObj:o}=e,[i,a]=(0,m.useState)("normal"),{styles:s}=t,{header:r}=s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:r.typography,onChange:e=>o("styles",e,"header","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i,onChange:e=>{a(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r[i].color,onChange:e=>o("styles",e,"header",i,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:r[i].bg,onChange:e=>o("styles",e,"header",i,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[i].padding[n],onChange:e=>o("styles",e,"header",i,"padding",n)}),"hover"===i&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:r.normal.transition,step:.05,min:0,max:5,onChange:e=>o("styles",e,"header","transition")})]})},fw=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),xw=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),yw=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),vw=()=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",children:(0,l.jsx)("path",{d:"M20 3H4C2.9 3 2 3.9 2 5v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H4V5h16zM8 19H4v-3h4v3zm0-5H4v-3h4v3zm6 5h-4v-3h4v3zm0-5h-4v-3h4v3zm6 5h-4v-3h4v3zm0-5h-4v-3h4v3z"})}),kw=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i,device:a}=e,{styles:s}=o,{content:r}=s;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table Style","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.width[a],onChange:e=>i("styles",e,"content","width",a)})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Alignment ","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:r.align[a],onChange:e=>i("styles",e,"content","align",a),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Start",value:"flex-start",icon:(0,l.jsx)(fw,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(xw,{style:{rotate:"-90deg"}})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"End",value:"flex-end",icon:(0,l.jsx)(yw,{style:{rotate:"-90deg"}})})]})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","border"),value:r[t].border,onChange:e=>i("styles",e,"content",t,"border")}),(0,l.jsx)(k,{className:"mt10",
390 +label:(0,x.__)("Border Radius","b-blocks"),values:r[t].radius[a],onChange:e=>i("styles",e,"content",t,"radius",a)}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:r.normal.transition,step:.05,min:0,max:5,onChange:e=>i("styles",e,"content","normal","transition")})]})},ww=e=>{const{attributes:t}=e,{datatables:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(kw,{...e}),(0,l.jsx)(bw,{...e}),(0,l.jsx)(uw,{...e}),(0,l.jsx)(pw,{...e}),(0,l.jsx)(mw,{...e}),n.enabled&&(0,l.jsx)(gw,{...e})]})},_w=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Cw=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bblockswp.com/docs/"}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:_w,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(dw,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ww,{...e})})]})})]})}),jw=({attributes:e,id:t})=>{const{content:n,styles:o,datatableStyles:i}=e,{content:a,header:s,body:r,cells:c,footer:d}=o,{column:u,search:p,recordInfo:h,pageLength:g,pagination:m,buttons:b}=i,f=`#${t}`,x=`${f} .b-blocks-table-main-container`,y=`${x} :where(.wp-block-b-blocks-table-head)`,v=`${x} .wp-block-b-blocks-table-body`,k=`${x} :where(.wp-block-b-blocks-table-footer)`,w=`${v} .wp-block-b-blocks-table-row`,_=`${w} .wp-block-b-blocks-table-cell`,C=`${x} :where(.b-blocks-table-head-cell)`,j=`${x} :where(.b-blocks-table-footer-cell)`,$=`${f} .dt-container .dt-layout-row .dt-layout-cell`,S=`${$} .dt-search`,T=`${$} .dt-length`,N=`${$} .dt-info`,M=`${$}>.dt-paging>nav>.dt-paging-button`,L=`${$} .dt-buttons .dt-button`,P=`${x}>colgroup>col`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${ps("",c.typography).googleFontLink}\n\t\t${ps("",s.typography).googleFontLink}\n\t\t${ps("",p.label.typo).googleFontLink}\n\t\t${ps("",p.input.typo).googleFontLink}\n\t\t${ps("",h.typo).googleFontLink}\n\t\t${ps("",g.typo).googleFontLink}\n\t\t${ps("",m.typo).googleFontLink}\n\t\t${ps("",b.typo).googleFontLink}\n\n\t\t${ps(_,c.typography).styles}\n\t\t${ps(`${C} .wp-block-paragraph`,s.typography).styles}\n\t\t${ps(`${S}>label`,p.label.typo).styles}\n\t\t${ps(`${S}>.dt-input`,p.input.typo).styles}\n\t\t${ps(`${N}`,h.typo).styles}\n\t\t${ps(`${T}>label`,g.typo).styles}\n\t\t${ps(`${M}`,m.typo).styles}\n\t\t${ps(`${L}`,b.typo).styles}\n\n\t\t${f}{\n\t\t\t${ns("justify-content",a.align.desktop)}\n\t\t}\n\n\t\t${x}{\n\t\t\t${ns("width",a.width.desktop)}\n\t\t\t${ns("border-radius",hs(a.normal.radius.desktop))}\n\t\t}\n\t\t\t\n\t\t${x}, ${x} .wp-block-b-blocks-table-cell{\n\t\t\tborder-collapse: ${n.cellBorderType};\n\t\t\t${"separate"===n.cellBorderType?"border-spacing: 2px;":""}\n\t\t\t${as(a.normal.border)}\n\t\t}\n\n\t\t${x}:hover,\n\t\t${x}:hover .wp-block-b-blocks-table-cell{\n\t\t\t${as(a.hover.border)}\n\t\t\tborder-collapse: ${n.cellBorderType};\n\t\t\t${"separate"===n.cellBorderType?"border-spacing: 2px;":""}\n\t\t}\n\n\t\t${y}>.wp-block-b-blocks-table-row {\n\t\t\t${os(s.normal.bg)}\n\t\t\ttransition:all ${s.normal.transition}s ease-in-out;\n\t\t}\n\t\t${y}>.wp-block-b-blocks-table-row:hover{\n\t\t\t${os(s.hover.bg)}\n\t\t}\n\n\t\t${C}{\n\t\t\t${ns("color",s.normal.color)}\n\t\t\t${ns("padding",hs(s.normal.padding.desktop))}\n\t\t}\n\n\t\t${C}:hover{\n\t\t\t${ns("color",s.hover.color)}\n\t\t\t${ns("padding",hs(s.hover.padding.desktop))}\n\t\t}\n\n\t\t${v}{\n\t\t\t${os(r.normal.bg)}\n\t\t\ttransition:all ${r.normal.transition}s ease-in-out;\n\t\t}\n\n\t\t${v}:hover{\n\t\t\t${os(r.hover.bg)}\n\t\t}\n\n\t\t${_}{\n\t\t\t${as(_.border)}\n\t\t\t${ns("padding",hs(c.desktop.padding))}\n\t\t\t${ns("border-radius",hs(c.desktop.radius))}\n\t\t\ttransition: all ${c.evenCell.normal.transition}s ease-in-out;\n\t\t\t\n\t\t}\n\n\t\t${w}:nth-of-type(even){\n\t\t\t${os(c.evenCell.normal.bg)}\n\t\t}\n\t\t\n\t\t${w}:nth-of-type(even):hover{\n\t\t\t${os(c.evenCell.hover.bg)}\n\t\t}\n\n\t\t${w}:nth-of-type(odd){\n\t\t\t${os(c.oddCell.normal.bg)}\n\t\t}\n\t\t${w}:nth-of-type(odd):hover{\n\t\t\t${os(c.oddCell.hover.bg)}\n\t\t}\n\n\t\t${w}:nth-of-type(even) .wp-block-b-blocks-table-cell{\n\t\t\t${ns("color",c.evenCell.normal.color)}\n\t\t}\n\t\t\n\t\t${w}:nth-of-type(even):hover .wp-block-b-blocks-table-cell{\n\t\t\t${ns("color",c.evenCell.hover.color)}\n\t\t}\n\n\t\t${w}:nth-of-type(odd) .wp-block-b-blocks-table-cell{\n\t\t\t${ns("color",c.oddCell.normal.color)}\n\t\t}\n\t\t${w}:nth-of-type(odd):hover .wp-block-b-blocks-table-cell{\n\t\t\t${ns("color",c.oddCell.hover.color)}\n\t\t}\n\n\t\t${k}>.wp-block-b-blocks-table-row{\n\t\t\t${os(d.normal.bg)}\n\t\t}\n\t\t${k}>.wp-block-b-blocks-table-row:hover{\n\t\t\t${os(d.hover.bg)}\n\t\t}\n\t\t${j}{\n\t\t\t${ns("padding",hs(d.padding.desktop))}\n\t\t\t${ns("color",d.normal.color)}\n\t\t}\n\t\t${j}:hover{\n\t\t\t${ns("color",d.hover.color)}\n\t\t}\n\n\t\t${S}>label{\n\t\t\t${ns("color",p.label.color)}\n\t\t\t${os(p.label.bg)}\n\t\t\t${ns("padding",hs(p.label.desktop.padding))}\n\t\t\t${ns("margin",hs(p.label.desktop.margin))}\n\t\t}\n\n\t\t${S}>.dt-input{\n\t\t\t\t${ns("padding",hs(p.input.desktop.padding))}\n\t\t\t\t${ns("margin",hs(p.input.desktop.margin))}\n\t\t\t\t${ns("color",p.input.normal.color)}\n\t\t\t\t${os(p.input.normal.bg)}\n\t\t\t\t${as(p.input.normal.border)}\n\t\t\t\t${ns("border-radius",hs(p.input.normal.radius))}\n\t\t\t\ttransition: all ${p.input.normal.transition}s ease-in-out;\n\t\t\t\t\n\t\t}\n\n\t\t${S}>.dt-input:hover{\n\t\t\t${ns("color",p.input.hover.color)}\n\t\t\t${os(p.input.hover.bg)}\n\t\t\t${as(p.input.hover.border)}\n\t\t\t${ns("border-radius",hs(p.input.hover.radius))}\n\t\t}\n\n\t\t${S}>.dt-input:focus{\n\t\t\t${ns("color",p.input.focus.color)}\n\t\t\t${os(p.input.focus.bg)}\n\t\t\t${as(p.input.focus.border)}\n\t\t\t${ns("border-radius",hs(p.input.focus.radius))}\n\t\t}\n\n\t\t${N}{\n\t\t\t${ns("padding",hs(h.desktop.padding))}\n\t\t\t${ns("margin",hs(h.desktop.margin))}\n\t\t\t${ns("color",h.color)}\n\t\t\t${os(h.bg)}\n\t\t}\n\n\t\t${T}>label{\n\t\t\t${ns("color",g.color)}\n\t\t\t${os(g.bg)}\n\t\t\t${ns("padding",hs(g.desktop.padding))}\n\t\t\t${ns("margin",hs(g.desktop.margin))}\n\t\t}\n\n\t\t${M}{\n\t\t\t${ns("padding",hs(m.desktop.padding))}\n\t\t\t${ns("margin",hs(m.desktop.margin))}\n\t\t\t${ns("color",m.normal.color)}\n\t\t\t${os(m.normal.bg)}\n\t\t\t${as(m.normal.border)}\n\t\t\t${ns("border-radius",hs(m.normal.radius))}\n\t\t\ttransition: all ${m.normal.transition}s ease-in-out;\n\t\t}\n\t\t${M}:hover{\n\t\t\t${ns("color",m.hover.color)}\n\t\t\t${os(m.hover.bg)}\n\t\t\t${as(m.hover.border)}\n\t\t\t${ns("border-radius",hs(m.hover.radius))}\n\t\t}\n\t\t${M}.current{\n\t\t\t${ns("color",m.active.color)}\n\t\t\t${os(m.active.bg)}\n\t\t\t${as(m.active.border)}\n\t\t\t${ns("border-radius",hs(m.active.radius))}\n\t\t}\n\n\t\t${L}{\n\t\t\t${ns("padding",hs(b.desktop.padding))}\n\t\t\t${ns("color",b.normal.color)}\n\t\t\t${os(b.normal.bg)}\n\t\t\t${as(b.normal.border)}\n\t\t\t${ns("border-radius",hs(b.normal.radius))}\n\t\t\ttransition: all ${b.normal.transition}s ease-in-out;\n\t\t}\n\t\t${L}:hover{\n\t\t\t${ns("color",b.hover.color)}\n\t\t\t${os(b.hover.bg)}\n\t\t\t${as(b.hover.border)}\n\t\t\t${ns("border-radius",hs(b.hover.radius))}\n\t\t}\n\n\t\t${u.map(((e,t)=>`\n\t\t\t${P}[data-dt-column="${t}"]{\n\t\t\t\t${ns("color",e.color)}\n\t\t\t\t${os(e.bg)}\n\t\t\t}\n\t\t`)).join("")}\n\n\t`}})},$w=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{device:n()?.toLowerCase(),innerBlocks:o(t)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,innerBlocks:a}=e,[r,c]=(0,m.useState)(3),[d,u]=(0,m.useState)(3),[g,b]=(0,m.useState)(!1),x=(0,m.useRef)(null),v=(0,m.useRef)(null),k=(0,m.useRef)(null);(0,m.useEffect)((()=>{
391 +if(!g)return;let e=!1;return(async()=>{const n=t.datatables,o=[s.e(5668).then(s.bind(s,5668))];let i=-1,a=-1,r=-1;n?.responsive&&o.push(Promise.all([s.e(5668),s.e(417)]).then(s.bind(s,417))),n?.fixedHeader&&o.push(Promise.all([s.e(5668),s.e(7917)]).then(s.bind(s,7917))),n?.buttons?.enabled&&(o.push(Promise.all([s.e(5668),s.e(2967)]).then(s.t.bind(s,2967,23))),(n.buttons.csv||n.buttons.excel||n.buttons.pdf)&&o.push(Promise.all([s.e(5668),s.e(7837),s.e(8486)]).then(s.t.bind(s,8486,23))),n.buttons.print&&o.push(Promise.all([s.e(5668),s.e(7837),s.e(897)]).then(s.t.bind(s,897,23))),n.buttons.colvis&&o.push(Promise.all([s.e(5668),s.e(7837),s.e(9908)]).then(s.t.bind(s,9908,23))),n.buttons.excel&&(i=o.length,o.push(s.e(1710).then(s.t.bind(s,1710,23)))),n.buttons.pdf&&(a=o.length,o.push(s.e(7164).then(s.t.bind(s,7164,23))),r=o.length,o.push(s.e(7108).then(s.t.bind(s,7108,23))))),n?.select?.enabled&&o.push(Promise.all([s.e(5668),s.e(2877)]).then(s.bind(s,2877)));const l=await Promise.all(o);if(e)return;const[{default:c}]=l;if(i>=0&&c.Buttons.jszip(l[i].default),a>=0){const e=l[a].default,t=l[r];e.vfs=t?.pdfMake?.vfs??t?.default?.pdfMake?.vfs??t?.default??t,c.Buttons.pdfMake(e)}const d=(()=>{const e=x.current?.querySelector("table");if(!e)return null;const t=e.cloneNode(!0);t.className="b-blocks-table-main-container",t.querySelectorAll('style, .block-list-appender, .block-editor-block-appender, [class*="open-parent-settings"], .components-popover').forEach((e=>e.remove())),t.querySelectorAll("td, th").forEach((e=>{const t=e.querySelector(".block-editor-block-list__layout");t&&(t.querySelectorAll(".block-list-appender, .block-editor-block-appender").forEach((e=>e.remove())),e.innerHTML=t.innerHTML)}));const n=["contenteditable","data-block","data-type","data-title","tabindex","aria-label","aria-multiline","aria-autocomplete"];return t.querySelectorAll("*").forEach((e=>{n.forEach((t=>e.removeAttribute(t)));const t=e.getAttribute("class");t&&e.setAttribute("class",t.split(/\s+/).filter((e=>e&&"wp-block"!==e&&!e.startsWith("block-editor")&&!e.startsWith("is-selected")&&!e.startsWith("is-hovered")&&!e.startsWith("is-highlighted")&&!e.startsWith("has-child-selected"))).join(" "))})),t})();if(!d||e)return;v.current.innerHTML="",v.current.appendChild(d);const u=((e,t=!1)=>{if(!e?.enabled)return null;const n={paging:e.paging.enabled,searching:e.searching.enabled,ordering:e.ordering.enabled,info:e.info,autoWidth:e.autoWidth,stateSave:!t&&e.stateSave,searchDelay:e.searchDelay};e.paging.enabled&&(n.pageLength=e.paging.pageLength,n.pagingType=e.paging.pagingType,n.lengthMenu=[[5,10,25,50,100,-1],["5","10","25","50","100","All"]]),e.searching.enabled&&(n.search={smart:e.searching.smart,regex:e.searching.regex,caseInsensitive:e.searching.caseInsensitive}),e.ordering.enabled&&(n.orderMulti=e.ordering.multiColumn),e.responsive&&(n.responsive=!0),e.fixedHeader&&(n.fixedHeader=!0),e.select?.enabled&&(n.select={style:e.select.style}),e.language&&(n.language={...e.language});const o={};if(["topStart","topEnd","bottomStart","bottomEnd"].forEach((t=>{const n=e.layout[t];o[t]=n&&"none"!==n?n:null})),e.buttons?.enabled){const t=(i=e.buttons,["copy","csv","excel","pdf","print","colvis"].filter((e=>i[e])));t.length&&(o.top2Start={buttons:t})}var i;return n.layout=o,e.serverSide?.enabled&&e.serverSide?.endpoint&&(n.serverSide=!0,n.ajax=e.serverSide.endpoint),n})(n,!0);u&&(k.current=new c(d,u),d.style.setProperty("border-collapse",t?.content?.cellBorderType||"collapse","important"))})().catch((e=>console.warn("b-blocks/table preview:",e))),()=>{e=!0,k.current&&(k.current.destroy(),k.current=null),v.current&&(v.current.innerHTML="")}}),[g,t.datatables]);const{options:w}=t,_=(e="td",t="")=>Array.from({length:d},(()=>["b-blocks/table-cell",{tagName:e,className:t}])),C=Array.from({length:r},(()=>["b-blocks/table-row",{},_("td")])),j=[w.isEnableHeader?["b-blocks/table-head",{},[["b-blocks/table-row",{},_("th","b-blocks-table-head-cell")]]]:null,["b-blocks/table-body",{},C],w.isEnableFooter?["b-blocks/table-footer",{},[["b-blocks/table-row",{},_("td","b-blocks-table-footer-cell")]]]:null].filter(Boolean),$=(0,h.useBlockProps)(),S=(0,h.useInnerBlocksProps)({tagName:"table",className:"b-blocks-table-main-container"},{template:j,templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-body","b-blocks/table-head","b-blocks/table-footer"]}),T=(0,f.useSelect)((e=>e("core/block-editor").getBlocks(o)),[o]),{insertBlock:N,removeBlock:M,replaceInnerBlocks:L}=(0,f.useDispatch)("core/block-editor"),P=T.find((e=>"b-blocks/table-body"===e.name)),E=T.find((e=>"b-blocks/table-head"===e.name)),A=T.find((e=>"b-blocks/table-footer"===e.name)),B=P?.innerBlocks[0]?.innerBlocks?.length||d,I=(e="td",t="")=>{const n=Array.from({length:B},(()=>(0,p.createBlock)("b-blocks/table-cell",{tagName:e,className:t})));return(0,p.createBlock)("b-blocks/table-row",{},n)},O=[{title:"Add Top Row",icon:ew,onClick:()=>{P&&N(I("td"),0,P.clientId,!1)}},{title:"Insert Bottom Row",icon:tw,onClick:()=>{P&&N(I("td"),P.innerBlocks.length,P.clientId,!1)}},{title:"Insert Left Column",icon:nw,onClick:()=>{T.forEach((e=>{e.innerBlocks.forEach((e=>{const t=e.innerBlocks[0]?.attributes?.tagName||"td";N((0,p.createBlock)("b-blocks/table-cell",{tagName:t}),0,e.clientId,!1)}))}))}},{title:"Add Right Column",icon:ow,onClick:()=>{T.forEach((e=>{e.innerBlocks.forEach((e=>{const t=e.innerBlocks[e.innerBlocks.length-1],n=t?.attributes?.tagName||"td";N((0,p.createBlock)("b-blocks/table-cell",{tagName:n}),e.innerBlocks.length,e.clientId,!1)}))}))}}],R=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Cw,{attributes:t,setAttributes:n,updateObj:R,device:i,handleToggleHeader:e=>{R("options",e,"isEnableHeader"),!e&&E?M(E.clientId,!1):e&&!E&&N((0,p.createBlock)("b-blocks/table-head",{},[I("th","b-blocks-table-head-cell")]),0,o,!1)},handleToggleFooter:e=>{R("options",e,"isEnableFooter"),!e&&A?M(A.clientId,!1):e&&!A&&N((0,p.createBlock)("b-blocks/table-footer",{},[I("td","b-blocks-table-footer-cell")]),T.length,o,!1)}}),(0,l.jsx)(jw,{attributes:t,id:`block-${o}`}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsxs)(y.ToolbarGroup,{children:[(0,l.jsx)(y.DropdownMenu,{icon:(0,l.jsx)(vw,{}),label:"Table Actions",controls:O,className:"b-blocks-table-action-menu"}),(0,l.jsx)(y.ToolbarButton,{icon:g?iw:aw,label:g?"Exit Preview":"Preview DataTables",onClick:()=>b((e=>!e)),isActive:g,disabled:!t.datatables?.enabled||0===a.length})]})}),(0,l.jsxs)("div",{...$,children:[0===a.length&&(0,l.jsxs)("div",{className:"b-blocks-table-input-form-wrapper",children:[(0,l.jsxs)("div",{className:"b-blocks-table-input-form-title-wrapper",children:[Nl,(0,l.jsx)("h2",{children:"Table"})]}),(0,l.jsx)("p",{className:"b-blocks-table-input-form-description",children:"Start creating a custom table for your content"}),(0,l.jsxs)("div",{className:"b-blocks-table-input-field-wrapper",children:[(0,l.jsxs)("div",{className:"b-blocks-table-row-column-field",children:[(0,l.jsx)("span",{children:"Rows"}),(0,l.jsx)(y.__experimentalNumberControl,{value:r,onChange:e=>c(e)})]}),(0,l.jsxs)("div",{className:"b-blocks-table-row-column-field",children:[(0,l.jsx)("span",{children:"Columns"}),(0,l.jsx)(y.__experimentalNumberControl,{value:d,onChange:e=>u(e)})]})]}),(0,l.jsxs)("div",{className:"b-blocks-table-input-field-checkbox-wrapper",children:[(0,l.jsx)(y.CheckboxControl,{label:"Include Header",checked:w.isEnableHeader,onChange:e=>R("options",e,"isEnableHeader")}),(0,l.jsx)(y.CheckboxControl,{label:"Include Footer",checked:w.isEnableFooter,onChange:e=>R("options",e,"isEnableFooter")})]}),(0,l.jsx)(Bn,{onClick:()=>{const e=Number(d)||1,t=Number(r)||1,n=(t,n="")=>Array.from({length:e},(()=>(0,p.createBlock)("b-blocks/table-cell",{tagName:t,...n&&{className:n}}))),i=[w.isEnableHeader?(0,p.createBlock)("b-blocks/table-head",{},[(0,p.createBlock)("b-blocks/table-row",{},n("th","b-blocks-table-head-cell"))]):null,(0,p.createBlock)("b-blocks/table-body",{},Array.from({length:t},(()=>(0,
392 +p.createBlock)("b-blocks/table-row",{},n("td"))))),w.isEnableFooter?(0,p.createBlock)("b-blocks/table-footer",{},[(0,p.createBlock)("b-blocks/table-row",{},n("td","b-blocks-table-footer-cell"))]):null].filter(Boolean);L(o,i,!1)},children:"Generate Table"})]}),a.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:x,style:{display:g?"none":void 0},children:(0,l.jsx)("table",{...S})}),g&&(0,l.jsx)("div",{ref:v,className:"b-blocks-dt-editor-preview"})]})]})]})}));Pl(Xk.name)&&(0,p.registerBlockType)(Xk,{icon:Nl,edit:$w,save:h.InnerBlocks.Content});const Sw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-head","version":"1.0.0","title":"Table Head","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table"],"keywords":["key1","key2","key3","key4","key5"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"settings":{"type":"object","default":{"rowSpan":1,"colSpan":1}},"styles":{"type":"object","default":{"alignment":{"desktop":"","tablet":"","mobile":""},"normal":{"bg":""},"hover":{"bg":"","transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Tw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})})})})},Nw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${o} {\n\t\t\t${ns("text-align",n.alignment.desktop)}\n\t\t\t${os(n.normal.bg)}\n\t\t\ttransition: background ${n.hover.transition}s ease-in-out;\n\t\t}\n\t\t${o}:hover {\n\t\t\t${os(n.hover.bg)}\n\t\t}\n\t`}})},Mw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),a=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:a}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,parentClientId:a}=e,{settings:s}=t,r=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:"thead"}),{template:[["b-blocks/table-row",{},[["b-blocks/table-cell",{}],["b-blocks/table-cell",{}],["b-blocks/table-cell",{}],["b-blocks/table-cell",{}]]]],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-row"]}),c=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Tw,{attributes:t,setAttributes:n,device:i,updateObj:c,parentClientId:a}),(0,l.jsx)(Nw,{attributes:t,id:`block-${o}`}),(0,l.jsx)("thead",{...r,colSpan:s.colSpan,rowSpan:s.rowSpan})]})}));Pl("b-blocks/table")&&(0,p.registerBlockType)(Sw,{icon:Nl,edit:Mw,save:h.InnerBlocks.Content});const Lw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-body","version":"1.0.0","title":"Table Body","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table"],"keywords":["table","body","table-body","b-blocks","b-table-body"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"styles":{"type":"object","default":{"normal":{"bg":{}},"hover":{"bg":{},"transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Pw=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i}=e,{styles:a}=o;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Style","b-blocks"),children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a[t].bg,onChange:e=>i("styles",e,t,"bg")}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:a.hover.transition,step:.05,min:0,max:5,onChange:e=>i("styles",e,"hover","transition")})]})]})},Ew=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})}),(0,l.jsx)(Pw,{...e})]})})},Aw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${o}{\n\t\t\t\t${os(n.normal.bg)}\n\t\t\t\ttransition:background ${n.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${o}:hover{\n\t\t\t\t${os(n.hover.bg)}\n\t\t\t}\n\n\t`}})},Bw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),a=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:a}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,parentClientId:a}=e,s=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:"tbody"}),{template:[["b-blocks/table-row",{}],["b-blocks/table-row",{}],["b-blocks/table-row",{}]],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-row"]}),r=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ew,{attributes:t,setAttributes:n,updateObj:r,device:i,parentClientId:a}),(0,l.jsx)(Aw,{attributes:t,id:`block-${o}`}),(0,l.jsx)("tbody",{...s})]})}));Pl("b-blocks/table")&&(0,p.registerBlockType)(Lw,{icon:Nl,edit:Bw,save:h.InnerBlocks.Content});const Iw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-row","version":"1.0.0","title":"Table Row","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table-body"],"keywords":["table","row","table-row","b-blocks","b-table-row"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"styles":{"type":"object","default":{"normal":{"bg":{}},"hover":{"bg":{},"transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Ow=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i}=e,{styles:a}=o;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Style","b-blocks"),children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a[t].bg,onChange:e=>i("styles",e,t,"bg")}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:a.hover.transition,step:.05,min:0,
393 +max:5,onChange:e=>i("styles",e,"hover","transition")})]})]})},Rw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})}),(0,l.jsx)(Ow,{...e})]})})},zw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${o}{\n\t\t\t\t${os(n.normal.bg)}\n\t\t\t\ttransition:background ${n.hover.transition}s ease-in-out;\n\t\t\t}\n\n\t\t\t${o}:hover{\n\t\t\t\t${os(n.hover.bg)}\n\t\t\t}\n\n\t`}})},Dw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{device:n()?.toLowerCase(),innerBlocks:o(t)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=(0,Qa.useRef)(null),[s,r]=(0,Qa.useState)(!1);(0,Qa.useEffect)((()=>{r(!0)}),[]);const{insertBlock:c,removeBlock:d}=(0,f.useDispatch)("core/block-editor"),{blockIndex:u,parentClientId:g,parentBlockName:m,columnCount:b}=(0,f.useSelect)((e=>{const{getBlockIndex:t,getBlockRootClientId:n,getBlock:i,getBlockName:a}=e("core/block-editor"),s=n(o),r=i(o);return{blockIndex:t(o),parentClientId:s,parentBlockName:a(s),columnCount:r?.innerBlocks?.length||4}}),[o]),x="b-blocks/table-body"===m,v=()=>{const e=Array.from({length:b},(()=>(0,p.createBlock)("b-blocks/table-cell",{})));return(0,p.createBlock)("b-blocks/table-row",{},e)},k=(0,h.useBlockProps)({tagName:"tr"}),_=(0,h.useInnerBlocksProps)(k,{template:[["b-blocks/table-cell",{}],["b-blocks/table-cell",{}],["b-blocks/table-cell",{}]],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-cell"]}),C=(0,w.useMergeRefs)([a,_.ref]),j=[{title:"Add Row Above",icon:"table-row-before",onClick:()=>c(v(),u,g,!0)},{title:"Add Row Below",icon:"table-row-after",onClick:()=>c(v(),u+1,g,!0)},{title:"Delete Row",icon:"trash",onClick:()=>d(o)}],$=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Rw,{attributes:t,setAttributes:n,updateObj:$,device:i,parentClientId:g}),(0,l.jsx)(zw,{attributes:t,id:`block-${o}`}),(0,l.jsx)("tr",{..._,ref:C}),s&&a.current&&x&&(0,l.jsx)(y.Popover,{anchor:a.current,placement:"right",noArrow:!0,animate:!1,flip:!1,resize:!1,focusOnMount:!1,className:"b-blocks-row-action-popover",children:(0,l.jsx)(y.DropdownMenu,{icon:"ellipsis",label:"Row Actions",controls:j,className:"b-blocks-row-action-menu"})})]})}));Pl(Iw.name)&&(0,p.registerBlockType)(Iw,{icon:Nl,edit:Dw,save:h.InnerBlocks.Content});const Fw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-cell","version":"1.0.0","title":"Table Cell","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table-row"],"keywords":["key1","key2","key3","key4","key5"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"tagName":{"type":"string","default":"td"},"settings":{"type":"object","default":{"rowSpan":1,"colSpan":1}},"styles":{"type":"object","default":{"alignment":{"desktop":"","tablet":"","mobile":""},"normal":{"bg":""},"hover":{"bg":"","transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Hw=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Ww=[{label:"Left",value:"left",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"right",icon:"align-right"}],Uw=e=>{const{attributes:t,updateObj:n,device:o}=e,{settings:i,styles:a}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table Cell","b-blocks"),children:[(0,l.jsxs)(y.Flex,{align:"center",justify:"space-between",children:[(0,l.jsx)(v,{className:"",children:"Alignment"}),(0,l.jsx)(_,{})]}),(0,l.jsx)(Tn,{className:"mt10",value:a.alignment[o],onChange:e=>n("styles",e,"alignment",o),options:Ww,isIcon:!0,size:"default"}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Row Span","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i.rowSpan,onChange:e=>n("settings",e,"rowSpan")}),(0,l.jsx)(y.RangeControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Column Span","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i.colSpan,onChange:e=>n("settings",e,"colSpan")})]})]})},Gw=e=>{const[t,n]=(0,m.useState)("normal"),{attributes:o,updateObj:i}=e,{styles:a}=o;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Style","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t,onChange:e=>{n(e)},children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Default",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:a[t].bg,onChange:e=>i("styles",e,t,"bg")}),"hover"===t&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),value:a.hover.transition,step:.05,min:0,max:5,onChange:e=>i("styles",e,"hover","transition")})]})})},Vw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Hw,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Uw,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Gw,{...e})})]})})]})})},qw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${o} {\n\t\t\t${ns("display","table-cell")}\n\t\t\t${ns("text-align",n.alignment.desktop)}\n\t\t\t${os(n.normal.bg)}\n\t\t\ttransition: background ${n.hover.transition}s ease-in-out;\n\t\t}\n\t\t${o}:hover {\n\t\t\t${os(n.hover.bg)}\n\t\t}\n\t`}})},Yw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),a=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:a}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,innerBlocks:a,parentClientId:s}=e,{settings:r,tagName:c="td",className:d}=t,u=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:c,className:d}),{template:[["core/paragraph",{placeholder:"Type / to choose a block"}]],templateLock:!1,renderAppender:a?.length>0?void 0:h.InnerBlocks.ButtonBlockAppender,__experimentalDirectInsert:!1}),p=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Vw,{attributes:t,setAttributes:n,device:i,updateObj:p,clientId:o,parentClientId:s}),(0,l.jsx)(qw,{attributes:t,id:`block-${o}`}),(0,l.jsx)(c,{...u,colSpan:r?.colSpan,rowSpan:r.rowSpan})]})}));Pl("b-blocks/table")&&(0,p.registerBlockType)(Fw,{icon:Nl,edit:Yw,save:h.InnerBlocks.Content})
394 +;const Kw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-footer","version":"1.0.0","title":"Table Footer","category":"bBlocks","description":"Make responsive and feature-rich tables on the go with B Blocks Table, offering styling, typography, and layout options tailored for modern web design.","parent":["b-blocks/table"],"keywords":["key1","key2","key3","key4","key5"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"settings":{"type":"object","default":{"rowSpan":1,"colSpan":1}},"styles":{"type":"object","default":{"alignment":{"desktop":"","tablet":"","mobile":""},"normal":{"bg":""},"hover":{"bg":"","transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Qw=e=>{const{parentClientId:t}=e,{selectBlock:n}=(0,f.useDispatch)("core/block-editor");return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.PanelBody,{initialOpen:!0,children:(0,l.jsx)(Bn,{onClick:()=>n(t),children:(0,x.__)("Open Parent Settings","b-blocks")})})})})},Zw=({attributes:e,id:t})=>{const{styles:n}=e,o=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${o} {\n\t\t\t${ns("text-align",n.alignment.desktop)}\n\t\t\t${os(n.normal.bg)}\n\t\t\ttransition: background ${n.hover.transition}s ease-in-out;\n\t\t}\n\t\t${o}:hover {\n\t\t\t${os(n.hover.bg)}\n\t\t}\n\t`}})},Xw=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o,getBlockRootClientId:i}=e("core/block-editor"),a=i(t);return{device:n()?.toLowerCase(),innerBlocks:o(t),parentClientId:a}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,parentClientId:a}=e,{settings:s}=t,r=(0,h.useInnerBlocksProps)((0,h.useBlockProps)({tagName:"tfoot"}),{template:[],templateLock:!1,renderAppender:!1,allowedBlocks:["b-blocks/table-row"]}),c=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Qw,{attributes:t,setAttributes:n,device:i,updateObj:c,parentClientId:a}),(0,l.jsx)(Zw,{attributes:t,id:`block-${o}`}),(0,l.jsx)("tfoot",{...r,colSpan:s.colSpan,rowSpan:s.rowSpan})]})}));Pl("b-blocks/table")&&(0,p.registerBlockType)(Kw,{icon:Nl,edit:Xw,save:h.InnerBlocks.Content});const Jw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/divider","title":"Divider","category":"bBlocks","description":"Add a customizable inline divider between paragraphs and sections. Choose a plain line, centered icon, or text label, with options for line style, color, thickness, width, alignment, and spacing.","keywords":["divider","separator","hr","line","rule","horizontal rule","or","section divider"],"textdomain":"b-blocks","attributes":{"type":{"type":"string","default":"line"},"layout":{"type":"object","default":{"alignment":"center","width":"100%"}},"line":{"type":"object","default":{"style":"solid","color":"#cccccc","width":"2px"}},"icon":{"type":"object","default":{"svg":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 576 512\\" fill=\\"currentColor\\"><path d=\\"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z\\"/></svg>","size":"16px","color":"","bg":{"type":"solid","color":""},"padding":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"borderRadius":{"top":"50px","right":"50px","bottom":"50px","left":"50px"}}},"text":{"type":"object","default":{"content":"OR","color":"","bg":{"type":"solid","color":""},"typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":600,"textTransform":"none"},"padding":{"top":"4px","right":"12px","bottom":"4px","left":"12px"}}},"spacing":{"type":"object","default":{"top":"24px","right":"","bottom":"24px","left":""}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true,"className":true,"customClassName":true,"spacing":{"margin":false,"padding":false}},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css"],"viewScript":"file:./view.js","render":"file:./render.php"}'),e_=({attributes:e,id:t,isBackend:n=!1})=>{const{layout:o={},line:i={},icon:a={},text:s={},spacing:r={},advanced:c}=e,d=i.color||"#cccccc",u=a.color||d,p=s.color||d,h=`${i.width||"2px"} ${i.style||"solid"} ${d}`,g=`#${t} .b-blocks-divider`,m=`${g} .b-blocks-divider-inner`,b=`${g} .b-blocks-divider-line`,f=`${g} .b-blocks-divider-icon`,x=`${g} .b-blocks-divider-text`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",s.typography).googleFontLink}\n\t\t\t${g}{\n\t\t\t\t${ns("margin",hs(r))}\n\t\t\t}\n\t\t\t${m}{\n\t\t\t\tmax-width: ${o.width||"100%"};\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\tborder-top: ${h};\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\tcolor: ${u};\n\t\t\t\tfont-size: ${a.size||"16px"};\n\t\t\t\t${ns("padding",hs(a.padding))}\n\t\t\t\t${ns("border-radius",hs(a.borderRadius))}\n\t\t\t\t${os(a.bg)}\n\t\t\t}\n\t\t\t${f}>svg{\n\t\t\t\tfill: ${u};\n\t\t\t\t${ns("height",a.size)}\n\t\t\t\t${ns("width",a.size)}\n\t\t\t}\n\t\t\t${ps(x,s.typography).styles}\n\t\t\t${x}{\n\t\t\t\tcolor: ${p};\n\t\t\t\t${ns("padding",hs(s.padding))}\n\t\t\t\t${os(s.bg)}\n\t\t\t}\n\t\t\t${_s(t,c,n,!1)}\n\t\t\t`}})},t_=["line","icon","text"],n_=["solid","dashed","dotted","double"],o_=["left","center","right"],i_=({attributes:e,textSlot:t=null})=>{
395 +const{type:n="line",layout:o={},line:i={},icon:a={},text:s={}}=e,r=t_.includes(n)?n:"line",c=["b-blocks-divider",`b-blocks-divider--${r}`,`b-blocks-divider-style--${n_.includes(i.style)?i.style:"solid"}`,`b-blocks-divider-align--${o_.includes(o.alignment)?o.alignment:"center"}`].join(" ");return(0,l.jsxs)("div",{className:c,children:["line"===r&&(0,l.jsx)("div",{className:"b-blocks-divider-inner",role:"separator",children:(0,l.jsx)("hr",{className:"b-blocks-divider-line","aria-hidden":"true"})}),"icon"===r&&(0,l.jsxs)("div",{className:"b-blocks-divider-inner",role:"separator",children:[(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"}),(0,l.jsx)("span",{className:"b-blocks-divider-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:a.svg||""}}),(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"})]}),"text"===r&&(0,l.jsxs)("div",{className:"b-blocks-divider-inner",role:"separator","aria-label":s.content||(0,x.__)("Section divider","b-blocks"),children:[(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"}),t||(0,l.jsx)("span",{className:"b-blocks-divider-text",children:s.content||""}),(0,l.jsx)("span",{className:"b-blocks-divider-line","aria-hidden":"true"})]})]})},a_=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],s_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],r_=[{label:(0,x.__)("Plain Line","b-blocks"),value:"line"},{label:(0,x.__)("Line with Icon","b-blocks"),value:"icon"},{label:(0,x.__)("Line with Text Label","b-blocks"),value:"text"}],l_=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],c_=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],d_=({attributes:e,updateObj:t})=>{const{type:n="line",layout:o={},icon:i={},text:a={}}=e,s="icon"===n,r="text"===n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:n||"line",options:r_,onChange:e=>t("type",e),help:(0,x.__)("Icon and Text place a centered element between two line segments.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Alignment","b-blocks"),labelPosition:"edge",className:"mt10",value:o.alignment||"center",options:c_,onChange:e=>t("layout",e,"alignment"),help:(0,x.__)("Only visible when Width is less than 100%.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Divider Width","b-blocks"),labelPosition:"edge",units:a_,isUnitSelectTabbable:!0,value:o.width||"100%",onChange:e=>t("layout",e,"width")})]}),s&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:i.svg,onChange:e=>t("icon",e,"svg")})}),r&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text Label","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label Text","b-blocks"),value:a.content||"",onChange:e=>t("text",(e||"").slice(0,40),"content"),placeholder:(0,x.__)("OR","b-blocks"),help:(0,x.__)("Short text shown centered on the line (max 40 chars). Also editable inline in the canvas.","b-blocks"),__nextHasNoMarginBottom:!0})})]})},u_=({attributes:e,updateObj:t})=>{const{type:n="line",line:o={},icon:i={},text:a={},spacing:s={}}=e,r="icon"===n,c="text"===n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Line Style","b-blocks"),labelPosition:"edge",value:o.style||"solid",options:l_,onChange:e=>t("line",e,"style"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Line Color","b-blocks"),value:o.color||"#cccccc",onChange:e=>t("line",e||"#cccccc","color"),defaultColor:"#cccccc"}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Line Thickness","b-blocks"),labelPosition:"edge",units:a_,isUnitSelectTabbable:!0,value:o.width||"2px",onChange:e=>t("line",e,"width")})]}),r&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size","b-blocks"),labelPosition:"edge",units:a_,isUnitSelectTabbable:!0,value:i.size||"16px",onChange:e=>t("icon",e,"size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:i.color||"",onChange:e=>t("icon",e||"","color"),defaultColor:o.color||"#cccccc"}),(0,l.jsx)(An,{label:(0,x.__)("Icon Background ","b-blocks"),value:i.bg,onChange:e=>t("icon",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Icon Padding","b-blocks"),units:a_,values:i.padding,resetValues:{top:"8px",right:"8px",bottom:"8px",left:"8px"},onChange:e=>t("icon",e,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Icon Border Radius","b-blocks"),units:a_,values:i.borderRadius,resetValues:{top:"50px",right:"50px",bottom:"50px",left:"50px"},onChange:e=>t("icon",e,"borderRadius")})]}),c&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:a.typography,onChange:e=>t("text",e,"typography")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:a.color||"",onChange:e=>t("text",e||"","color"),defaultColor:o.color||"#cccccc"}),(0,l.jsx)(An,{label:(0,x.__)("Text Background","b-blocks"),value:a.bg,onChange:e=>t("text",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),units:a_,values:a.padding,resetValues:{top:"4px",right:"12px",bottom:"4px",left:"12px"},onChange:e=>t("text",e,"padding")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Spacing","b-blocks"),initialOpen:!1,children:(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),units:a_,values:s,resetValues:{top:"24px",right:"",bottom:"24px",left:""},onChange:e=>t("spacing",e)})})]})},p_=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:s_,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(d_,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(u_,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},h_=["left","center","right"],g_=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{type:a="line",layout:s={},text:r={}}=t,c=bBlocksPremiumChecker,d=fe(t,n),u=h_.includes(s.alignment)?s.alignment:"center",p="text"===a?(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-divider-text",value:r.content||"",onChange:e=>d("text",e,"content"),placeholder:(0,x.__)("OR","b-blocks"),allowedFormats:[]}):null;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:u,onChange:e=>d("layout",e||"center","alignment")})}),(0,l.jsx)(p_,{attributes:t,setAttributes:n,updateObj:d,isPremium:c,device:i}),(0,l.jsx)("div",{...(0,h.useBlockProps)(),children:(0,l.jsxs)("div",{children:[(0,l.jsx)(e_,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(i_,{attributes:t,textSlot:p})]})})]})}));Pl(Jw.name)&&(0,p.registerBlockType)(Jw,{icon:yl,edit:g_,save:()=>null})
396 +;const m_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/dual-color-heading","version":"1.0.0","title":"Dual Color Heading","category":"bBlocks","description":"Highlight content heading with different colors.","keywords":["dual","color","heading","dual-color-heading"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"sortElements":{"type":"array","default":["heading","separator","subHeading","icon"]},"heading":{"type":"object","default":{"tag":"h2","colorType":"solid","first":{"text":"Dual Heading","colorType":"gradient","color":"#146EF5","gradient":"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)"},"last":{"text":"Example","colorType":"solid","color":"#FA52CA","gradient":"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)"},"typography":{"fontFamily":"Default","fontCategory":"sans-serif","fontVariant":"700","fontWeight":700,"isUploadFont":true,"fontSize":{"desktop":"40px","tablet":"36px","mobile":"32px"},"fontStyle":"normal","textTransform":"none","textDecoration":"auto","lineHeight":"135%","letterSpace":"0px"},"align":""}},"separator":{"type":"object","default":{"show":true,"type":"line","iconType":"upload","icon":{"upload":"","library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'> <path d=\'M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z\'></path></svg>"},"iconSize":36,"iconColor":"#1e1e1e","alignment":"center","distance":"0px","left":{"color":"#146EF5","width":"100px","height":"5px","bRadius":{}},"right":{"color":"#00ffff","width":"100px","height":"5px","bRadius":{}},"margin":{"top":"14px","right":"0px","bottom":"14px","left":"0px"}}},"subHeading":{"type":"object","default":{"text":"Insert a meaningful line to evaluate the headline.","color":"#333","typography":{"fontSize":{"desktop":"16px","tablet":"15px","mobile":"15px"}}}},"icon":{"type":"object","default":{"show":true,"iconType":"upload","icon":{"upload":"","library":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'emoji-heart-eyes-fill\'><path d=\'M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0M4.756 4.566c.763-1.424 4.02-.12.952 3.434-4.496-1.596-2.35-4.298-.952-3.434m6.559 5.448a.5.5 0 0 1 .548.736A4.5 4.5 0 0 1 7.965 13a4.5 4.5 0 0 1-3.898-2.25.5.5 0 0 1 .548-.736h.005l.017.005.067.015.252.055c.215.046.515.108.857.169.693.124 1.522.242 2.152.242s1.46-.118 2.152-.242a27 27 0 0 0 1.109-.224l.067-.015.017-.004.005-.002zm-.07-5.448c1.397-.864 3.543 1.838-.953 3.434-3.067-3.554.19-4.858.952-3.434z\'></path></svg>"},"img":{"url":"","alt":"","title":""},"size":36,"color":"#000"}},"alignment":{"type":"object","default":{"desktop":"center","tablet":"center","mobile":"center"}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"tablet":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"mobile":{"top":"16px","right":"16px","bottom":"16px","left":"16px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),b_="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTIyLjg4IDExNy4wMyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIyLjg4IDExNy4wMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGc+PHBhdGggZD0iTTYzLjA5LDEuMTFsMTYsMzkuMWw0Mi4xNCwzLjEzYzAuOTgsMC4wNywxLjcyLDAuOTIsMS42NSwxLjljLTAuMDQsMC41Mi0wLjMsMC45OC0wLjY4LDEuMjhMOTAsNzMuNzlsMTAuMDQsNDEuMDUgYzAuMjMsMC45NS0wLjM2LDEuOTItMS4zMSwyLjE1Yy0wLjUsMC4xMi0xLDAuMDItMS4zOS0wLjI0bC0zNS45LTIyLjIxTDI1LjUsMTE2Ljc3Yy0wLjg0LDAuNTItMS45MywwLjI2LTIuNDUtMC41OCBjLTAuMjYtMC40Mi0wLjMyLTAuOTEtMC4yMi0xLjM1bDAsMGwxMC4wNC00MS4wNUwwLjYzLDQ2LjQ4Yy0wLjc1LTAuNjMtMC44NC0xLjc2LTAuMjEtMi41MWMwLjMyLTAuMzgsMC43Ny0wLjU5LDEuMjMtMC42M3YwIGw0Mi4xNC0zLjEzbDE2LTM5LjFjMC4zNy0wLjkxLDEuNDEtMS4zNSwyLjMxLTAuOThDNjIuNTcsMC4zMiw2Mi45MSwwLjY4LDYzLjA5LDEuMTFMNjMuMDksMS4xMUw2My4wOSwxLjExeiBNNjQuMSwzOS42NiBsNS43MSwxMy45NmwxNS4wNSwxLjEyYzAuMjcsMC4wMiwwLjUyLDAuMDgsMC43NiwwLjE3bDI5LjczLTguNDNsLTM3LjYyLTIuOGwwLTAuMDFjLTAuNjUtMC4wNS0xLjI2LTAuNDUtMS41Mi0xLjFMNjMuMTYsMTAuNjYgbDAuMywyOC4wOEM2My43NCwzOSw2My45NiwzOS4zMSw2NC4xLDM5LjY2TDY0LjEsMzkuNjZMNjQuMSwzOS42NnogTTExMS4xLDUxLjI1bC0yMy45NSw2Ljc5Yy0wLjE1LDAuNTItMC40NywwLjk3LTAuODgsMS4yOSBsLTExLjQ1LDkuN2wzLjU5LDE0LjY3YzAuMDcsMC4yOSwwLjA5LDAuNTgsMC4wNiwwLjg2bDE1Ljg2LDIxLjlMODYuMyw3My42NWMtMC4yLTAuNjYsMC0xLjQsMC41Ni0xLjg3TDExMS4xLDUxLjI1TDExMS4xLDUxLjI1eiBNOTIuMjEsMTA5LjM5bC0xNi4zLTIyLjUxYy0wLjUxLDAtMC45OS0wLjE1LTEuNC0wLjQyTDYzLjYsNzkuN3YxMS4xN2MwLDAuMjUtMC4wNSwwLjQ5LTAuMTUsMC43MUw5Mi4yMSwxMDkuMzlMOTIuMjEsMTA5LjM5eiBNNjAuMTgsOTEuMTNjLTAuMDEtMC4wOC0wLjAyLTAuMTctMC4wMi0wLjI1Vjc5LjUxbC0xMS4yOCw2Ljk4Yy0wLjM0LDAuMjEtMC43MSwwLjMzLTEuMDksMC4zN0wzMC42NSwxMDkuNEw2MC4xOCw5MS4xMyBMNjAuMTgsOTEuMTN6IE0yOC41MywxMDYuNTRsMTYuNDktMjEuNjhjLTAuMDgtMC4zOC0wLjA4LTAuNzgsMC4wMS0xLjE1bDAsMGwzLjU5LTE0LjY3TDM3LjEsNTkuMjdjLTAuNDMtMC4zNi0wLjctMC44My0wLjgzLTEuMzMgTDguNzEsNDguNjZsMjcuMzEsMjMuMTJsMCwwYzAuNSwwLjQyLDAuNzQsMS4xLDAuNTgsMS43OEwyOC41MywxMDYuNTRMMjguNTMsMTA2LjU0eiBNMTIsNDYuMTVsMjUuNjUsOC42NSBjMC4wOCwwLjAzLDAuMTYsMC4wNiwwLjIzLDAuMWMwLjIyLTAuMDgsMC40Ni0wLjEzLDAuNy0wLjE1bDAsMGwxNS4wNi0xLjEybDUuNzEtMTMuOTZjMC4xNi0wLjM5LDAuNC0wLjcxLDAuNjktMC45N2wtMC4zLTI4LjA1IGwtMTMuMDEsMzEuOGMtMC4yMSwwLjY4LTAuODIsMS4xOS0xLjU4LDEuMjVMMTIsNDYuMTVMMTIsNDYuMTV6IE02MC4xLDQ0LjU5bC00LjcsMTEuNDhsLTE2LjY0LDEuMjRsMTIuNzQsMTAuNzlsLTMuOTcsMTYuMjEgbDAuNjEtMC4zOGwyLjg4LTEuNzhsMTAuNy02LjYybDQuNzEsMi45Mmw5LjExLDUuNjRsMC4zNywwLjIzbC0zLjk3LTE2LjIxbDEyLjc0LTEwLjc5bC0wLjI2LTAuMDJ2MGwtMTYuMzgtMS4yMmwtNC41MS0xMS4wM3YwIGwtMS44MS00LjQyTDYwLjEsNDQuNTlMNjAuMSw0NC41OXoiLz48L2c+PC9zdmc+",f_="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjI1NnB4IiBoZWlnaHQ9IjI1NnB4IiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+DQogICAgPHRpdGxlPm9rdGE8L3RpdGxlPg0KICAgIDxnPg0KICAgICAgICA8cGF0aCBkPSJNMTQwLjg0NDI4LDEuNzc3Nzc3NzggTDEzNS41Nzg0ODEsNjYuNjMxMTExMSBDMTMzLjA4NzksNjYuMzQ2NjY2NyAxMzAuNTk3MzIsNjYuMjA0NDQ0NCAxMjguMDM1NTgsNjYuMjA0NDQ0NCBDMTI0LjgzMzQwNSw2Ni4yMDQ0NDQ0IDEyMS43MDIzODksNjYuNDE3Nzc3OCAxMTguNjQyNTMzLDY2LjkxNTU1NTYgTDExNS42NTM4MzcsMzUuNDg0NDQ0NCBDMTE1LjU4MjY3NywzNC40ODg4ODg5IDExNi4zNjU0MzEsMzMuNjM1NTU1NiAxMTcuMzYxNjYzLDMzLjYzNTU1NTYgTDEyMi42OTg2MjEsMzMuNjM1NTU1NiBMMTIwLjEzNjg4MSwxLjg0ODg4ODg5IEMxMjAuMDY1NzIyLDAuODUzMzMzMzMzIDEyMC44NDg0NzYsMCAxMjEuNzczNTQ5LDAgTDEzOS4yMDc2MTIsMCBDMTQwLjIwMzg0NSwwIDE0MC45ODY1OTgsMC44NTMzMzMzMzMgMTQwLjg0NDI4LDEuODQ4ODg4ODkgTDE0MC44NDQyOCwxLjg0ODg4ODg5IEwxNDAuODQ0MjgsMS43Nzc3Nzc3OCBaIE05Ni44Njc3NDM0LDQuOTc3Nzc3NzggQzk2LjU4MzEwNTYsNC4wNTMzMzMzMyA5NS41ODY4NzM0LDMuNDg0NDQ0NDQgOTQuNjYxODAwNiwzLjg0IEw3OC4yOTUxMjg2LDkuODEzMzMzMzMgQzc3LjM3MDA1NTgsMTAuMTY4ODg4OSA3Ni45NDMwOTkxLDExLjIzNTU1NTYgNzcuMzcwMDU1OCwxMi4wODg4ODg5IEw5MC42NzY4NzE4LDQxLjEwMjIyMjIgTDg1LjYyNDU1MTMsNDIuOTUxMTExMSBDODQuNjk5NDc4NSw0My4zMDY2NjY3IDg0LjI3MjUyMTgsNDQuMzczMzMzMyA4NC42OTk0Nzg1LDQ1LjIyNjY2NjcgTDk4LjI5MDkzMjIsNzMuNzQyMjIyMiBDMTAzLjIwMDkzNCw3MS4wNCAxMDguNTM3ODkyLDY4Ljk3Nzc3NzggMTE0LjE1OTQ4OCw2Ny42OTc3Nzc4IEw5Ni45Mzg5MDI4LDQuOTc3Nzc3NzggTDk2Ljg2Nzc0MzQsNC45Nzc3Nzc3OCBaIE01Ni43MzM4MTcxLDIzLjA0IEw5NC4zNzcxNjI4LDc2LjA4ODg4ODkgQzg5LjYwOTQ4MDEsNzkuMjE3Nzc3OCA4NS4yNjg3NTQsODIuOTE1NTU1NiA4MS41Njg0NjMsODcuMTgyMjIyMiBMNTkuMDEwOTE5Myw2NC45OTU1NTU2IEM1OC4yOTkzMjQ5LDY0LjI4NDQ0NDQgNTguMzcwNDg0Myw2My4xNDY2NjY3IDU5LjA4MjA3ODgsNjIuNTA2NjY2NyBMNjMuMjA5MzI2NSw1OS4wOTMzMzMzIEw0MC43OTQxMDE3LDM2LjQwODg4ODkgQzQwLjA4MjUwNzMsMzUuNjk3Nzc3OCA0MC4xNTM2NjY3LDM0LjU2IDQwLjkzNjQyMDYsMzMuOTIgTDU0LjI0MzIzNjYsMjIuNzU1NTU1NiBDNTUuMDI1OTkwNSwyMi4xMTU1NTU2IDU2LjA5MzM4MjEsMjIuMjU3Nzc3OCA1Ni42NjI2NTc3LDIzLjA0IEw1Ni43MzM4MTcxLDIzLjA0IFogTTI1LjEzOTAyNDEsNTMuNzYgQzI0LjM1NjI3MDIsNTMuMTkxMTExMSAyMy4yMTc3MTkxLDUzLjQ3NTU1NTYgMjIuNzE5NjAzLDU0LjMyODg4ODkgTDE0LjAzODE1MDksNjkuNDA0NDQ0NCBDMTMuNTQwMDM0OCw3MC4yNTc3Nzc4IDEzLjg5NTgzMiw3MS4zMjQ0NDQ0IDE0Ljc0OTc0NTMsNzEuNzUxMTExMSBMNDMuNjQwNDc5NSw4NS40MDQ0NDQ0IEw0MC45MzY0MjA2LDkwLjAyNjY2NjcgQzQwLjQzODMwNDUsOTAuODggNDAuNzk0MTAxNyw5Mi4wMTc3Nzc4IDQxLjcxOTE3NDUsOTIuMzczMzMzMyBMNzAuNDY3NTg5NywxMDUuNTI4ODg5IEM3Mi41MzEyMTM2LDEwMC4xOTU1NTYgNzUuMzA2NDMxOSw5NS4yMTc3Nzc4IDc4LjcyMjA4NTIsOTAuNzM3Nzc3OCBMMjUuMTM5MDI0MSw1My43NiBaIE0zLjg2MjM1MDQyLDk0LjcyIEM0LjAwNDY2OTMxLDkzLjcyNDQ0NDQgNS4wMDA5MDE1Miw5My4xNTU1NTU2IDUuOTI1OTc0MjksOTMuMzY4ODg4OSBMNjguOTAyMDgyLDEwOS43OTU1NTYgQzY3LjI2NTQxNDgsMTE1LjEyODg4OSA2Ni4zNDAzNDIsMTIwLjc0NjY2NyA2Ni4xOTgwMjMxLDEyNi41Nzc3NzggTDM0LjY3NDM4OTYsMTI0LjAxNzc3OCBDMzMuNjc4MTU3MywxMjMuOTQ2NjY3IDMyLjk2NjU2MjksMTIzLjAyMjIyMiAzMy4xODAwNDEyLDEyMi4wMjY2NjcgTDM0LjEwNTExNCwxMTYuNzY0NDQ0IEwyLjI5Njg0MjY2LDExMy43Nzc3NzggQzEuMzAwNjEwNDQsMTEzLjcwNjY2NyAwLjY2MDE3NTQ1MSwxMTIuNzgyMjIyIDAuODAyNDk0MzM5LDExMS43ODY2NjcgTDMuNzkxMTkwOTgsOTQuNjQ4ODg4OSBMMy43OTExOTA5OCw5NC42NDg4ODg5IEwzLjg2MjM1MDQyLDk0LjcyIFogTTEuNTE0MDg4NzgsMTM3LjI0NDQ0NCBDMC41MTc4NTY1NjQsMTM3LjMxNTU1NiAtMC4xMjI1Nzg0MywxMzguMjQgMC4wMTk3NDA0NTc4LDEzOS4yMzU1NTYgTDMuMDc5NTk2NTQsMTU2LjM3MzMzMyBDMy4yMjE5MTU0MywxNTcuMzY4ODg5IDQuMjE4MTQ3NjQsMTU3LjkzNzc3OCA1LjE0MzIyMDQxLDE1Ny43MjQ0NDQgTDM2LjAyNjQxOSwxNDkuNjg4ODg5IEwzNi45NTE0OTE4LDE1NC45NTExMTEgQzM3LjA5MzgxMDYsMTU1Ljk0NjY2NyAzOC4wOTAwNDI5LDE1Ni41MTU1NTYgMzkuMDE1MTE1NiwxNTYuMzAyMjIyIEw2OS40NzEzNTc1LDE0Ny45MTExMTEgQzY3LjY5MjM3MTQsMTQyLjY0ODg4OSA2Ni41NTM4MjAzLDEzNy4wMzExMTEgNjYuMjY5MTgyNiwxMzEuMjcxMTExIEwxLjQ0MjkyOTMzLDEzNy4yNDQ0NDQgTDEuNTE0MDg4NzgsMTM3LjI0NDQ0NCBaIE0xMS42MTg3Mjk4LDE4Mi4zMjg4ODkgQzExLjEyMDYxMzcsMTgxLjQ3NTU1NiAxMS40NzY0MTA5LDE4MC40MDg4ODkgMTIuMzMwMzI0MiwxNzkuOTgyMjIyIEw3MS4xMDgwMjQ3LDE1Mi4xMDY2NjcgQzczLjMxMzk2NzUsMTU3LjM2ODg4OSA3Ni4zMDI2NjQxLDE2Mi4yNzU1NTYgNzkuODYwNjM2MywxNjYuNjg0NDQ0IEw1NC4xMDA5MTc3LDE4NS4wMzExMTEgQzUzLjMxODE2MzgsMTg1LjYgNTIuMTc5NjEyNywxODUuMzg2NjY3IDUxLjY4MTQ5NjYsMTg0LjUzMzMzMyBMNDguOTc3NDM3NywxNzkuODQgTDIyLjcxOTYwMywxOTcuOTczMzMzIEMyMS45MzY4NDkxLDE5OC41NDIyMjIgMjAuNzk4Mjk4LDE5OC4yNTc3NzggMjAuMzAwMTgxOSwxOTcuNDA0NDQ0IEwxMS41NDc1NzAzLDE4Mi4zMjg4ODkgTDExLjYxODcyOTgsMTgyLjMyODg4OSBaIE04Mi44NDkzMzMsMTcwLjA5Nzc3OCBMMzcuMDkzODEwNiwyMTYuMzkxMTExIEMzNi4zODIyMTYyLDIxNy4xMDIyMjIgMzYuNDUzMzc1NiwyMTguMjQgMzcuMjM2MTI5NSwyMTguODggTDUwLjYxNDEwNDksMjMwLjA0NDQ0NCBDNTEuMzk2ODU4OCwyMzAuNjg0NDQ0IDUyLjQ2NDI1MDUsMjMwLjU0MjIyMiA1My4wMzM1MjYsMjI5Ljc2IEw3MS41MzQ5ODE0LDIwMy43MzMzMzMgTDc1LjY2MjIyOTEsMjA3LjIxNzc3OCBDNzYuNDQ0OTgzLDIwNy44NTc3NzggNzcuNTgzNTM0MSwyMDcuNzE1NTU2IDc4LjE1MjgwOTcsMjA2Ljg2MjIyMiBMOTYuMDg0OTg5NSwxODAuODM1NTU2IEM5MS4yNDYxNDczLDE3Ny44NDg4ODkgODYuNzYzMTAyNCwxNzQuMjIyMjIyIDgyLjkyMDQ5MjQsMTcwLjA5Nzc3OCBMODIuODQ5MzMzLDE3MC4wOTc3NzggWiBNNzMuODEyMDgzNiwyNDQuNDA4ODg5IEM3Mi44ODcwMTA4LDI0NC4wNTMzMzMgNzIuNDYwMDU0MiwyNDIuOTg2NjY3IDcyLjg4NzAxMDgsMjQyLjEzMzMzMyBMOTkuOTk4NzU4OSwxODIuOTY4ODg5IEMxMDQuOTc5OTIsMTg1LjUyODg4OSAxMTAuMzg4MDM4LDE4Ny40NDg4ODkgMTE2LjAwOTYzNCwxODguNTE1NTU2IEwxMDguMDM5Nzc2LDIxOS4wOTMzMzMgQzEwNy44MjYyOTgsMjIwLjAxNzc3OCAxMDYuNzU4OTA2LDIyMC41ODY2NjcgMTA1LjgzMzgzMywyMjAuMjMxMTExIEwxMDAuNzgxNTEzLDIxOC4zODIyMjIgTDkyLjMxMzUzOSwyNDkuMTczMzMzIEM5Mi4wMjg5MDEyLDI1MC4wOTc3NzggOTEuMDMyNjY5LDI1MC42NjY2NjcgOTAuMTA3NTk2MiwyNTAuMzExMTExIEw3My43NDA5MjQyLDI0NC4zMzc3NzggTDczLjc0MDkyNDIsMjQ0LjMzNzc3OCBMNzMuODEyMDgzNiwyNDQuNDA4ODg5IFogTTEyMC40OTI2NzksMTg5LjI5Nzc3OCBMMTE1LjIyNjg4LDI1NC4xNTExMTEgQzExNS4xNTU3MiwyNTUuMTQ2NjY3IDExNS45Mzg0NzQsMjU2IDExNi44NjM1NDcsMjU2IEwxMzQuMjk3NjExLDI1NiBDMTM1LjI5Mzg0MywyNTYgMTM2LjA3NjU5NywyNTUuMTQ2NjY3IDEzNS45MzQyNzgsMjU0LjE1MTExMSBMMTMzLjM3MjUzOCwyMjIuMzY0NDQ0IEwxMzguNzA5NDk2LDIyMi4zNjQ0NDQgQzEzOS43MDU3MjgsMjIyLjM2NDQ0NCAxNDAuNDg4NDgyLDIyMS41MTExMTEgMTQwLjQxNzMyMywyMjAuNTE1NTU2IEwxMzcuNDI4NjI2LDE4OS4wODQ0NDQgQzEzNC4zNjg3NywxODkuNTgyMjIyIDEzMS4yMzc3NTUsMTg5Ljc5NTU1NiAxMjguMDM1NTgsMTg5Ljc5NTU1NiBDMTI1LjQ3Mzg0LDE4OS43OTU1NTYgMTIyLjk4MzI1OSwxODkuNjUzMzMzIDEyMC40OTI2NzksMTg5LjI5Nzc3OCBMMTIwLjQ5MjY3OSwxODkuMjk3Nzc4IFogTTE4My4yNTUzMDgsMTMuNzI0NDQ0NCBDMTgzLjY4MjI2NSwxMi44IDE4My4yNTUzMDgsMTEuODA0NDQ0NCAxODIuMzMwMjM1LDExLjQ0ODg4ODkgTDE2NS45NjM1NjMsNS40NzU1NTU1NiBDMTY1LjAzODQ5LDUuMTIgMTY0LjA0MjI1OCw1LjY4ODg4ODg5IDE2My43NTc2Miw2LjYxMzMzMzMzIEwxNTUuMjg5NjQ3LDM3LjQwNDQ0NDQgTDE1MC4yMzczMjYsMzUuNTU1NTU1NiBDMTQ5LjMxMjI1MywzNS4yIDE0OC4zMTYwMjEsMzUuNzY4ODg4OSAxNDguMDMxMzgzLDM2LjY5MzMzMzMgTDE0MC4wNjE1MjYsNjcuMjcxMTExMSBDMTQ1Ljc1NDI4MSw2OC40MDg4ODg5IDE1MS4wOTEyMzksNzAuMzI4ODg4OSAxNTYuMDcyNDAxLDcyLjgxNzc3NzggTDE4My4yNTUzMDgsMTMuNzI0NDQ0NCBMMTgzLjI1NTMwOCwxMy43MjQ0NDQ0IFogTTIxOC45NzczNDksMzkuNTM3Nzc3OCBMMTczLjIyMTgyNiw4NS44MzExMTExIEMxNjkuMzc5MjE3LDgxLjcwNjY2NjcgMTY0Ljk2NzMzMSw3OC4wOCAxNjAuMDU3MzI5LDc1LjA5MzMzMzMgTDE3Ny45ODk1MDksNDkuMDY2NjY2NyBDMTc4LjU1ODc4NSw0OC4yODQ0NDQ0IDE3OS42OTczMzYsNDguMDcxMTExMSAxODAuNDgwMDksNDguNzExMTExMSBMMTg0LjYwNzMzNyw1Mi4xOTU1NTU2IEwyMDMuMTA4NzkzLDI2LjE2ODg4ODkgQzIwMy42NzgwNjgsMjUuMzg2NjY2NyAyMDQuODE2NjIsMjUuMjQ0NDQ0NCAyMDUuNTI4MjE0LDI1Ljg4NDQ0NDQgTDIxOC45MDYxODksMzcuMDQ4ODg4OSBDMjE5LjY4ODk0MywzNy42ODg4ODg5IDIxOS42ODg5NDMsMzguODI2NjY2NyAyMTkuMDQ4NTA4LDM5LjUzNzc3NzggTDIxOC45NzczNDksMzkuNTM3Nzc3OCBaIE0yNDMuNzQwODM1LDc1Ljk0NjY2NjcgQzI0NC42NjU5MDgsNzUuNTIgMjQ0Ljk1MDU0Niw3NC40NTMzMzMzIDI0NC40NTI0Myw3My42IEwyMzUuNjk5ODE4LDU4LjUyNDQ0NDQgQzIzNS4yMDE3MDIsNTcuNjcxMTExMSAyMzQuMDYzMTUxLDU3LjQ1Nzc3NzggMjMzLjI4MDM5Nyw1Ny45NTU1NTU2IEwyMDcuMDIyNTYyLDc2LjA4ODg4ODkgTDIwNC4zMTg1MDMsNzEuNDY2NjY2NyBDMjAzLjgyMDM4Nyw3MC42MTMzMzMzIDIwMi42ODE4MzYsNzAuMzI4ODg4OSAyMDEuODk5MDgyLDcwLjk2ODg4ODkgTDE3Ni4xMzkzNjQsODkuMzE1NTU1NiBDMTc5LjY5NzMzNiw5My43MjQ0NDQ0IDE4Mi42MTQ4NzMsOTguNjMxMTExMSAxODQuODkxOTc1LDEwMy44OTMzMzMgTDI0My42Njk2NzYsNzYuMDE3Nzc3OCBMMjQzLjc0MDgzNSw3NS45NDY2NjY3IFogTTI1Mi45OTE1NjMsOTkuNTU1NTU1NiBMMjU1Ljk4MDI2LDExNi42OTMzMzMgQzI1Ni4xMjI1NzgsMTE3LjY4ODg4OSAyNTUuNDgyMTQzLDExOC41NDIyMjIgMjU0LjQ4NTkxMSwxMTguNjg0NDQ0IEwxODkuNjU5NjU4LDEyNC43Mjg4ODkgQzE4OS4zNzUwMiwxMTguODk3Nzc4IDE4OC4yMzY0NjksMTEzLjM1MTExMSAxODYuNDU3NDgzLDEwOC4wODg4ODkgTDIxNi45MTM3MjUsOTkuNjk3Nzc3OCBDMjE3LjgzODc5OCw5OS40MTMzMzMzIDIxOC44MzUwMywxMDAuMDUzMzMzIDIxOC45NzczNDksMTAxLjA0ODg4OSBMMjE5LjkwMjQyMiwxMDYuMzExMTExIEwyNTAuNzg1NjIsOTguMjc1NTU1NiBDMjUxLjcxMDY5Myw5OC4wNjIyMjIyIDI1Mi43MDY5MjUsOTguNjMxMTExMSAyNTIuODQ5MjQ0LDk5LjYyNjY2NjcgTDI1Mi44NDkyNDQsOTkuNjI2NjY2NyBMMjUyLjk5MTU2Myw5OS41NTU1NTU2IFogTTI1MC4wNzQwMjYsMTYyLjQ4ODg4OSBDMjUwLjk5OTA5OCwxNjIuNzAyMjIyIDI1MS45OTUzMzEsMTYyLjEzMzMzMyAyNTIuMTM3NjUsMTYxLjEzNzc3OCBMMjU1LjEyNjM0NiwxNDQgQzI1NS4yNjg2NjUsMTQzLjAwNDQ0NCAyNTQuNjI4MjMsMTQyLjE1MTExMSAyNTMuNjMxOTk4LDE0Mi4wMDg4ODkgTDIyMS44MjM3MjcsMTM5LjAyMjIyMiBMMjIyLjc0ODc5OSwxMzMuNzYgQzIyMi44OTExMTgsMTMyLjc2NDQ0NCAyMjIuMjUwNjgzLDEzMS45MTExMTEgMjIxLjI1NDQ1MSwxMzEuNzY4ODg5IEwxODkuNzMwODE3LDEyOS4yMDg4ODkgQzE4OS41ODg0OTksMTM1LjA0IDE4OC42NjM0MjYsMTQwLjY1Nzc3OCAxODcuMDI2NzU5LDE0NS45OTExMTEgTDI1MC4wMDI4NjYsMTYyLjQxNzc3OCBMMjUwLjAwMjg2NiwxNjIuNDE3Nzc4IEwyNTAuMDc0MDI2LDE2Mi40ODg4ODkgWiBNMjMzLjI4MDM5NywyMDEuNiBDMjMyLjc4MjI4MSwyMDIuNDUzMzMzIDIzMS42NDM3MywyMDIuNjY2NjY3IDIzMC44NjA5NzYsMjAyLjE2ODg4OSBMMTc3LjI3NzkxNSwxNjUuMTkxMTExIEMxODAuNjkzNTY4LDE2MC43MTExMTEgMTgzLjQ2ODc4NiwxNTUuNzMzMzMzIDE4NS41MzI0MSwxNTAuNCBMMjE0LjI4MDgyNiwxNjMuNTU1NTU2IEMyMTUuMjA1ODk4LDE2My45ODIyMjIgMjE1LjU2MTY5NiwxNjUuMDQ4ODg5IDIxNS4wNjM1NzksMTY1LjkwMjIyMiBMMjEyLjM1OTUyMSwxNzAuNTI0NDQ0IEwyNDEuMjUwMjU1LDE4NC4xNzc3NzggQzI0Mi4xMDQxNjgsMTg0LjYwNDQ0NCAyNDIuNDU5OTY1LDE4NS42NzExMTEgMjQxLjk2MTg0OSwxODYuNTI0NDQ0IEwyMzMuMjgwMzk3LDIwMS42IEwyMzMuMjgwMzk3LDIwMS42IEwyMzMuMjgwMzk3LDIwMS42IFogTTE2MS42MjI4MzcsMTc5Ljc2ODg4OSBMMTk5LjI2NjE4MywyMzIuODE3Nzc4IEMxOTkuODM1NDU4LDIzMy42IDIwMC45NzQwMSwyMzMuNzQyMjIyIDIwMS42ODU2MDQsMjMzLjEwMjIyMiBMMjE0Ljk5MjQyLDIyMS45Mzc3NzggQzIxNS43NzUxNzQsMjIxLjI5Nzc3OCAyMTUuNzc1MTc0LDIyMC4xNiAyMTUuMTM0NzM5LDIxOS40NDg4ODkgTDE5Mi43MTk1MTQsMTk2Ljc2NDQ0NCBMMTk2Ljg0Njc2MiwxOTMuMzUxMTExIEMxOTcuNjI5NTE2LDE5Mi43MTExMTEgMTk3LjYyOTUxNiwxOTEuNTczMzMzIDE5Ni45MTc5MjEsMTkwLjg2MjIyMiBMMTc0LjM2MDM3OCwxNjguNjc1NTU2IEMxNzAuNTg4OTI3LDE3Mi45NDIyMjIgMTY2LjMxOTM2LDE3Ni43MTExMTEgMTYxLjU1MTY3OCwxNzkuNzY4ODg5IEwxNjEuNTUxNjc4LDE3OS43Njg4ODkgTDE2MS42MjI4MzcsMTc5Ljc2ODg4OSBaIE0xNjEuMjY3MDQsMjUyLjAxNzc3OCBDMTYwLjM0MTk2NywyNTIuMzczMzMzIDE1OS4zNDU3MzUsMjUxLjgwNDQ0NCAxNTkuMDYxMDk3LDI1MC44OCBMMTQxLjg0MDUxMiwxODguMTYgQzE0Ny40NjIxMDgsMTg2Ljg4IDE1Mi43OTkwNjYsMTg0LjgxNzc3OCAxNTcuNzA5MDY4LDE4Mi4xMTU1NTYgTDE3MS4zMDA1MjIsMjEwLjYzMTExMSBDMTcxLjcyNzQ3OCwyMTEuNTU1NTU2IDE3MS4zMDA1MjIsMjEyLjYyMjIyMiAxNzAuMzc1NDQ5LDIxMi45MDY2NjcgTDE2NS4zMjMxMjgsMjE0Ljc1NTU1NiBMMTc4LjYyOTk0NCwyNDMuNzY4ODg5IEMxNzkuMDU2OTAxLDI0NC42OTMzMzMgMTc4LjYyOTk0NCwyNDUuNjg4ODg5IDE3Ny43MDQ4NzEsMjQ2LjA0NDQ0NCBMMTYxLjMzODE5OSwyNTIuMDE3Nzc4IEwxNjEuMzM4MTk5LDI1Mi4wMTc3NzggTDE2MS4yNjcwNCwyNTIuMDE3Nzc4IFoiPjwvcGF0aD4NCiAgICA8L2c+DQo8L3N2Zz4NCg==",x_=e=>"image/svg+xml"===(e&&(e.type||("string"==typeof e&&"svg"===e.split(".").pop().toLowerCase()?"image/svg+xml":null))),y_=({attributes:e})=>{
397 +const{sortElements:t,heading:n,icon:o,separator:i,subHeading:a}=e,s=(0,m.useRef)(null);return(0,l.jsx)("div",{className:"dch-dual-color-container",ref:s,children:t.map(((e,t)=>{switch(e){case"heading":return(0,l.jsxs)(zn,{tagName:n.tag,className:"dch-dual-color-title",children:[(0,l.jsxs)("span",{className:"heading-first",children:[n.first.text," "]}),(0,l.jsx)("span",{className:"heading-last",children:n.last.text})]},t);case"separator":return i.show&&(0,l.jsxs)("div",{className:"dch-separator-wrapper",children:["line"===i.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"separator-left"}),(0,l.jsx)("span",{className:"separator-right"})]}),"icon"===i.type&&(0,l.jsxs)(m.Fragment,{children:["upload"===i.iconType&&(0,l.jsx)("span",{className:"dch-separator-icon",children:x_(i.icon.upload)?(0,l.jsx)(qs,{src:i.icon?.upload?i.icon.upload:b_}):jt(i.icon.upload)?(0,l.jsx)("img",{src:i.icon?.upload,alt:""}):(0,l.jsx)(qs,{src:i.icon?.upload?i.icon.upload:b_})}),"library"===i.iconType&&(0,l.jsx)("span",{className:"dch-separator-icon",dangerouslySetInnerHTML:{__html:i.icon?.library}})]},t)]},t);case"subHeading":return(0,l.jsx)("div",{className:"dch-dual-color-subcontent",dangerouslySetInnerHTML:{__html:a.text}},t);case"icon":return o.show&&(0,l.jsxs)(m.Fragment,{children:["upload"===o.iconType&&(0,l.jsx)("span",{className:"dch-dual-color-icon-svg",children:x_(o.icon?.upload.url)?(0,l.jsx)(qs,{src:o.icon?.upload.url||f_}):jt(o.icon?.upload.url)?(0,l.jsx)("img",{src:o.icon?.upload.url,alt:""}):(0,l.jsx)(qs,{src:o.icon?.upload.url||f_})}),"library"===o.iconType&&(0,l.jsx)("span",{className:"dch-dual-color-icon-svg",dangerouslySetInnerHTML:{__html:o.icon.library}})]},t)}}))})},v_=({attributes:e,id:o,isBackend:i=!1})=>{const{heading:a,alignment:s,icon:r,subHeading:c,separator:d,advanced:u}=e,p=`#${o}`,h=`${p} .dch-dual-color-container`,g=`${h} .dch-dual-color-title`,m=`${h} .dch-dual-color-subcontent`,b=`${p} .dch-separator-wrapper`,f=`${b} .dch-separator-icon`,x=`${h} .dch-dual-color-icon-svg`,y=e=>"justify-items: "+("left"===s[e]?"start":"right"===s[e]?"end":"center");return(0,l.jsx)("style",{children:`\n\t\t\t${ps("",a.typography)?.googleFontLink}\n\t\t\t${ps("",c.typography)?.googleFontLink}\n\t\t\t${h}{\n\t\t\t\t${y("desktop")};\n\t\t\t}\n\t\t\t${ps(g,a.typography).styles}\n\n\t\t\t${b}{\n\t\t\t\tgap: ${d.distance};\n\t\t\t\tjustify-content:${"left"===d.alignment?"flex-start":"center"===d.alignment?"center":"flex-end"};\n\t\t\t\tmargin: ${hs(d.margin)};\n\t}\n\n ${["left","right"].map((e=>`${p} .separator-${e}{\n ${ns("width",d[e].width)}\n ${ns("height",d[e].height)}\n ${ns("background",d[e].color)}\n ${ns("border-radius",d[e].bRadius)}\n }`)).join("")}\n\n\t\t\t${g}{\n\t\t\t\t${ns("width",a?.align?"100%":"")}\n\t\t\t\t${ns("text-align",a?.align)}\n\t\t\t}\n\n\t\t\t${f}> svg{\n ${ns("height",jt(d.iconSize)?d.iconSize+"px":"")}\n ${ns("width",jt(d.iconSize)?d.iconSize+"px":"")}\n ${ns("color",d.iconColor)}\n ${ns("fill",d.iconColor)}\n\t\t\t}\n\t\t\t${f}> img{\n ${ns("height",jt(d.iconSize)?d.iconSize+"px":"")}\n ${ns("width",jt(d.iconSize)?d.iconSize+"px":"")}\n\t\t\t}\n\t\t\t${f} svg path{\n ${ns("color",d.iconColor)}\n\t\t\t}\n\t\t\t${x}>svg{\n ${ns("height",jt(r.size)?r.size+"px":"")}\n ${ns("width",jt(r.size)?r.size+"px":"")}\n ${ns("color",r.color)}\n ${ns("fill",r.color)}\n\t\t\t}\n\n\t\t\t${x}>img{\n ${ns("height",jt(r.size)?r.size+"px":"")}\n ${ns("width",jt(r.size)?r.size+"px":"")}\n ${ns("color",r.color)}\n\t\t\t}\n\n\t\t\t${x}>svg path{\n ${ns("color",r.color)}\n\t\t\t}\n\t\t\t${m}{\n ${ns("color",jt(c.color)?`${c.color} !important`:"")}\n\t\t\t\tdisplay:grid;\n\t\t\t\t${y("desktop")};\n\t\t\t}\n\t\t\t${ps(`${m}>*`,c.typography).styles}\n\n\t\t\t${["first","last"].map((e=>`${g} .heading-${e}{\n\t\t\t\t\t\t${a[e].color?`color:${"solid"===a[e].colorType&&a[e].color};`:`background:${a[e].gradient};`}\n\t\t\t\t\t\tbackground:${"gradient"===a[e].colorType&&a[e].gradient};\n\t\t\t${"gradient"===a[e].colorType||0===a[e].color.length?"\n\t\t\t\t\t-webkit-background-clip: text;\n\t\t\t\t\t-webkit-text-fill-color: transparent; \n\t\t\t\t\t":""}\n\t\t\t}`)).join("")}\n\t\t\t${t} {\n\t\t\t\t${h}{\n\t\t\t\t\t${y("tablet")};\n\t\t\t\t}\n\t\t\t\t${m}{\n\t\t\t\t\t${y("tablet")};\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t${n} {\n\t\t\t\t${h}{\n\t\t\t\t\t${y("mobile")};\n\t\t\t\t}\n\t\t\t\t${m}{\n\t\t\t\t\t${y("mobile")};\n\t\t\t\t}\n\t\t\t}\n\t\t\t${Cs(o,u,i)}\n\t`})},k_=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"span",value:"span"},{label:"P",value:"p"},{label:"div",value:"div"}],w_={top:"14px",right:"14px",bottom:"14px",left:"14px"},C_={top:"0px",right:"0px",bottom:"0px",left:"0px"},j_=[{label:(0,x.__)("Left","b-blocks"),value:"left",icon:"editor-alignleft"},{label:(0,x.__)("Center","b-blocks"),value:"center",icon:"editor-aligncenter"},{label:(0,x.__)("Right","b-blocks"),value:"right",icon:"editor-alignright"}],$_=[{title:(0,x.__)("Left","b-blocks"),name:"left"},{title:(0,x.__)("Right","b-blocks"),name:"right"}],S_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],T_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),N_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),M_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),L_=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{
398 +d:"M448 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32L32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32z"})}),P_=e=>{const{attributes:t,setAttributes:n,updateObj:o}=e,{sortElements:i,heading:a,icon:s,separator:r,subHeading:c}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Elements","b-blocks"),children:(0,l.jsx)(Ma,{label:(0,x.__)("Sort Elements:"),value:i,onChange:e=>o("sortElements",e)})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Heading","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("HTML Tag","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:a.tag,onChange:e=>o("heading",e,"tag"),options:k_})]}),["first","last"].map((e=>(0,l.jsx)(y.__experimentalInputControl,{className:"mt20",label:(0,x.__)(("first"===e?"First":"Last")+" Part","b-blocks"),value:a[e].text,onChange:t=>n({heading:{...a,[e]:{...a[e],text:t}}})},e))),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a?.align,onChange:e=>o("heading",e,"align"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:T_}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:N_}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:M_}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Justify",value:"justify",icon:L_})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Separator","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:r.show,onChange:e=>o("separator",e,"show")}),r.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:"Type"}),(0,l.jsx)(y.SelectControl,{value:r.type,options:[{label:"Line",value:"line"},{label:"Icon",value:"icon"}],onChange:e=>o("separator",e,"type")})]}),"icon"===r.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{className:"mt10",options:[{label:"Library",value:"library"},{label:"Upload",value:"upload"}],value:r.iconType,label:(0,x.__)("Icon Type","b-blocks"),onChange:e=>o("separator",e,"iconType")}),"library"===r.iconType&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:r.icon.library,onChange:e=>o("separator",e,"icon","library")}),"upload"===r.iconType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:"Icon"}),(0,l.jsx)(we,{types:["image/*"],value:{url:r.icon.upload},default:b_,label:(0,x.__)("Choose Icon","b-blocks"),className:"dual-color-heading-icon",onChange:e=>o("separator",e?.url,"icon","upload")})]})]})]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Sub Heading","b-blocks"),children:(0,l.jsx)(La,{height:220,value:c.text,onChange:e=>n({subHeading:{...c,text:e}})})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Icon","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:s.show,onChange:e=>n({icon:{...s,show:e}})}),s.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{options:[{label:"Library",value:"library"},{label:"Upload",value:"upload"}],value:s.iconType,label:(0,x.__)("Icon Type","b-blocks"),onChange:e=>n({icon:be(s,e,"iconType")})}),"library"===s.iconType&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:s.icon.library,onChange:e=>n({icon:be(s,e,"icon","library")})}),"upload"===s.iconType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon","b-blocks")}),(0,l.jsx)(we,{default:f_,value:s.icon.upload,label:(0,x.__)("Choose Icon","b-blocks"),onChange:e=>n({icon:be(s,e,"icon","upload")})})]})]})]})]})},E_=(0,w.compose)((0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor"),{gradients:n}=e("core/block-editor").getSettings();return{device:t()?.toLowerCase(),gradients:n.length>12?n.slice(0,12):n}})))((({attributes:e,setAttributes:t,updateObj:n,device:i,gradients:a})=>{const{alignment:s,icon:r,heading:c,subHeading:d,separator:u}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{initialOpen:!0,title:(0,x.__)("Wrapper/Container","dual-color-heading"),className:"bPlPanelBody",children:(0,l.jsx)(Tn,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","dual-color-heading"),(0,l.jsx)(_,{})]}),value:s[i],onChange:e=>n("alignment",e,i),options:j_,isIcon:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Heading","dual-color-heading"),children:[(0,l.jsx)(Oa,{className:"mb10",value:c.typography,onChange:e=>n("heading",e,"typography")}),["first","last"].map(((e,n)=>(0,l.jsxs)("div",{children:[(0,l.jsx)(y.PanelRow,{className:"mt20",children:(0,l.jsx)(Tn,{label:(0,x.__)(`${e[0].toUpperCase()+e.substring(1)} Color Type:`,"dual-color-heading"),value:c[e].colorType,onChange:n=>t({heading:{...c,[e]:{...c[e],colorType:n}}}),options:ze,size:"small"})}),"gradient"===c[e].colorType?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.GradientPicker,{value:c[e].gradient,onChange:n=>t({heading:{...c,[e]:{...c[e],gradient:n}}}),gradients:a})}):(0,l.jsx)(Ue,{label:(0,x.__)(`${e[0].toUpperCase()+e.substring(1)} Color:`,"dual-color-heading"),value:c[e].color,onChange:n=>t({heading:{...c,[e]:{...c[e],color:n}}}),defaultColor:"first"===e?o:""})]},n)))]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Sub Heading","dual-color-heading"),children:[(0,l.jsx)(Oa,{className:"mb10",value:d.typography,onChange:e=>n("subHeading",e,"typography")}),(0,l.jsx)(Ue,{color:d.color,value:d.color,label:(0,x.__)("Color","dual-color-heading"),onChange:e=>n("subHeading",e,"color")})]}),u.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Separator","dual-color-heading"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Alignment:","dual-color-heading")}),(0,l.jsx)(Tn,{value:u.alignment,onChange:e=>n("separator",e,"alignment"),options:j_,isIcon:!0})]}),(0,l.jsx)(k,{className:"mt20",label:"Margin",resetValues:w_,values:u.margin,onChange:e=>n("separator",e,"margin")}),"line"===u.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Distance Between Lines","dual-color-heading"),labelPosition:"left",min:0,max:1e3,step:5,value:u.distance,onChange:e=>n("separator",e,"distance")}),(0,l.jsx)("br",{}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:$_,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Width","dual-color-heading"),labelPosition:"left",min:0,max:u[e.name].width.includes("%")?100:1e3,step:1,value:u[e.name].width,onChange:t=>n("separator",t,e.name,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height","dual-color-heading"),labelPosition:"left",min:0,max:u[e.name].height.includes("%")?100:1e3,step:1,value:u[e.name].height,onChange:t=>n("separator",t,e.name,"height")}),(0,l.jsx)(Ye,{className:"mt20",label:"Color",value:u[e.name].color,onChange:t=>n("separator",t,e.name,"color")}),(0,l.jsx)(k,{className:"mt20",label:(0,x.__)("Border Radius","dual-color-heading"),values:u[e.name].bRadius,resetValues:C_,onChange:t=>n("separator",t,e.name,"bRadius")})]})})]}),"icon"===u.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt20",value:u.iconSize,
399 +label:(0,x.__)("Icon Size","dual-color-heading"),min:0,max:300,step:1,onChange:e=>n("separator",e,"iconSize")}),(0,l.jsx)(Ue,{label:"Icon Color",color:u.iconColor,value:u.iconColor,onChange:e=>n("separator",e,"iconColor")})]})]}),r.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Icon Style","dual-color-heading"),children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Icon Size","dual-color-heading"),value:r.size,min:10,max:550,onChange:e=>n("icon",e,"size")}),(0,l.jsx)(Ue,{label:"Icon Color",color:r.color,value:r.color,onChange:e=>n("icon",e,"color")})]})]})})),A_=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:"bBlocks"})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:S_,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(P_,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(E_,{...e})}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e}),isPremium:e.isPremium})]})})]})};Pl(m_.name)&&(0,p.registerBlockType)(m_,{icon:mr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=fe(t,n),a=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A_,{attributes:t,setAttributes:n,updateObj:i,isPremium:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(v_,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(y_,{attributes:t})})]})]})}});const B_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/emoji-stack-separator","version":"0.1.0","title":"Emoji Stack Separator","category":"bBlocks","textdomain":"b-blocks","description":"A full-width emoji stack separator with customizable emoji and height","example":{"attributes":{"emoji":"🤗","height":192,"align":"full","emojiSize":"medium","density":"normal","animationStyle":"none"}},"attributes":{"emoji":{"type":"string","default":"🤗"},"height":{"type":"string","default":"192px"},"align":{"type":"string","default":"full"},"emojiSize":{"type":"string","default":"medium"},"density":{"type":"string","default":"normal"},"animationStyle":{"type":"string","default":"none"},"margin":{"type":"object","default":{}},"padding":{"type":"object","default":{}},"background":{"type":"object","default":{}},"border":{"type":"object","default":{}},"borderRadius":{"type":"object","default":{}}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),I_=({attributes:e})=>{const{emoji:t,height:n,align:o,emojiSize:i,density:a,animationStyle:s}=e,r=(0,m.useRef)(null);(0,m.useEffect)((()=>{if(r.current){const e=setTimeout((()=>{c(r.current,t,n,i,a)}),50);return()=>clearTimeout(e)}}),[t,n,o,i,a]);const c=(e,t,n,o,i)=>{e.innerHTML="";const a=(e=>{const t={small:{fontSize:2.5,overlap:-1},medium:{fontSize:3.75,overlap:-1.4},large:{fontSize:5,overlap:-1.8},xlarge:{fontSize:6.5,overlap:-2.3}};return t[e]||t.medium})(o),s=(e=>{const t={sparse:{overlapFactor:.5,rowMargin:-2,emojisExtra:2},normal:{overlapFactor:.65,rowMargin:-3,emojisExtra:4},dense:{overlapFactor:.75,rowMargin:-3.5,emojisExtra:6}};return t[e]||t.normal})(i),r=e.offsetWidth,l=Math.ceil(r/(60*s.overlapFactor))+s.emojisExtra;for(let n=0;n<4;n++){const o=document.createElement("div");o.className="b-blocks-emoji-stack-iemoji-row",n>0&&(o.style.marginTop=`${s.rowMargin}rem`);for(let e=0;e<l;e++){const n=document.createElement("span");n.textContent=t,n.className="b-blocks-emoji-stack-item";const i=60*Math.random()-30,s=20*Math.random()-10;n.style.fontSize=`${a.fontSize}rem`,n.style.marginRight=`${a.overlap}rem`,n.style.setProperty("--b-blocks-emoji-stack-separator-rotation",`${i}deg`),n.style.setProperty("--b-blocks-emoji-stack-separator-index",e),n.style.transform=`rotate(${i}deg) translateY(${s}px)`,o.appendChild(n)}e.appendChild(o)}};return(0,l.jsx)("div",{className:"b-blocks-emoji-stack-separator-container "+(s?`b-blocks-emoji-stack-separator-animation-${s}`:""),children:(0,l.jsx)("div",{ref:r,className:"b-blocks-emoji-stack-container"})})},O_=({attributes:e,setAttributes:t})=>{const{emoji:n,emojiSize:o,density:i,animationStyle:a}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Emoji Stack Settings","b-blocks"),children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Emoji","b-blocks"),value:n,onChange:e=>{const n=Array.from(e)[0];t({emoji:n})},help:(0,x.__)("Enter any emoji character","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Emoji Size","b-blocks"),value:o,options:[{label:(0,x.__)("Small","b-blocks"),value:"small"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"},{label:(0,x.__)("Extra Large","b-blocks"),value:"xlarge"}],onChange:e=>t({emojiSize:e}),help:(0,x.__)("Adjust the size of each emoji","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Stack Density","b-blocks"),value:i,options:[{label:(0,x.__)("Sparse","b-blocks"),value:"sparse"},{label:(0,x.__)("Normal","b-blocks"),value:"normal"},{label:(0,x.__)("Dense","b-blocks"),value:"dense"}],onChange:e=>t({density:e}),help:(0,x.__)("Control how tightly packed the emojis are","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Hover Animation","b-blocks"),value:a,options:[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"},{label:(0,x.__)("Rotate","b-blocks"),value:"rotate"},{label:(0,x.__)("Wave","b-blocks"),value:"wave"}],onChange:e=>t({animationStyle:e}),help:(0,x.__)("Add interactive hover effects to emojis","b-blocks")})]})})},R_=({attributes:e,setAttributes:t})=>{const{padding:n,margin:o,background:i,height:a,border:s,borderRadius:r}=e;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Emoji Container","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height","b-blocks"),value:a,onChange:e=>t({height:e}),step:8}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:n,onChange:e=>t({padding:e})}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Margin","b-blocks"),values:o,onChange:e=>t({margin:e})}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i,onChange:e=>t({background:e})}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:s,onChange:e=>t({border:e})}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:r,onChange:e=>t({borderRadius:e})})]})},z_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],D_=e=>(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:z_,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(O_,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(R_,{...e})})]})})}),F_=({attributes:e,id:t})=>{const{background:n,height:o,padding:i,margin:a,border:s,borderRadius:r}=e,c=`#${t} .b-blocks-emoji-stack-separator-container`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n ${c}{\n ${os(n)}\n ${ns("height",o)}\n ${ns("padding",hs(i))}\n ${ns("margin",hs(a))}\n ${as(s)}\n ${ns("border-radius",hs(r))}\n }\n `}})};Pl(B_.name)&&(0,p.registerBlockType)(B_,{icon:Yr,edit:e=>{const{attributes:t,clientId:n}=e,{align:o}=t,i=(0,h.useBlockProps)({className:`align${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(D_,{...e}),(0,
400 +l.jsx)(F_,{attributes:t,id:`block-${n}`}),(0,l.jsx)("div",{...i,children:(0,l.jsx)(I_,{attributes:t})})]})}})
401 +;const H_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/event-card","title":"Event Card","category":"bBlocks","description":"A single event announcement card with title, date/time, location, description, and a ticket CTA. Optionally outputs schema.org Event JSON-LD for Google rich results.","keywords":["event","schema","jsonld","calendar","webinar","workshop","rich results","tickets"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"content":{"type":"object","default":{"eventName":"Event Name","eventDescription":"","titleTag":"h3"}},"image":{"type":"object","default":{"id":0,"url":"","alt":"","border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"datetime":{"type":"object","default":{"startDate":"","startTime":"","endDate":"","endTime":"","timezone":"UTC","status":"EventScheduled"}},"location":{"type":"object","default":{"isVirtual":false,"virtualUrl":"","venueName":"","venueAddress":"","venueCity":"","venueCountry":"US","color":"","iconColor":"","typo":{}}},"organizer":{"type":"object","default":{"name":"","url":"","show":true,"color":"","iconColor":"","typo":{}}},"link":{"type":"object","default":{"label":"Get Tickets","url":"","newTab":true}},"cta":{"type":"object","default":{"showButton":true,"bg":"#146EF5","text":"#ffffff","hoverBg":"#0040E3","fontSize":"15px","borderRadius":6,"transition":0.3,"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"schema":{"type":"object","default":{"show":true}},"status":{"type":"object","default":{"show":true,"color":"","bg":{"type":"solid","color":""},"typo":{},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"card":{"type":"object","default":{"style":"default","alignment":"left","bg":"#ffffff","maxWidth":"640px","showDateBadge":true}},"badge":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"title":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"22px"},"fontWeight":"700"},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"meta":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"14px"}},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"description":{"type":"object","default":{"color":"","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"15px"}},"border":{},"bRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"24px","right":"28px","bottom":"24px","left":"28px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"7px","spreed":"","color":"rgba(0, 0, 0, 0.08)","isInset":false},{"hOffset":"0px","vOffset":"8px","blur":"24px","spreed":"0px","color":"rgba(0, 0, 0, 0.06)","isInset":false}],"border":{"top":{"color":"#146ef5","style":"solid","width":"5px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),W_=(e,t)=>e?"object"==typeof e&&e[t]?hs(e[t]):"desktop"===t&&"object"==typeof e&&("top"in e||"right"in e||"bottom"in e||"left"in e)?hs(e):"":"",U_=(e,t)=>e?"object"==typeof e&&e[t]?is(e[t]):"desktop"===t?is(e):"":"",G_=({attributes:e,id:o,isBackend:i=!1})=>{
402 +const{card:a={},badge:s={},cta:r={},title:c={},meta:d={},description:u={},location:p={},organizer:h={},status:g={},image:m={},advanced:b={}}=e,{bg:f,maxWidth:x}=a,{color:y,iconColor:v,typo:k={}}=p,{color:w,iconColor:_,typo:C={}}=h,j=r.color||r.text,$=r.hoverColor||r.hoverText||j,S="object"==typeof r.bg?os(r.bg):ns("background-color",r.bg||"#146EF5"),T="object"==typeof r.hoverBg?os(r.hoverBg):ns("background-color",r.hoverBg||"#0040E3"),N=as(r.border)||(r.border?U_(r.border,"desktop"):r.borderRadius?`border-radius: ${parseInt(r.borderRadius,10)||0}px;`:""),M=ns("padding",W_(r.padding,"desktop")),L=ns("margin",W_(r.margin,"desktop")),P=ns("border-radius",W_(r.bRadius,"desktop")),E="0px"===x?"100%":x||"640px",A=`#${o} .b-blocks-event-card`,B=`#${o} .b-blocks-event-card-inner`,I=`#${o} .b-blocks-event-card-badge`,O=`#${o} .b-blocks-event-card-title`,R=`#${o} .b-blocks-event-card-meta`,z=`#${o} .b-blocks-event-card-description`,D=`#${o} .b-blocks-event-card-status`,F=`#${o} .b-blocks-event-card-cover img`,H=`#${o} .b-blocks-event-card-meta-location`,W=`#${o} .b-blocks-event-card-meta-organizer`,U=`#${o} .b-blocks-event-card-btn`,G=(e,t={})=>`\n\t\t${e}{\n\t\t\t${ns("color",t.color)}\n\t\t\t${os(t.bg)}\n\t\t\t${as(t.border)||U_(t.border,"desktop")}\n\t\t\t${ns("border-radius",W_(t.bRadius,"desktop"))}\n\t\t\t${ns("padding",W_(t.padding,"desktop"))}\n\t\t\t${ns("margin",W_(t.margin,"desktop"))}\n\t\t}\n\t\t${ps(e,t.typo||{}).styles}\n\t`,V=(e,t={},n="desktop")=>{const o=W_(t.padding,n),i=W_(t.margin,n),a=W_(t.bRadius,n),s=U_(t.border,n);return o||i||a||s?`\n\t\t\t${e}{\n\t\t\t\t${ns("padding",o)}\n\t\t\t\t${ns("margin",i)}\n\t\t\t\t${ns("border-radius",a)}\n\t\t\t\t${s}\n\t\t\t}\n\t\t`:""};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",s.typo).googleFontLink}\n\t\t\t${ps("",c.typo).googleFontLink}\n\t\t\t${ps("",d.typo).googleFontLink}\n\t\t\t${ps("",u.typo).googleFontLink}\n\t\t\t${ps("",g.typo).googleFontLink}\n\t\t\t${ps("",r.typo).googleFontLink}\n\t\t\t${A}{ max-width: ${E}; }\n\t\t\t${B}{ ${ns("background-color",f)} }\n\t\t\t${G(I,s)}\n\t\t\t${U}{\n\t\t\t\t${ns("color",j)}\n\t\t\t\t${S}\n\t\t\t\t${N}\n\t\t\t\t${P}\n\t\t\t\t${M}\n\t\t\t\t${L}\n\t\t\t\ttransition: all ${r.transition??.3}s ease-in-out;\n\t\t\t\t${!r.typo?.fontSize&&r.fontSize?ns("font-size",r.fontSize):""}\n\t\t\t}\n\t\t\t${ps(U,r.typo||{}).styles}\n\t\t\t${U}:hover, ${U}:focus{\n\t\t\t\t${T}\n\t\t\t\t${ns("color",$)}\n\t\t\t}\n\t\t\t${G(O,c)}\n\t\t\t${G(R,d)}\n\t\t\t${G(z,u)}\n\t\t\t${G(D,g)}\n\t\t\t${G(F,m)}\n\t\t\t${ps("",k).googleFontLink}\n\t\t\t${ps(H,k).styles}\n\t\t\t${H}{ ${ns("color",y)} }\n\t\t\t${H} .b-blocks-event-card-meta-icon{ ${ns("color",v)} }\n\t\t\t${ps("",C).googleFontLink}\n\t\t\t${ps(W,C).styles}\n\t\t\t${W}{ ${ns("color",w)} }\n\t\t\t${W} .b-blocks-event-card-meta-icon{ ${ns("color",_)} }\n\t\t\t${t}{\n\t\t\t\t${V(I,s,"tablet")}\n\t\t\t\t${V(O,c,"tablet")}\n\t\t\t\t${V(R,d,"tablet")}\n\t\t\t\t${V(z,u,"tablet")}\n\t\t\t\t${V(D,g,"tablet")}\n\t\t\t\t${V(F,m,"tablet")}\n\t\t\t\t${V(U,r,"tablet")}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${V(I,s,"mobile")}\n\t\t\t\t${V(O,c,"mobile")}\n\t\t\t\t${V(R,d,"mobile")}\n\t\t\t\t${V(z,u,"mobile")}\n\t\t\t\t${V(D,g,"mobile")}\n\t\t\t\t${V(F,m,"mobile")}\n\t\t\t\t${V(U,r,"mobile")}\n\t\t\t}\n\t\t\t${_s(o,b,i)}\n\t\t\t`.replace(/\s+/g," ").trim()}})},V_=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],q_=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],Y_={top:"",right:"",bottom:"",left:""},K_=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Toronto","America/Sao_Paulo","America/Mexico_City","Europe/London","Europe/Paris","Europe/Berlin","Europe/Madrid","Europe/Rome","Europe/Amsterdam","Europe/Moscow","Africa/Cairo","Africa/Johannesburg","Asia/Dubai","Asia/Kolkata","Asia/Bangkok","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Tokyo","Asia/Seoul","Australia/Sydney","Australia/Perth","Pacific/Auckland"],Q_=({attributes:e,setAttributes:t,updateObj:n})=>{const{image:o={},datetime:i={},location:a={},organizer:s={},link:r={},cta:c={}}=e,{id:d,url:u,alt:p}=o,{startDate:h,startTime:g,endDate:m,endTime:b,timezone:f,status:k}=i,{isVirtual:w,virtualUrl:_,venueName:C,venueAddress:j,venueCity:$,venueCountry:S}=a,{label:T,url:N,newTab:M}=r,{showButton:L=!0}=c,P="_custom"===f||f&&!K_.includes(f),E=P?"_custom":f||"UTC";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Event Details","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("p",{style:{marginTop:0,fontStyle:"italic",opacity:.75},children:(0,x.__)("Edit the event name and description directly on the card. Set the heading level (H2–H4) from the block toolbar.","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Start Date","b-blocks"),type:"date",value:h||"",onChange:e=>n("datetime",e,"startDate"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Start Time","b-blocks"),type:"time",value:g||"",onChange:e=>n("datetime",e,"startTime"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("End Date (optional)","b-blocks"),type:"date",value:m||"",onChange:e=>n("datetime",e,"endDate"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("End Time (optional)","b-blocks"),type:"time",value:b||"",onChange:e=>n("datetime",e,"endTime"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Timezone","b-blocks"),value:E,options:[...K_.map((e=>({label:e,value:e}))),{label:(0,x.__)("Custom…","b-blocks"),value:"_custom"}],onChange:e=>n("datetime","_custom"===e?"":e,"timezone"),__nextHasNoMarginBottom:!0}),P&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Custom timezone","b-blocks"),value:"_custom"===f?"":f||"",onChange:e=>n("datetime",e,"timezone"),placeholder:"Continent/City",help:(0,x.__)("Use a valid IANA timezone name, e.g. America/New_York.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Event Status","b-blocks"),value:k||"EventScheduled",options:[{label:(0,x.__)("Scheduled","b-blocks"),value:"EventScheduled"},{label:(0,x.__)("Cancelled","b-blocks"),value:"EventCancelled"},{label:(0,x.__)("Postponed","b-blocks"),value:"EventPostponed"},{label:(0,x.__)("Moved Online","b-blocks"),value:"EventMovedOnline"}],onChange:e=>n("datetime",e,"status"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Virtual / Online event","b-blocks"),checked:!!w,onChange:e=>n("location",e,"isVirtual")}),w&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Virtual Event URL","b-blocks"),type:"url",value:_||"",onChange:e=>n("location",e,"virtualUrl"),placeholder:"https://example.com/webinar",__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,x.__)("Cover Image:","b-blocks")}),(0,l.jsx)(we,{label:u?(0,x.__)("Replace Image","b-blocks"):(0,x.__)("Select Image","b-blocks"),value:{id:d,url:u,alt:p},types:["image"],height:"100%",width:"100%",onChange:e=>t({image:{...o,id:e?.id||0,url:e?.url||"",alt:e?.alt||p||""}})}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Alt Text","b-blocks"),value:p||"",onChange:e=>n("image",e,"alt"),help:(0,x.__)("Describes the image; leave empty for a decorative image.","b-blocks"),__nextHasNoMarginBottom:!0})]}),!w&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Location","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Venue Name","b-blocks"),value:C||"",onChange:e=>n("location",e,"venueName"),placeholder:(0,x.__)("e.g. City Hall Auditorium","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Address","b-blocks"),value:j||"",onChange:e=>n("location",e,"venueAddress"),__nextHasNoMarginBottom:!0
403 +}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("City","b-blocks"),value:$||"",onChange:e=>n("location",e,"venueCity"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Country (ISO 2-letter)","b-blocks"),value:S||"",onChange:e=>n("location",e,"venueCountry"),placeholder:"US",help:(0,x.__)("Two-letter ISO country code used in schema markup.","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Organizer","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Organizer Name","b-blocks"),value:s.name||"",onChange:e=>n("organizer",e,"name"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Organizer URL","b-blocks"),type:"url",value:s.url||"",onChange:e=>n("organizer",e,"url"),placeholder:"https://example.com",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show organizer on card","b-blocks"),checked:!!s.show,onChange:e=>n("organizer",e,"show")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Button","b-blocks"),checked:!1!==L,onChange:e=>n("cta",e,"showButton")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Button Label","b-blocks"),value:T||"",onChange:e=>n("link",e,"label"),placeholder:(0,x.__)("Get Tickets","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button URL","b-blocks"),type:"url",value:N||"",onChange:e=>n("link",e,"url"),placeholder:"https://example.com/register",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Open in new tab","b-blocks"),checked:!!M,onChange:e=>n("link",e,"newTab")})]})]})},Z_=(e,t="desktop")=>e?"object"==typeof e&&e[t]?e[t]:"object"==typeof e&&("top"in e||"right"in e||"bottom"in e||"left"in e)&&"desktop"===t?e:Y_:Y_,X_=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,Qa.useState)("normal"),{card:a={},badge:s={},cta:r={},title:c={},meta:d={},description:u={},location:p={},organizer:h={},status:g={},image:m={}}=e,{showDateBadge:b}=a,{color:f,iconColor:v,typo:w={}}=p,{color:C,iconColor:j,typo:$={}}=h,S=(e,o,i,a="")=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:e,initialOpen:!1,children:[a&&(0,l.jsx)(y.ToggleControl,{label:a,checked:!1!==i.show,onChange:e=>t(o,e,"show")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i.color||"",onChange:e=>t(o,e,"color"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>t(o,e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typo||{},onChange:e=>t(o,e,"typo")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i.border,onChange:e=>t(o,e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(i.bRadius,n),resetValues:Y_,onChange:e=>t(o,e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(i.padding,n),resetValues:Y_,onChange:e=>t(o,e,"padding",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(i.margin,n),resetValues:Y_,onChange:e=>t(o,e,"margin",n)})]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show date badge","b-blocks"),checked:!!b,onChange:e=>t("card",e,"showDateBadge")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:s.color||"",onChange:e=>t("badge",e,"color"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:s.bg,onChange:e=>t("badge",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typo||{},onChange:e=>t("badge",e,"typo")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("badge",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(s.bRadius,n),resetValues:Y_,onChange:e=>t("badge",e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(s.padding,n),resetValues:Y_,onChange:e=>t("badge",e,"padding",n)})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:m.border,onChange:e=>t("image",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(m.bRadius,n),resetValues:Y_,onChange:e=>t("image",e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(m.padding,n),resetValues:Y_,onChange:e=>t("image",e,"padding",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(m.margin,n),resetValues:Y_,onChange:e=>t("image",e,"margin",n)})]}),S((0,x.__)("Title","b-blocks"),"title",c),S((0,x.__)("Meta","b-blocks"),"meta",d),S((0,x.__)("Description","b-blocks"),"description",u),S((0,x.__)("Event Status","b-blocks"),"status",g,(0,x.__)("Show event status","b-blocks")),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Location","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:f||"",onChange:e=>t("location",e,"color"),defaultColor:""}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:v||"",onChange:e=>t("location",e,"iconColor"),defaultColor:""}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:w,onChange:e=>t("location",e,"typo")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Organizer","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:C||"",onChange:e=>t("organizer",e,"color"),defaultColor:""}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:j||"",onChange:e=>t("organizer",e,"iconColor"),defaultColor:""}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:$,onChange:e=>t("organizer",e,"typo")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("CTA Button Style","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:r.typo||{},onChange:e=>t("cta",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),"normal"===o?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:r.color||r.text||"",onChange:e=>t("cta",e,"color"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:r.bg,onChange:e=>t("cta",e,"bg")})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Hover Color","b-blocks"),value:r.hoverColor||r.hoverText||"",onChange:e=>t("cta",e,"hoverColor"),defaultColor:""}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Hover Background","b-blocks"),value:r.hoverBg,onChange:e=>t("cta",e,"hoverBg")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:r.transition??.3,min:0,max:5,step:.05,
404 +onChange:e=>t("cta",e,"transition")})]}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>t("cta",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(r.bRadius,n),resetValues:Y_,onChange:e=>t("cta",e,"bRadius",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(r.padding,n),resetValues:Y_,onChange:e=>t("cta",e,"padding",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:q_,values:Z_(r.margin,n),resetValues:Y_,onChange:e=>t("cta",e,"margin",n)})]})]})},J_=e=>{const{attributes:t,setAttributes:n}=e;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:V_,onSelect:me,children:o=>(0,l.jsxs)(l.Fragment,{children:["general"===o.name&&(0,l.jsx)(Q_,{...e}),"style"===o.name&&(0,l.jsx)(X_,{...e}),"advanced"===o.name&&(0,l.jsx)(Qt,{advanced:t.advanced,onChange:e=>n({advanced:e})})]})})})},eC=()=>[(0,x.__)("Jan","b-blocks"),(0,x.__)("Feb","b-blocks"),(0,x.__)("Mar","b-blocks"),(0,x.__)("Apr","b-blocks"),(0,x.__)("May","b-blocks"),(0,x.__)("Jun","b-blocks"),(0,x.__)("Jul","b-blocks"),(0,x.__)("Aug","b-blocks"),(0,x.__)("Sep","b-blocks"),(0,x.__)("Oct","b-blocks"),(0,x.__)("Nov","b-blocks"),(0,x.__)("Dec","b-blocks")],tC=(e,t)=>{if(!e)return"";const n=e.split("-");if(3!==n.length)return e;const o=parseInt(n[1],10)-1,i=parseInt(n[2],10);let a=`${eC()[o]||""} ${i}, ${n[0]}`;return t&&(a+=` · ${t}`),a.trim()},nC=[{tag:"h2",label:(0,x.__)("Heading 2","b-blocks")},{tag:"h3",label:(0,x.__)("Heading 3","b-blocks")},{tag:"h4",label:(0,x.__)("Heading 4","b-blocks")}];Pl(H_.name)&&(0,p.registerBlockType)(H_,{icon:$l,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{content:i={},image:a={},datetime:s={},location:r={},organizer:c={},link:d={},card:u={},cta:p={},status:g={}}=t,m=(0,f.useSelect)((e=>e("core/editor")?.getDeviceType()?.toLowerCase()||"desktop"),[]),{url:b,alt:v}=a,{eventName:k,eventDescription:w,titleTag:_}=i,{startDate:C,startTime:j,endDate:$,endTime:S,status:T}=s,{isVirtual:N,venueName:M,venueAddress:L,venueCity:P,venueCountry:E}=r,{label:A}=d,{showButton:B=!0}=p,{style:I,alignment:O,showDateBadge:R=!0}=u,{show:z=!0}=g,D=fe(t,n),F=["h2","h3","h4"].includes(_)?_:"h3",H=["left","center","right"].includes(O)?O:"left",W=["default","outlined","flat"].includes(I)?I:"default",U=(e=>({EventCancelled:{label:(0,x.__)("Cancelled","b-blocks"),cls:"is-cancelled"},EventPostponed:{label:(0,x.__)("Postponed","b-blocks"),cls:"is-postponed"},EventMovedOnline:{label:(0,x.__)("Moved Online","b-blocks"),cls:"is-moved-online"}}[e]||null))(T),G=["b-blocks-event-card",`b-blocks-event-card--${W}`,`b-blocks-event-card--align-${H}`,N?"is-virtual":"",U?U.cls:""].filter(Boolean).join(" "),V=(0,h.useBlockProps)({id:`block-${o}`}),q=(e=>{const t=(e||(new Date).toISOString().split("T")[0]).split("-");if(3!==t.length)return{month:"JAN",day:"1"};const n=parseInt(t[1],10)-1,o=String(parseInt(t[2],10));return{month:eC()[n]||"JAN",day:o}})(C),Y=tC(C,j),K=tC($,S),Q=(({isVirtual:e,venueName:t,venueAddress:n,venueCity:o})=>e?(0,x.__)("Online / Virtual","b-blocks"):[t,n,o].filter(Boolean).join(", "))({isVirtual:N,venueName:M,venueAddress:L,venueCity:P}),Z=F;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(J_,{...e,updateObj:D,device:m}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.AlignmentControl,{value:H,onChange:e=>D("card",e||"left","alignment")}),(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(y.ToolbarDropdownMenu,{icon:"heading",label:(0,x.__)("Title heading level","b-blocks"),controls:nC.map((e=>({title:e.label,isActive:F===e.tag,onClick:()=>D("content",e.tag,"titleTag")})))})})]}),(0,l.jsxs)("div",{...V,children:[(0,l.jsx)(G_,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:G,children:(0,l.jsxs)("article",{className:"b-blocks-event-card-inner",children:[b&&(0,l.jsx)("div",{className:"b-blocks-event-card-cover",children:(0,l.jsx)("img",{src:b,alt:v||""})}),(0,l.jsxs)("div",{className:"b-blocks-event-card-header",children:[R&&q.day&&(0,l.jsxs)("div",{className:"b-blocks-event-card-badge","aria-hidden":"true",children:[(0,l.jsx)("span",{className:"b-blocks-event-card-badge-month",children:q.month}),(0,l.jsx)("span",{className:"b-blocks-event-card-badge-day",children:q.day})]}),(0,l.jsxs)("div",{className:"b-blocks-event-card-heading",children:[(0,l.jsxs)(Z,{className:"b-blocks-event-card-title",children:[(0,l.jsx)(h.RichText,{tagName:"span",value:k||"",onChange:e=>D("content",e,"eventName"),placeholder:(0,x.__)("Event Name","b-blocks"),allowedFormats:[]}),!1!==z&&U&&(0,l.jsx)("span",{className:"b-blocks-event-card-status",contentEditable:!1,children:U.label})]}),Y&&(0,l.jsxs)("p",{className:"b-blocks-event-card-meta b-blocks-event-card-meta-date",children:[(0,l.jsx)("svg",{className:"b-blocks-event-card-meta-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{fill:"currentColor",d:"M7 2v2H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7Zm12 7v10H5V9h14Z"})}),(0,l.jsx)("time",{children:Y}),K&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"b-blocks-event-card-dash","aria-hidden":"true",children:" – "}),(0,l.jsx)("time",{children:K})]})]})]})]}),Q&&(0,l.jsxs)("address",{className:"b-blocks-event-card-meta b-blocks-event-card-meta-location",children:[(0,l.jsx)("svg",{className:"b-blocks-event-card-meta-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{fill:"currentColor",d:"M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5Z"})}),Q,!N&&E&&(0,l.jsx)("span",{className:"b-blocks-event-card-country",children:E})]}),c.show&&c.name&&(0,l.jsxs)("p",{className:"b-blocks-event-card-meta b-blocks-event-card-meta-organizer",children:[(0,l.jsx)("svg",{className:"b-blocks-event-card-meta-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{fill:"currentColor",d:"M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5 0-9 2.5-9 5.5V22h18v-2.5c0-3-4-5.5-9-5.5Z"})}),(0,l.jsx)("span",{className:"b-blocks-event-card-organizer-label",children:(0,x.__)("By","b-blocks")})," ",c.name]}),(0,l.jsx)(h.RichText,{tagName:"div",className:"b-blocks-event-card-description",value:w||"",onChange:e=>D("content",e,"eventDescription"),placeholder:(0,x.__)("Optional event description…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]}),B&&(0,l.jsx)("div",{className:"b-blocks-event-card-cta",children:(0,l.jsx)("span",{className:"b-blocks-event-card-btn",children:A||(0,x.__)("Get Tickets","b-blocks")})})]})})})]})]})},save:()=>null})
405 +;const oC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/expand-content","title":"Expand Content","description":"Wrap any inner blocks in a collapsible reveal. The first portion is visible behind a fade overlay and a Show More / Show Less button toggles the rest. Accessible and reduced-motion aware.","category":"bBlocks","keywords":["expand","read more","show more","collapse","truncate"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"buttons":{"type":"object","default":{"showMore":"Show More","showLess":"Show Less","isShowCollapse":true,"persistState":false,"alignment":"center"}},"layout":{"type":"object","default":{"previewHeight":"200px","fadeHeight":"80px","fadeColor":"#ffffff"}},"styles":{"type":"object","default":{"buttons":{"showMore":{"padding":{"top":"","right":"","bottom":"","left":""},"border":{},"radius":{},"color":"#ffffff","bg":{"color":"#0073aa"},"typo":{"fontSize":{"desktop":"","tablet":"","mobile":""}}},"showLess":{"padding":{"top":"","right":"","bottom":"","left":""},"border":{},"radius":{},"color":"#ffffff","bg":{"color":"#0073aa"},"typo":{"fontSize":{"desktop":"","tablet":"","mobile":""}}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}],"border":{"color":"#dddddd","style":"solid","width":"1px"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}},"animationDuration":{"type":"number","default":300}},"supports":{"align":["wide","full"],"html":false,"className":true,"customClassName":true},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),iC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],aC=[{label:"Left",value:"left",icon:"align-left"},{label:"Center",value:"center",icon:"align-center"},{label:"Right",value:"right",icon:"align-right"}],sC=e=>{const{attributes:t,updateObj:n}=e,{buttons:o}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Content","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Show More Label","b-blocks"),value:o?.showMore,onChange:e=>n("buttons",e,"showMore"),placeholder:(0,x.__)("Show More","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Show Less Label","b-blocks"),value:o?.showLess,onChange:e=>n("buttons",e,"showLess"),placeholder:(0,x.__)("Show Less","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show collapse button after expanding","b-blocks"),checked:o.isShowCollapse,onChange:e=>n("buttons",e,"isShowCollapse"),help:(0,x.__)("When disabled, visitors can expand once and the content stays open.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Remember state for the visitor","b-blocks"),checked:o.persistState,onChange:e=>n("buttons",e,"persistState"),help:(0,x.__)("Saves the open / closed state in sessionStorage so it persists across page navigation in the same tab.","b-blocks")})]})},rC=e=>{const{attributes:t,updateObj:n}=e,{layout:o,buttons:i}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Collapsed Preview Height (px)","b-blocks"),value:o?.previewHeight,onChange:e=>n("layout",e,"previewHeight"),help:(0,x.__)("How much of the content stays visible before the Show More button.","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Fade Overlay Height (px)","b-blocks"),value:o?.fadeHeight,onChange:e=>n("layout",e,"fadeHeight"),help:(0,x.__)("Set to 0 to hide the fade overlay entirely.","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Fade Color:","b-blocks"),value:o?.fadeColor,onChange:e=>n("layout",e,"fadeColor"),defaultColor:"#ffffff"}),(0,l.jsx)("p",{className:"components-base-control__help",style:{marginTop:"-8px"},children:(0,x.__)("Match your page background color so the fade blends seamlessly.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Align","b-blocks")}),(0,l.jsx)(Tn,{value:i.alignment,onChange:e=>n("buttons",e,"alignment"),options:aC,isIcon:!0,size:"default"})]})]})},lC=e=>{const{attributes:t,setAttributes:n}=e,{animationDuration:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(rC,{...e}),(0,l.jsx)(sC,{...e}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Animation Duration (ms)","b-blocks"),value:o,onChange:e=>n({animationDuration:e}),min:0,max:1e3,step:50,help:(0,x.__)("Set to 0 to snap instantly. The animation is also disabled automatically when the visitor has prefers-reduced-motion enabled.","b-blocks")})})]})},cC=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{buttons:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Button Style","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)("p",{className:"mb10",children:(0,l.jsx)("b",{children:"Show More Button"})}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i.showMore.padding,onChange:e=>n("styles",e,"buttons","showMore","padding")}),(0,l.jsx)(An,{value:i.showMore.bg,onChange:e=>n("styles",e,"buttons","showMore","bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.showMore.color,onChange:e=>n("styles",e,"buttons","showMore","color")}),(0,l.jsx)(Oa,{value:i.showMore.typo,onChange:e=>n("styles",e,"buttons","showMore","typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i.showMore.border,onChange:e=>n("styles",e,"buttons","showMore","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i.showMore.radius,onChange:e=>n("styles",e,"buttons","showMore","radius")}),(0,l.jsx)("p",{className:"mb10 mt10",children:(0,l.jsx)("b",{children:"Show Less Button"})}),(0,
406 +l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i.showLess.padding,onChange:e=>n("styles",e,"buttons","showLess","padding")}),(0,l.jsx)(An,{value:i.showLess.bg,onChange:e=>n("styles",e,"buttons","showLess","bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.showLess.color,onChange:e=>n("styles",e,"buttons","showLess","color")}),(0,l.jsx)(Oa,{value:i.showLess.typo,onChange:e=>n("styles",e,"buttons","showLess","typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i.showLess.border,onChange:e=>n("styles",e,"buttons","showLess","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i.showLess.radius,onChange:e=>n("styles",e,"buttons","showLess","radius")})]})},dC=e=>{const{attributes:t,updateObj:n}=e,{advanced:o}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:iC,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(lC,{...e}),"style"===t.name&&(0,l.jsx)(cC,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:o,onChange:e=>n("advanced",e)})]})})})},uC=({attributes:e,id:t,isBackend:n=!1})=>{const{styles:o,layout:i,buttons:a,advanced:s,animationDuration:r}=e,{buttons:c}=o,d=Number.isFinite(r)?r:300,u=i.fadeColor||"#ffffff",p=`#${t} .b-blocks-expand-content-wrapper`,h=`${p} .b-blocks-expand-content-innerBlocks`,g=`${p} .b-blocks-expand-content-toggle-button-container`,m=`${g} .b-blocks-expand-content-toggle-button`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n ${ps("",c.showMore.typo).googleFontLink}\n ${ps(`${m}.is-showMore`,c.showMore.typo).styles}\n\n ${ps("",c.showLess.typo).googleFontLink}\n ${ps(`${m}.is-showLess`,c.showLess.typo).styles}\n\n ${h}{\n transition: max-height ${d}ms ease-in-out;\n }\n\n ${h}.is-clamped{\n ${ns("max-height",i.previewHeight)}\n }\n\n ${h}.is-clamped::after{\n height: ${i.fadeHeight||"80px"};\n background: linear-gradient(to bottom, ${(e=>{const t=(e||"").trim(),n=t.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i);if(n)return`rgba(${n[1]}, ${n[2]}, ${n[3]}, 0)`;let o=t.replace("#","");return/^[0-9a-fA-F]{3,4}$/.test(o)&&(o=o.split("").map((e=>e+e)).join("")),/^[0-9a-fA-F]{6,8}$/.test(o)?`rgba(${parseInt(o.slice(0,2),16)}, ${parseInt(o.slice(2,4),16)}, ${parseInt(o.slice(4,6),16)}, 0)`:"rgba(0, 0, 0, 0)"})(u)} 0%, ${u} 100%);\n }\n\n ${m}.is-showMore{\n ${ns("padding",hs(c.showMore.padding))}\n ${os(c.showMore.bg)}\n ${as(c.showMore.border)}\n ${ns("border-radius",hs(c.showMore.radius))}\n ${ns("color",c.showMore.color)}\n }\n\n ${m}.is-showLess{\n ${ns("padding",hs(c.showLess.padding))}\n ${os(c.showLess.bg)}\n ${as(c.showLess.border)}\n ${ns("border-radius",hs(c.showLess.radius))}\n ${ns("color",c.showLess.color)}\n }\n\n ${g}{\n ${ns("justify-content",a.alignment)}\n }\n\n ${_s(t,s,n,!1)}\n\n `}})},pC=[["core/heading",{level:3,placeholder:(0,x.__)("Section heading...","b-blocks")}],["core/paragraph",{placeholder:(0,x.__)("Add the content that should always be visible here, then keep writing — anything past the preview height will be hidden behind a Show More button on the frontend.","b-blocks")}]];Pl(oC.name)&&(0,p.registerBlockType)(oC,{icon:hl,edit:({attributes:e,setAttributes:t,clientId:n})=>{const{buttons:o}=e,[i,a]=(0,Qa.useState)(!1),s=`block-${n}`,r=fe(e,t);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(dC,{attributes:e,setAttributes:t,updateObj:r}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(uC,{attributes:e,id:s,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"b-blocks-expand-content-wrapper",children:[(0,l.jsx)("div",{className:"b-blocks-expand-content-innerBlocks "+(i?"":"is-clamped"),children:(0,l.jsx)(h.InnerBlocks,{template:pC,templateLock:!1})}),(0,l.jsx)("div",{className:"b-blocks-expand-content-toggle-button-container",children:(0,l.jsx)("button",{type:"button",className:"b-blocks-expand-content-toggle-button "+(i?"is-showLess":"is-showMore"),"aria-disabled":"true",tabIndex:-1,onClick:()=>a((e=>!e)),children:i?o.showLess:o.showMore})})]})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const hC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/facebook-embed","version":"1.0.0","title":"Facebook Embed","category":"bBlocks","description":"Facebook Embed allows you to facebook posts, videos on your website or blog.","keywords":["facebook","embed","post"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"facebook":{"type":"object","default":{"alignment":"center","type":"post","url":{"post":"https://www.facebook.com/photo/?fbid=1113142977483877&set=a.520898976708283","video":"https://www.facebook.com/bPluginsLLC/videos/281067148325015"},"fullScreen":false,"autoPlay":false,"height":"100%","width":500,"caption":false,"fullPost":true}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","facebookEmbbed","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","facebookEmbbed"]}'),gC=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{
407 +d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),mC=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),bC=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",children:(0,l.jsx)("path",{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),fC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],xC=[{label:"Post",value:"post"},{label:"Video",value:"video"}],yC=[{label:"Left",value:"left",icon:gC},{label:"Center",value:"center",icon:mC},{label:"Right",value:"right",icon:bC}],vC=({attributes:e,updateObj:t,facebookKey:n})=>{const{facebook:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Embed","b-blocks"),initialOpen:!0,children:[!n&&(0,l.jsxs)(y.Notice,{className:"mb10",status:"warning",isDismissible:!1,children:["Set your Facebook App ID in the ",(0,l.jsx)("a",{href:`${location.origin}/wp-admin/admin.php?page=b-blocks#/settings`,target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("em",{children:"Settings"})})," to use this block."]}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:o.type,onChange:e=>t("facebook",e,"type"),options:xC}),(0,l.jsx)(y.__experimentalInputControl,{className:"mt10",label:(0,x.__)("URL","b-blocks"),labelPosition:"edge",value:o.url[o.type],onChange:e=>t("facebook",e,"url",o.type)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Full Post","b-blocks"),checked:o.fullPost,onChange:e=>t("facebook",e,"fullPost")}),"video"===o.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Caption","b-blocks"),checked:o.caption,onChange:e=>t("facebook",e,"caption")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Full Screen","b-blocks"),checked:o.fullScreen,onChange:e=>t("facebook",e,"fullScreen")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Auto Play","b-blocks"),checked:o.autoPlay,onChange:e=>t("facebook",e,"autoPlay")})]}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Width","b-blocks"),labelPosition:"edge",value:o.width,onChange:e=>t("facebook",e,"width"),min:1,max:1200,step:5}),(0,l.jsx)(Tn,{className:"mt10",value:o.alignment,isIcon:!0,label:(0,x.__)("Alignment","b-blocks"),options:yC,onChange:e=>t("facebook",e,"alignment")})]})},kC=({attributes:e,updateObj:t,isPremium:n,facebookKey:o})=>{const{advanced:i}=e;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:fC,onSelect:me,children:a=>(0,l.jsxs)(l.Fragment,{children:["general"===a.name&&(0,l.jsx)(vC,{attributes:e,updateObj:t,facebookKey:o}),"advanced"===a.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>t("advanced",e),isPremium:n})]})})})},wC=({attributes:e,id:t})=>{const{advanced:n}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${Cs(t,n)}\n\t`}})},_C=({attributes:e,facebookKey:t})=>{const{facebook:n}=e,o=`https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(n.url?.video||"")}&width=${n.width||"500"}&show_text=${n.fullPost}&show_captions=${n.caption}&autoplay=${n.autoPlay}&appId=${t}`,i=`https://www.facebook.com/plugins/post.php?href=${encodeURIComponent(n.url?.post||"")}&width=${n.width||"500"}&show_text=${n.fullPost}&appId=${t}`;return(0,l.jsxs)("div",{className:`b-blocks-facebookEmbed-wrapper ${n.alignment}`,children:["video"===n.type&&(0,l.jsx)("div",{className:"fb-video-container",children:(0,l.jsx)("iframe",{src:o,width:n.width||"500",height:"auto",style:{border:"none",overflow:"hidden",width:"100%",minHeight:"315px"},scrolling:"no",frameBorder:"0",allowFullScreen:n.fullScreen,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"})}),"post"===n.type&&(0,l.jsx)("div",{className:"fb-post-container",children:(0,l.jsx)("iframe",{src:i,width:n.width||"500",height:"auto",style:{border:"none",overflow:"hidden",width:"100%",minHeight:"500px"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"})})]})};Pl(hC.name)&&(0,p.registerBlockType)(hC,{icon:br,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,a]=(0,m.useState)(""),s=window.bBlocksCursorDataConfig?.nonce,{data:r,isLoading:c}=jd("bblocks_api_keys",{_wpnonce:s},!0),d=bBlocksPremiumChecker;(0,m.useEffect)((()=>{a(r?.facebook?.key)}),[r,c]);const u=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(kC,{attributes:t,updateObj:u,isPremium:d,facebookKey:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(wC,{attributes:t,id:`block-${o}`}),(0,l.jsx)(_C,{attributes:t,facebookKey:i})]})]})}})
408 +;const CC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/facebook-page","version":"1.0.0","title":"Facebook Page","category":"bBlocks","description":"The Facebook Page Block allows you to embed your Social Media on your WordPress website.","keywords":["facebook","page","embed"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"facebook":{"type":"object","default":{"appId":"","link":"https://www.facebook.com/bPluginsLLC","layout":["timeline"],"smallHeader":false,"coverPhoto":true,"profilePhotos":true,"ctaButton":true,"width":340,"height":500,"align":"center"}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","facebookPage","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","facebookPage"]}'),jC=({attributes:e,facebookKey:t})=>{const{facebook:n}=e,o=`https://www.facebook.com/plugins/page.php?href=${encodeURIComponent(n.link)}&tabs=${n.layout?.join(",")||"timeline"}&width=${n.width}&height=${n.height}&small_header=${n.smallHeader}&adapt_container_width=true&hide_cover=${!n.coverPhoto}&show_facepile=${n.profilePhotos}&hide_cta=${n.ctaButton}&appId=${t}`;return(0,l.jsx)("div",{className:`bBlocks-fbPage-wrapper ${n.align}`,children:(0,l.jsx)("div",{children:(0,l.jsx)("iframe",{src:o,width:n.width,height:n.height,scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share",title:"Facebook Page"})})})},$C=({attributes:e,id:t})=>{const{advanced:n}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:` \n\t\t\t${_s(t,n)}\n\t\t`}})},SC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],TC=[{label:"Left",value:"left",icon:gC},{label:"Center",value:"center",icon:mC},{label:"Right",value:"right",icon:bC}],NC=e=>{const{attributes:t,updateObj:n,facebookKey:o}=e,{facebook:i}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Items","b-blocks"),children:[!o&&(0,l.jsxs)(y.Notice,{className:"mb10",status:"warning",isDismissible:!1,children:["Set your Facebook App ID in the ",(0,l.jsx)("a",{href:`${location.origin}/wp-admin/admin.php?page=b-blocks#/settings`,target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("em",{children:"Settings"})})," to use this block."]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link","social-media-page-block"),value:i.link,onChange:e=>n("facebook",e,"link")}),(0,l.jsx)(v,{children:(0,x.__)("Layout","social-media-page-block")}),(0,l.jsx)(Ft,{value:i.layout,options:[{label:"Timeline",value:"timeline"},{label:"Events",value:"events"},{label:"Messages",value:"messages"}],onChange:e=>n("facebook",e,"layout")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Small Header","social-media-page-block"),checked:i.smallHeader,value:i.smallHeader,onChange:e=>n("facebook",e,"smallHeader")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Cover Photo","social-media-page-block"),checked:i.coverPhoto,value:i.coverPhoto,onChange:e=>n("facebook",e,"coverPhoto")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Profile Photos","social-media-page-block"),checked:i.profilePhotos,value:i.profilePhotos,onChange:e=>n("facebook",e,"profilePhotos")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Width","social-media-page-block"),value:i.width,onChange:e=>n("facebook",e,"width"),min:0,max:1e3}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Height","social-media-page-block"),value:i.height,onChange:e=>n("facebook",e,"height"),min:0,max:1e3}),(0,l.jsx)(Tn,{className:"mt10",value:i.align,isIcon:!0,label:(0,x.__)("Alignment","b-blocks"),options:TC,onChange:e=>n("facebook",e,"align")})]})]})},MC=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:SC,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(NC,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})})};Pl(CC.name)&&(0,p.registerBlockType)(CC,{icon:fr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,a]=(0,m.useState)(""),s=window.bBlocksCursorDataConfig?.nonce,{data:r,isLoading:c}=jd("bblocks_api_keys",{_wpnonce:s},!0),d=fe(t,n),u=bBlocksPremiumChecker;return(0,m.useEffect)((()=>{a(r?.facebook?.key)}),[r,c]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(MC,{attributes:t,setAttributes:n,updateObj:d,isPremium:u,facebookKey:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)($C,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(jC,{attributes:t,facebookKey:i},JSON.stringify(t.facebook))]})]})}})
409 +;const LC=JSON.parse('{"apiVersion":3,"name":"b-blocks/feature-boxes","title":"Feature Boxes","description":"Display Feature boxes section.","category":"bBlocks","keywords":["features","feature boxes","features section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"features":{"type":"array","default":[{"background":{"color":"#0000"},"isUpIcon":false,"icon":{"class":"fa-brands fa-wordpress","fontSize":120},"upIcon":{"id":null,"url":"","alt":"","title":""},"iconWidth":"120px","title":"Feature 1","titleColor":"#333","separator":{"width":"20%","height":"2px","style":"solid","color":"#bbb"},"desc":"This content area describes feature 1 descriptions or details.","descColor":"#333"},{"background":{"color":"#0000"},"isUpIcon":false,"icon":{"class":"fa-brands fa-wordpress","fontSize":120},"upIcon":{"id":null,"url":"","alt":"","title":""},"iconWidth":"120px","title":"Feature 2","titleColor":"#333","separator":{"width":"20%","height":"2px","style":"solid","color":"#bbb"},"desc":"This content area describes feature 2 descriptions or details.","descColor":"#333"},{"background":{"color":"#0000"},"isUpIcon":false,"icon":{"class":"fa-brands fa-wordpress","fontSize":120},"upIcon":{"id":null,"url":"","alt":"","title":""},"iconWidth":"120px","title":"Feature 3","titleColor":"#333","separator":{"width":"20%","height":"2px","style":"solid","color":"#bbb"},"desc":"This content area describes feature 3 descriptions or details.","descColor":"#333"}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"30px"},"rowGap":{"type":"string","default":"30px"},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"20px"}},"isIcon":{"type":"boolean","default":true},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"isTitle":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"20px","tablet":"18px","mobile":"16px"},"fontWeight":600}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isSep":{"type":"boolean","default":true},"sepMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px","tablet":"15px","mobile":"15px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),PC=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateFeature:n,activeIndex:o,setActiveIndex:i,device:a})=>{const{features:s=[],columns:r,columnGap:c,rowGap:d,textAlign:u,padding:p,isIcon:g,iconMargin:m,isTitle:b,titleTypo:f,titleMargin:k,isSep:w,sepMargin:C,isDesc:j,descTypo:$}=e,S=()=>{t({features:[...s,{background:{color:"#0000"},isUpIcon:!1,icon:{class:"fa fa-wordpress",fontSize:120},upIcon:{id:null,url:"",alt:"",title:""},iconWidth:"120px",title:`Feature ${s.length+1}`,titleColor:"#333",separator:{width:"20%",height:"2px",style:"solid",color:"#bbb"},desc:`This content area describes feature ${s.length+1} description/details.`,descColor:"#333"}]}),i(s.length)},{background:T={},isUpIcon:N=!1,icon:M={},upIcon:L={},iconWidth:P="",titleColor:E="",separator:A={},descColor:B=""}=s[o]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Features","b-blocks"),children:[null!==o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Feature No ${o+1}:`,"b-blocks")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:T,onChange:e=>n("background",e)}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:N,onChange:e=>n("isUpIcon",e)}),N?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:L,onChange:e=>n("upIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:P,onChange:e=>n("iconWidth",e),units:[Pe(),Ee(),Ae()]})]}):(0,l.jsx)(Un,{value:M,onChange:e=>n("icon",e),defaults:{class:"fa fa-wordpress",fontSize:120}})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:E,onChange:e=>n("titleColor",e),defaultColor:"#333"}),(0,l.jsx)(Ta,{value:A,onChange:e=>n("separator",e),defaults:{width:"20%"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:B,onChange:e=>n("descColor",e),defaultColor:"#333"}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<s?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{e.preventDefault(),t({features:[...s.slice(0,o),...s.slice(o+1)]}),i(0===o?0:o-1)},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{e.preventDefault(),t({features:[...s.slice(0,o),{...s[o]},...s.slice(o)]}),i(o+1)},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Feature","b-blocks"),onClick:S,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Feature","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:r[a],onChange:e=>{t({columns:{...r,[a]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(ad,{label:(0,x.__)("Padding:","b-blocks"),value:p,onChange:e=>t({padding:e}),defaults:{vertical:"50px",horizontal:"20px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:g,onChange:e=>t({isIcon:e})}),g&&(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:m,onChange:e=>t({iconMargin:e}),defaults:{side:4,bottom:"20px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:b,onChange:e=>t({isTitle:e})}),b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Oa,{value:f,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:20,tablet:18,mobile:16},fontWeight:600}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:k,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:w,onChange:e=>t({isSep:e})}),w&&(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>t({sepMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{
410 +className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:j,onChange:e=>t({isDesc:e})}),j&&(0,l.jsx)(Oa,{value:$,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Feature","b-blocks"),onClick:S,children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:u,onChange:e=>t({textAlign:e})})]})]})})),EC="bBlocksFeatureBoxes",AC=({attributes:e,id:t})=>{const{features:n=[],columnGap:o,rowGap:i,textAlign:a,padding:s,iconMargin:r,titleTypo:c,titleMargin:d,sepMargin:u,descTypo:p}=e,h=`#${t}`,g=`${h} .${EC}`,m=`${g} .feature`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",c)?.googleFontLink}\n\t\t${ps("",p)?.googleFontLink}\n\t\t${ps(`${m} .featureTitle`,c)?.styles}\n\t\t${ps(`${m} .featureDescription`,p)?.styles}\n\n\t\t${g}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t}\n\t\t${m}{\n\t\t\ttext-align: ${a};\n\t\t\tpadding: ${us(s)};\n\t\t}\n\t\t${m} .featureIcon{\n\t\t\tmargin: ${us(r)};\n\t\t}\n\t\t${m} .featureTitle{\n\t\t\tmargin: ${us(d)};\n\t\t}\n\t\t${m} .featureSeparator{\n\t\t\tmargin: ${us(u)};\n\t\t}\n\n\t\t${n.map(((e,t)=>{const{background:n,icon:o,iconWidth:i,titleColor:a,separator:s,descColor:r}=e,l=`${h} #feature-${t}`;return`\n\t\t\t\t${l}{\n\t\t\t\t\t${os(n)}\n\t\t\t\t}\n\t\t\t\t${l} .featureIcon i{\n\t\t\t\t\t${rs(o)}\n\t\t\t\t}\n\t\t\t\t${l} .featureIcon img{\n\t\t\t\t\twidth: ${i};\n\t\t\t\t}\n\t\t\t\t${l} .featureTitle{\n\t\t\t\t\tcolor: ${a};\n\t\t\t\t}\n\t\t\t\t${l} .featureSeparator{\n\t\t\t\t\t${cs(s)}\n\t\t\t\t}\n\t\t\t\t${l} .featureDescription{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})};Pl(LC.name)&&(0,p.registerBlockType)(LC,{icon:xr,edit:({attributes:e,setAttributes:t,clientId:n})=>{const{features:o=[],columns:i,isIcon:a,isTitle:s,isSep:r,isDesc:c}=e,[d,u]=(0,m.useState)(0),p=(e,n)=>{const i=zb(o,(t=>{t[d][e]=n}));t({features:i})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(PC,{attributes:e,setAttributes:t,updateFeature:p,activeIndex:d,setActiveIndex:u}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(AC,{attributes:e,id:`block-${n}`}),(0,l.jsx)("div",{className:`${EC} columns-${i.desktop} columns-tablet-${i.tablet} columns-mobile-${i.mobile}`,children:o.map(((e,t)=>{const{isUpIcon:n,icon:o,upIcon:i,title:g,desc:m}=e;return(0,l.jsxs)("div",{onClick:()=>u(t),className:"feature "+(t===d?"bPlNowEditing":""),id:`feature-${t}`,children:[a&&(0,l.jsx)("div",{className:"featureIcon",children:n?(0,l.jsx)("img",{className:i?.id?`wp-image-${i?.id}`:null,src:i?.url,alt:i?.alt}):o?.class&&(0,l.jsx)("i",{className:o?.class})}),(0,l.jsxs)("div",{className:"featureDetails",children:[s&&(0,l.jsx)(h.RichText,{className:"featureTitle",tagName:"h4",value:g,onChange:e=>p("title",e),placeholder:(0,x.__)("Feature title","b-blocks"),inlineToolbar:!0}),r&&(0,l.jsx)("span",{className:"featureSeparator"}),c&&(0,l.jsx)(h.RichText,{className:"featureDescription",tagName:"p",value:m,onChange:e=>p("desc",e),placeholder:(0,x.__)("Description of the feature","b-blocks"),inlineToolbar:!0})]})]},t)}))})]})]})},save:()=>null})
411 +;const BC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/file-download-card","title":"File Download Card","category":"bBlocks","description":"A single-file download card with a file-type badge, title, size, and download button.","keywords":["download","file","pdf","ebook","zip","document","attachment","button"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"file":{"type":"object","default":{"id":0,"url":"","name":"","type":"","size":"","buttonLabel":"Download","openNewTab":false,"showFileType":true,"showFileSize":true}},"content":{"type":"object","default":{"title":"","description":""}},"layout":{"type":"object","default":{"type":"horizontal"}},"icon":{"type":"object","default":{"style":"filled","bg":{},"color":"#2563eb","border":{"color":"#2563eb","style":"solid","width":"2px"},"size":48,"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"title":{"type":"object","default":{"color":"#111827","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":"600"},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"description":{"type":"object","default":{"color":"#6b7280","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"meta":{"type":"object","default":{"color":"#9ca3af","bg":{"type":"solid","color":""},"typo":{"fontSize":{"desktop":"12px","tablet":"","mobile":""}},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"button":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#2563eb"},"color":"#ffffff","border":{},"padding":{"desktop":{"top":"10px","right":"20px","bottom":"10px","left":"20px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{"type":"solid","color":""},"color":"","border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"typo":{"fontSize":{"desktop":"14px","tablet":"","mobile":""},"fontWeight":"600"},"transition":0.2}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"20px","right":"25px","bottom":"20px","left":"25px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"5px","spreed":"0px","color":"rgba(113, 144, 176, 0.43)","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 0)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),IC=({attributes:e,id:o,isBackend:i=!1})=>{
412 +const{icon:a={},title:s={},description:r={},meta:c={},button:d={},advanced:u}=e,p=parseInt(a.size,10)||48,h=`#${o} .b-blocks-file-download-card`,g=`${h} .b-blocks-file-download-card-badge`,m=`${h} .b-blocks-file-download-card-title`,b=`${h} .b-blocks-file-download-card-desc`,f=`${h} .b-blocks-file-download-card-meta`,x=`${h} .b-blocks-file-download-card-btn`,y=(e,t,n)=>ns(e,hs(t?.[n])),v=e=>`\n\t\t${g}{ ${y("padding",a.padding,e)} ${y("margin",a.margin,e)} ${y("border-radius",a.radius,e)} }\n\t\t${m}{ ${y("padding",s.padding,e)} ${y("margin",s.margin,e)} ${y("border-radius",s.borderRadius,e)} }\n\t\t${b}{ ${y("padding",r.padding,e)} ${y("margin",r.margin,e)} ${y("border-radius",r.borderRadius,e)} }\n\t\t${f}{ ${y("padding",c.padding,e)} ${y("margin",c.margin,e)} ${y("border-radius",c.borderRadius,e)} }\n\t\t${x}{ ${y("padding",d.normal?.padding,e)} ${y("margin",d.normal?.margin,e)} ${y("border-radius",d.normal?.radius,e)} }\n\t\t${x}:hover, ${x}:focus-visible{ ${y("padding",d.hover?.padding,e)} ${y("margin",d.hover?.margin,e)} ${y("border-radius",d.hover?.radius,e)} }\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",s.typo).googleFontLink}\n\t\t\t${ps("",r.typo).googleFontLink}\n\t\t\t${ps("",c.typo).googleFontLink}\n\t\t\t${ps("",d.typo).googleFontLink}\n\t\t\t${g}{\n\t\t\t\twidth:${p}px;\n\t\t\t\theight:${p}px;\n\t\t\t\tfont-size:${Math.round(.28*p)}px;\n\t\t\t\t${os(a.bg)}\n\t\t\t\t${ns("color",a.color)}\n\t\t\t\t${is(a.border)}\n\t\t\t}\n\t\t\t${m}{\n\t\t\t\t${ns("color",s.color)}\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${is(s.border)}\n\t\t\t}\n\t\t\t${ps(m,s.typo).styles}\n\t\t\t${b}{\n\t\t\t\t${ns("color",r.color)}\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${is(r.border)}\n\t\t\t}\n\t\t\t${ps(b,r.typo).styles}\n\t\t\t${f}{\n\t\t\t\t${ns("color",c.color)}\n\t\t\t\t${os(c.bg)}\n\t\t\t\t${is(c.border)}\n\t\t\t}\n\t\t\t${ps(f,c.typo).styles}\n\t\t\t${x}{\n\t\t\t\t${os(d.normal?.bg)}\n\t\t\t\t${ns("color",d.normal?.color)}\n\t\t\t\t${is(d.normal?.border)}\n\t\t\t\ttransition:all ${d.transition??.2}s ease;\n\t\t\t}\n\t\t\t${ps(x,d.typo).styles}\n\t\t\t${x}:hover, ${x}:focus-visible{\n\t\t\t\t${os(d.hover?.bg)}\n\t\t\t\t${ns("color",d.hover?.color)}\n\t\t\t\t${is(d.hover?.border)}\n\t\t\t}\n\t\t\t${v("desktop")}\n\t\t\t${t}{ ${v("tablet")} }\n\t\t\t${n}{ ${v("mobile")} }\n\t\t\t${_s(o,u,i,!1)}\n\t\t\t`}})},OC=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],RC={top:"",right:"",bottom:"",left:""},zC=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],DC=[{label:(0,x.__)("Horizontal (icon left)","b-blocks"),value:"horizontal"},{label:(0,x.__)("Vertical (icon top)","b-blocks"),value:"vertical"}],FC=[{label:(0,x.__)("Filled","b-blocks"),value:"filled"},{label:(0,x.__)("Outline","b-blocks"),value:"outline"}],HC={"application/pdf":"PDF","application/zip":"ZIP","application/x-zip-compressed":"ZIP","application/x-rar-compressed":"RAR","application/x-7z-compressed":"7Z","application/gzip":"GZ","application/msword":"DOC","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"DOC","application/vnd.ms-excel":"XLS","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"XLS","application/vnd.ms-powerpoint":"PPT","application/vnd.openxmlformats-officedocument.presentationml.presentation":"PPT","application/json":"JSON","application/rtf":"RTF","application/epub+zip":"EPUB","text/plain":"TXT","text/csv":"CSV","text/html":"HTML","image/png":"PNG","image/jpeg":"JPG","image/gif":"GIF","image/webp":"WEBP","image/svg+xml":"SVG","audio/mpeg":"MP3","audio/wav":"WAV","audio/ogg":"OGG","video/mp4":"MP4","video/quicktime":"MOV","video/webm":"WEBM"},WC=(e,t)=>{const n=(e||"").toLowerCase().trim();if(n&&HC[n])return HC[n];const o=(t||"").split("?")[0].split("#")[0],i=o.lastIndexOf(".");if(i>-1){const e=o.slice(i+1).toUpperCase();if(/^[A-Z0-9]{1,5}$/.test(e))return e}return"FILE"},UC=({attributes:e,updateObj:t,setAttributes:n})=>{const{file:o={},content:i={},layout:a={},icon:s={}}=e,{id:r,url:c,name:d,type:u,size:p,buttonLabel:g,openNewTab:m,showFileType:b=!0,showFileSize:f=!0}=o,v=c?WC(u,c):"";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("File","b-blocks"),initialOpen:!0,children:[c?(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10,padding:"8px 10px",background:"#f0f0f1",borderRadius:6},children:[(0,l.jsx)("strong",{style:{fontSize:11},children:v}),(0,l.jsx)("span",{style:{fontSize:12,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d||c})]}):null,(0,l.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:12},children:[(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{value:r||0,onSelect:e=>{n({file:{...o,id:e?.id||0,url:e?.url||"",name:e?.title||e?.filename||"",type:e?.mime||"",size:e?.filesizeHumanReadable||""}})},render:({open:e})=>(0,l.jsx)(y.Button,{variant:"secondary",onClick:e,children:c?(0,x.__)("Replace File","b-blocks"):(0,x.__)("Select File","b-blocks")})})}),c&&(0,l.jsx)(y.Button,{variant:"link",isDestructive:!0,onClick:()=>n({file:{...o,id:0,url:"",name:"",type:"",size:""}}),children:(0,x.__)("Remove","b-blocks")})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Or enter file URL","b-blocks"),value:r?"":c||"",onChange:e=>n({file:{...o,url:e,id:0}}),type:"url",placeholder:"https://",help:r?(0,x.__)("Using a media-library file. Remove it to enter an external URL.","b-blocks"):(0,x.__)("Use for files hosted outside the media library.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Card title","b-blocks"),value:i.title||"",onChange:e=>t("content",e,"title"),placeholder:d||(0,x.__)("Auto-uses file name","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Description","b-blocks"),value:i.description||"",onChange:e=>t("content",e,"description"),placeholder:(0,x.__)("Optional short description","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button label","b-blocks"),value:g||"",onChange:e=>t("file",e,"buttonLabel"),placeholder:(0,x.__)("Download","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("File size (override)","b-blocks"),value:p||"",onChange:e=>t("file",e,"size"),placeholder:"e.g. 2.4 MB",help:r?(0,x.__)("Auto-detected from the media library on the front end.","b-blocks"):(0,x.__)("Shown for external URLs (not auto-detected).","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Open in new tab","b-blocks"),checked:!!m,onChange:e=>t("file",!!e,"openNewTab")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show file type badge","b-blocks"),checked:!!b,onChange:e=>t("file",!!e,"showFileType")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show file size","b-blocks"),checked:!!f,onChange:e=>t("file",!!e,"showFileSize")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Layout","b-blocks"),labelPosition:"edge",value:a.type||"horizontal",options:DC,onChange:e=>t("layout",e,"type"),__nextHasNoMarginBottom:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Badge","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Style","b-blocks"),value:s.style||"filled",options:FC,onChange:e=>t("icon",e,"style"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Badge Size","b-blocks"),value:parseInt(s.size,10)||48,onChange:e=>t("icon",e,"size"),min:32,max:96,__nextHasNoMarginBottom:!0})]})]})},GC=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,
413 +m.useState)("normal"),{icon:a={},title:s={},description:r={},meta:c={},button:d={}}=e,u=d[o]||{},p=(e,o,i,a,s)=>(0,l.jsx)(k,{className:s,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:OC,values:a?.[n],resetValues:RC,onChange:e=>t(o,e,i,n)}),h=(e,i,a,s)=>(0,l.jsx)(k,{className:s,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:OC,values:a?.[n],resetValues:RC,onChange:e=>t("button",e,o,i,n)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Badge","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:a.bg,onChange:e=>t("icon",e,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Icon / Text Color:","b-blocks"),value:a.color,onChange:e=>t("icon",e,"color"),defaultColor:"#2563eb"}),p((0,x.__)("Padding","b-blocks"),"icon","padding",a.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"icon","margin",a.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("icon",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Corner Radius","b-blocks"),"icon","radius",a.radius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:s.color||"#111827",onChange:e=>t("title",e,"color"),defaultColor:"#111827"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:s.bg,onChange:e=>t("title",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typo,onChange:e=>t("title",e,"typo")}),p((0,x.__)("Padding","b-blocks"),"title","padding",s.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"title","margin",s.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("title",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Border Radius","b-blocks"),"title","borderRadius",s.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:r.color||"#6b7280",onChange:e=>t("description",e,"color"),defaultColor:"#6b7280"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:r.bg,onChange:e=>t("description",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.typo,onChange:e=>t("description",e,"typo")}),p((0,x.__)("Padding","b-blocks"),"description","padding",r.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"description","margin",r.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>t("description",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Border Radius","b-blocks"),"description","borderRadius",r.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:c.color||"#9ca3af",onChange:e=>t("meta",e,"color"),defaultColor:"#9ca3af"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:c.bg,onChange:e=>t("meta",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:c.typo,onChange:e=>t("meta",e,"typo")}),p((0,x.__)("Padding","b-blocks"),"meta","padding",c.padding,"mt10"),p((0,x.__)("Margin","b-blocks"),"meta","margin",c.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:c.border,onChange:e=>t("meta",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),p((0,x.__)("Border Radius","b-blocks"),"meta","borderRadius",c.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:d.typo,onChange:e=>t("button",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:u.bg,onChange:e=>t("button",e,o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:u.color||"",onChange:e=>t("button",e,o,"color"),defaultColor:"#ffffff"}),h((0,x.__)("Padding","b-blocks"),"padding",u.padding,"mt10"),h((0,x.__)("Margin","b-blocks"),"margin",u.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:u.border,onChange:e=>t("button",e||{},o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),h((0,x.__)("Border Radius","b-blocks"),"radius",u.radius),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:d.transition??.2,onChange:e=>t("button",e,"transition"),min:0,max:5,step:.01,__nextHasNoMarginBottom:!0})]})]})},VC=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:zC,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(UC,{...e}),"style"===t.name&&(0,l.jsx)(GC,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},qC=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{file:i={},content:a={},layout:s={},icon:r={}}=t,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,d=fe(t,n),{url:u,id:p,name:g,type:m,size:b,buttonLabel:f,showFileType:v=!0,showFileSize:k=!0}=i,w=e=>{n({file:{...i,id:e?.id||0,url:e?.url||"",name:e?.title||e?.filename||"",type:e?.mime||"",size:e?.filesizeHumanReadable||""}})},_=u?WC(m,u):"FILE",C=!(!b||!String(b).trim()),j=v&&_||k&&C,$=["b-blocks-file-download-card",`b-blocks-file-download-card--${s.type||"horizontal"}`,`b-blocks-file-download-card--icon-${r.style||"filled"}`].join(" "),S=(0,h.useBlockProps)({id:`block-${o}`});return u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(VC,{...e,updateObj:d,isPremium:c}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(h.MediaUpload,{value:p||0,onSelect:w,render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{icon:"media-document",label:(0,x.__)("Replace file","b-blocks"),onClick:e})})})}),(0,l.jsxs)(y.ToolbarGroup,{children:[(0,l.jsx)(y.ToolbarButton,{icon:"align-pull-left",label:(0,x.__)("Horizontal layout","b-blocks"),isPressed:"horizontal"===(s.type||"horizontal"),onClick:()=>d("layout","horizontal","type")}),(0,l.jsx)(y.ToolbarButton,{icon:"editor-insertmore",label:(0,x.__)("Vertical layout","b-blocks"),isPressed:"vertical"===s.type,onClick:()=>d("layout","vertical","type")})]})]}),(0,l.jsxs)("div",{...S,children:[(0,l.jsx)(IC,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:$,children:(0,l.jsxs)("article",{className:"b-blocks-file-download-card-card",children:[(0,l.jsx)("span",{className:"b-blocks-file-download-card-badge","aria-hidden":"true",children:_}),(0,l.jsxs)("div",{className:"b-blocks-file-download-card-body",children:[(0,l.jsx)(h.RichText,{tagName:"h3",className:"b-blocks-file-download-card-title",value:a.title,onChange:e=>d("content",e,"title"),placeholder:g||(0,x.__)("Card title…","b-blocks"),allowedFormats:[]}),(0,l.jsx)(h.RichText,{tagName:"p",className:"b-blocks-file-download-card-desc",value:a.description,onChange:e=>d("content",e,"description"),placeholder:(0,x.__)("Optional short description","b-blocks"),allowedFormats:[]}),j?(0,
414 +l.jsxs)("p",{className:"b-blocks-file-download-card-meta",children:[v&&_?(0,l.jsx)("span",{className:"b-blocks-file-download-card-meta-type",children:_}):null,v&&_&&k&&C?(0,l.jsx)("span",{className:"b-blocks-file-download-card-meta-sep",children:"·"}):null,k&&C?(0,l.jsx)("span",{className:"b-blocks-file-download-card-meta-size",children:b}):null]}):null]}),(0,l.jsx)("div",{className:"b-blocks-file-download-card-action",children:(0,l.jsxs)("span",{className:"b-blocks-file-download-card-btn",children:[(0,l.jsx)("svg",{className:"b-blocks-file-download-card-btn-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M5 21h14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,l.jsx)("span",{className:"b-blocks-file-download-card-btn-label",children:f||(0,x.__)("Download","b-blocks")})]})})]})})})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(VC,{...e,updateObj:d,isPremium:c}),(0,l.jsx)("div",{...S,children:(0,l.jsx)("div",{children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{value:p||0,onSelect:w,render:({open:e})=>(0,l.jsxs)("button",{type:"button",className:"b-blocks-file-download-card-placeholder",onClick:e,children:[(0,l.jsx)("span",{className:"b-blocks-file-download-card-placeholder-icon",children:(0,x.__)("FILE","b-blocks")}),(0,l.jsx)("span",{children:(0,x.__)("Select a file from the media library to create a download card.","b-blocks")})]})})})})})]})}));Pl(BC.name)&&(0,p.registerBlockType)(BC,{icon:jl,edit:qC,save:()=>null});const YC=JSON.parse('{"apiVersion":3,"name":"b-blocks/flip-boxes","title":"Flip Boxes","description":"Display Flip boxes section.","category":"bBlocks","keywords":["flip","flip boxes","flip boxes section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"boxes":{"type":"array","default":[{"frontBG":{"type":"solid","color":"#000000b3"},"backBG":{"type":"solid","color":"#000000b3"},"border":{"solid":"solid"},"shadow":{"type":"box"},"isFrontUpIcon":false,"frontIcon":{"class":"fa fa-sync-alt","fontSize":70,"color":"#fff"},"upFrontIcon":{"id":null,"url":"","alt":"","title":""},"frontIconWidth":"70px","isBackUpIcon":false,"backIcon":{"class":"fa-brands fa-wordpress","fontSize":70,"color":"#fff"},"upBackIcon":{"id":null,"url":"","alt":"","title":""},"backIconWidth":"70px","frontTitle":"Front Title 1","frontTitleColor":"#fff","backTitle":"Back Title 1","backTitleColor":"#fff","desc":"This content area describes flip box 1 descriptions/details.","descColor":"#fff","btn":"Button 1","btnLink":"#","btnBorder":{"radius":"3px"},"btnColors":{"color":"#fff","bg":"#ff4500"},"btnHovColors":{"color":"#fff","bg":"#ff7500"},"direction":"right"},{"frontBG":{"type":"solid","color":"#000000b3"},"backBG":{"type":"solid","color":"#000000b3"},"border":{"solid":"solid"},"shadow":{"type":"box"},"isFrontUpIcon":false,"frontIcon":{"class":"fa fa-sync-alt","fontSize":70,"color":"#fff"},"upFrontIcon":{"id":null,"url":"","alt":"","title":""},"frontIconWidth":"70px","isBackUpIcon":false,"backIcon":{"class":"fa-brands fa-wordpress","fontSize":70,"color":"#fff"},"upBackIcon":{"id":null,"url":"","alt":"","title":""},"backIconWidth":"70px","frontTitle":"Front Title 2","frontTitleColor":"#fff","backTitle":"Back Title 2","backTitleColor":"#fff","desc":"This content area describes flip box 2 descriptions/details.","descColor":"#fff","btn":"Button 2","btnLink":"#","btnBorder":{"radius":"3px"},"btnColors":{"color":"#fff","bg":"#ff4500"},"btnHovColors":{"color":"#fff","bg":"#ff7500"},"direction":"right"},{"frontBG":{"type":"solid","color":"#000000b3"},"backBG":{"type":"solid","color":"#000000b3"},"border":{"solid":"solid"},"shadow":{"type":"box"},"isFrontUpIcon":false,"frontIcon":{"class":"fa fa-sync-alt","fontSize":70,"color":"#fff"},"upFrontIcon":{"id":null,"url":"","alt":"","title":""},"frontIconWidth":"70px","isBackUpIcon":false,"backIcon":{"class":"fa-brands fa-wordpress","fontSize":70,"color":"#fff"},"upBackIcon":{"id":null,"url":"","alt":"","title":""},"backIconWidth":"70px","frontTitle":"Front Title 3","frontTitleColor":"#fff","backTitle":"Back Title 3","backTitleColor":"#fff","desc":"This content area describes flip box 3 descriptions/details.","descColor":"#fff","btn":"Button 3","btnLink":"#","btnBorder":{"radius":"3px"},"btnColors":{"color":"#fff","bg":"#ff4500"},"btnHovColors":{"color":"#fff","bg":"#ff7500"},"direction":"right"}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"40px"},"rowGap":{"type":"string","default":"30px"},"boxHeight":{"type":"string","default":"400px"},"textAlign":{"type":"string","default":"center"},"boxPadding":{"type":"object","default":{"vertical":"30px","horizontal":"25px"}},"isIcon":{"type":"boolean","default":true},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"isBtn":{"type":"boolean","default":true},"isLinkNewTab":{"type":"boolean","default":true},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"btnPadding":{"type":"object","default":{"vertical":"15px","horizontal":"25px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),KC=[{name:"front",title:(0,x.__)("Front","b-blocks")},{name:"back",title:(0,x.__)("Back","b-blocks")}],QC=e=>{const{attributes:t,setAttributes:n,index:o}=e,{boxes:i=[],isIcon:a}=t,{frontBG:s={},backBG:r={},border:c={},shadow:d={},isFrontUpIcon:u=!1,frontIcon:p={},upFrontIcon:h={},frontIconWidth:g="70px",isBackUpIcon:m=!1,backIcon:b={},upBackIcon:f={},backIconWidth:k="70px",frontTitle:w="",frontTitleColor:_="",backTitle:C="",backTitleColor:j="",desc:$="",descColor:S="",btn:T="",btnLink:N="",btnBorder:M={},btnColors:L={},btnHovColors:P={}}=i?.[o]||{},E=(e,i)=>{fe(t,n)("boxes",i,o,e)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",gap:10,children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o].direction,onChange:e=>E("direction",e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:"arrow-right-alt"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"bottom",icon:"arrow-down-alt"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:"arrow-left-alt"}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"top",icon:"arrow-up-alt"})]})]}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:c,onChange:e=>E("border",e)}),(0,l.jsx)(id,{label:(0,x.__)("Shadow:","b-blocks"),value:d,onChange:e=>E("shadow",e)}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:KC,children:e=>(0,l.jsxs)(l.Fragment,{children:["front"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Front Box","b-blocks"),children:(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:s,onChange:e=>E("frontBG",e)})}),a&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Front Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:u,onChange:e=>E("isFrontUpIcon",e)}),u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,
415 +x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:h,onChange:e=>E("upFrontIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:g,onChange:e=>E("frontIconWidth",e),units:[Pe(),Ee(),Ae()]})]}):(0,l.jsx)(Un,{value:p,onChange:e=>E("frontIcon",e),defaults:{class:"fa fa-sync-alt",fontSize:70,color:"#fff"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Front Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:w,onChange:e=>E("frontTitle",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:_,onChange:e=>E("frontTitleColor",e),defaultColor:"#fff"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:$,onChange:e=>E("desc",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:S,onChange:e=>E("descColor",e),defaultColor:"#fff"})]})]}),"back"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Back Box","b-blocks"),children:(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:r,onChange:e=>E("backBG",e)})}),a&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Back Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Upload Icon?","b-blocks"),checked:m,onChange:e=>E("isBackUpIcon",e)}),m?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:f,onChange:e=>E("upBackIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:k,onChange:e=>E("backIconWidth",e),units:[Pe(),Ee(),Ae()]})]}):(0,l.jsx)(Un,{value:b,onChange:e=>E("backIcon",e),defaults:{class:"fa fa-wordpress",fontSize:70,color:"#fff"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Back Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:C,onChange:e=>E("backTitle",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:j,onChange:e=>E("backTitleColor",e),defaultColor:"#fff"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:T,onChange:e=>E("btn",e)}),(0,l.jsx)(v,{children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:N,onChange:e=>E("btnLink",e)}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:M,onChange:e=>E("btnBorder",e),defaults:{radius:"3px"}}),(0,l.jsx)(On,{value:L,onChange:e=>E("btnColors",e),defaults:{color:"#fff",bg:"#ff4500"}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:P,onChange:e=>E("btnHovColors",e),defaults:{color:"#fff",bg:"#ff7500"}})]})]})]})})]})},ZC=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,isPremium:i,device:a})=>{const{boxes:s=[],columns:r,columnGap:c,rowGap:d,boxHeight:u,textAlign:p,boxPadding:g,isIcon:m,iconMargin:b,titleTypo:f,titleMargin:k,isDesc:w,descTypo:C,isBtn:j,isLinkNewTab:$,btnTypo:S,btnPadding:T}=e,N={frontBG:{type:"solid",color:"#000000b3"},backBG:{type:"solid",color:"#000000b3"},border:{},shadow:{},frontIcon:{class:"fa fa-sync-alt",fontSize:70,color:"#fff"},backIcon:{class:"fa-brands fa-wordpress",fontSize:70,color:"#fff"},frontTitle:`Front Title ${s.length+1}`,frontTitleColor:"#fff",backTitle:`Back Title ${s.length+1}`,backTitleColor:"#fff",desc:`This content area describes flip box ${s.length+1} descriptions/details.`,descColor:"#fff",btn:`Button ${s.length+1}`,btnLink:"#",btnBorder:{radius:"3px"},btnColors:{color:"#fff",bg:"#ff4500"},btnHovColors:{color:"#fff",bg:"#ff7500"}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:s=>(0,l.jsxs)(l.Fragment,{children:["general"==s.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Boxes","b-blocks"),children:[(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,arrKey:"boxes",minItem:1,ItemSettings:QC,itemLabel:"Flip Box",newItem:N,title:"frontTitle",design:i?"sortable":"single"}),!i&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:r[a],onChange:e=>{t({columns:{...r,[a]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:m,onChange:e=>t({isIcon:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Description","b-blocks"),checked:w,onChange:e=>t({isDesc:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Button","b-blocks"),checked:j,onChange:e=>t({isBtn:e})}),j&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Link in New Tab","b-blocks"),checked:$,onChange:e=>t({isLinkNewTab:e})})]})]}),"style"==s.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Box","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({boxHeight:e}),units:[Pe(),Ae()]}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:g,onChange:e=>t({boxPadding:e}),defaults:{vertical:"30px",horizontal:"25px"}})]}),m&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:(0,l.jsx)(ad,{label:(0,x.__)("Margin:","b-blocks"),value:b,onChange:e=>t({iconMargin:e}),defaults:{side:4,bottom:"20px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:f,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}}),f&&(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:k,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"20px"}})]}),w&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Oa,{value:C,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}})}),j&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:S,onChange:e=>t({btnTypo:e}),defaults:{fontSize:{desktop:20,tablet:18,mobile:16}}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:T,onChange:e=>t({btnPadding:e}),defaults:{vertical:"15px",horizontal:"25px"}})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,
416 +l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Box","b-blocks"),onClick:()=>t({boxes:[...s,N]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:p,onChange:e=>t({textAlign:e})})]})]})})),XC="bBlocksFlipBoxes",JC=({attributes:e,id:t})=>{const{boxes:n,columnGap:o,rowGap:i,boxHeight:a,textAlign:s,boxPadding:r,iconMargin:c,titleTypo:d,titleMargin:u,descTypo:p,btnTypo:h,btnPadding:g}=e,m=`#${t}`,b=`${m} .flipBox`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",d)?.googleFontLink}\n\t\t${ps("",p)?.googleFontLink}\n\t\t${ps("",h)?.googleFontLink}\n\t\t${ps(`${b} .flipTitle`,d)?.styles}\n\t\t${ps(`${b} .flipDescription`,p)?.styles}\n\t\t${ps(`${b} .flipBtn`,h)?.styles}\n\n\t\t${m} .${XC}{ grid-gap: ${i} ${o}; }\n\t\t${b}{\n\t\t\theight: ${a};\n\t\t}\n\t\t${b} .box{\n\t\t\ttext-align: ${s};\n\t\t\tpadding: ${us(r)};\n\t\t}\n\t\t${b} i.flipIcon{\n\t\t\tmargin: ${us(c)};\n\t\t}\n\t\t${b} .flipTitle{\n\t\t\tmargin: ${us(u)};\n\t\t}\n\t\t${b} .flipBtn{\n\t\t\tpadding: ${us(g)};\n\t\t}\n\t\t\t\n\t\t${n.map(((e,t)=>{const{frontBG:n,backBG:o,border:i,shadow:a,frontIcon:s={},frontIconWidth:r="70px",backIcon:l={},backIconWidth:c="70px",frontTitleColor:d,backTitleColor:u,descColor:p,btnBorder:h,btnColors:g,btnHovColors:b}=e,f=`${m} #flipBox-${t}`;return`\n\t\t\t\t${f} .box{\n\t\t\t\t\t${is(i)}\n\t\t\t\t\tbox-shadow: ${ds(a)};\n\t\t\t\t}\n\t\t\t\t${f} .box.front{\n\t\t\t\t\t${os(n)}\n\t\t\t\t}\n\t\t\t\t${f} .box.back{\n\t\t\t\t\t${os(o)}\n\t\t\t\t}\n\t\t\t\t${f} img.flipIcon.frontIcon{\n\t\t\t\t\twidth: ${r};\n\t\t\t\t}\n\t\t\t\t${f} i.flipIcon.frontIcon{\n\t\t\t\t\t${rs(s)}\n\t\t\t\t}\n\t\t\t\t${f} img.flipIcon.backIcon{\n\t\t\t\t\twidth: ${c};\n\t\t\t\t}\n\t\t\t\t${f} i.flipIcon.backIcon{\n\t\t\t\t\t${rs(l)}\n\t\t\t\t}\n\t\t\t\t${f} .flipTitle.flipFrontTitle{\n\t\t\t\t\tcolor: ${d};\n\t\t\t\t}\n\t\t\t\t${f} .flipTitle.flipBackTitle{\n\t\t\t\t\tcolor: ${u};\n\t\t\t\t}\n\t\t\t\t${f} .flipDescription{\n\t\t\t\t\tcolor: ${p};\n\t\t\t\t}\n\t\t\t\t${f} .flipBtn{\n\t\t\t\t\t${ss(g)}\n\t\t\t\t\t${is(h)}\n\t\t\t\t}\n\t\t\t\t${f} .flipBtn:hover{\n\t\t\t\t\t${ss(b)}\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},ej=({attributes:e,isBackend:t=!1,custom:n})=>{const{boxes:o,columns:i,isIcon:a,isDesc:s,isBtn:r,isLinkNewTab:c}=e;return(0,l.jsx)("div",{className:`${XC} columns-${i.desktop} columns-tablet-${i.tablet} columns-mobile-${i.mobile}`,children:o.map(((e,o)=>{const{isFrontUpIcon:i=!1,frontIcon:d={},upFrontIcon:u={},isBackUpIcon:p=!1,backIcon:h={},upBackIcon:g={},frontTitle:m,backTitle:b,desc:f,btn:x,btnLink:y,direction:v="right"}=e;return(0,l.jsxs)("div",{onClick:()=>t&&n.setActiveIndex(o),className:"flipBox "+(t&&o===n.activeIndex?"bPlNowEditing":""),id:`flipBox-${o}`,"data-direction":v,children:[(0,l.jsx)("div",{className:"box front",children:(0,l.jsxs)("div",{className:"frontContent",children:[a&&(0,l.jsx)(l.Fragment,{children:i?(0,l.jsx)("img",{className:u?.id?"flipIcon frontIcon":null,src:u?.url,alt:u?.alt}):d?.class&&(0,l.jsx)("i",{className:`flipIcon frontIcon ${d?.class}`})}),m&&(0,l.jsx)("h3",{className:"flipTitle flipFrontTitle",children:m}),s&&f&&(0,l.jsx)("p",{className:"flipDescription",children:f})]})}),(0,l.jsx)("div",{className:"box back",children:(0,l.jsxs)("div",{className:"backContent",children:[a&&(0,l.jsx)(l.Fragment,{children:p?(0,l.jsx)("img",{className:g?.id?"flipIcon backIcon":null,src:g?.url,alt:g?.alt}):h?.class&&(0,l.jsx)("i",{className:`flipIcon backIcon ${h?.class}`})}),b&&(0,l.jsx)("h3",{className:"flipTitle flipBackTitle",children:b}),r&&x&&(0,l.jsx)("a",{href:$t(y),className:"flipBtn",target:c?"_blank":"_self",rel:"noreferrer noopener",children:x})]})})]},o)}))})};Pl(YC.name)&&(0,p.registerBlockType)(YC,{icon:yr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,a]=(0,m.useState)(0),s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ZC,{attributes:t,setAttributes:n,activeIndex:i,setActiveIndex:a,isPremium:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(JC,{attributes:t,id:`block-${o}`}),(0,l.jsx)(ej,{attributes:t,isBackend:!0,custom:{activeIndex:i,setActiveIndex:a}})]})]})},save:()=>null})
417 +;const tj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/form-builder","version":"1.0.0","title":"Form","category":"bBlocks","description":"Create Beautiful and Professional Login, Register or any other custom Forms easily with a few clicks.","keywords":["form","register","login","sign in","sign up"],"textdomain":"b-blocks","attributes":{"formId":{"type":"string","default":""},"postId":{"type":"number","default":""},"clientId":{"type":"string","default":""},"form":{"type":"object","default":{"formType":""}},"align":{"type":"string","default":""},"weakPassword":{"type":"object","default":{"option":"default","validation":{"length":8,"uppercase":true,"lowercase":true,"number":true,"specialChar":true}}},"password":{"type":"object","default":{"container":{"desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{},"bg":{"color":"#0000"}},"meter":{"desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{}},"passStrengthTxt":{"veryWeak":"Very Weak","weak":"Weak Password","medium":"Medium Password","strong":"Strong Password","desktop":{"margin":{},"padding":{}},"tablet":{"margin":{},"padding":{}},"mobile":{"margin":{},"padding":{}},"typography":{}},"colors":{"veryWeak":"","weak":"","medium":"","strong":"","bg":{}}}},"button":{"type":"object","default":{"button":{"text":"Submit"},"navigation":{"isNavigation":true,"first":{"text":"Already have an account?"},"second":{"text":"Sign In","url":""}},"spinner":{"show":false},"signup":{"text":"Register","desktop":{"margin":{},"padding":{"top":"12px","left":"25px","bottom":"12px","right":"25px"},"justify":"space-between","displayAs":"row","alignment":"left","width":"","height":""},"tablet":{"margin":{},"padding":{"top":"12px","left":"25px","bottom":"12px","right":"25px"},"justify":"space-between","displayAs":"row","alignment":"left","width":"","height":""},"mobile":{"margin":{},"padding":{"top":"12px","left":"25px","bottom":"12px","right":"25px"},"justify":"space-between","displayAs":"row","alignment":"left","width":"","height":""},"typography":{},"normal":{"color":"#fff","bg":{"color":"#146EF5"},"border":{},"radius":{}},"hover":{"color":"#fff","bg":{"color":"#146EF5"},"border":{},"radius":{}},"animation":"none","spinner":{"show":false,"position":0,"color":""}},"signin":{"text":{"first":"","second":"Sign In","link":""},"desktop":{"margin":{},"padding":{},"displayAs":"row","justify":"start","alignment":"baseline","containerWidth":"","width":"","height":""},"tablet":{"margin":{},"padding":{},"displayAs":"row","justify":"start","alignment":"baseline","containerWidth":"","width":"","height":""},"mobile":{"margin":{},"padding":{},"displayAs":"row","justify":"start","alignment":"baseline","containerWidth":"","width":"","height":""},"typography":{"fontSize":{"desktop":"16px"}},"normal":{"color":"","bg":{},"border":{},"radius":{}},"hover":{"color":"","bg":{},"border":{},"radius":{}}},"signout":{"text":{"first":"You are already loggedin.","second":"Logout"}}}},"formOptions":{"type":"object","default":{"isRedirect":true,"customUrl":"","redirectPrevious":false,"userRole":"subscriber"}},"emailOptions":{"type":"object","default":{"user":{"type":"default","messageType":"HTML","mail":{"subject":"Thank you for registering","message":"<p>Thank you for registering on gutenberg plugin development!</p> \\n <p>Username: [username]</p> \\n <p>Password: [password]</p> \\n<p>Please click the following address to login to your account:</p> \\n<p>http://localhost/my-site/wp-admin/post.php/ </p>"}},"admin":{"type":"default","messageType":"HTML","email":"","mail":{"subject":"New User Registration","message":"<p>New user registration on your site gutenberg plugin development</p>\\n<p>Username: [username]</p>\\n<p>Email: [email]</p>"}}}},"termsConditions":{"type":"object","default":{"show":false,"label":{"first":"I Accept","second":"the Terms and Conditions."},"url":"","margin":{"desktop":{},"tablet":{},"mobile":{}},"padding":{"desktop":{},"tablet":{},"mobile":{}},"checkboxMargin":{"desktop":{},"tablet":{},"mobile":{}},"color":{"text":"","link":"","bg":"","checkbox":""},"typography":{"fontSize":{"desktop":"15px"}}}},"validation":{"type":"object","default":{"error":{"email":{"invalid":"You have used an invalid email","missing":"Email is missing","alreadyUsed":"Email is already registered with other account."},"username":{"invalid":"You have used an invalid username","alreadyUsed":"The username already registered.","missing":"Username is missing"},"password":{"invalid":"Your password is invalid","confirmedPass":"Your confirmed password did not match","missing":"Password is missing","custom":""},"styles":{"typo":{"fontSize":{"desktop":"11px"}},"color":"","margin":{}}},"success":{"text":"Form submitted successfully!","styles":{"isShow":false,"typo":{"fontSize":{"desktop":"14px"}},"color":{"text":"","bg":{}},"margin":{},"padding":{},"border":{"left":{"color":"#00F","style":"solid","width":"2px"}},"radius":{}}}}},"message":{"type":"object","default":{"isShowDemoSuccess":false,"isShowDemoError":false,"success":{"successFulRegistration":"Registration completed successfully!"},"error":{"default":"Something went wrong!"}}},"styles":{"type":"object","default":{"form":{"bg":{},"width":{"type":"full","desktop":"100%","tablet":"","mobile":""},"align":"center","border":{},"shadow":[],"desktop":{"margin":{},"padding":{},"radius":{},"fieldGap":10},"tablet":{"margin":{},"padding":{},"radius":{},"fieldGap":""},"mobile":{"margin":{},"padding":{},"radius":{},"fieldGap":""}},"buttonStyle":{"container":{"desktop":{"display":"row","margin":{},"padding":{},"justify":"space-between","align":"flex-start","gap":"10px"},"tablet":{"display":"row","margin":{},"padding":{},"justify":"","align":"","gap":""},"mobile":{"display":"row","margin":{},"padding":{},"justify":"","align":"","gap":""}},"button":{"typography":{"fontSize":{"desktop":"15px"}},"desktop":{"position":"","margin":{},"padding":{}},"tablet":{"position":"","margin":{},"padding":{}},"mobile":{"position":"","margin":{},"padding":{}},"normal":{"color":"","bg":{},"desktop":{"border":{},"shadow":[],"radius":{}},"tablet":{"border":{},"shadow":[],"radius":{}},"mobile":{"border":{},"shadow":[],"radius":{}}},"hover":{"animation":"","transition":"","color":"","bg":{},"desktop":{"border":{},"shadow":[],"radius":{}},"tablet":{"border":{},"shadow":[],"radius":{}},"mobile":{"border":{},"shadow":[],"radius":{}}}},"spinner":{"isDemo":false,"margin":{"left":"10px","right":"","top":"","bottom":""},"color":"#fff","size":"16px"},"navigation":{"first":{"typography":{},"color":"","desktop":{"margin":{}},"tablet":{"margin":{}},"mobile":{"margin":{}}},"second":{"typography":{},"color":"","desktop":{"margin":{}},"tablet":{"margin":{}},"mobile":{"margin":{}}}}},"message":{"success":{"typo":{"fontSize":{"desktop":"14px"}},"color":{"text":"","bg":{}},"margin":{},"padding":{},"border":{"left":{"color":"#00F","style":"solid","width":"2px"}},"radius":{}},"error":{"typo":{"fontSize":{"desktop":"14px"}},"color":{"text":"","bg":{}},"margin":{},"padding":{},"border":{"left":{"color":"#ff2c2c","style":"solid","width":"2px"}},"radius":{}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"60px","right":"60px","bottom":"60px","left":"60px"},"tablet":{"top":"50px","right":"50px","bottom":"50px","left":"50px"},"mobile":{"top":"40px","right":"40px","bottom":"40px","left":"40px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"usesContext":["b-blocks/inputClientId"],"example":{"attributes":{}},"editorScript":"file:../index.js","render":"file:./render.php","style":"file:./view.css","viewScript":["file:./view.js","wp-util"]}'),nj=({handleReplaceForm:e})=>(0,
418 +l.jsxs)("div",{className:"b-blocks-b-form-preselectFormSkeleton-wrapper",children:[(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton-wrapper",children:[(0,l.jsxs)("div",{onClick:()=>e("register"),children:[(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton",children:[(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton-button-wrapper",children:[(0,l.jsx)("div",{}),(0,l.jsx)("div",{})]})]}),(0,l.jsx)("p",{className:"b-blocks-b-form-skeleton-form-title",children:"Register Form"})]}),(0,l.jsxs)("div",{onClick:()=>e("login"),children:[(0,l.jsxs)("div",{className:"b-blocks-b-form-skeleton",children:[(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-field"}),(0,l.jsx)("div",{className:"b-blocks-b-form-skeleton-button-wrapper",children:(0,l.jsx)("div",{})})]}),(0,l.jsx)("p",{className:"b-blocks-b-form-skeleton-form-title",children:"Login Form"})]})]}),(0,l.jsx)("div",{})]}),oj={register:[{clientId:"49f6ed66-21bd-479f-a38d-df2c86fa87db",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"text",placeholder:"Username",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z'/></svg>",name:"username"},label:{text:"User Name"},options:{isLabel:!0,isRequired:!0,isIcon:!0,isShowRequiredIcon:!1},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{left:"33px",bottom:"10px",top:"10px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"49f6ed66-21bd-479f-a38d-df2c86fa87db"},innerBlocks:[]},{clientId:"3aad4b69-888a-415e-bd89-ae47dbca7f4a",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"email",placeholder:"Email",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z'/></svg>",name:"email"},label:{text:"Email"},options:{isLabel:!0,isRequired:!0,isIcon:!0,isShowRequiredIcon:!1},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{top:"10px",bottom:"10px",left:"33px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"3aad4b69-888a-415e-bd89-ae47dbca7f4a"},innerBlocks:[]},{clientId:"de949083-6ecf-4d44-9ce6-95ae2cfa39e9",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"password",placeholder:"Password",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z'/></svg>",name:"password"},label:{text:"Password"},options:{isLabel:!0,isRequired:!0,isIcon:!0,isShowRequiredIcon:!1},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",
419 419 validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{left:"33px",top:"10px",bottom:"10px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"de949083-6ecf-4d44-9ce6-95ae2cfa39e9"},innerBlocks:[]}],login:[{clientId:"d9ad798f-b8ef-4834-a770-f176959b8348",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"text",placeholder:"Username or Email",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z'/></svg>",name:"username"},label:{text:"Username or Email"},options:{isLabel:!0,isRequired:!0,isIcon:!0},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{top:"10px",bottom:"10px",left:"33px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"d9ad798f-b8ef-4834-a770-f176959b8348"},innerBlocks:[]},{clientId:"5cd7d62b-b34e-45c7-8142-625e376e012f",name:"b-blocks/input-field",isValid:!0,originalContent:"",validationIssues:[],attributes:{align:"",inputField:{type:"password",placeholder:"Password",value:"",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z'/></svg>",name:"password"},label:{text:"Password"},options:{isLabel:!0,isRequired:!0,isIcon:!0},password:{options:{isWeek:!0,isStrengthMeter:!1,isStrengthText:!1,isVisibilityIcon:!0,passStrengthText:"default",validationText:"default",isUpperCase:!0,isLowerCase:!0,isNumber:!0,isSpecialChar:!0,minLength:8},strengthText:{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}},validation:{errorMessage:{text:{missing:"This field is required."},email:{missing:"This field is required.",invalid:""},password:{missing:"This field is required.",invalid:"",customValidation:""},url:{missing:"This Field is required."}}},styles:{inputField:{typo:{fontSize:{desktop:"16px"}},colors:{text:"",placeholder:""},desktop:{padding:{left:"33px",top:"10px",bottom:"10px"}},tablet:{padding:[]},mobile:{padding:[]},normal:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},focus:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]},hover:{border:[],bg:[],radius:{desktop:[],tablet:[],mobile:[]},shadow:[]}},label:{typo:{fontSize:{desktop:"16px"}},colors:{required:"",text:""},desktop:{margin:[]},tablet:{margin:[]},mobile:{margin:[]},position:"top"},icon:{field:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}},password:{color:"",desktop:{size:"",position:{x:"",y:""}},tablet:{size:"",position:{x:"",y:""}},mobile:{size:"",position:{x:"",y:""}}}},error:{text:{typo:{fontSize:{desktop:"14px"}},color:"#f5222d",bg:[],desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}},input:{desktop:{margin:[],padding:[],border:[],radius:[]},tablet:{margin:[],padding:[],border:[],radius:[]},mobile:{margin:[],padding:[],border:[],radius:[]}}},password:{strength:{container:{desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[],bg:{color:""}},meter:{gap:"",desktop:{width:"",height:"",margin:[],padding:[]},tablet:{width:"",
420 -height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"5cd7d62b-b34e-45c7-8142-625e376e012f"},innerBlocks:[]}]},oj=({attributes:e,id:t,isBackend:n=!1})=>{const{styles:o,termsConditions:i}=e,{form:a,buttonStyle:s,message:r}=o,{container:c,button:d,navigation:u}=s,{first:p,second:h}=u,{success:g,error:m}=r,b=`#${t}`,f=`${b} .b-blocks-b-form-wrapper`,x=`${f} .b-blocks-b-form-container`,y=`${x} .b-blocks-form-button-wrapper`,v=`${y} .b-blocks-form-submitBtn`,k=`${y} .b-blocks-form-button-navigation-wrapper`,w=`${k} .b-blocks-form-button-navigation-text`,_=`${k} .b-blocks-form-button-navigation-link`,C=`${x} .b-blocks-b-form-termsConditionWrapper`,j=`${f} .b-blocks-b-form-success-message`,$=`${f} .b-blocks-b-form-error-message`,S=n?".block-editor-inner-blocks .block-editor-block-list__layout":`${b} .b-blocks-b-form-child-field-wrapper`,T=` ${"left"===a.align?"justify-content: flex-start":"center"===a.align?"justify-content: center":"right"===a.align?"justify-content: flex-end":""}\n\t`;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",d.typography).googleFontLink}\n\t\t\t${ps("",p.typography).googleFontLink}\n\t\t\t${ps("",h.typography).googleFontLink}\n\t\t\t${ps("",i.typography).googleFontLink}\n\t\t\t${ps("",g.typo).googleFontLink}\n\t\t\t${ps("",m.typo).googleFontLink}\n\n\t\t\t${ps(w,p.typography).styles}\n\t\t\t${ps(_,h.typography).styles}\n\t\t\t${ps(v,d.typography).styles}\n\t\t\t${ps(C,i.typography).styles}\n\t\t\t${ps(j,g.typo).styles}\n\t\t\t${ps($,m.typo).styles}\n\n\t\t\t${b}{\n\t\t\t\t${"custom"===a.width.type?T:""}\n\t\t\t}\n\n\t\t\t${f}{\n\t\t\t\t${os(a.bg)}\n\t\t\t\t${"custom"===a.width.type?ns("width",a.width.desktop):""}\n\t\t\t\t${ns("margin",hs(a.desktop.margin))}\n\t\t\t\t${ns("padding",hs(a.desktop.padding))}\n\t\t\t\t${as(a.border)}\n\t\t\t\t${ns("border-radius",hs(a.desktop.radius))}\n\t\t\t\t${ns("box-shadow",ls(a.shadow))}\n\t\t\t}\n\n\t\t\t${S}{\n\t\t\t\tdisplay:grid;\n\t\t\t\t${ns("gap",a.desktop.fieldGap?a.desktop.fieldGap+"px":"")}\n\t\t\t}\n\t\t\t\n\t\t\t${y}{\n\t\t\t\t${ns("margin",hs(c.desktop.margin))}\n\t\t\t\tflex-direction:${c.desktop.display};\n\t\t\t\t${"row"===c.desktop.display?"align-items: center;":`align-items:${c.desktop.align};`}\n\t\t\t\t${ns("justify-content",c.desktop.justify)}\n\t\t\t\t${"row"===c.desktop.display?"":ns("gap",c.desktop.gap)}\n\t\t\t}\n\n\t\t\t${v}{\n\t\t\t\t\t${ns("margin",hs(d.desktop.margin))}\n\t\t\t\t\t${ns("padding",hs(d.desktop.padding))}\n\t\t\t\t\t${ns("color",d.normal.color)}\n\t\t\t\t\t${os(d.normal.bg)}\n\t\t\t\t\t${as(d.normal.desktop.border)}\n\t\t\t\t\t${ns("border-radius",hs(d.normal.desktop.radius))}\n\t\t\t\t\t${ns("box-shadow",ls(d.normal.desktop.shadow))}\n\t\t\t}\n\n\t\t\t${v}:hover{\n\t\t\t\t\t${ns("color",d.hover.color)}\n\t\t\t\t\t${os(d.hover.bg)}\n\t\t\t\t\t${as(d.hover.desktop.border)}\n\t\t\t\t\t${ns("border-radius",hs(d.hover.desktop.radius))}\n\t\t\t\t\t${ns("box-shadow",ls(d.hover.desktop.shadow))}\n\t\t\t}\n\t\t\t${v}>.b-form-button-loading-spinner{\n\t\t\t\t${ns("color",hs(s.spinner.color))}\n\t\t\t\t${ns("fill",hs(s.spinner.color))}\n\t\t\t\t${ns("margin",hs(s.spinner.margin))}\n\t\t\t\t${ns("width",s.spinner.size)}\n\t\t\t\t${ns("height",s.spinner.size)}\n\t\t\t}\n\n\t\t\t${w}{\n\t\t\t\t${ns("color",p.color)}\n\t\t\t\t${ns("margin",hs(p.desktop.margin))}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${ns("color",h.color)}\n\t\t\t\t${ns("margin",hs(h.desktop.margin))}\n\t\t\t}\n\n\t\t\t${C}{\n\t\t\t\t${ns("margin",hs(i.margin.desktop))}\n\t\t\t\t${ns("padding",hs(i.padding.desktop))}\n\t\t\t\t${ns("color",hs(i.color.text))}\n\t\t\t\t${ns("background",hs(i.color.bg))}\n\t\t\t}\n\n\t\t\t${C} .b-blocks-b-form-checkbox-container{\n\t\t\t\t${ns("margin",hs(i.checkboxMargin.desktop))}\n\t\t\t}\n\n\t\t\t${C} .b-blocks-b-blocks-termsConditionWrapper-link{\n\t\t\t\t${ns("color",i.color.link)}\n\t\t\t}\n\n\t\t\t${C} .b-blocks-b-form-checkbox-container>input:checked ~ .b-blocks-b-form-checkmark {\n\t\t\t\t${ns("background",i.color.checkbox)}\n\t\t\t}\n\n\t\t\t${j}{\n\t\t\t\t${ns("margin",hs(g.margin))}\n\t\t\t\t${ns("padding",hs(g.padding))}\n\t\t\t\t${ns("color",g.color.text)}\n\t\t\t\t${os(g.color.bg)}\n\t\t\t\t${as(g.border)}\n\t\t\t\t${ns("border-radius",hs(g.radius))}\n\t\t\t}\n\t\t\t${$}{\n\t\t\t\t${ns("margin",hs(m.margin))}\n\t\t\t\t${ns("padding",hs(m.padding))}\n\t\t\t\t${ns("color",m.color.text)}\n\t\t\t\t${os(m.color.bg)}\n\t\t\t\t${as(m.border)}\n\t\t\t\t${ns("border-radius",hs(m.radius))}\n\t\t\t}\n\n\t`.replace(/\s+/g," ").trim()}})})},ij=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"})}),aj=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),sj=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M16 224h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm416 192H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-384H172.83A12.82 12.82 0 0 0 160 44.83v38.34A12.82 12.82 0 0 0 172.83 96h262.34A12.82 12.82 0 0 0 448 83.17V44.83A12.82 12.82 0 0 0 435.17 32zm0 256H172.83A12.82 12.82 0 0 0 160 300.83v38.34A12.82 12.82 0 0 0 172.83 352h262.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288z"})}),rj=e=>(0,l.jsx)("svg",{fill:"hsl(228, 97%, 42%)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsxs)("g",{children:[(0,l.jsx)("circle",{cx:"12",cy:"2.5",r:"1.5",opacity:".14"}),(0,l.jsx)("circle",{cx:"16.75",cy:"3.77",r:"1.5",opacity:".29"}),(0,l.jsx)("circle",{cx:"20.23",cy:"7.25",r:"1.5",opacity:".43"}),(0,l.jsx)("circle",{cx:"21.50",cy:"12.00",r:"1.5",opacity:".57"}),(0,l.jsx)("circle",{cx:"20.23",cy:"16.75",r:"1.5",opacity:".71"}),(0,l.jsx)("circle",{cx:"16.75",cy:"20.23",r:"1.5",opacity:".86"}),(0,l.jsx)("circle",{cx:"12",cy:"21.5",r:"1.5"}),(0,l.jsx)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"discrete",dur:"0.75s",values:"0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12",repeatCount:"indefinite"})]})}),lj=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],cj=[{label:"Default",value:"default"},{label:"Administrator",value:"administrator"},{label:"Editor",value:"editor"},{label:"Author",value:"author"},{label:"Contributor",value:"contributor"},{label:"Subscriber",value:"subscriber"
421 -}],dj=((0,x.__)("Container","b-blocks"),(0,x.__)("Form Wrapper","b-blocks"),(0,x.__)("Form","b-blocks"),(0,x.__)("Header Content","b-blocks"),(0,x.__)("Logo","b-blocks"),(0,x.__)("Image","b-blocks"),(0,x.__)("Title","b-blocks"),(0,x.__)("Subtitle","b-blocks"),[{label:"Start",value:"start"},{label:"End",value:"end"},{label:"Center",value:"center"},{label:"Space Between",value:"space-between"},{label:"Space Around",value:"space-around"},{label:"Space Evenly",value:"space-evenly"}]),uj=({attributes:e,updateObj:t})=>{const{button:n}=e,{navigation:o}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Button","b-blocks"),children:[(0,l.jsx)(v,{className:"mt0 mb10",children:(0,l.jsx)("strong",{children:"Submit Button"})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button Text","b-blocks"),value:n.button.text,onChange:e=>t("button",e,"button","text")}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Navigation","b-blocks"),checked:o.isNavigation,value:o.isNavigation,onChange:e=>t("button",e,"navigation","isNavigation")}),o.isNavigation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10 mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Navigate Button","b-blocks")})}),(0,l.jsxs)(y.Flex,{align:"normal",gap:3,children:[(0,l.jsx)(y.TextControl,{value:n.navigation.first.text,onChange:e=>t("button",e,"navigation","first","text")}),(0,l.jsxs)("div",{children:[(0,l.jsx)(y.TextControl,{className:"mb0",value:n.navigation.second.text,onChange:e=>t("button",e,"navigation","second","text")}),(0,l.jsx)("small",{children:(0,x.__)("Second option is linkable","b-blocks")})]})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Sign In URL","b-blocks"),value:n.navigation.second.url,placeholder:`${window.location.origin}/login`,onChange:e=>t("button",e,"navigation","second","url")})]})]})},pj=(0,f.withSelect)((e=>{const{getUsers:t}=e("core");return{users:(t()||[]).filter((e=>Array.isArray(e.roles)&&e.roles.includes("administrator")))}}))((({attributes:e,updateObj:t,users:n})=>{const{emailOptions:o}=e,i=n.map((e=>({label:e?.username,value:e?.email})));return(0,m.useEffect)((()=>{""===o.admin.email&&i.length>0&&t("emailOptions",i[0]?.value,"admin","email")}),[i]),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Email Options","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:[{title:"User",name:"user"},{title:"Admin",name:"admin"}],onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Email Template Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{options:[{label:"WordPress Default",value:"default"},{label:"Custom",value:"custom"}],value:o[e.name].type,onChange:n=>t("emailOptions",n,e.name,"type")}),"custom"===o[e.name].type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Email Subject","b-blocks"),value:o[e.name].mail.subject,onChange:n=>t("emailOptions",n,e.name,"mail","subject")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("From (administrator)","b-blocks"),options:i,value:o.admin.email,onChange:e=>t("emailOptions",e,"admin","email")}),(0,l.jsx)(v,{children:(0,x.__)("Email Message","b-blocks")}),(0,l.jsx)(La,{value:o[e.name].mail.message,onChange:n=>t("emailOptions",n,e.name,"mail","message")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Email Content Type","b-blocks"),labelPosition:"edge",options:[{label:"HTML",value:"html"},{label:"Plain",value:"plain"}],value:o[e.name].messageType,onChange:n=>t("emailOptions",n,e.name,"messageType")})]})]})})})})),hj=({attributes:e,handleReplaceForm:t})=>{const{form:n}=e;return(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Form","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Form Type","b-blocks"),labelPosition:"edge",options:[{label:"Register",value:"register"},{label:"Login",value:"login"}],value:n.formType,onChange:e=>t(e)})})},gj=({attributes:e,setAttributes:t,updateObj:n})=>{const{formOptions:o,form:i}=e,{formType:a}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Form Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Redirect","b-blocks"),checked:o.isRedirect,value:o.isRedirect,onChange:e=>t({formOptions:be(o,e,"isRedirect")})}),o.isRedirect&&(0,l.jsxs)(l.Fragment,{children:[!o.redirectPrevious&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Custom Redirect URL","b-blocks"),value:o.customUrl,placeholder:location,onChange:e=>n("formOptions",e,"customUrl")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Redirect to Previous Page","b-blocks"),checked:o.redirectPrevious,value:o.redirectPrevious,onChange:e=>n("formOptions",e,"redirectPrevious")})]}),"register"===a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("New User Role","b-blocks"),value:o.userRole,onChange:e=>n("formOptions",e,"userRole"),options:cj})]})]})},mj=({attributes:e,updateObj:t})=>{const{message:n}=e;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Message","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Demo Success message"),value:n.isShowDemoSuccess,checked:n.isShowDemoSuccess,onChange:e=>t("message",e,"isShowDemoSuccess")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Demo Error message"),value:n.isShowDemoError,checked:n.isShowDemoError,onChange:e=>t("message",e,"isShowDemoError")}),(0,l.jsx)("div",{className:"mt10",children:(0,l.jsx)("strong",{children:"Success"})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Success Message","b-blocks"),value:n.success.successFulRegistration,onChange:e=>t("message",e,"success","successFulRegistration")}),(0,l.jsx)("p",{className:"mt10 mb0",children:(0,l.jsx)("strong",{children:"Error"})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Default Message","b-blocks"),value:n.error.default,onChange:e=>t("message",e,"error","default")})]})},bj=({attributes:e,setAttributes:t})=>{const{button:n}=e;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Sign Out","b-blocks"),className:"bPlPanelBody",children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Sign Out Label Text","b-blocks"),value:n?.signout?.text?.first,onChange:e=>t({button:{...n,signout:{...n?.signout,text:{...n?.signout?.text,first:e}}}})}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Sign Out Button Text","b-blocks"),value:n?.signout?.text?.second,onChange:e=>t({button:{...n,signout:{...n?.signout,text:{...n?.signout?.text,second:e}}}})})]})},fj=window.location.origin;window.location.origin,window.location.pathname;const xj=({attributes:e,updateObj:t})=>{const{termsConditions:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Terms & Conditions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enforce Terms & Conditions","b-blocks"),checked:n.show,value:n.show,onChange:e=>t("termsConditions",e,"show")}),n.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("First label","b-blocks"),value:n.label.first,onChange:e=>t("termsConditions",e,"label","first")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Second label (Second Label is linkable)","b-blocks"),value:n.label.second,onChange:e=>t("termsConditions",e,"label","second")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Terms & Conditions URL","b-blocks"),value:n.url,placeholder:fj,onChange:e=>t("termsConditions",e,"url")})]})]})},yj=e=>{const{attributes:t}=e,{form:n}=t,{formType:o}=n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hj,{...e}),(0,l.jsx)(uj,{...e}),"contact"!==o&&(0,l.jsx)(gj,{...e}),"register"===o&&(0,l.jsx)(pj,{...e}),"register"===o&&(0,l.jsx)(xj,{...e}),(0,l.jsx)(mj,{...e}),"contact"!==o&&(0,l.jsx)(bj,{...e})]})},vj=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,
422 -m.useState)("container"),[a,s]=(0,m.useState)("normal"),{styles:r}=e,{buttonStyle:c}=r,{container:d,navigation:u}=c,{first:p,second:h}=u;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Container",value:"container"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Button",value:"button"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Navigation",value:"navigation"})]}),"container"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:d[n].margin,onChange:e=>t("styles",e,"buttonStyle","container",n,"margin")}),(0,l.jsx)(Ve,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Display As","b-blocks")," ",(0,l.jsx)(_,{})]}),options:[{label:"Inline",value:"row"},{label:"Block",value:"column"}],value:d[n].display,onChange:e=>t("styles",e,"buttonStyle","container",n,"display")}),"row"===d[n].display&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.SelectControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Justify Content","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",options:dj,value:d[n].justify,onChange:e=>t("styles",e,"buttonStyle","container",n,"justify")})}),"column"===d[n].display&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isDeselectable:!0,value:d[n].align,onChange:e=>t("styles",e,"buttonStyle","container",n,"align"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:(0,l.jsx)(ij,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(aj,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:(0,l.jsx)(sj,{})})]})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",value:d[n].gap,onChange:e=>t("styles",e,"buttonStyle","container",n,"gap")})]})]}),"button"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:c.button[n].margin,onChange:e=>t("styles",e,"buttonStyle","button",n,"margin")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:c.button[n].padding,onChange:e=>t("styles",e,"buttonStyle","button",n,"padding")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:c.button.typography,onChange:e=>t("styles",e,"buttonStyle","button","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>{s(e)},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:c.button[a].color,onChange:e=>t("styles",e,"buttonStyle","button",a,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:c.button[a].bg,onChange:e=>t("styles",e,"buttonStyle","button",a,"bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c.button[a][n].border,onChange:e=>t("styles",e,"buttonStyle","button",a,n,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c.button[a][n].radius,onChange:e=>t("styles",e,"buttonStyle","button",a,n,"radius")}),(0,l.jsx)(yt,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Shadow","b-blocks")," ",(0,l.jsx)(_,{})]}),value:c.button[a][n].shadow,onChange:e=>t("styles",e,"buttonStyle","button",a,n,"shadow")})]}),"navigation"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"mt10",children:(0,l.jsx)("strong",{children:"First Text"})}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:p.color,onChange:e=>t("styles",e,"buttonStyle","navigation","first","color")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p[n].margin,onChange:e=>t("styles",e,"buttonStyle","navigation","first",n,"margin")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:p.typography,onChange:e=>t("styles",e,"buttonStyle","navigation","first","typography")}),(0,l.jsx)("hr",{}),(0,l.jsx)("strong",{children:"Second Linkable Text"}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:h.color,onChange:e=>t("styles",e,"buttonStyle","navigation","second","color")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:h[n].margin,onChange:e=>t("styles",e,"buttonStyle","navigation","second",n,"margin")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:h.typography,onChange:e=>t("styles",e,"buttonStyle","navigation","second","typography")})]}),(0,l.jsx)("hr",{className:"mt10 mb10"}),(0,l.jsx)("strong",{children:"Spinner"}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Demo spinner","b-blocks"),checked:c.spinner.isDemo,value:c.spinner.isDemo,onChange:e=>t("styles",e,"buttonStyle","spinner","isDemo")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Size","b-blocks"),value:c.spinner.size,onChange:e=>t("styles",e,"buttonStyle","spinner","size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:c.spinner.color,onChange:e=>t("styles",e,"buttonStyle","spinner","color")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c.spinner.margin,onChange:e=>t("styles",e,"buttonStyle","spinner","margin")})]})},kj=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{form:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Form","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Form Width","b-blocks"),labelPosition:"edge",options:[{label:"Full Width (100%)",value:"full"},{label:"Custom",value:"custom"}],value:i.width.type,onChange:e=>t("styles",e,"form","width","type")}),"custom"===i.width.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",value:i.width[n],onChange:e=>t("styles",e,"form","width",n),isUnitSelectTabbable:!0}),(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isDeselectable:!0,value:i.align,onChange:e=>t("styles",e,"form","align"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:(0,l.jsx)(ij,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(aj,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:(0,l.jsx)(sj,{})})]})]})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>t("styles",e,"form","bg")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:i[n].margin,onChange:e=>t("styles",e,"form",n,"margin")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i[n].padding,
423 -onChange:e=>t("styles",e,"form",n,"padding")}),(0,l.jsx)(y.RangeControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Field Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i[n].fieldGap,onChange:e=>t("styles",e,"form",n,"fieldGap")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i.border,onChange:e=>t("styles",e,"form","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[n].radius,onChange:e=>t("styles",e,"form",n,"radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:i.shadow,onChange:e=>t("styles",e,"form","shadow")})]})},wj=({attributes:e,updateObj:t})=>{const{styles:n}=e,{message:o}=n;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Messages","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:[{title:"Success",name:"success"},{title:"Error",name:"error"}],onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),values:o[e.name].padding,onChange:n=>t("styles",n,"message",e.name,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:o[e.name].margin,onChange:n=>t("styles",n,"message",e.name,"margin")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o[e.name].color.text,onChange:n=>t("styles",n,"message",e.name,"color","text")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),isImage:!1,value:o[e.name].color.bg,onChange:n=>t("styles",n,"message",e.name,"color","bg")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:o[e.name].typo,onChange:n=>t("styles",n,"message",e.name,"typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e.name].border,onChange:n=>t("styles",n,"message",e.name,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius"),values:o[e.name].radius,onChange:n=>t("styles",n,"message",e.name,"radius")})]})})})},_j=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{termsConditions:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Terms & Conditions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.margin[n],onChange:e=>t("termsConditions",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.padding[n],onChange:e=>t("termsConditions",e,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Checkbox Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.checkboxMargin[n],onChange:e=>t("termsConditions",e,"checkboxMargin",n)}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:o.color.text,onChange:e=>t("termsConditions",e,"color","text")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Link Color","b-blocks"),value:o.color.link,onChange:e=>t("termsConditions",e,"color","link")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Background Color","b-blocks"),value:o.color.bg,onChange:e=>t("termsConditions",e,"color","bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Checkbox","b-blocks"),value:o.color.checkbox,onChange:e=>t("termsConditions",e,"color","checkbox")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("termsConditions",e,"typography")})]})})),Cj=e=>{const{attributes:t}=e,{termsConditions:n,form:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(kj,{...e}),(0,l.jsx)(vj,{...e}),n.show&&"register"===o.formType&&(0,l.jsx)(_j,{...e}),(0,l.jsx)(wj,{...e})]})},jj=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:lj,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(yj,{...e}),"style"===t.name&&(0,l.jsx)(Cj,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},$j="b-blocks-input-field-error-container",Sj={invalid_email:{name:"email",message:"Incorrect email"},invalid_username:{name:"username",message:"Incorrect username"},incorrect_password:{name:"password",message:"Incorrect password"}},Tj=(e,t)=>{if(!e)return{container:null,messageEl:null};const n=e.querySelector(`.b-blocks-input-field-validation-${t}`),o=n?.querySelector(".b-blocks-input-field-error-message");return{container:n,messageEl:o}},Nj=(e,t,n)=>{const{container:o,messageEl:i}=Tj(e,t);o&&i&&(i.style.display="unset",i.textContent=n,o.classList.add($j))},Mj=(e,t)=>{const{container:n,messageEl:o}=Tj(e,t);n&&o&&(o.style.display="none",n.classList.remove($j))},Lj=({children:e,attributes:t,isFrontend:n=!1})=>{const{form:o,button:i,termsConditions:a,message:s,formId:r,postId:c,formOptions:d,styles:u}=t,{navigation:p}=i,h=!n&&s.isShowDemoSuccess,g=!n&&s.isShowDemoError,[b,f]=(0,m.useState)(!1),[x,y]=(0,m.useState)(!1),v=window.bBlocksCursorDataConfig?.nonce,{data:k,saveData:w,error:_,isLoading:C,isError:j}=Cd("b_form_submit",{_nonce:v},!1),$=(0,m.useRef)("");return((e,t,n,o)=>{(0,m.useEffect)((()=>{const t=n?.current;if(t&&e){if("register"===o){const n=(e=>{if(!e)return[];const t=new FormData(e);return Array.from(t.keys())})(t),o=e?.message||"";n.forEach((e=>{"string"==typeof o&&o.toLowerCase().includes(e.toLowerCase())?Nj(t,e,o):Mj(t,e)}))}if("login"===o){const n=e?.errorCode;(e=>{["email","username","password"].forEach((t=>Mj(e,t)))})(t);const o=Sj[n];o&&Nj(t,o.name,o.message)}}}),[e,t,n,o])})(_,j,$,o.formType),(0,m.useEffect)((()=>{_&&_?.message?.includes("Something went wrong")&&y(!0),k&&(f(!0),$.current.reset(),d.isRedirect&&(d.redirectUrl&&!d.redirectPrevious?setTimeout((()=>{window.location.href=d.redirectUrl}),500):d.redirectPrevious?setTimeout((()=>{window.history.back()}),1e3):window.location.href="/"))}),[_,C,k]),(0,l.jsxs)("div",{className:"b-blocks-b-form-wrapper",children:[(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=e.target;let n=[];const i=new FormData(e.target),a=Object.fromEntries(i);Object.keys(a).forEach((e=>{const o=(e=>{const n=t.querySelector(`.b-blocks-input-field-validation-${e}`);if(n)return JSON.parse(n.dataset.iserror)?(n.classList.add("b-blocks-input-field-error-container"),e):void(_||n.classList.remove("b-blocks-input-field-error-container"))})(e);o&&n.push(o)})),n.length>0?y(!0):w({...a,type:o.formType,current_post_id:c,formId:r})},className:"b-blocks-b-form-container",ref:$,children:[e,a.show&&"register"===o.formType&&(0,l.jsxs)("div",{className:"b-blocks-b-form-termsConditionWrapper",children:[(0,l.jsxs)("label",{className:"b-blocks-b-form-checkbox-container",children:[(0,l.jsx)("input",{type:"checkbox",required:!0}),(0,l.jsx)("span",{className:"b-blocks-b-form-checkmark"})]}),(0,l.jsx)("label",{className:"b-blocks-b-blocks-termsConditionWrapper-first",children:a.label.first}),(0,l.jsx)("a",{className:"b-blocks-b-blocks-termsConditionWrapper-link",href:a.url,children:a.label.second})]}),(0,l.jsxs)("div",{className:"b-blocks-form-button-wrapper",children:[(0,l.jsxs)("button",{className:"b-blocks-form-submitBtn",type:"submit",children:[i.button.text," ",C&&n&&(0,l.jsx)(rj,{className:"b-form-button-loading-spinner"})," ",!n&&u.buttonStyle.spinner.isDemo&&(0,l.jsx)(rj,{className:"b-form-button-loading-spinner"})," "]}),p.isNavigation&&(p.first.text||p.second.text)&&(0,l.jsxs)("div",{className:"b-blocks-form-button-navigation-wrapper",children:[(0,l.jsx)("p",{
424 -className:"b-blocks-form-button-navigation-text",children:p.first.text})," ",(0,l.jsx)("a",{className:"b-blocks-form-button-navigation-link",href:p.second.url,children:p.second.text})," "]})]})]}),b&&s.success.successFulRegistration&&(0,l.jsx)("div",{className:"b-blocks-b-form-success-message",children:(0,l.jsx)("span",{children:s.success.successFulRegistration})}),h&&(0,l.jsx)("div",{className:"b-blocks-b-form-success-message",children:(0,l.jsx)("span",{children:s.success.successFulRegistration})}),x&&s.error.default&&(0,l.jsx)("div",{className:"b-blocks-b-form-error-message",children:(0,l.jsx)("span",{children:s.error.default})}),g&&(0,l.jsx)("div",{className:"b-blocks-b-form-error-message",children:(0,l.jsx)("span",{children:s.error.default})})]})},Pj=(0,f.withSelect)((e=>{const{getDeviceType:t,getCurrentPostId:n}=e("core/editor");return{device:t()?.toLowerCase(),postId:n()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,postId:a}=e,{form:s,button:r,formId:c,message:d}=t,{replaceInnerBlocks:u}=(0,f.useDispatch)("core/block-editor"),g=fe(t,n);(0,m.useEffect)((()=>{n({clientId:o})}),[o]);const b=(0,f.useSelect)((e=>e("core/block-editor").getBlocks(o)),[o]),x=e=>{(e=>{const t={form:{...s,formType:"login"},button:{...r,navigation:{...r.navigation,first:{...r.navigation.first,text:"Not registered yet?"},second:{...r.navigation.second,text:"Create an Account"}}},message:{...d,success:{...d.success,successFulRegistration:"Login completed successfully!"}}},o={form:{...s,formType:"register"},button:{...r,navigation:{...r.navigation,first:{...r.navigation.first,text:"Already have an account?"},second:{...r.navigation.second,text:"Sign In"}}},message:{...d,success:{...d.success,successFulRegistration:"Registration completed successfully!"}}};"register"===e?n(o):"login"===e&&n(t)})(e);const t=nj[e].map((e=>(0,p.createBlock)(e.name,e.attributes||{})));u(o,t,!1)};return(0,m.useEffect)((()=>{const e="b_form_"+Math.floor(1e9*Math.random()).toString();c||""!==c||n({formId:e}),jt(a)&&n({postId:a})}),[a]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(jj,{attributes:t,setAttributes:n,updateObj:g,isPremium:!1,device:i,clientId:o,handleReplaceForm:x}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(oj,{attributes:t,id:`block-${o}`,isBackend:!0}),""===s.formType&&(0,l.jsx)(tj,{updateObj:g,clientId:o,handleReplaceForm:x}),""!==s.formType&&(0,l.jsx)(Lj,{attributes:t,isFrontend:!1,children:(0,l.jsx)("div",{className:"b-blocks-b-form-child-field-wrapper",children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:["b-blocks/input-field","b-blocks/row","b-blocks/dual-color-heading","b-blocks/icon-box","b-blocks/advanced-image","core/paragraph"],templateLock:!1,renderAppender:()=>b?.length>0?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{})})})})]})]})}));Ll(ej.name)&&(0,p.registerBlockType)(ej,{icon:Jr,edit:Pj,save:h.InnerBlocks.Content});const Ej=JSON.parse('{"apiVersion":3,"name":"b-blocks/gif","title":"Gif Image","description":"Embed gif image.","category":"bBlocks","keywords":["video image","embed gif image","animated image"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"cId":{"type":"string","default":""},"gif":{"type":"object","default":null},"gifAlign":{"type":"string","default":"center"},"gifWidth":{"type":"string","default":"0px"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Aj="bBlocksGif";Ll(Ej.name)&&(0,p.registerBlockType)(Ej,{icon:vr,edit:e=>{const{attributes:{gif:t,gifAlign:n,gifWidth:o},setAttributes:i,clientId:a}=e;(0,m.useEffect)((()=>{a&&i({cId:a.substring(0,10)})}),[a]);const s=(0,m.useRef)(null),[r,c]=(0,m.useState)(""),[d,u]=(0,m.useState)([]),p=`block-${a}`,g="dM3iQq13qK0Mls9ygR2zjxxPDQVlw1Ql";""===r&&(0,m.useEffect)((()=>{fetch(`https://api.giphy.com/v1/gifs/trending?api_key=${g}&limit=25`).then((e=>e.json())).then((e=>{u(e.data)})).catch((e=>alert(e.message)))}),[r]),r&&""!==r&&(0,m.useEffect)((()=>{fetch(`https://api.giphy.com/v1/gifs/search?api_key=${g}&limit=25&q=${r}`).then((e=>e.json())).then((e=>{u(e.data)})).catch((e=>alert(e.message)))}),[r]);const b=e=>{const t=s.current?.ownerDocument;if(!t)return;const n=t.getElementById(p),o=t.getElementById(`gifModal-${a}`);n&&o&&(n.style.minHeight=e?"720px":"auto",o.style.display=e?"block":"none")},f=()=>b(!0),v=()=>b(!1);return(0,m.useEffect)((()=>{const e=s.current?.ownerDocument,t=e?.defaultView;if(!t)return;const n=t=>{const n=e.getElementById(p),o=e.getElementById(`gifModal-${a}`);n&&o&&t.target===o&&(n.style.minHeight="auto",o.style.display="none")};return t.addEventListener("click",n),()=>t.removeEventListener("click",n)}),[p,a]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:un}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Gif Settings","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:o,onChange:e=>i({gifWidth:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>i({gifAlign:e}),describedBy:(0,x.__)("GIF Alignment"),alignmentControls:[{title:(0,x.__)("GIF in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("GIF in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("GIF in right","b-blocks"),align:"right",icon:"align-right"}]})}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:s}),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t#${p} .${Aj}{\n\t\t\t\t\ttext-align: ${n};\n\t\t\t\t}\n\t\t\t\t#${p} .${Aj} figure{\n\t\t\t\t\twidth: ${"0px"===o||"0%"===o||"0em"===o?"auto":o};\n\t\t\t\t}\n\t\t\t`.replace(/\s+/g," ")}}),(0,l.jsxs)("div",{className:Aj,children:[(0,l.jsxs)("figure",{className:"editImageHolder",children:[t&&(0,l.jsx)("img",{src:t?.images?.original?.url,alt:t?.title}),(0,l.jsx)("div",{className:"mediaControl",children:t?(0,l.jsxs)("div",{className:"btnControl",children:[(0,l.jsx)(y.Button,{icon:"controls-repeat",onClick:f,children:(0,x.__)("Replace","b-blocks")}),(0,l.jsx)(y.Button,{icon:"exit",onClick:()=>i({gif:null}),className:"btnRed",children:(0,x.__)("Remove","b-blocks")})]}):(0,l.jsx)("div",{className:"btnControl",children:(0,l.jsx)(y.Button,{icon:"upload",onClick:f,children:(0,x.__)("Insert GIF","b-blocks")})})})]}),(0,l.jsxs)("div",{className:"gifModal",id:`gifModal-${a}`,children:[(0,l.jsxs)("div",{className:"gifModalContent",children:[(0,l.jsx)("span",{className:"close",onClick:v,children:"×"}),(0,l.jsxs)("div",{className:"gifModalHeader",children:[(0,l.jsx)("label",{htmlFor:`gifSrcBox-${a}`,children:"Search Gif:"}),(0,l.jsx)(y.TextControl,{className:"gifSearchField",value:r,id:`gifSrcBox-${a}`,onChange:e=>c(e),placeholder:(0,x.__)("Search gif here","b-blocks")})]}),(0,l.jsx)("div",{className:"gifModalBody",children:(0,l.jsx)("div",{className:"gifData",children:0!==d.length&&d.map((e=>(0,l.jsxs)("figure",{onClick:()=>{i({gif:e,width:`${parseInt(e.images.original.width)}px`}),v()},children:[(0,l.jsx)("img",{src:e.images.downsized.url,alt:e.title}),(0,l.jsx)("figcaption",{children:e.title})]},e.id)))})})," "]})," "]})," "]})]})]})},save:()=>null})
425 -;const Bj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/google-map","title":"Google Map","category":"bBlocks","description":"A fully interactive Google Map: custom markers with rich info windows, clustering, category filtering, map themes, traffic/transit/KML/GeoJSON layers, shapes, directions, search and geolocation — plus the classic embed-URL mode.","keywords":["google map","map","marker","location","directions","store locator","embed","contact"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"source":{"type":"object","default":{"type":"interactive","embedUrl":"","center":{"lat":"","lng":"","address":""},"mapId":"","language":"","region":""}},"map":{"type":"object","default":{"zoom":12,"minZoom":"","maxZoom":"","mapType":"roadmap","allowTypeSwitch":true,"gestureHandling":"cooperative","draggable":true,"scrollwheel":false,"fitBounds":false,"desktop":{"height":"450px","maxWidth":"","align":"center"},"tablet":{"height":"350px","maxWidth":"","align":""},"mobile":{"height":"250px","maxWidth":"","align":""},"useAspectRatio":false,"aspectRatio":{"desktop":"16/9","tablet":"","mobile":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{},"mobile":{}},"shadow":[]}},"controls":{"type":"object","default":{"disableDefaultUI":false,"zoom":true,"zoomPosition":"RIGHT_BOTTOM","mapType":true,"streetView":true,"fullscreen":true,"scale":false,"rotate":false,"keyboardShortcuts":true}},"markers":{"type":"array","default":[{"id":"marker-1","title":"Our Office","content":"<p>Drop by any weekday between 9am and 5pm.</p>","address":"","lat":23.8103,"lng":90.4125,"category":"","icon":{"type":"default","url":{"library":"","upload":""}},"image":{"url":"","alt":""},"pinColor":"","glyphColor":"","animation":"","draggable":true,"openByDefault":false}]},"marker":{"type":"object","default":{"pinColor":"#8a2be2","glyphColor":"#ffffff","borderColor":"#ffffff","scale":1,"animation":"none","desktop":{"size":"40px"},"tablet":{"size":""},"mobile":{"size":""}}},"infoWindow":{"type":"object","default":{"trigger":"click","singleOpen":true,"bgColor":"#ffffff","textColor":"#1e1e1e","typo":{"fontSize":{"desktop":"14px"}},"border":{"width":"0px"},"shadow":[],"desktop":{"maxWidth":"280px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"maxWidth":"","padding":{},"radius":{}},"mobile":{"maxWidth":"","padding":{},"radius":{}}}},"clustering":{"type":"object","default":{"enabled":false,"background":{"type":"solid","color":"#8a2be2"},"color":"#8a2be2","size":"40px","textColor":"#ffffff","clickToZoom":true}},"categories":{"type":"array","default":[]},"filterBar":{"type":"object","default":{"show":false,"align":"left","showAll":true,"allLabel":"All","activeColor":"#8a2be2","color":"#1e1e1e","bgColor":"#f0f0f0","activeTextColor":"#ffffff","typo":{"fontSize":{"desktop":"13px"}},"desktop":{"gap":"8px","padding":{"top":"6px","right":"14px","bottom":"6px","left":"14px"},"radius":{"top":"999px","right":"999px","bottom":"999px","left":"999px"}},"tablet":{"gap":"","padding":{},"radius":{}},"mobile":{"gap":"","padding":{},"radius":{}}}},"theme":{"type":"object","default":{"preset":"default","customJson":"","grayscale":0,"saturation":0,"hue":""}},"layers":{"type":"object","default":{"traffic":false,"transit":false,"bicycling":false,"kmlUrl":"","geoJson":"","fitGeoJson":true,"heatmap":{"enabled":false,"radius":20,"opacity":0.6}}},"shapes":{"type":"array","default":[]},"directions":{"type":"object","default":{"enabled":false,"mode":"DRIVING","origin":{"address":"","lat":"","lng":""},"destination":{"address":"","lat":"","lng":""},"waypoints":[],"showPanel":false,"routeColor":"#2A6DF0"}},"tools":{"type":"object","default":{"searchBox":false,"geolocation":false,"nearbyRadius":0}},"performance":{"type":"object","default":{"lazyLoad":"onView"}},"caption":{"type":"object","default":{"text":"","align":"center","color":"","typo":{"fontSize":{"desktop":"14px"}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"linear","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"angel":90},"img":{"url":""}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),Ij="b-blocks-google-map",Oj={lat:23.8103,lng:90.4125},Rj=[{label:(0,x.__)("16:9 (Widescreen)","b-blocks"),value:"16/9"},{label:(0,x.__)("4:3 (Standard)","b-blocks"),value:"4/3"},{label:(0,x.__)("1:1 (Square)","b-blocks"),value:"1/1"},{label:(0,x.__)("3:4 (Portrait)","b-blocks"),value:"3/4"}],zj=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Dj=/^(www\.|maps\.)?google\.(com|co\.[a-z]{2}|com\.[a-z]{2}|[a-z]{2,3})$/i,Fj=e=>{if(!e||"string"!=typeof e)return!1;try{const t=new URL(e);return"https:"===t.protocol&&!!Dj.test(t.hostname)&&!!t.pathname.startsWith("/maps/embed")}catch(e){return!1}},Hj=e=>{const t=String(e?.message||e?.code||"");return/REQUEST_DENIED|PERMISSION|BILLING/i.test(t)?(0,x.__)("Google denied the lookup. The Geocoding API is probably not enabled for this key, or the project has no billing account. Enter the coordinates manually below.","b-blocks"):/OVER_QUERY_LIMIT|OVER_DAILY/i.test(t)?(0,x.__)("This API key is over its request quota. Try again later, or enter the coordinates manually below.","b-blocks"):(0,x.__)("No result for that address. Check the spelling, or enter the coordinates manually below.","b-blocks")},Wj=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","GeometryCollection"],Uj=e=>e&&"Feature"===e.type?e:e&&Wj.includes(e.type)?{type:"Feature",geometry:e,properties:{}}:null,Gj=e=>!(!e||"object"!=typeof e||Array.isArray(e)||void 0===e.stylers&&void 0===e.featureType&&void 0===e.elementType),Vj=e=>Array.isArray(e)?e.length>0&&e.every(Gj):Gj(e),qj=e=>{if(!e||!String(e).trim())return{data:null,error:""};let t;try{t=JSON.parse(e)}catch(e){return{data:null,error:(0,x.__)("This is not valid JSON, so it will be skipped.","b-blocks")}}if(Array.isArray(t)){const e=t.map(Uj).filter(Boolean);return e.length?{data:{type:"FeatureCollection",features:e},error:""}:{data:null,error:Vj(t)?(0,x.__)("This is a Google Maps style, not GeoJSON. Paste it into Theme → Custom JSON to recolour the map.","b-blocks"):(0,x.__)('This array holds no recognisable GeoJSON features. GeoJSON describes places — each entry needs a "geometry" with coordinates.',"b-blocks")}}if(!t||"object"!=typeof t)return{data:null,error:(0,x.__)("GeoJSON must be an object or an array of features.","b-blocks")};if("FeatureCollection"===t.type||"Feature"===t.type)return{data:t,error:""};const n=Uj(t);return n?{data:n,error:""}:Vj(t)?{data:null,error:(0,x.__)("This is a Google Maps style, not GeoJSON. Paste it into Theme → Custom JSON to recolour the map.","b-blocks")}:{data:null,
420 +height:"",margin:[],padding:[]},mobile:{width:"",height:"",margin:[],padding:[]},border:[],radius:[]},text:{desktop:{margin:[],padding:[]},tablet:{margin:[],padding:[]},mobile:{margin:[],padding:[]},typography:{fontSize:{desktop:"15px"}}},colors:{veryWeak:"#f5222d",weak:"#fa8c16",medium:"#fadb14",strong:"#7cb305"}}}},clientId:"5cd7d62b-b34e-45c7-8142-625e376e012f"},innerBlocks:[]}]},ij=({attributes:e,id:t,isBackend:n=!1})=>{const{styles:o,termsConditions:i}=e,{form:a,buttonStyle:s,message:r}=o,{container:c,button:d,navigation:u}=s,{first:p,second:h}=u,{success:g,error:m}=r,b=`#${t}`,f=`${b} .b-blocks-b-form-wrapper`,x=`${f} .b-blocks-b-form-container`,y=`${x} .b-blocks-form-button-wrapper`,v=`${y} .b-blocks-form-submitBtn`,k=`${y} .b-blocks-form-button-navigation-wrapper`,w=`${k} .b-blocks-form-button-navigation-text`,_=`${k} .b-blocks-form-button-navigation-link`,C=`${x} .b-blocks-b-form-termsConditionWrapper`,j=`${f} .b-blocks-b-form-success-message`,$=`${f} .b-blocks-b-form-error-message`,S=n?".block-editor-inner-blocks .block-editor-block-list__layout":`${b} .b-blocks-b-form-child-field-wrapper`,T=` ${"left"===a.align?"justify-content: flex-start":"center"===a.align?"justify-content: center":"right"===a.align?"justify-content: flex-end":""}\n\t`;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",d.typography).googleFontLink}\n\t\t\t${ps("",p.typography).googleFontLink}\n\t\t\t${ps("",h.typography).googleFontLink}\n\t\t\t${ps("",i.typography).googleFontLink}\n\t\t\t${ps("",g.typo).googleFontLink}\n\t\t\t${ps("",m.typo).googleFontLink}\n\n\t\t\t${ps(w,p.typography).styles}\n\t\t\t${ps(_,h.typography).styles}\n\t\t\t${ps(v,d.typography).styles}\n\t\t\t${ps(C,i.typography).styles}\n\t\t\t${ps(j,g.typo).styles}\n\t\t\t${ps($,m.typo).styles}\n\n\t\t\t${b}{\n\t\t\t\t${"custom"===a.width.type?T:""}\n\t\t\t}\n\n\t\t\t${f}{\n\t\t\t\t${os(a.bg)}\n\t\t\t\t${"custom"===a.width.type?ns("width",a.width.desktop):""}\n\t\t\t\t${ns("margin",hs(a.desktop.margin))}\n\t\t\t\t${ns("padding",hs(a.desktop.padding))}\n\t\t\t\t${as(a.border)}\n\t\t\t\t${ns("border-radius",hs(a.desktop.radius))}\n\t\t\t\t${ns("box-shadow",ls(a.shadow))}\n\t\t\t}\n\n\t\t\t${S}{\n\t\t\t\tdisplay:grid;\n\t\t\t\t${ns("gap",a.desktop.fieldGap?a.desktop.fieldGap+"px":"")}\n\t\t\t}\n\t\t\t\n\t\t\t${y}{\n\t\t\t\t${ns("margin",hs(c.desktop.margin))}\n\t\t\t\tflex-direction:${c.desktop.display};\n\t\t\t\t${"row"===c.desktop.display?"align-items: center;":`align-items:${c.desktop.align};`}\n\t\t\t\t${ns("justify-content",c.desktop.justify)}\n\t\t\t\t${"row"===c.desktop.display?"":ns("gap",c.desktop.gap)}\n\t\t\t}\n\n\t\t\t${v}{\n\t\t\t\t\t${ns("margin",hs(d.desktop.margin))}\n\t\t\t\t\t${ns("padding",hs(d.desktop.padding))}\n\t\t\t\t\t${ns("color",d.normal.color)}\n\t\t\t\t\t${os(d.normal.bg)}\n\t\t\t\t\t${as(d.normal.desktop.border)}\n\t\t\t\t\t${ns("border-radius",hs(d.normal.desktop.radius))}\n\t\t\t\t\t${ns("box-shadow",ls(d.normal.desktop.shadow))}\n\t\t\t}\n\n\t\t\t${v}:hover{\n\t\t\t\t\t${ns("color",d.hover.color)}\n\t\t\t\t\t${os(d.hover.bg)}\n\t\t\t\t\t${as(d.hover.desktop.border)}\n\t\t\t\t\t${ns("border-radius",hs(d.hover.desktop.radius))}\n\t\t\t\t\t${ns("box-shadow",ls(d.hover.desktop.shadow))}\n\t\t\t}\n\t\t\t${v}>.b-form-button-loading-spinner{\n\t\t\t\t${ns("color",hs(s.spinner.color))}\n\t\t\t\t${ns("fill",hs(s.spinner.color))}\n\t\t\t\t${ns("margin",hs(s.spinner.margin))}\n\t\t\t\t${ns("width",s.spinner.size)}\n\t\t\t\t${ns("height",s.spinner.size)}\n\t\t\t}\n\n\t\t\t${w}{\n\t\t\t\t${ns("color",p.color)}\n\t\t\t\t${ns("margin",hs(p.desktop.margin))}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${ns("color",h.color)}\n\t\t\t\t${ns("margin",hs(h.desktop.margin))}\n\t\t\t}\n\n\t\t\t${C}{\n\t\t\t\t${ns("margin",hs(i.margin.desktop))}\n\t\t\t\t${ns("padding",hs(i.padding.desktop))}\n\t\t\t\t${ns("color",hs(i.color.text))}\n\t\t\t\t${ns("background",hs(i.color.bg))}\n\t\t\t}\n\n\t\t\t${C} .b-blocks-b-form-checkbox-container{\n\t\t\t\t${ns("margin",hs(i.checkboxMargin.desktop))}\n\t\t\t}\n\n\t\t\t${C} .b-blocks-b-blocks-termsConditionWrapper-link{\n\t\t\t\t${ns("color",i.color.link)}\n\t\t\t}\n\n\t\t\t${C} .b-blocks-b-form-checkbox-container>input:checked ~ .b-blocks-b-form-checkmark {\n\t\t\t\t${ns("background",i.color.checkbox)}\n\t\t\t}\n\n\t\t\t${j}{\n\t\t\t\t${ns("margin",hs(g.margin))}\n\t\t\t\t${ns("padding",hs(g.padding))}\n\t\t\t\t${ns("color",g.color.text)}\n\t\t\t\t${os(g.color.bg)}\n\t\t\t\t${as(g.border)}\n\t\t\t\t${ns("border-radius",hs(g.radius))}\n\t\t\t}\n\t\t\t${$}{\n\t\t\t\t${ns("margin",hs(m.margin))}\n\t\t\t\t${ns("padding",hs(m.padding))}\n\t\t\t\t${ns("color",m.color.text)}\n\t\t\t\t${os(m.color.bg)}\n\t\t\t\t${as(m.border)}\n\t\t\t\t${ns("border-radius",hs(m.radius))}\n\t\t\t}\n\n\t`.replace(/\s+/g," ").trim()}})})},aj=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"})}),sj=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),rj=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M16 224h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm416 192H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-384H172.83A12.82 12.82 0 0 0 160 44.83v38.34A12.82 12.82 0 0 0 172.83 96h262.34A12.82 12.82 0 0 0 448 83.17V44.83A12.82 12.82 0 0 0 435.17 32zm0 256H172.83A12.82 12.82 0 0 0 160 300.83v38.34A12.82 12.82 0 0 0 172.83 352h262.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288z"})}),lj=e=>(0,l.jsx)("svg",{fill:"hsl(228, 97%, 42%)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsxs)("g",{children:[(0,l.jsx)("circle",{cx:"12",cy:"2.5",r:"1.5",opacity:".14"}),(0,l.jsx)("circle",{cx:"16.75",cy:"3.77",r:"1.5",opacity:".29"}),(0,l.jsx)("circle",{cx:"20.23",cy:"7.25",r:"1.5",opacity:".43"}),(0,l.jsx)("circle",{cx:"21.50",cy:"12.00",r:"1.5",opacity:".57"}),(0,l.jsx)("circle",{cx:"20.23",cy:"16.75",r:"1.5",opacity:".71"}),(0,l.jsx)("circle",{cx:"16.75",cy:"20.23",r:"1.5",opacity:".86"}),(0,l.jsx)("circle",{cx:"12",cy:"21.5",r:"1.5"}),(0,l.jsx)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"discrete",dur:"0.75s",values:"0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12",repeatCount:"indefinite"})]})}),cj=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],dj=[{label:"Default",value:"default"},{label:"Administrator",value:"administrator"},{label:"Editor",value:"editor"},{label:"Author",value:"author"},{label:"Contributor",value:"contributor"},{label:"Subscriber",value:"subscriber"
421 +}],uj=((0,x.__)("Container","b-blocks"),(0,x.__)("Form Wrapper","b-blocks"),(0,x.__)("Form","b-blocks"),(0,x.__)("Header Content","b-blocks"),(0,x.__)("Logo","b-blocks"),(0,x.__)("Image","b-blocks"),(0,x.__)("Title","b-blocks"),(0,x.__)("Subtitle","b-blocks"),[{label:"Start",value:"start"},{label:"End",value:"end"},{label:"Center",value:"center"},{label:"Space Between",value:"space-between"},{label:"Space Around",value:"space-around"},{label:"Space Evenly",value:"space-evenly"}]),pj=({attributes:e,updateObj:t})=>{const{button:n}=e,{navigation:o}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Button","b-blocks"),children:[(0,l.jsx)(v,{className:"mt0 mb10",children:(0,l.jsx)("strong",{children:"Submit Button"})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button Text","b-blocks"),value:n.button.text,onChange:e=>t("button",e,"button","text")}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Navigation","b-blocks"),checked:o.isNavigation,value:o.isNavigation,onChange:e=>t("button",e,"navigation","isNavigation")}),o.isNavigation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10 mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Navigate Button","b-blocks")})}),(0,l.jsxs)(y.Flex,{align:"normal",gap:3,children:[(0,l.jsx)(y.TextControl,{value:n.navigation.first.text,onChange:e=>t("button",e,"navigation","first","text")}),(0,l.jsxs)("div",{children:[(0,l.jsx)(y.TextControl,{className:"mb0",value:n.navigation.second.text,onChange:e=>t("button",e,"navigation","second","text")}),(0,l.jsx)("small",{children:(0,x.__)("Second option is linkable","b-blocks")})]})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Sign In URL","b-blocks"),value:n.navigation.second.url,placeholder:`${window.location.origin}/login`,onChange:e=>t("button",e,"navigation","second","url")})]})]})},hj=(0,f.withSelect)((e=>{const{getUsers:t}=e("core");return{users:(t()||[]).filter((e=>Array.isArray(e.roles)&&e.roles.includes("administrator")))}}))((({attributes:e,updateObj:t,users:n})=>{const{emailOptions:o}=e,i=n.map((e=>({label:e?.username,value:e?.email})));return(0,m.useEffect)((()=>{""===o.admin.email&&i.length>0&&t("emailOptions",i[0]?.value,"admin","email")}),[i]),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Email Options","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:[{title:"User",name:"user"},{title:"Admin",name:"admin"}],onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Email Template Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{options:[{label:"WordPress Default",value:"default"},{label:"Custom",value:"custom"}],value:o[e.name].type,onChange:n=>t("emailOptions",n,e.name,"type")}),"custom"===o[e.name].type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Email Subject","b-blocks"),value:o[e.name].mail.subject,onChange:n=>t("emailOptions",n,e.name,"mail","subject")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("From (administrator)","b-blocks"),options:i,value:o.admin.email,onChange:e=>t("emailOptions",e,"admin","email")}),(0,l.jsx)(v,{children:(0,x.__)("Email Message","b-blocks")}),(0,l.jsx)(La,{value:o[e.name].mail.message,onChange:n=>t("emailOptions",n,e.name,"mail","message")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Email Content Type","b-blocks"),labelPosition:"edge",options:[{label:"HTML",value:"html"},{label:"Plain",value:"plain"}],value:o[e.name].messageType,onChange:n=>t("emailOptions",n,e.name,"messageType")})]})]})})})})),gj=({attributes:e,handleReplaceForm:t})=>{const{form:n}=e;return(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Form","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Form Type","b-blocks"),labelPosition:"edge",options:[{label:"Register",value:"register"},{label:"Login",value:"login"}],value:n.formType,onChange:e=>t(e)})})},mj=({attributes:e,setAttributes:t,updateObj:n})=>{const{formOptions:o,form:i}=e,{formType:a}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Form Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Redirect","b-blocks"),checked:o.isRedirect,value:o.isRedirect,onChange:e=>t({formOptions:be(o,e,"isRedirect")})}),o.isRedirect&&(0,l.jsxs)(l.Fragment,{children:[!o.redirectPrevious&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Custom Redirect URL","b-blocks"),value:o.customUrl,placeholder:location,onChange:e=>n("formOptions",e,"customUrl")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Redirect to Previous Page","b-blocks"),checked:o.redirectPrevious,value:o.redirectPrevious,onChange:e=>n("formOptions",e,"redirectPrevious")})]}),"register"===a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("New User Role","b-blocks"),value:o.userRole,onChange:e=>n("formOptions",e,"userRole"),options:dj})]})]})},bj=({attributes:e,updateObj:t})=>{const{message:n}=e;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Message","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Demo Success message"),value:n.isShowDemoSuccess,checked:n.isShowDemoSuccess,onChange:e=>t("message",e,"isShowDemoSuccess")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Demo Error message"),value:n.isShowDemoError,checked:n.isShowDemoError,onChange:e=>t("message",e,"isShowDemoError")}),(0,l.jsx)("div",{className:"mt10",children:(0,l.jsx)("strong",{children:"Success"})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Success Message","b-blocks"),value:n.success.successFulRegistration,onChange:e=>t("message",e,"success","successFulRegistration")}),(0,l.jsx)("p",{className:"mt10 mb0",children:(0,l.jsx)("strong",{children:"Error"})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Default Message","b-blocks"),value:n.error.default,onChange:e=>t("message",e,"error","default")})]})},fj=({attributes:e,setAttributes:t})=>{const{button:n}=e;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Sign Out","b-blocks"),className:"bPlPanelBody",children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Sign Out Label Text","b-blocks"),value:n?.signout?.text?.first,onChange:e=>t({button:{...n,signout:{...n?.signout,text:{...n?.signout?.text,first:e}}}})}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Sign Out Button Text","b-blocks"),value:n?.signout?.text?.second,onChange:e=>t({button:{...n,signout:{...n?.signout,text:{...n?.signout?.text,second:e}}}})})]})},xj=window.location.origin;window.location.origin,window.location.pathname;const yj=({attributes:e,updateObj:t})=>{const{termsConditions:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Terms & Conditions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enforce Terms & Conditions","b-blocks"),checked:n.show,value:n.show,onChange:e=>t("termsConditions",e,"show")}),n.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("First label","b-blocks"),value:n.label.first,onChange:e=>t("termsConditions",e,"label","first")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Second label (Second Label is linkable)","b-blocks"),value:n.label.second,onChange:e=>t("termsConditions",e,"label","second")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Terms & Conditions URL","b-blocks"),value:n.url,placeholder:xj,onChange:e=>t("termsConditions",e,"url")})]})]})},vj=e=>{const{attributes:t}=e,{form:n}=t,{formType:o}=n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(gj,{...e}),(0,l.jsx)(pj,{...e}),"contact"!==o&&(0,l.jsx)(mj,{...e}),"register"===o&&(0,l.jsx)(hj,{...e}),"register"===o&&(0,l.jsx)(yj,{...e}),(0,l.jsx)(bj,{...e}),"contact"!==o&&(0,l.jsx)(fj,{...e})]})},kj=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,
422 +m.useState)("container"),[a,s]=(0,m.useState)("normal"),{styles:r}=e,{buttonStyle:c}=r,{container:d,navigation:u}=c,{first:p,second:h}=u;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Container",value:"container"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Button",value:"button"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Navigation",value:"navigation"})]}),"container"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:d[n].margin,onChange:e=>t("styles",e,"buttonStyle","container",n,"margin")}),(0,l.jsx)(Ve,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Display As","b-blocks")," ",(0,l.jsx)(_,{})]}),options:[{label:"Inline",value:"row"},{label:"Block",value:"column"}],value:d[n].display,onChange:e=>t("styles",e,"buttonStyle","container",n,"display")}),"row"===d[n].display&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.SelectControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Justify Content","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",options:uj,value:d[n].justify,onChange:e=>t("styles",e,"buttonStyle","container",n,"justify")})}),"column"===d[n].display&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isDeselectable:!0,value:d[n].align,onChange:e=>t("styles",e,"buttonStyle","container",n,"align"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:(0,l.jsx)(aj,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(sj,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:(0,l.jsx)(rj,{})})]})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",value:d[n].gap,onChange:e=>t("styles",e,"buttonStyle","container",n,"gap")})]})]}),"button"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:c.button[n].margin,onChange:e=>t("styles",e,"buttonStyle","button",n,"margin")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:c.button[n].padding,onChange:e=>t("styles",e,"buttonStyle","button",n,"padding")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:c.button.typography,onChange:e=>t("styles",e,"buttonStyle","button","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>{s(e)},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:c.button[a].color,onChange:e=>t("styles",e,"buttonStyle","button",a,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:c.button[a].bg,onChange:e=>t("styles",e,"buttonStyle","button",a,"bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c.button[a][n].border,onChange:e=>t("styles",e,"buttonStyle","button",a,n,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c.button[a][n].radius,onChange:e=>t("styles",e,"buttonStyle","button",a,n,"radius")}),(0,l.jsx)(yt,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Shadow","b-blocks")," ",(0,l.jsx)(_,{})]}),value:c.button[a][n].shadow,onChange:e=>t("styles",e,"buttonStyle","button",a,n,"shadow")})]}),"navigation"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"mt10",children:(0,l.jsx)("strong",{children:"First Text"})}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:p.color,onChange:e=>t("styles",e,"buttonStyle","navigation","first","color")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:p[n].margin,onChange:e=>t("styles",e,"buttonStyle","navigation","first",n,"margin")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:p.typography,onChange:e=>t("styles",e,"buttonStyle","navigation","first","typography")}),(0,l.jsx)("hr",{}),(0,l.jsx)("strong",{children:"Second Linkable Text"}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:h.color,onChange:e=>t("styles",e,"buttonStyle","navigation","second","color")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:h[n].margin,onChange:e=>t("styles",e,"buttonStyle","navigation","second",n,"margin")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:h.typography,onChange:e=>t("styles",e,"buttonStyle","navigation","second","typography")})]}),(0,l.jsx)("hr",{className:"mt10 mb10"}),(0,l.jsx)("strong",{children:"Spinner"}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Demo spinner","b-blocks"),checked:c.spinner.isDemo,value:c.spinner.isDemo,onChange:e=>t("styles",e,"buttonStyle","spinner","isDemo")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Size","b-blocks"),value:c.spinner.size,onChange:e=>t("styles",e,"buttonStyle","spinner","size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:c.spinner.color,onChange:e=>t("styles",e,"buttonStyle","spinner","color")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:c.spinner.margin,onChange:e=>t("styles",e,"buttonStyle","spinner","margin")})]})},wj=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{form:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Form","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Form Width","b-blocks"),labelPosition:"edge",options:[{label:"Full Width (100%)",value:"full"},{label:"Custom",value:"custom"}],value:i.width.type,onChange:e=>t("styles",e,"form","width","type")}),"custom"===i.width.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",value:i.width[n],onChange:e=>t("styles",e,"form","width",n),isUnitSelectTabbable:!0}),(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isDeselectable:!0,value:i.align,onChange:e=>t("styles",e,"form","align"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:(0,l.jsx)(aj,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(sj,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:(0,l.jsx)(rj,{})})]})]})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>t("styles",e,"form","bg")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:i[n].margin,onChange:e=>t("styles",e,"form",n,"margin")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i[n].padding,
423 +onChange:e=>t("styles",e,"form",n,"padding")}),(0,l.jsx)(y.RangeControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Field Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i[n].fieldGap,onChange:e=>t("styles",e,"form",n,"fieldGap")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i.border,onChange:e=>t("styles",e,"form","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[n].radius,onChange:e=>t("styles",e,"form",n,"radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:i.shadow,onChange:e=>t("styles",e,"form","shadow")})]})},_j=({attributes:e,updateObj:t})=>{const{styles:n}=e,{message:o}=n;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Messages","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:[{title:"Success",name:"success"},{title:"Error",name:"error"}],onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),values:o[e.name].padding,onChange:n=>t("styles",n,"message",e.name,"padding")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:o[e.name].margin,onChange:n=>t("styles",n,"message",e.name,"margin")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o[e.name].color.text,onChange:n=>t("styles",n,"message",e.name,"color","text")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),isImage:!1,value:o[e.name].color.bg,onChange:n=>t("styles",n,"message",e.name,"color","bg")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:o[e.name].typo,onChange:n=>t("styles",n,"message",e.name,"typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e.name].border,onChange:n=>t("styles",n,"message",e.name,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius"),values:o[e.name].radius,onChange:n=>t("styles",n,"message",e.name,"radius")})]})})})},Cj=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{termsConditions:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Terms & Conditions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.margin[n],onChange:e=>t("termsConditions",e,"margin",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.padding[n],onChange:e=>t("termsConditions",e,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Checkbox Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o.checkboxMargin[n],onChange:e=>t("termsConditions",e,"checkboxMargin",n)}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:o.color.text,onChange:e=>t("termsConditions",e,"color","text")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Link Color","b-blocks"),value:o.color.link,onChange:e=>t("termsConditions",e,"color","link")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Background Color","b-blocks"),value:o.color.bg,onChange:e=>t("termsConditions",e,"color","bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Checkbox","b-blocks"),value:o.color.checkbox,onChange:e=>t("termsConditions",e,"color","checkbox")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("termsConditions",e,"typography")})]})})),jj=e=>{const{attributes:t}=e,{termsConditions:n,form:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wj,{...e}),(0,l.jsx)(kj,{...e}),n.show&&"register"===o.formType&&(0,l.jsx)(Cj,{...e}),(0,l.jsx)(_j,{...e})]})},$j=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:cj,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(vj,{...e}),"style"===t.name&&(0,l.jsx)(jj,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},Sj="b-blocks-input-field-error-container",Tj={invalid_email:{name:"email",message:"Incorrect email"},invalid_username:{name:"username",message:"Incorrect username"},incorrect_password:{name:"password",message:"Incorrect password"}},Nj=(e,t)=>{if(!e)return{container:null,messageEl:null};const n=e.querySelector(`.b-blocks-input-field-validation-${t}`),o=n?.querySelector(".b-blocks-input-field-error-message");return{container:n,messageEl:o}},Mj=(e,t,n)=>{const{container:o,messageEl:i}=Nj(e,t);o&&i&&(i.style.display="unset",i.textContent=n,o.classList.add(Sj))},Lj=(e,t)=>{const{container:n,messageEl:o}=Nj(e,t);n&&o&&(o.style.display="none",n.classList.remove(Sj))},Pj=({children:e,attributes:t,isFrontend:n=!1})=>{const{form:o,button:i,termsConditions:a,message:s,formId:r,postId:c,formOptions:d,styles:u}=t,{navigation:p}=i,h=!n&&s.isShowDemoSuccess,g=!n&&s.isShowDemoError,[b,f]=(0,m.useState)(!1),[x,y]=(0,m.useState)(!1),v=window.bBlocksCursorDataConfig?.nonce,{data:k,saveData:w,error:_,isLoading:C,isError:j}=jd("b_form_submit",{_nonce:v},!1),$=(0,m.useRef)("");return((e,t,n,o)=>{(0,m.useEffect)((()=>{const t=n?.current;if(t&&e){if("register"===o){const n=(e=>{if(!e)return[];const t=new FormData(e);return Array.from(t.keys())})(t),o=e?.message||"";n.forEach((e=>{"string"==typeof o&&o.toLowerCase().includes(e.toLowerCase())?Mj(t,e,o):Lj(t,e)}))}if("login"===o){const n=e?.errorCode;(e=>{["email","username","password"].forEach((t=>Lj(e,t)))})(t);const o=Tj[n];o&&Mj(t,o.name,o.message)}}}),[e,t,n,o])})(_,j,$,o.formType),(0,m.useEffect)((()=>{_&&_?.message?.includes("Something went wrong")&&y(!0),k&&(f(!0),$.current.reset(),d.isRedirect&&(d.redirectUrl&&!d.redirectPrevious?setTimeout((()=>{window.location.href=d.redirectUrl}),500):d.redirectPrevious?setTimeout((()=>{window.history.back()}),1e3):window.location.href="/"))}),[_,C,k]),(0,l.jsxs)("div",{className:"b-blocks-b-form-wrapper",children:[(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=e.target;let n=[];const i=new FormData(e.target),a=Object.fromEntries(i);Object.keys(a).forEach((e=>{const o=(e=>{const n=t.querySelector(`.b-blocks-input-field-validation-${e}`);if(n)return JSON.parse(n.dataset.iserror)?(n.classList.add("b-blocks-input-field-error-container"),e):void(_||n.classList.remove("b-blocks-input-field-error-container"))})(e);o&&n.push(o)})),n.length>0?y(!0):w({...a,type:o.formType,current_post_id:c,formId:r})},className:"b-blocks-b-form-container",ref:$,children:[e,a.show&&"register"===o.formType&&(0,l.jsxs)("div",{className:"b-blocks-b-form-termsConditionWrapper",children:[(0,l.jsxs)("label",{className:"b-blocks-b-form-checkbox-container",children:[(0,l.jsx)("input",{type:"checkbox",required:!0}),(0,l.jsx)("span",{className:"b-blocks-b-form-checkmark"})]}),(0,l.jsx)("label",{className:"b-blocks-b-blocks-termsConditionWrapper-first",children:a.label.first}),(0,l.jsx)("a",{className:"b-blocks-b-blocks-termsConditionWrapper-link",href:a.url,children:a.label.second})]}),(0,l.jsxs)("div",{className:"b-blocks-form-button-wrapper",children:[(0,l.jsxs)("button",{className:"b-blocks-form-submitBtn",type:"submit",children:[i.button.text," ",C&&n&&(0,l.jsx)(lj,{className:"b-form-button-loading-spinner"})," ",!n&&u.buttonStyle.spinner.isDemo&&(0,l.jsx)(lj,{className:"b-form-button-loading-spinner"})," "]}),p.isNavigation&&(p.first.text||p.second.text)&&(0,l.jsxs)("div",{className:"b-blocks-form-button-navigation-wrapper",children:[(0,l.jsx)("p",{
424 +className:"b-blocks-form-button-navigation-text",children:p.first.text})," ",(0,l.jsx)("a",{className:"b-blocks-form-button-navigation-link",href:p.second.url,children:p.second.text})," "]})]})]}),b&&s.success.successFulRegistration&&(0,l.jsx)("div",{className:"b-blocks-b-form-success-message",children:(0,l.jsx)("span",{children:s.success.successFulRegistration})}),h&&(0,l.jsx)("div",{className:"b-blocks-b-form-success-message",children:(0,l.jsx)("span",{children:s.success.successFulRegistration})}),x&&s.error.default&&(0,l.jsx)("div",{className:"b-blocks-b-form-error-message",children:(0,l.jsx)("span",{children:s.error.default})}),g&&(0,l.jsx)("div",{className:"b-blocks-b-form-error-message",children:(0,l.jsx)("span",{children:s.error.default})})]})},Ej=(0,f.withSelect)((e=>{const{getDeviceType:t,getCurrentPostId:n}=e("core/editor");return{device:t()?.toLowerCase(),postId:n()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i,postId:a}=e,{form:s,button:r,formId:c,message:d}=t,{replaceInnerBlocks:u}=(0,f.useDispatch)("core/block-editor"),g=fe(t,n);(0,m.useEffect)((()=>{n({clientId:o})}),[o]);const b=(0,f.useSelect)((e=>e("core/block-editor").getBlocks(o)),[o]),x=e=>{(e=>{const t={form:{...s,formType:"login"},button:{...r,navigation:{...r.navigation,first:{...r.navigation.first,text:"Not registered yet?"},second:{...r.navigation.second,text:"Create an Account"}}},message:{...d,success:{...d.success,successFulRegistration:"Login completed successfully!"}}},o={form:{...s,formType:"register"},button:{...r,navigation:{...r.navigation,first:{...r.navigation.first,text:"Already have an account?"},second:{...r.navigation.second,text:"Sign In"}}},message:{...d,success:{...d.success,successFulRegistration:"Registration completed successfully!"}}};"register"===e?n(o):"login"===e&&n(t)})(e);const t=oj[e].map((e=>(0,p.createBlock)(e.name,e.attributes||{})));u(o,t,!1)};return(0,m.useEffect)((()=>{const e="b_form_"+Math.floor(1e9*Math.random()).toString();c||""!==c||n({formId:e}),jt(a)&&n({postId:a})}),[a]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)($j,{attributes:t,setAttributes:n,updateObj:g,isPremium:!1,device:i,clientId:o,handleReplaceForm:x}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(ij,{attributes:t,id:`block-${o}`,isBackend:!0}),""===s.formType&&(0,l.jsx)(nj,{updateObj:g,clientId:o,handleReplaceForm:x}),""!==s.formType&&(0,l.jsx)(Pj,{attributes:t,isFrontend:!1,children:(0,l.jsx)("div",{className:"b-blocks-b-form-child-field-wrapper",children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:["b-blocks/input-field","b-blocks/row","b-blocks/dual-color-heading","b-blocks/icon-box","b-blocks/advanced-image","core/paragraph"],templateLock:!1,renderAppender:()=>b?.length>0?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{})})})})]})]})}));Pl(tj.name)&&(0,p.registerBlockType)(tj,{icon:Jr,edit:Ej,save:h.InnerBlocks.Content});const Aj=JSON.parse('{"apiVersion":3,"name":"b-blocks/gif","title":"Gif Image","description":"Embed gif image.","category":"bBlocks","keywords":["video image","embed gif image","animated image"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"cId":{"type":"string","default":""},"gif":{"type":"object","default":null},"gifAlign":{"type":"string","default":"center"},"gifWidth":{"type":"string","default":"0px"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Bj="bBlocksGif";Pl(Aj.name)&&(0,p.registerBlockType)(Aj,{icon:vr,edit:e=>{const{attributes:{gif:t,gifAlign:n,gifWidth:o},setAttributes:i,clientId:a}=e;(0,m.useEffect)((()=>{a&&i({cId:a.substring(0,10)})}),[a]);const s=(0,m.useRef)(null),[r,c]=(0,m.useState)(""),[d,u]=(0,m.useState)([]),p=`block-${a}`,g="dM3iQq13qK0Mls9ygR2zjxxPDQVlw1Ql";""===r&&(0,m.useEffect)((()=>{fetch(`https://api.giphy.com/v1/gifs/trending?api_key=${g}&limit=25`).then((e=>e.json())).then((e=>{u(e.data)})).catch((e=>alert(e.message)))}),[r]),r&&""!==r&&(0,m.useEffect)((()=>{fetch(`https://api.giphy.com/v1/gifs/search?api_key=${g}&limit=25&q=${r}`).then((e=>e.json())).then((e=>{u(e.data)})).catch((e=>alert(e.message)))}),[r]);const b=e=>{const t=s.current?.ownerDocument;if(!t)return;const n=t.getElementById(p),o=t.getElementById(`gifModal-${a}`);n&&o&&(n.style.minHeight=e?"720px":"auto",o.style.display=e?"block":"none")},f=()=>b(!0),v=()=>b(!1);return(0,m.useEffect)((()=>{const e=s.current?.ownerDocument,t=e?.defaultView;if(!t)return;const n=t=>{const n=e.getElementById(p),o=e.getElementById(`gifModal-${a}`);n&&o&&t.target===o&&(n.style.minHeight="auto",o.style.display="none")};return t.addEventListener("click",n),()=>t.removeEventListener("click",n)}),[p,a]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:un}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Gif Settings","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:o,onChange:e=>i({gifWidth:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)("small",{children:(0,x.__)("Keep width 0, to auto width.","b-blocks")})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>i({gifAlign:e}),describedBy:(0,x.__)("GIF Alignment"),alignmentControls:[{title:(0,x.__)("GIF in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("GIF in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("GIF in right","b-blocks"),align:"right",icon:"align-right"}]})}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:s}),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t#${p} .${Bj}{\n\t\t\t\t\ttext-align: ${n};\n\t\t\t\t}\n\t\t\t\t#${p} .${Bj} figure{\n\t\t\t\t\twidth: ${"0px"===o||"0%"===o||"0em"===o?"auto":o};\n\t\t\t\t}\n\t\t\t`.replace(/\s+/g," ")}}),(0,l.jsxs)("div",{className:Bj,children:[(0,l.jsxs)("figure",{className:"editImageHolder",children:[t&&(0,l.jsx)("img",{src:t?.images?.original?.url,alt:t?.title}),(0,l.jsx)("div",{className:"mediaControl",children:t?(0,l.jsxs)("div",{className:"btnControl",children:[(0,l.jsx)(y.Button,{icon:"controls-repeat",onClick:f,children:(0,x.__)("Replace","b-blocks")}),(0,l.jsx)(y.Button,{icon:"exit",onClick:()=>i({gif:null}),className:"btnRed",children:(0,x.__)("Remove","b-blocks")})]}):(0,l.jsx)("div",{className:"btnControl",children:(0,l.jsx)(y.Button,{icon:"upload",onClick:f,children:(0,x.__)("Insert GIF","b-blocks")})})})]}),(0,l.jsxs)("div",{className:"gifModal",id:`gifModal-${a}`,children:[(0,l.jsxs)("div",{className:"gifModalContent",children:[(0,l.jsx)("span",{className:"close",onClick:v,children:"×"}),(0,l.jsxs)("div",{className:"gifModalHeader",children:[(0,l.jsx)("label",{htmlFor:`gifSrcBox-${a}`,children:"Search Gif:"}),(0,l.jsx)(y.TextControl,{className:"gifSearchField",value:r,id:`gifSrcBox-${a}`,onChange:e=>c(e),placeholder:(0,x.__)("Search gif here","b-blocks")})]}),(0,l.jsx)("div",{className:"gifModalBody",children:(0,l.jsx)("div",{className:"gifData",children:0!==d.length&&d.map((e=>(0,l.jsxs)("figure",{onClick:()=>{i({gif:e,width:`${parseInt(e.images.original.width)}px`}),v()},children:[(0,l.jsx)("img",{src:e.images.downsized.url,alt:e.title}),(0,l.jsx)("figcaption",{children:e.title})]},e.id)))})})," "]})," "]})," "]})]})]})},save:()=>null})
425 +;const Ij=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/google-map","title":"Google Map","category":"bBlocks","description":"A fully interactive Google Map: custom markers with rich info windows, clustering, category filtering, map themes, traffic/transit/KML/GeoJSON layers, shapes, directions, search and geolocation — plus the classic embed-URL mode.","keywords":["google map","map","marker","location","directions","store locator","embed","contact"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"source":{"type":"object","default":{"type":"interactive","embedUrl":"","center":{"lat":"","lng":"","address":""},"mapId":"","language":"","region":""}},"map":{"type":"object","default":{"zoom":12,"minZoom":"","maxZoom":"","mapType":"roadmap","allowTypeSwitch":true,"gestureHandling":"cooperative","draggable":true,"scrollwheel":false,"fitBounds":false,"desktop":{"height":"450px","maxWidth":"","align":"center"},"tablet":{"height":"350px","maxWidth":"","align":""},"mobile":{"height":"250px","maxWidth":"","align":""},"useAspectRatio":false,"aspectRatio":{"desktop":"16/9","tablet":"","mobile":""},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{},"mobile":{}},"shadow":[]}},"controls":{"type":"object","default":{"disableDefaultUI":false,"zoom":true,"zoomPosition":"RIGHT_BOTTOM","mapType":true,"streetView":true,"fullscreen":true,"scale":false,"rotate":false,"keyboardShortcuts":true}},"markers":{"type":"array","default":[{"id":"marker-1","title":"Our Office","content":"<p>Drop by any weekday between 9am and 5pm.</p>","address":"","lat":23.8103,"lng":90.4125,"category":"","icon":{"type":"default","url":{"library":"","upload":""}},"image":{"url":"","alt":""},"pinColor":"","glyphColor":"","animation":"","draggable":true,"openByDefault":false}]},"marker":{"type":"object","default":{"pinColor":"#8a2be2","glyphColor":"#ffffff","borderColor":"#ffffff","scale":1,"animation":"none","desktop":{"size":"40px"},"tablet":{"size":""},"mobile":{"size":""}}},"infoWindow":{"type":"object","default":{"trigger":"click","singleOpen":true,"bgColor":"#ffffff","textColor":"#1e1e1e","typo":{"fontSize":{"desktop":"14px"}},"border":{"width":"0px"},"shadow":[],"desktop":{"maxWidth":"280px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"maxWidth":"","padding":{},"radius":{}},"mobile":{"maxWidth":"","padding":{},"radius":{}}}},"clustering":{"type":"object","default":{"enabled":false,"background":{"type":"solid","color":"#8a2be2"},"color":"#8a2be2","size":"40px","textColor":"#ffffff","clickToZoom":true}},"categories":{"type":"array","default":[]},"filterBar":{"type":"object","default":{"show":false,"align":"left","showAll":true,"allLabel":"All","activeColor":"#8a2be2","color":"#1e1e1e","bgColor":"#f0f0f0","activeTextColor":"#ffffff","typo":{"fontSize":{"desktop":"13px"}},"desktop":{"gap":"8px","padding":{"top":"6px","right":"14px","bottom":"6px","left":"14px"},"radius":{"top":"999px","right":"999px","bottom":"999px","left":"999px"}},"tablet":{"gap":"","padding":{},"radius":{}},"mobile":{"gap":"","padding":{},"radius":{}}}},"theme":{"type":"object","default":{"preset":"default","customJson":"","grayscale":0,"saturation":0,"hue":""}},"layers":{"type":"object","default":{"traffic":false,"transit":false,"bicycling":false,"kmlUrl":"","geoJson":"","fitGeoJson":true,"heatmap":{"enabled":false,"radius":20,"opacity":0.6}}},"shapes":{"type":"array","default":[]},"directions":{"type":"object","default":{"enabled":false,"mode":"DRIVING","origin":{"address":"","lat":"","lng":""},"destination":{"address":"","lat":"","lng":""},"waypoints":[],"showPanel":false,"routeColor":"#2A6DF0"}},"tools":{"type":"object","default":{"searchBox":false,"geolocation":false,"nearbyRadius":0}},"performance":{"type":"object","default":{"lazyLoad":"onView"}},"caption":{"type":"object","default":{"text":"","align":"center","color":"","typo":{"fontSize":{"desktop":"14px"}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"linear","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"angel":90},"img":{"url":""}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),Oj="b-blocks-google-map",Rj={lat:23.8103,lng:90.4125},zj=[{label:(0,x.__)("16:9 (Widescreen)","b-blocks"),value:"16/9"},{label:(0,x.__)("4:3 (Standard)","b-blocks"),value:"4/3"},{label:(0,x.__)("1:1 (Square)","b-blocks"),value:"1/1"},{label:(0,x.__)("3:4 (Portrait)","b-blocks"),value:"3/4"}],Dj=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],Fj=/^(www\.|maps\.)?google\.(com|co\.[a-z]{2}|com\.[a-z]{2}|[a-z]{2,3})$/i,Hj=e=>{if(!e||"string"!=typeof e)return!1;try{const t=new URL(e);return"https:"===t.protocol&&!!Fj.test(t.hostname)&&!!t.pathname.startsWith("/maps/embed")}catch(e){return!1}},Wj=e=>{const t=String(e?.message||e?.code||"");return/REQUEST_DENIED|PERMISSION|BILLING/i.test(t)?(0,x.__)("Google denied the lookup. The Geocoding API is probably not enabled for this key, or the project has no billing account. Enter the coordinates manually below.","b-blocks"):/OVER_QUERY_LIMIT|OVER_DAILY/i.test(t)?(0,x.__)("This API key is over its request quota. Try again later, or enter the coordinates manually below.","b-blocks"):(0,x.__)("No result for that address. Check the spelling, or enter the coordinates manually below.","b-blocks")},Uj=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","GeometryCollection"],Gj=e=>e&&"Feature"===e.type?e:e&&Uj.includes(e.type)?{type:"Feature",geometry:e,properties:{}}:null,Vj=e=>!(!e||"object"!=typeof e||Array.isArray(e)||void 0===e.stylers&&void 0===e.featureType&&void 0===e.elementType),qj=e=>Array.isArray(e)?e.length>0&&e.every(Vj):Vj(e),Yj=e=>{if(!e||!String(e).trim())return{data:null,error:""};let t;try{t=JSON.parse(e)}catch(e){return{data:null,error:(0,x.__)("This is not valid JSON, so it will be skipped.","b-blocks")}}if(Array.isArray(t)){const e=t.map(Gj).filter(Boolean);return e.length?{data:{type:"FeatureCollection",features:e},error:""}:{data:null,error:qj(t)?(0,x.__)("This is a Google Maps style, not GeoJSON. Paste it into Theme → Custom JSON to recolour the map.","b-blocks"):(0,x.__)('This array holds no recognisable GeoJSON features. GeoJSON describes places — each entry needs a "geometry" with coordinates.',"b-blocks")}}if(!t||"object"!=typeof t)return{data:null,error:(0,x.__)("GeoJSON must be an object or an array of features.","b-blocks")};if("FeatureCollection"===t.type||"Feature"===t.type)return{data:t,error:""};const n=Gj(t);return n?{data:n,error:""}:qj(t)?{data:null,error:(0,x.__)("This is a Google Maps style, not GeoJSON. Paste it into Theme → Custom JSON to recolour the map.","b-blocks")}:{data:null,
426 426 /* translators: %s: the "type" value found in the pasted GeoJSON */
427 -error:t.type?(0,x.sprintf)((0,x.__)('Unrecognised GeoJSON type "%s". Expected a Feature, a FeatureCollection, or a geometry.',"b-blocks"),String(t.type)):(0,x.__)('This GeoJSON has no "type" property.',"b-blocks")}},Yj=e=>{if(!e||"string"!=typeof e)return!1;try{const{hostname:t}=new URL(e);return/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(t)||/\.(local|test|localhost|internal|invalid)$/i.test(t)||/^(10\.|192\.168\.|172\.(1[6-9]|2\d|3[01])\.)/.test(t)}catch(e){return!1}},Kj=(e,t=null)=>{const n=parseFloat(e);return Number.isFinite(n)?n:t},Qj=(e={})=>{const t=e.source||{},n=t.type||(t.embedUrl?"embed":"interactive");return{...e,source:{...t,type:n,center:{...Oj,...t.center||{}}}}},Zj=(e,t,n)=>{if(!e)return;const o=t=>{const o=e?.[t]?.[n];if(void 0!==o&&""!==o)return o;const i=e?.[n]?.[t];return void 0!==i&&""!==i?i:void 0};return"mobile"===t?o("mobile")??o("tablet")??o("desktop"):"tablet"===t?o("tablet")??o("desktop"):o("desktop")},Xj=(e,t,n)=>e?.[t]?.[n]??e?.[n]?.[t]??"",Jj={default:[],silver:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],retro:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]}],dark:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],night:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]}],aubergine:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]},e$=(e={})=>{const{preset:t="default",customJson:n="",grayscale:o=0,saturation:i=0,hue:a=""}=e;let s=[];if("custom"===t)try{const e=JSON.parse(n||"[]");Array.isArray(e)&&(s=e)}catch(e){s=[]}else s=Jj[t]||[];const r=[];return Kj(o,0)&&r.push({saturation:-Math.abs(Kj(o,0))}),Kj(i,0)&&r.push({saturation:Kj(i,0)}),a&&r.push({hue:a}),r.length?[...s,{elementType:"all",stylers:r}]:s},t$=e=>{if(!e||!e.trim())return!0;try{return Array.isArray(JSON.parse(e))}catch(e){return!1}},n$=({attributes:e,id:o,isBackend:i=!1})=>{const{map:a={},marker:s={},infoWindow:r={},clustering:c={},categories:d=[],filterBar:u={},caption:p={},advanced:h}=e,g=`#${o}`,m=`${g} .${Ij}-wrapper`,b=`${g} .${Ij}-canvas`,f=`${g} .${Ij}-iframe`,x=`${g} .${Ij}-caption`,y=`${g} .${Ij}-pin`,v=`${g} .${Ij}-cluster`,k=`${g} .${Ij}-filter-chip`,w=`${g} .${Ij}-filter-bar`,_=`${g} .gm-style-iw-c`,C=`${g} .gm-style-iw-d`,j=`${g} .${Ij}-figure, ${g} .${Ij}-placeholder`,$=(d||[]).filter((e=>e?.id&&e?.color)).map((e=>{const t=String(e.id).replace(/["'\\\]]/g,"");return`\n\t\t\t\t${k}[data-category="${t}"] .${Ij}-filter-dot{ background: ${e.color}; }\n\t\t\t\t${k}[data-category="${t}"].active{ background: ${e.color}; }\n\t\t\t`})).join(""),S=e=>{return`\n\t\t${g}{ ${ns("text-align",Zj(a,e,"align"))} }\n\n\t\t${j}{\n\t\t\tmargin: ${t=Zj(a,e,"align"),
428 -"left"===t?"0 auto 0 0":"right"===t?"0 0 0 auto":"0 auto"};\n\t\t\t${ns("max-width",Zj(a,e,"maxWidth"))}\n\t\t}\n\n\t\t${m}{\n\t\t\t${((e,t,n)=>ns("border-radius",hs(t?.[n])))(0,a.borderRadius,e)}\n\t\t\t${a.useAspectRatio?ns("aspect-ratio",((e,t)=>"string"==typeof e?e:e?"mobile"===t?e.mobile||e.tablet||e.desktop:"tablet"===t&&e.tablet||e.desktop:void 0)(a.aspectRatio,e)||"16/9"):ns("height",Zj(a,e,"height"))}\n\t\t}\n\n\t\t${y}{\n\t\t\t${ns("width",s?.[e]?.size)}\n\t\t\t${ns("height",s?.[e]?.size)}\n\t\t}\n\n\t\t${_}{\n\t\t\t${ns("max-width",r?.[e]?.maxWidth)}\n\t\t\t${ns("border-radius",hs(r?.[e]?.radius))}\n\t\t}\n\n\t\t${C}{ ${ns("padding",hs(r?.[e]?.padding))} }\n\n\t\t${w}{ ${ns("gap",u?.[e]?.gap)} }\n\n\t\t${k}{\n\t\t\t${ns("padding",hs(u?.[e]?.padding))}\n\t\t\t${ns("border-radius",hs(u?.[e]?.radius))}\n\t\t}\n\t`;var t};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",p.typo).googleFontLink}\n\t\t\t${ps("",u.typo).googleFontLink}\n\t\t\t${ps("",r.typo).googleFontLink}\n\n\t\t\t${g}{ display: block; }\n\n\t\t\t${j}{ width: 100%; }\n\n\t\t\t${m}{\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n\t\t\t\t${ns("box-shadow",ls(a.shadow||[]))}\n\t\t\t\t${a.useAspectRatio?"height: auto;":""}\n\t\t\t}\n\n\t\t\t${b}, ${f}{\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\t${a.useAspectRatio?"position: absolute; inset: 0;":""}\n\t\t\t}\n\n\t\t\t${v}{\n\t\t\t\t${c.background?os(c.background):ns("background",c.color)}\n\t\t\t\t${ns("color",c.textColor)}\n\t\t\t\t${ns("width",c.size)}\n\t\t\t\t${ns("height",c.size)}\n\t\t\t}\n\n\t\t\t${w}{ ${ns("justify-content","right"===u.align?"flex-end":"center"===u.align?"center":"flex-start")} }\n\n\t\t\t${k}{\n\t\t\t\t${ns("color",u.color)}\n\t\t\t\t${ns("background",u.bgColor)}\n\t\t\t}\n\t\t\t${ps(k,u.typo).styles}\n\n\t\t\t${k}.active{\n\t\t\t\t${ns("background",u.activeColor)}\n\t\t\t\t${ns("color",u.activeTextColor)}\n\t\t\t}\n\n\t\t\t/* After the generic .active rule so a category colour wins. */\n\t\t\t${$}\n\n\t\t\t${_}{\n\t\t\t\t${ns("background",r.bgColor)}\n\t\t\t\t${is(r.border)}\n\t\t\t\t${ns("box-shadow",ls(r.shadow||[]))}\n\t\t\t}\n\n\t\t\t/* The tail is a separate rotated box; without this a recoloured\n\t\t\t info window keeps a white arrow. Both class names are emitted —\n\t\t\t Google renamed it from -t to -tc. */\n\t\t\t${g} .gm-style-iw-t::after,\n\t\t\t${g} .gm-style-iw-tc::after{\n\t\t\t\t${ns("background",r.bgColor)}\n\t\t\t}\n\n\t\t\t${C}, ${g} .${Ij}-info{\n\t\t\t\t${ns("color",r.textColor)}\n\t\t\t}\n\t\t\t${ps(`${g} .${Ij}-info`,r.typo).styles}\n\n\t\t\t${x}{\n\t\t\t\t${ns("text-align",p.align)}\n\t\t\t\t${ns("color",p.color)}\n\t\t\t}\n\t\t\t${ps(x,p.typo).styles}\n\n\t\t\t${S("desktop")}\n\t\t\t${t}{ ${S("tablet")} }\n\t\t\t${n}{ ${S("mobile")} }\n\n\t\t\t${_s(o,h,i,!1)}\n\t\t\t`}})},{getOwnPropertyNames:o$,getOwnPropertySymbols:i$}=Object,{hasOwnProperty:a$}=Object.prototype;function s$(e,t){return function(n,o,i){return e(n,o,i)&&t(n,o,i)}}function r$(e){return function(t,n,o){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,o);const{cache:i}=o,a=i.get(t),s=i.get(n);if(a&&s)return a===n&&s===t;i.set(t,n),i.set(n,t);const r=e(t,n,o);return i.delete(t),i.delete(n),r}}function l$(e){return o$(e).concat(i$(e))}const c$=Object.hasOwn||((e,t)=>a$.call(e,t));function d$(e,t){return e===t||!e&&!t&&e!=e&&t!=t}const{getOwnPropertyDescriptor:u$,keys:p$}=Object;function h$(e,t){return e.byteLength===t.byteLength&&$$(new Uint8Array(e),new Uint8Array(t))}function g$(e,t,n){let o=e.length;if(t.length!==o)return!1;for(;o-- >0;)if(!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function m$(e,t){return e.byteLength===t.byteLength&&$$(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function b$(e,t){return d$(e.getTime(),t.getTime())}function f$(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function x$(e,t){return e===t}function y$(e,t,n){const o=e.size;if(o!==t.size)return!1;if(!o)return!0;const i=new Array(o),a=e.entries();let s,r,l=0;for(;(s=a.next())&&!s.done;){const o=t.entries();let a=!1,c=0;for(;(r=o.next())&&!r.done;){if(i[c]){c++;continue}const o=s.value,d=r.value;if(n.equals(o[0],d[0],l,c,e,t,n)&&n.equals(o[1],d[1],o[0],d[0],e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1;l++}return!0}const v$=d$;function k$(e,t,n){const o=p$(e);let i=o.length;if(p$(t).length!==i)return!1;for(;i-- >0;)if(!T$(e,t,n,o[i]))return!1;return!0}function w$(e,t,n){const o=l$(e);let i,a,s,r=o.length;if(l$(t).length!==r)return!1;for(;r-- >0;){if(i=o[r],!T$(e,t,n,i))return!1;if(a=u$(e,i),s=u$(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable))return!1}return!0}function _$(e,t){return d$(e.valueOf(),t.valueOf())}function C$(e,t){return e.source===t.source&&e.flags===t.flags}function j$(e,t,n){const o=e.size;if(o!==t.size)return!1;if(!o)return!0;const i=new Array(o),a=e.values();let s,r;for(;(s=a.next())&&!s.done;){const o=t.values();let a=!1,l=0;for(;(r=o.next())&&!r.done;){if(!i[l]&&n.equals(s.value,r.value,s.value,r.value,e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1}return!0}function $$(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function S$(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function T$(e,t,n,o){return!("_owner"!==o&&"__o"!==o&&"__v"!==o||!e.$$typeof&&!t.$$typeof)||c$(t,o)&&n.equals(e[o],t[o],o,o,e,t,n)}const N$={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},M$=Object.prototype.toString;const L$=P$();function P$(e={}){const{circular:t=!1,createInternalComparator:n,createState:o,strict:i=!1}=e,a=function({circular:e,createCustomConfig:t,strict:n}){let o={areArrayBuffersEqual:h$,areArraysEqual:n?w$:g$,areDataViewsEqual:m$,areDatesEqual:b$,areErrorsEqual:f$,areFunctionsEqual:x$,areMapsEqual:n?s$(y$,w$):y$,areNumbersEqual:v$,areObjectsEqual:n?w$:k$,arePrimitiveWrappersEqual:_$,areRegExpsEqual:C$,areSetsEqual:n?s$(j$,w$):j$,areTypedArraysEqual:n?s$($$,w$):$$,areUrlsEqual:S$,unknownTagComparators:void 0};if(t&&(o=Object.assign({},o,t(o))),e){const e=r$(o.areArraysEqual),t=r$(o.areMapsEqual),n=r$(o.areObjectsEqual),i=r$(o.areSetsEqual);o=Object.assign({},o,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return o}(e),s=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:o,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:r,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:u,areTypedArraysEqual:p,areUrlsEqual:h,unknownTagComparators:g}){return function(m,b,f){if(m===b)return!0;if(null==m||null==b)return!1;const x=typeof m;if(x!==typeof b)return!1;if("object"!==x)return"number"===x?r(m,b,f):"function"===x&&a(m,b,f);const y=m.constructor;if(y!==b.constructor)return!1;if(y===Object)return l(m,b,f);if(Array.isArray(m))return t(m,b,f);if(y===Date)return o(m,b,f);if(y===RegExp)return d(m,b,f);if(y===Map)return s(m,b,f);if(y===Set)return u(m,b,f);const v=M$.call(m);if("[object Date]"===v)return o(m,b,f);if("[object RegExp]"===v)return d(m,b,f);if("[object Map]"===v)return s(m,b,f);if("[object Set]"===v)return u(m,b,f);if("[object Object]"===v)return"function"!=typeof m.then&&"function"!=typeof b.then&&l(m,b,f);if("[object URL]"===v)return h(m,b,f);if("[object Error]"===v)return i(m,b,f);if("[object Arguments]"===v)return l(m,b,f);if(N$[v])return p(m,b,f)
429 -;if("[object ArrayBuffer]"===v)return e(m,b,f);if("[object DataView]"===v)return n(m,b,f);if("[object Boolean]"===v||"[object Number]"===v||"[object String]"===v)return c(m,b,f);if(g){let e=g[v];if(!e){const t=null!=(k=m)?k[Symbol.toStringTag]:void 0;t&&(e=g[t])}if(e)return e(m,b,f)}var k;return!1}}(a),r=n?n(s):(l=s,function(e,t,n,o,i,a,s){return l(e,t,s)});var l;return function({circular:e,comparator:t,createState:n,equals:o,strict:i}){if(n)return function(a,s){const{cache:r=(e?new WeakMap:void 0),meta:l}=n();return t(a,s,{cache:r,equals:o,meta:l,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};const a={cache:void 0,equals:o,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}({circular:t,comparator:s,createState:o,equals:r,strict:i})}P$({strict:!0}),P$({circular:!0}),P$({circular:!0,strict:!0}),P$({createInternalComparator:()=>d$}),P$({strict:!0,createInternalComparator:()=>d$}),P$({circular:!0,createInternalComparator:()=>d$}),P$({circular:!0,createInternalComparator:()=>d$,strict:!0});const E$=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],A$=new Uint32Array(96);class B${static from(e){if(!e||void 0===e.byteLength||e.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(1!==o)throw new Error(`Got v${o} data when expected v1.`);const i=E$[15&n];if(!i)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(e,2,1),[s]=new Uint32Array(e,4,1);return new B$(s,a,i,void 0,e)}constructor(e,t=64,n=Float64Array,o=ArrayBuffer,i){if(isNaN(e)||e<0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const a=E$.indexOf(this.ArrayType),s=2*e*this.ArrayType.BYTES_PER_ELEMENT,r=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-r%8)%8;if(a<0)throw new Error(`Unexpected typed array class: ${n}.`);if(i)this.data=i,this.ids=new this.IndexArrayType(i,8,e),this.coords=new n(i,8+r+l,2*e),this._pos=2*e,this._finished=!0;else{const i=this.data=new o(8+s+r+l);this.ids=new this.IndexArrayType(i,8,e),this.coords=new n(i,8+r+l,2*e),this._pos=0,this._finished=!1,new Uint8Array(i,0,2).set([219,16+a]),new Uint16Array(i,2,1)[0]=t,new Uint32Array(i,4,1)[0]=e}}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return I$(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:a,nodeSize:s}=this;A$[0]=0,A$[1]=i.length-1,A$[2]=0;let r=3;const l=[];for(;r>0;){const c=A$[--r],d=A$[--r],u=A$[--r];if(d-u<=s){for(let s=u;s<=d;s++){const r=a[2*s],c=a[2*s+1];r>=e&&r<=n&&c>=t&&c<=o&&l.push(i[s])}continue}const p=u+d>>1,h=a[2*p],g=a[2*p+1];h>=e&&h<=n&&g>=t&&g<=o&&l.push(i[p]),(0===c?e<=h:t<=g)&&(A$[r++]=u,A$[r++]=p-1,A$[r++]=1-c),(0===c?n>=h:o>=g)&&(A$[r++]=p+1,A$[r++]=d,A$[r++]=1-c)}return l}within(e,t,n){const o=[];return this.withinInto(e,t,n,o),o}withinInto(e,t,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:a,nodeSize:s}=this;A$[0]=0,A$[1]=i.length-1,A$[2]=0;let r=3,l=0;const c=n*n;for(;r>0;){const d=A$[--r],u=A$[--r],p=A$[--r];if(u-p<=s){for(let n=p;n<=u;n++)D$(a[2*n],a[2*n+1],e,t)<=c&&(o[l++]=i[n]);continue}const h=p+u>>1,g=a[2*h],m=a[2*h+1];D$(g,m,e,t)<=c&&(o[l++]=i[h]),(0===d?e-n<=g:t-n<=m)&&(A$[r++]=p,A$[r++]=h-1,A$[r++]=1-d),(0===d?e+n>=g:t+n>=m)&&(A$[r++]=h+1,A$[r++]=u,A$[r++]=1-d)}return l}}function I$(e,t,n,o,i,a){if(i-o<=n)return;const s=o+i>>1;O$(e,t,s,o,i,a),I$(e,t,n,o,s-1,1-a),I$(e,t,n,s+1,i,1-a)}function O$(e,t,n,o,i,a){for(;i>o;){if(i-o>600){const s=i-o+1,r=n-o+1,l=Math.log(s),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(s-c)/s)*(r-s/2<0?-1:1);O$(e,t,n,Math.max(o,Math.floor(n-r*c/s+d)),Math.min(i,Math.floor(n+(s-r)*c/s+d)),a)}const s=t[2*n+a];let r=o,l=i;for(R$(e,t,o,n),t[2*i+a]>s&&R$(e,t,o,i);r<l;){for(R$(e,t,r,l),r++,l--;t[2*r+a]<s;)r++;for(;t[2*l+a]>s;)l--}t[2*o+a]===s?R$(e,t,o,l):(l++,R$(e,t,l,i)),l<=n&&(o=l+1),n<=l&&(i=l-1)}}function R$(e,t,n,o){z$(e,n,o),z$(t,2*n,2*o),z$(t,2*n+1,2*o+1)}function z$(e,t,n){const o=e[t];e[t]=e[n],e[n]=o}function D$(e,t,n,o){const i=e-n,a=t-o;return i*i+a*a}const F$={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},H$=Math.fround||(W$=new Float32Array(1),e=>(W$[0]=+e,W$[0]));var W$;class U${constructor(e){this.options=Object.assign(Object.create(F$),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:o}=this.options;t&&console.time("total time");const i=`prepare ${e.length} points`;t&&console.time(i),this.points=e;const a=[];for(let t=0;t<e.length;t++){const n=e[t];if(!n.geometry)continue;const[o,i]=n.geometry.coordinates,s=H$(q$(o)),r=H$(Y$(i));a.push(s,r,1/0,t,-1,1),this.options.reduce&&a.push(0)}let s=this.trees[o+1]=this._createTree(a);t&&console.timeEnd(i);for(let e=o;e>=n;e--){const n=+Date.now();s=this.trees[e]=this._createTree(this._cluster(s,e)),t&&console.log("z%d: %d clusters in %dms",e,s.numItems,+Date.now()-n)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let i=180===e[2]?180:((e[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){const e=this.getClusters([n,o,180,a],t),s=this.getClusters([-180,o,i,a],t);return e.concat(s)}const s=this.trees[this._limitZoom(t)],r=s.range(q$(n),Y$(a),q$(i),Y$(o)),l=s.data,c=[];for(const e of r){const t=this.stride*e;c.push(l[t+5]>1?G$(l,t,this.clusterProps):this.points[l[t+3]])}return c}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),o="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(o);const a=i.data;if(t*this.stride>=a.length)throw new Error(o);const s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),r=a[t*this.stride],l=a[t*this.stride+1],c=i.within(r,l,s),d=[];for(const t of c){const n=t*this.stride;a[n+4]===e&&d.push(a[n+5]>1?G$(a,n,this.clusterProps):this.points[a[n+3]])}if(0===d.length)throw new Error(o);return d}getLeaves(e,t,n){t=t||10,n=n||0;const o=[];return this._appendLeaves(o,e,t,n,0),o}getTile(e,t,n){const o=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:a,radius:s}=this.options,r=s/a,l=(n-r)/i,c=(n+1+r)/i,d={features:[]};return this._addTileFeatures(o.range((t-r)/i,l,(t+1+r)/i,c),o.data,t,n,i,d),0===t&&this._addTileFeatures(o.range(1-r/i,l,1,c),o.data,i,n,i,d),t===i-1&&this._addTileFeatures(o.range(0,l,r/i,c),o.data,-1,n,i,d),d.features.length?d:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,o,i){const a=this.getChildren(t);for(const t of a){const a=t.properties;if(a&&a.cluster?i+a.point_count<=o?i+=a.point_count:i=this._appendLeaves(e,a.cluster_id,n,o,i):i<o?i++:e.push(t),e.length===n)break}return i}_createTree(e){const t=new B$(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)t.add(e[n],e[n+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,n,o,i,a){for(const s of e){const e=s*this.stride,r=t[e+5]>1;let l,c,d;if(r)l=V$(t,e,this.clusterProps),c=t[e],d=t[e+1];else{const n=this.points[t[e+3]];l=n.properties;const[o,i]=n.geometry.coordinates;c=q$(o),d=Y$(i)}const u={type:1,
430 -geometry:[[Math.round(this.options.extent*(c*i-n)),Math.round(this.options.extent*(d*i-o))]],tags:l};let p;p=r||this.options.generateId?t[e+3]:this.points[t[e+3]].id,void 0!==p&&(u.id=p),a.features.push(u)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:n,extent:o,reduce:i,minPoints:a}=this.options,s=n/(o*Math.pow(2,t)),r=e.data,l=[],c=this.stride;for(let n=0;n<r.length;n+=c){if(r[n+2]<=t)continue;r[n+2]=t;const o=r[n],d=r[n+1],u=e.within(r[n],r[n+1],s),p=r[n+5];let h=p;for(const e of u){const n=e*c;r[n+2]>t&&(h+=r[n+5])}if(h>p&&h>=a){let e,a=o*p,s=d*p,g=-1;const m=(n/c<<5)+(t+1)+this.points.length;for(const o of u){const l=o*c;if(r[l+2]<=t)continue;r[l+2]=t;const d=r[l+5];a+=r[l]*d,s+=r[l+1]*d,r[l+4]=m,i&&(e||(e=this._map(r,n,!0),g=this.clusterProps.length,this.clusterProps.push(e)),i(e,this._map(r,l)))}r[n+4]=m,l.push(a/h,s/h,1/0,m,-1,h),i&&l.push(g)}else{for(let e=0;e<c;e++)l.push(r[n+e]);if(h>1)for(const e of u){const n=e*c;if(!(r[n+2]<=t)){r[n+2]=t;for(let e=0;e<c;e++)l.push(r[n+e])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+5]>1){const o=this.clusterProps[e[t+6]];return n?Object.assign({},o):o}const o=this.points[e[t+3]].properties,i=this.options.map(o);return n&&i===o?Object.assign({},i):i}}function G$(e,t,n){return{type:"Feature",id:e[t+3],properties:V$(e,t,n),geometry:{type:"Point",coordinates:[(o=e[t],360*(o-.5)),K$(e[t+1])]}};var o}function V$(e,t,n){const o=e[t+5],i=o>=1e4?`${Math.round(o/1e3)}k`:o>=1e3?Math.round(o/100)/10+"k":o,a=e[t+6],s=-1===a?{}:Object.assign({},n[a]);return Object.assign(s,{cluster:!0,cluster_id:e[t+3],point_count:o,point_count_abbreviated:i})}function q$(e){return e/360+.5}function Y$(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function K$(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}"function"==typeof SuppressedError&&SuppressedError;class Q${static isAdvancedMarkerAvailable(e){return google.maps.marker&&!0===e.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(Number.isFinite(e.position.lat)&&Number.isFinite(e.position.lng))return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return!!this.isAdvancedMarker(e)||e.getVisible()}}class Z${constructor({markers:e,position:t}){this.markers=[],e&&(this.markers=e),t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(0===this.markers.length&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(Q$.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((e=>Q$.getVisible(e))).length}push(e){this.markers.push(e)}delete(){this.marker&&(Q$.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function X$(e,t="assertion failed"){if(null==e)throw Error(t)}class J${constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return eS(e)}}const eS=e=>e.map((e=>new Z$({position:Q$.getPosition(e),markers:[e]})));class tS extends J${constructor(e){var{maxZoom:t,radius:n=60}=e,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["maxZoom","radius"]);super({maxZoom:t}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new U$(Object.assign({maxZoom:this.maxZoom,radius:n},o))}calculate(e){let t=!1,n=e.map.getZoom();X$(n),n=Math.round(n);const o={zoom:n};if(!L$(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map((e=>{const t=Q$.getPosition(e);return{type:"Feature",geometry:{type:"Point",coordinates:[t.lng(),t.lat()]},properties:{marker:e}}}));this.superCluster.load(n)}return t||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(t=!L$(this.state,o)),this.state=o,0===e.markers.length?(this.clusters=[],{clusters:this.clusters,changed:t}):(t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t})}cluster({map:e}){const t=e.getZoom();return X$(t),this.superCluster.getClusters([-180,-90,180,90],Math.round(t)).map((e=>this.transformCluster(e)))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new Z$({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map((e=>e.properties.marker)),position:{lat:t,lng:e}});const o=n.marker;return new Z$({markers:[o],position:Q$.getPosition(o)})}}class nS{constructor(e,t){this.markers={sum:e.length};const n=t.map((e=>e.count)),o=n.reduce(((e,t)=>e+t),0);this.clusters={count:t.length,markers:{mean:o/t.length,sum:o,min:Math.min(...n),max:Math.max(...n)}}}}class oS{render({count:e,position:t},n,o){const i=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>\n</svg>`,a=`Cluster of ${e} markers`,s=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Q$.isAdvancedMarkerAvailable(o)){const e=(new DOMParser).parseFromString(i,"image/svg+xml").documentElement;e.setAttribute("transform","translate(0 25)");const n={map:o,position:t,zIndex:s,title:a,content:e};return new google.maps.marker.AdvancedMarkerElement(n)}const r={position:t,zIndex:s,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(r)}}class iS{constructor(){!function(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}(iS,google.maps.OverlayView)}}var aS;!function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click",e.GMP_CLICK="gmp-click"}(aS||(aS={}));const sS=(e,t,n)=>{t.bounds&&n.fitBounds(t.bounds)};class rS extends iS{constructor({map:e,markers:t=[],algorithmOptions:n={},algorithm:o=new tS(n),renderer:i=new oS,onClusterClick:a=sS}){super(),this.map=null,this.idleListener=null,this.markers=[...t],this.clusters=[],this.algorithm=o,this.renderer=i,this.onClusterClick=a,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach((e=>{this.addMarker(e,!0)})),t||this.render()}removeMarker(e,t){const n=this.markers.indexOf(e);return-1!==n&&(Q$.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){let n=!1;return e.forEach((e=>{n=this.removeMarker(e,!0)||n})),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,aS.CLUSTERING_BEGIN,this);const{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||null==n){const e=new Set;for(const n of t)1==n.markers.length&&e.add(n.markers[0]);const n=[];for(const t of this.clusters)null!=t.marker&&(1==t.markers.length?e.has(t.marker)||Q$.setMap(t.marker,null):n.push(t.marker));this.clusters=t,this.renderClusters(),
431 -requestAnimationFrame((()=>n.forEach((e=>Q$.setMap(e,null)))))}google.maps.event.trigger(this,aS.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();X$(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((e=>Q$.setMap(e,null))),this.clusters.forEach((e=>e.delete())),this.clusters=[]}renderClusters(){const e=new nS(this.markers,this.clusters),t=this.getMap();this.clusters.forEach((n=>{if(1===n.markers.length)n.marker=n.markers[0];else if(n.marker=this.renderer.render(n,e,t),n.markers.forEach((e=>Q$.setMap(e,null))),this.onClusterClick){const e=Q$.isAdvancedMarker(n.marker)?aS.GMP_CLICK:aS.CLUSTER_CLICK;n.marker.addListener(e,(e=>{google.maps.event.trigger(this,aS.CLUSTER_CLICK,n),this.onClusterClick(e,n,t)}))}Q$.setMap(n.marker,t)}))}}const lS="b-blocks-google-map-heat",cS=[[0,[0,0,255,0]],[.2,[0,0,255,255]],[.4,[0,255,255,255]],[.6,[0,255,0,255]],[.8,[255,255,0,255]],[1,[255,0,0,255]]],dS=({OverlayView:e,LatLng:t})=>class extends e{constructor({points:e=[],radius:t=20,opacity:n=.6}={}){super();const o=(e,t)=>Number.isFinite(Number(e))?Number(e):t;this.points=e,this.radius=Math.max(4,o(t,20)),this.opacity=Math.min(1,Math.max(0,o(n,.6))),this.blur=Math.max(4,.65*this.radius),this.canvas=null,this.ctx=null,this.stamp=null,this.stampRadius=null,this.gradient=null,this.idleListener=null}setOptions({points:e,radius:t,opacity:n}={}){const o=(e,t)=>Number.isFinite(Number(e))?Number(e):t;Array.isArray(e)&&(this.points=e),void 0!==t&&(this.radius=Math.max(4,o(t,this.radius)),this.blur=Math.max(4,.65*this.radius)),void 0!==n&&(this.opacity=Math.min(1,Math.max(0,o(n,this.opacity)))),this.draw()}onAdd(){const e=document.createElement("canvas");e.className=lS,e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.zIndex="1",e.style.pointerEvents="none",this.canvas=e,this.ctx=e.getContext("2d"),this.gradient=(()=>{const e=document.createElement("canvas");e.width=1,e.height=256;const t=e.getContext("2d"),n=t.createLinearGradient(0,0,0,256);return cS.forEach((([e,[t,o,i,a]])=>{n.addColorStop(e,`rgba(${t},${o},${i},${a/255})`)})),t.fillStyle=n,t.fillRect(0,0,1,256),t.getImageData(0,0,1,256).data})();const t=this.getMap()?.getDiv();t?.querySelectorAll(`.${lS}`).forEach((e=>e.remove())),t?.appendChild(e),this.idleListener=this.getMap()?.addListener("idle",(()=>this.draw()))}draw(){const e=this.getProjection(),n=this.getMap()?.getDiv();if(!(e&&n&&this.canvas&&this.ctx))return;const o=Math.min(n.clientWidth||0,4096),i=Math.min(n.clientHeight||0,4096);if(o<=0||i<=0)return;this.canvas.width!==o&&(this.canvas.width=o),this.canvas.height!==i&&(this.canvas.height=i),this.canvas.style.width=`${o}px`,this.canvas.style.height=`${i}px`,this.canvas.style.opacity=String(this.opacity),this.stamp&&this.stampRadius===this.radius||(this.stamp=((e,t)=>{const n=e+t,o=document.createElement("canvas");o.width=2*n,o.height=2*n;const i=o.getContext("2d");return i.shadowOffsetX=2*n,i.shadowOffsetY=2*n,i.shadowBlur=t,i.shadowColor="#000",i.beginPath(),i.arc(-n,-n,e,0,2*Math.PI,!0),i.closePath(),i.fill(),o})(this.radius,this.blur),this.stampRadius=this.radius);const a=this.ctx,s=this.radius+this.blur;a.clearRect(0,0,o,i),a.globalAlpha=.55;let r=0;if(this.points.forEach((n=>{const l=e.fromLatLngToContainerPixel(new t(n.lat,n.lng));l&&(l.x<-s||l.y<-s||l.x>o+s||l.y>i+s||(a.drawImage(this.stamp,l.x-s,l.y-s),r++))})),a.globalAlpha=1,!r)return;const l=a.getImageData(0,0,o,i),c=l.data;for(let e=3;e<c.length;e+=4){const t=c[e];if(!t)continue;const n=4*t;c[e-3]=this.gradient[n],c[e-2]=this.gradient[n+1],c[e-1]=this.gradient[n+2]}a.putImageData(l,0,0)}onRemove(){this.idleListener?.remove(),this.idleListener=null,this.canvas?.parentNode?.removeChild(this.canvas),this.canvas=null,this.ctx=null,this.stamp=null,this.stampRadius=null,this.gradient=null}},uS="__bBlocksMapsCb__",pS=new Map;let hS=!1,gS="",mS=!1,bS=!1;const fS=new Set,xS=e=>(pS.has(e)||pS.set(e,window.google.maps.importLibrary(e).catch((t=>{throw pS.delete(e),t}))),pS.get(e)),yS=(e={})=>{const{markers:t=[],shapes:n=[],directions:o={},tools:i={},clustering:a={},source:s={}}=e,r=new Set(["core","maps"]);return s.mapId&&(t.length||a.enabled)&&r.add("marker"),i.searchBox&&r.add("places"),o.enabled&&r.add("routes"),n.length&&r.add("geometry"),[...r]},vS=(e,t=["maps"],n={})=>e?(hS&&gS&&gS!==e&&!mS&&(mS=!0,console.warn("[b-blocks] The Google Maps API is already loaded with a different API key; the first key wins.")),((e,{version:t="weekly",language:n="",region:o=""}={})=>{const i=window.google=window.google||{},a=i.maps=i.maps||{};if((()=>{const e=window.gm_authFailure;if(e?.bBlocksHooked)return;const t=()=>{bS=!0,fS.forEach((e=>e())),"function"==typeof e&&e()};t.bBlocksHooked=!0,window.gm_authFailure=t})(),a.importLibrary)return hS=!0,void(gS=gS||e);const s=new Set;let r=null;a.importLibrary=(i,...l)=>(s.add(i),(r||(r=Promise.resolve().then((()=>new Promise(((i,l)=>{const c=new URLSearchParams;c.set("key",e),c.set("v",t),c.set("loading","async"),c.set("libraries",[...s].join(",")),c.set("callback",`google.maps.${uS}`),n&&c.set("language",n),o&&c.set("region",o);const d=document.createElement("script");d.src=`https://maps.googleapis.com/maps/api/js?${c.toString()}`,d.async=!0,d.nonce=document.querySelector("script[nonce]")?.nonce||"",d.onerror=()=>{r=null,l(new Error("google-maps-load-failed"))},a[uS]=i,document.head.append(d)})))))).then((()=>a.importLibrary(i,...l)))),hS=!0,gS=e})(e,n),Promise.all(t.map(xS)).then((e=>Object.assign({},...e)))):Promise.reject(new Error("missing-key")),kS=(e="")=>{if(!e||"string"!=typeof e)return"";const t=(new DOMParser).parseFromString(e,"text/html");return t.body.querySelectorAll("script, style, iframe, object, embed, form, link, meta").forEach((e=>e.remove())),t.body.querySelectorAll("*").forEach((e=>{[...e.attributes].forEach((({name:t,value:n})=>{const o=/^on/i.test(t),i=/^\s*javascript:/i.test(n||"");(o||i&&("href"===t||"src"===t))&&e.removeAttribute(t)}))})),t.body.innerHTML},wS=(e={})=>{const t=Kj(e.lat),n=Kj(e.lng);return null===t||null===n?null:{lat:t,lng:n}},_S=(e="")=>{if(!e||"string"!=typeof e)return[];const t=e.trim();if(!t)return[];if(t.startsWith("["))try{const e=JSON.parse(t);return Array.isArray(e)?e.map((e=>({lat:Kj(e?.lat??e?.[0]),lng:Kj(e?.lng??e?.[1])}))).filter((e=>null!==e.lat&&null!==e.lng)):[]}catch(e){return[]}return t.split(/[\n;|]+/).map((e=>{const[t,n]=e.split(",").map((e=>Kj(e)));return{lat:t,lng:n}})).filter((e=>null!==e.lat&&null!==e.lng))},CS=(e,t=[])=>t.find((t=>t.id===e?.category))||null,jS=({address:e="",message:t="",status:n="info",onActivate:o=null,actionLabel:i=""})=>{return(0,l.jsxs)("div",{className:`${Ij}-fallback ${Ij}-fallback-${n}`,role:"note",children:[t?(0,l.jsx)("p",{className:`${Ij}-fallback-message`,children:t}):null,e?(0,l.jsx)("p",{className:`${Ij}-fallback-address`,children:e}):null,o?(0,l.jsx)("button",{type:"button",className:`${Ij}-fallback-button`,onClick:o,children:i||(0,x.__)("Load map","b-blocks")}):(0,l.jsx)("a",{className:`${Ij}-fallback-link`,href:(a=e,`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(a||"")}`),target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("Open in Google Maps","b-blocks")})]});var a},$S=({categories:e=[],filterBar:t={},active:n="",onChange:o=()=>{}})=>{if(!e.length)return null;const{showAll:i=!0,allLabel:a=""}=t,s=i?[{id:"",label:a||(0,x.__)("All","b-blocks")},...e]:e;return(0,l.jsx)("div",{className:`${Ij}-filter-bar`,role:"group","aria-label":(0,x.__)("Filter map locations by category","b-blocks"),children:s.map((e=>{const t=n===e.id;return(0,l.jsxs)("button",{type:"button",className:`${Ij}-filter-chip${t?" active":""}`,"data-category":e.id||"","aria-pressed":t,onClick:()=>o(e.id),children:[e.id?(0,l.jsx)("span",{className:`${Ij}-filter-dot`,"aria-hidden":"true"}):null,e.label]},e.id||"all")}))})},SS=({embedUrl:e,captionText:t})=>{
432 -if(!Fj(e))return(0,l.jsx)("div",{className:`${Ij}-placeholder`,role:"note",children:(0,x.__)("Paste a valid Google Maps embed URL from Google Maps → Share → Embed a map.","b-blocks")});const n=t
433 -/* translators: %s: caption text describing the map location */?(0,x.sprintf)((0,x.__)("Google Map of %s","b-blocks"),t):(0,x.__)("Google Map","b-blocks");return(0,l.jsx)("div",{className:`${Ij}-wrapper`,children:(0,l.jsx)("iframe",{className:`${Ij}-iframe`,src:e,title:n,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",allowFullScreen:!0})})},TS=({attributes:e,apiKey:t="",isBackend:n=!1,device:o="desktop",onMarkerDrag:i=null})=>{const a=(0,m.useMemo)((()=>Qj(e)),[e]),{source:s={},map:r={},controls:c={},markers:d=[],marker:u={},infoWindow:p={},clustering:h={},categories:g=[],filterBar:b={},theme:f={},layers:y={},shapes:v=[],directions:k={},tools:w={},performance:_={},caption:C={}}=a,j="embed"===s.type,$=C.text||"",S=(0,m.useRef)(null),T=(0,m.useRef)(null),N=(0,m.useRef)(null),M=(0,m.useRef)(null),L=(0,m.useRef)(null),P=(0,m.useRef)([]),E=(0,m.useRef)(null),A=(0,m.useRef)(null),B=(0,m.useRef)([]),I=(0,m.useRef)([]),O=(0,m.useRef)(""),R=(0,m.useRef)(null),[z,D]=(0,m.useState)(null),[F,H]=(0,m.useState)(""),[W,U]=(0,m.useState)(0),[G,V]=(0,m.useState)(""),[q,Y]=(0,m.useState)(!1),K=_.lazyLoad||"onView",[Q,Z]=(0,m.useState)(n||j||"none"===K),X=(0,m.useMemo)((()=>e$(f)),[JSON.stringify(f)]),J=s.mapId||"",ee=e=>z?.[e]||window.google?.maps?.[e],te=JSON.stringify([s.center,r,c,X]),ne=JSON.stringify([d,u,p,g,h,G,o]),oe=JSON.stringify(y),ie=!!y.heatmap?.enabled,ae=(0,m.useMemo)((()=>d.map((e=>wS(e))).filter(Boolean)),[JSON.stringify(d)]),se=JSON.stringify(ae),re=JSON.stringify([y.heatmap?.radius,y.heatmap?.opacity]),le=JSON.stringify(v),ce=JSON.stringify(k);if((0,m.useEffect)((()=>{if(Q||"onView"!==K||!S.current)return;if(!("IntersectionObserver"in window))return void Z(!0);const e=new IntersectionObserver((t=>{t.some((e=>e.isIntersecting))&&(Z(!0),e.disconnect())}),{rootMargin:"200px"});return e.observe(S.current),()=>e.disconnect()}),[Q,K]),(0,m.useEffect)((()=>{if(j||!Q)return;let e=!1;if(t)return H(""),vS(t,yS(a),{language:s.language,region:s.region}).then((t=>{e||D(t)})).catch((t=>{e||H(t?.message||"google-maps-load-failed")})),()=>{e=!0};H("missing-key")}),[j,Q,t,s.language,s.region,JSON.stringify(yS(a))]),(0,m.useEffect)((()=>{return e=()=>H("auth"),bS&&e(),fS.add(e),()=>fS.delete(e);var e}),[]),(0,m.useEffect)((()=>{if(!z?.Map||!T.current)return;const e=new z.Map(T.current,{center:{lat:Kj(s.center?.lat,23.8103),lng:Kj(s.center?.lng,90.4125)},zoom:Kj(r.zoom,12),mapTypeId:r.mapType||"roadmap",mapId:J||void 0,styles:J?void 0:X});L.current=e,U((e=>e+1));const t=new MutationObserver((()=>{const e=T.current;if(!e)return;const t=e.querySelector(".gm-err-container, .gm-err-content"),n=e.querySelector(".gm-style-moc"),o=!!n&&n.textContent.trim().length>0&&"0"!==(window.getComputedStyle(n)?.opacity||"0");(t||o)&&H("auth")}));return t.observe(T.current,{childList:!0,subtree:!0}),()=>{t.disconnect(),I.current.forEach((e=>e?.remove?.())),I.current=[],A.current?.close(),A.current=null,E.current?.clearMarkers(),E.current=null,P.current.forEach((e=>{e.map=null})),P.current=[],B.current.forEach((e=>{e?.setMap?.(null)})),B.current=[],L.current=null,T.current&&(T.current.innerHTML="")}}),[z,J]),(0,m.useEffect)((()=>{const e=L.current;if(!e)return;const t=(o=c.zoomPosition||"RIGHT_BOTTOM",window.google?.maps?.ControlPosition?.[o]??void 0);var o;const i=Kj(r.minZoom),a=Kj(r.maxZoom),l=null!==i&&null!==a,d=l?Math.min(i,a):i,u=l?Math.max(i,a):a;try{e.setOptions({center:{lat:Kj(s.center?.lat,23.8103),lng:Kj(s.center?.lng,90.4125)},zoom:Kj(r.zoom,12),minZoom:d??void 0,maxZoom:u??void 0,mapTypeId:r.mapType||"roadmap",gestureHandling:n?"none":r.gestureHandling||"cooperative",draggable:!1!==r.draggable,scrollwheel:!!r.scrollwheel,keyboardShortcuts:!1!==c.keyboardShortcuts,disableDefaultUI:!!c.disableDefaultUI,zoomControl:!!c.zoom,zoomControlOptions:t?{position:t}:void 0,mapTypeControl:!!c.mapType&&!1!==r.allowTypeSwitch,streetViewControl:!!c.streetView,fullscreenControl:!!c.fullscreen,scaleControl:!!c.scale,rotateControl:!!c.rotate,styles:J?void 0:X})}catch(e){console.warn("[b-blocks] Google Maps rejected a map option:",e?.message||e)}}),[W,te,J,n]),(0,m.useEffect)((()=>{const e=L.current;if(!e||!J||!z?.AdvancedMarkerElement)return;const{AdvancedMarkerElement:t,PinElement:a,InfoWindow:s}=z,l=[],c=[],m=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,b=parseInt(p.desktop?.maxWidth,10)||280,f=[],x=()=>f.forEach((e=>e?.close()));A.current={close:x},d.forEach(((r,d)=>{if(G&&r.category!==G)return;const h=wS(r);if(!h)return;let y=((e={},t={},n="desktop",o=[])=>{const{type:i="default",url:a={}}=e.icon||{},s=t?.[n]?.size||t?.desktop?.size||"40px",r=e.pinColor||CS(e,o)?.color||t.pinColor||"#8a2be2";if("library"===i||"upload"===i){const e="library"===i?a.library:a.upload;if(!e)return;const t=document.createElement("div");return t.className="b-blocks-google-map-pin b-blocks-google-map-pin-svg",t.style.width=s,t.style.height=s,t.style.color=r,t.innerHTML=kS(e),t}if("image"===i){const t=e.image?.url;if(!t)return;const n=document.createElement("div");n.className="b-blocks-google-map-pin b-blocks-google-map-pin-image",n.style.width=s,n.style.height=s;const o=document.createElement("img");return o.src=t,o.alt=e.image?.alt||e.title||"",n.append(o),n}})(r,u,o,g);!y&&a&&(y=new a(((e={},t={},n=[])=>{const o=CS(e,n);return{background:e.pinColor||o?.color||t.pinColor||"#8a2be2",borderColor:t.borderColor||"#ffffff",glyphColor:e.glyphColor||t.glyphColor||"#ffffff",scale:Kj(t.scale,1)??1}})(r,u,g)).element);const v=r.animation||u.animation||"none";y&&"none"!==v&&!m&&y.classList.add(`${Ij}-anim-${v}`);const k=new t({map:e,position:h,title:r.title||"",content:y||void 0,gmpClickable:!0,gmpDraggable:n&&!1!==r.draggable,zIndex:d+1}),w=p.trigger||"click",_="always"===w,C=s?new s({maxWidth:b}):null;f.push(C);const j=()=>{C&&(_||!1===p.singleOpen||x(),C.setContent(((e={})=>{const t=document.createElement("div");if(t.className="b-blocks-google-map-info",e.image?.url&&"image"!==e.icon?.type){const n=document.createElement("img");n.className="b-blocks-google-map-info-image",n.src=e.image.url,n.alt=e.image.alt||e.title||"",n.loading="lazy",t.append(n)}if(e.title){const n=document.createElement("h4");n.className="b-blocks-google-map-info-title",n.textContent=e.title,t.append(n)}const n=document.createElement("div");if(n.className="b-blocks-google-map-info-body",n.innerHTML=kS(e.content||""),t.append(n),e.address){const n=document.createElement("p");n.className="b-blocks-google-map-info-address",n.textContent=e.address,t.append(n)}return t})(r)),C.open({map:e,anchor:k}))};"hover"===w&&k.content?(k.content.addEventListener("mouseenter",j),k.content.addEventListener("mouseleave",(()=>C?.close()))):"click"===w&&l.push(k.addListener("gmp-click",j)),n&&i&&!1!==r.draggable&&l.push(k.addListener("dragend",(e=>{const t=e?.latLng;t&&i(d,{lat:t.lat(),lng:t.lng()})}))),(_||r.openByDefault)&&j(),c.push(k)})),P.current=c,I.current=[...I.current,...l],h.enabled&&c.length&&(E.current=new rS({map:e,markers:c,onClusterClick:!1===h.clickToZoom?()=>{}:void 0,renderer:{render:({count:e,position:n})=>{const o=document.createElement("div");return o.className=`${Ij}-cluster`,o.textContent=String(e),new t({position:n,content:o,zIndex:9999})}}}));const y=ee("LatLngBounds");if(r.fitBounds&&c.length>1&&y){const t=new y;c.forEach((e=>t.extend(e.position))),e.fitBounds(t)}return()=>{l.forEach((e=>e?.remove?.())),I.current=I.current.filter((e=>!l.includes(e))),x(),A.current=null,E.current?.clearMarkers(),E.current=null,c.forEach((e=>{e.map=null})),P.current=[]}}),[W,ne,J,n]),(0,m.useEffect)((()=>{const e=L.current;if(!e)return;const t=ee("TrafficLayer"),n=ee("TransitLayer"),o=ee("BicyclingLayer"),i=ee("KmlLayer"),a=[];y.traffic&&t&&a.push(new t),y.transit&&n&&a.push(new n),y.bicycling&&o&&a.push(new o),y.kmlUrl&&i&&a.push(new i({url:y.kmlUrl,preserveViewport:!0})),a.forEach((t=>t.setMap(e)));const s=[],r=qj(y.geoJson);if(r.data&&e.data)try{s.push(...e.data.addGeoJson(r.data))}catch(e){
434 -console.warn("[b-blocks] Google rejected this GeoJSON:",e?.message||e)}const l=ee("LatLngBounds");if(!1===y.fitGeoJson&&(O.current=""),s.length&&!1!==y.fitGeoJson&&l&&O.current!==y.geoJson){const t=new l;s.forEach((e=>{const n=e?.getGeometry?.();"function"==typeof n?.forEachLatLng&&n.forEachLatLng((e=>t.extend(e)))})),t.isEmpty()||(e.fitBounds(t),O.current=y.geoJson)}return B.current=a.filter(Boolean),()=>{a.forEach((e=>e.setMap(null))),s.forEach((t=>e.data.remove(t))),B.current=[]}}),[W,oe,ne,z]),(0,m.useEffect)((()=>{const e=L.current;if(!e||!ie)return;const t=ee("OverlayView"),n=ee("LatLng");if(!t||!n)return void console.warn("[b-blocks] Heatmap needs google.maps.OverlayView and LatLng; neither the imported library nor the namespace provided them.");const o=new(dS({OverlayView:t,LatLng:n}))({points:ae,radius:Kj(y.heatmap?.radius,20),opacity:Kj(y.heatmap?.opacity,.6)});return o.setMap(e),R.current=o,()=>{o.setMap(null),R.current===o&&(R.current=null)}}),[W,ie,z]),(0,m.useEffect)((()=>{ie&&(ae.length?R.current?.setOptions({points:ae,radius:Kj(y.heatmap?.radius,20),opacity:Kj(y.heatmap?.opacity,.6)}):console.warn(`[b-blocks] Heatmap is on but none of the ${d.length} marker(s) have coordinates, so there is nothing to draw.`))}),[ie,re,se]),(0,m.useEffect)((()=>{const e=L.current;if(!e||!v.length)return;const t=ee("Circle"),n=ee("Rectangle"),o=ee("Polygon"),i=ee("Polyline");if(!i)return;const a=v.map((e=>{const a={strokeColor:e.strokeColor||"#2A6DF0",strokeOpacity:Kj(e.strokeOpacity,.9),strokeWeight:Kj(e.strokeWeight,3)},s={fillColor:e.fillColor||"#2A6DF0",fillOpacity:Kj(e.fillOpacity,.25)};if("circle"===e.type){const n=wS(e.center||{});return n&&t?new t({...a,...s,center:n,radius:Kj(e.radius,1e3)}):null}if("rectangle"===e.type){const{north:t,south:o,east:i,west:r}=e.bounds||{},l={north:Kj(t),south:Kj(o),east:Kj(i),west:Kj(r)};return Object.values(l).some((e=>null===e))?null:n?new n({...a,...s,bounds:l}):null}const r=_S(e.path);return r.length<2?null:"polygon"===e.type&&o?new o({...a,...s,paths:r}):new i({...a,path:r})})).filter(Boolean);return a.forEach((t=>t.setMap(e))),()=>a.forEach((e=>e.setMap(null)))}),[W,le,z]),(0,m.useEffect)((()=>{const e=L.current;if(!(e&&k.enabled&&z?.DirectionsService&&z?.DirectionsRenderer))return;const t=k.origin?.address||wS(k.origin||{}),n=k.destination?.address||wS(k.destination||{});if(!t||!n)return;const o=new z.DirectionsRenderer({map:e,panel:k.showPanel&&M.current?M.current:null,polylineOptions:{strokeColor:k.routeColor||"#2A6DF0",strokeWeight:5}});let i=!1;return(new z.DirectionsService).route({origin:t,destination:n,travelMode:k.mode||"DRIVING",waypoints:(k.waypoints||[]).map((e=>e?.address||wS(e||{}))).filter(Boolean).map((e=>({location:e,stopover:!0})))}).then((e=>{i||o.setDirections(e)})).catch((()=>{})),()=>{i=!0,o.setMap(null),M.current&&(M.current.innerHTML="")}}),[W,ce,z]),(0,m.useEffect)((()=>{const e=L.current;if(!(e&&w.searchBox&&z?.PlaceAutocompleteElement&&N.current))return;let t;try{t=new z.PlaceAutocompleteElement}catch(e){return}t.className=`${Ij}-search-input`,N.current.append(t);const n=async({placePrediction:t})=>{try{const n=t.toPlace();await n.fetchFields({fields:["location","formattedAddress"]}),n.location&&(e.setCenter(n.location),e.setZoom(Math.max(Kj(r.zoom,12),14)))}catch(e){}};return t.addEventListener("gmp-select",n),()=>{t.removeEventListener("gmp-select",n),t.remove()}}),[W,w.searchBox,z]),j)return(0,l.jsx)("div",{className:`${Ij}-container`,ref:S,children:(0,l.jsxs)("figure",{className:`${Ij}-figure`,children:[(0,l.jsx)(SS,{embedUrl:s.embedUrl,captionText:$}),$?(0,l.jsx)("figcaption",{className:`${Ij}-caption`,children:$}):null]})});const de=s.center?.address||d[0]?.address||$,ue=Q||"onClick"!==K?"auth"===F?(0,l.jsx)(jS,{address:de,status:"warning",message:n?(0,x.__)("Google rejected this API key. Check that billing is enabled on the Google Cloud project, that the Maps JavaScript API is turned on, and that the key’s HTTP referrer restriction allows this site.","b-blocks"):(0,x.__)("This map is temporarily unavailable.","b-blocks")}):"missing-key"===F?(0,l.jsx)(jS,{address:de,status:"warning",message:(0,x.__)("A Google Maps API key is required to show this map.","b-blocks")}):F?(0,l.jsx)(jS,{address:de,status:"warning",message:(0,x.__)("The Google Maps API could not be loaded.","b-blocks")}):null:(0,l.jsx)(jS,{address:de,status:"idle",message:(0,x.__)("Map ready to load.","b-blocks"),onActivate:()=>Z(!0),actionLabel:(0,x.__)("Load map","b-blocks")});return(0,l.jsx)("div",{className:`${Ij}-container`,ref:S,children:(0,l.jsxs)("figure",{className:`${Ij}-figure`,children:[!ue&&b.show&&g.length?(0,l.jsx)($S,{categories:g,filterBar:b,active:G,onChange:V}):null,ue||!w.searchBox&&!w.geolocation?null:(0,l.jsxs)("div",{className:`${Ij}-tools`,children:[w.searchBox?(0,l.jsx)("div",{className:`${Ij}-search`,ref:N}):null,w.geolocation?(0,l.jsx)("button",{type:"button",className:`${Ij}-locate`,onClick:()=>{const e=L.current;e&&navigator.geolocation&&(Y(!0),navigator.geolocation.getCurrentPosition((({coords:t})=>{Y(!1);const n={lat:t.latitude,lng:t.longitude};e.panTo(n),e.setZoom(14);const o=Kj(w.nearbyRadius,0),i=ee("Circle");if(o>0&&i){const t=new i({map:e,center:n,radius:o,strokeColor:"#2A6DF0",strokeOpacity:.6,fillColor:"#2A6DF0",fillOpacity:.12});B.current.push(t)}}),(()=>Y(!1)),{enableHighAccuracy:!0,timeout:1e4}))},disabled:q,children:q?(0,x.__)("Locating…","b-blocks"):(0,x.__)("Find my location","b-blocks")}):null]}),(0,l.jsx)("div",{className:`${Ij}-wrapper`,children:ue||(0,l.jsx)("div",{className:`${Ij}-canvas`,ref:T,role:"region","aria-label":$
435 -/* translators: %s: caption text describing the map location */?(0,x.sprintf)((0,x.__)("Interactive map of %s","b-blocks"),$):(0,x.__)("Interactive Google Map","b-blocks")})}),!ue&&k.enabled&&k.showPanel?(0,l.jsx)("div",{className:`${Ij}-directions-panel`,ref:M}):null,$?(0,l.jsx)("figcaption",{className:`${Ij}-caption`,children:$}):null]})})},NS=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"},{label:"vh",value:"vh"}],MS={top:"",right:"",bottom:"",left:""},LS=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],PS=[{label:(0,x.__)("Interactive","b-blocks"),value:"interactive"},{label:(0,x.__)("Embed URL","b-blocks"),value:"embed"}],ES=[{label:(0,x.__)("Roadmap","b-blocks"),value:"roadmap"},{label:(0,x.__)("Satellite","b-blocks"),value:"satellite"},{label:(0,x.__)("Hybrid","b-blocks"),value:"hybrid"},{label:(0,x.__)("Terrain","b-blocks"),value:"terrain"}],AS=[{label:(0,x.__)("Cooperative (Ctrl + scroll)","b-blocks"),value:"cooperative"},{label:(0,x.__)("Greedy (always pans)","b-blocks"),value:"greedy"},{label:(0,x.__)("None (locked)","b-blocks"),value:"none"},{label:(0,x.__)("Auto","b-blocks"),value:"auto"}],BS=[{label:(0,x.__)("Top Left","b-blocks"),value:"TOP_LEFT"},{label:(0,x.__)("Top Center","b-blocks"),value:"TOP_CENTER"},{label:(0,x.__)("Top Right","b-blocks"),value:"TOP_RIGHT"},{label:(0,x.__)("Left Top","b-blocks"),value:"LEFT_TOP"},{label:(0,x.__)("Left Center","b-blocks"),value:"LEFT_CENTER"},{label:(0,x.__)("Left Bottom","b-blocks"),value:"LEFT_BOTTOM"},{label:(0,x.__)("Right Top","b-blocks"),value:"RIGHT_TOP"},{label:(0,x.__)("Right Center","b-blocks"),value:"RIGHT_CENTER"},{label:(0,x.__)("Right Bottom","b-blocks"),value:"RIGHT_BOTTOM"},{label:(0,x.__)("Bottom Left","b-blocks"),value:"BOTTOM_LEFT"},{label:(0,x.__)("Bottom Center","b-blocks"),value:"BOTTOM_CENTER"},{label:(0,x.__)("Bottom Right","b-blocks"),value:"BOTTOM_RIGHT"}],IS=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Drop","b-blocks"),value:"drop"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"}],OS=[{label:(0,x.__)("Click","b-blocks"),value:"click"},{label:(0,x.__)("Hover","b-blocks"),value:"hover"},{label:(0,x.__)("Always open","b-blocks"),value:"always"},{label:(0,x.__)("Never","b-blocks"),value:"none"}],RS=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Silver","b-blocks"),value:"silver"},{label:(0,x.__)("Retro","b-blocks"),value:"retro"},{label:(0,x.__)("Dark","b-blocks"),value:"dark"},{label:(0,x.__)("Night","b-blocks"),value:"night"},{label:(0,x.__)("Aubergine","b-blocks"),value:"aubergine"},{label:(0,x.__)("Custom JSON","b-blocks"),value:"custom"}],zS=[{label:(0,x.__)("Driving","b-blocks"),value:"DRIVING"},{label:(0,x.__)("Walking","b-blocks"),value:"WALKING"},{label:(0,x.__)("Bicycling","b-blocks"),value:"BICYCLING"},{label:(0,x.__)("Transit","b-blocks"),value:"TRANSIT"}],DS=[{label:(0,x.__)("Polyline","b-blocks"),value:"polyline"},{label:(0,x.__)("Polygon","b-blocks"),value:"polygon"},{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Rectangle","b-blocks"),value:"rectangle"}],FS=[{label:(0,x.__)("When scrolled into view","b-blocks"),value:"onView"},{label:(0,x.__)("On click","b-blocks"),value:"onClick"},{label:(0,x.__)("Load immediately","b-blocks"),value:"none"}],HS=[{label:(0,x.__)("Default Pin","b-blocks"),value:"default"},{label:(0,x.__)("Icon Library","b-blocks"),value:"library"},{label:(0,x.__)("Upload SVG","b-blocks"),value:"upload"},{label:(0,x.__)("Image","b-blocks"),value:"image"}],WS=[{name:"location",title:(0,x.__)("Location","b-blocks")},{name:"content",title:(0,x.__)("Content","b-blocks")},{name:"icon",title:(0,x.__)("Icon","b-blocks")}],US=(e,t={})=>{const n=.004*Math.max(0,Number(e)-1);return{id:`marker-${e}`,title:(0,x.__)("New Location","b-blocks"),content:"<p>Describe this location.</p>",address:"",lat:Number((Kj(t.lat,Oj.lat)+n).toFixed(6)),lng:Number((Kj(t.lng,Oj.lng)+n).toFixed(6)),category:"",icon:{type:"default",url:{library:"",upload:""}},image:{url:"",alt:""},pinColor:"",glyphColor:"",animation:"",draggable:!0,openByDefault:!1}},GS=(e={},t=0)=>{const n=.006*Math.max(0,t),o=Kj(e.lat,Oj.lat)+n,i=Kj(e.lng,Oj.lng)+n,a=e=>Number(e.toFixed(6)),s=.012;return{path:`${a(o-s)},${a(i-s)}\n${a(o+s)},${a(i+s)}`,center:{lat:a(o),lng:a(i)},radius:1e3,bounds:{north:a(o+s),south:a(o-s),east:a(i+s),west:a(i-s)}}},VS=(e,t={})=>({id:`shape-${e}`,type:"polyline",label:(0,x.__)("New Shape","b-blocks"),...GS(t,Number(e)-1),strokeColor:"#2A6DF0",strokeOpacity:.9,strokeWeight:3,fillColor:"#2A6DF0",fillOpacity:.25}),qS=({caption:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Caption Text","b-blocks"),value:e.text||"",onChange:e=>t("caption",e,"text"),placeholder:(0,x.__)("e.g. 123 Main St, Anytown","b-blocks"),help:(0,x.__)("Optional. Shown below the map and used as the map’s accessible name.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Caption Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:e.align||"center",onChange:e=>t("caption",e||"center","align"),children:zj.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),YS=({attributes:e,setAttributes:t,updateObj:n})=>{const{categories:o=[],filterBar:i={}}=e,a=(e,n,i)=>t({categories:Rb(o,(t=>{t[e][n]=i}))});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Categories & Filter Bar","b-blocks"),initialOpen:!1,children:[o.map(((e,n)=>(0,l.jsxs)(y.Flex,{className:"mt10",align:"flex-end",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:e.label,onChange:e=>a(n,"label",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ge,{label:"",value:e.color,onChange:e=>a(n,"color",e)}),(0,l.jsx)(y.Button,{isDestructive:!0,label:(0,x.__)("Remove","b-blocks"),onClick:()=>(e=>t({categories:o.filter(((t,n)=>n!==e))}))(n),children:(0,l.jsx)(y.Dashicon,{icon:"no"})})]},e.id))),(0,l.jsx)(y.Flex,{justify:"center",className:"addItem mt15",children:(0,l.jsxs)(y.Button,{variant:"primary",onClick:()=>{return t({categories:[...o,(e=o.length+1,{id:`cat-${e}`,label:(0,x.__)("Category","b-blocks"),color:"#8a2be2"})]});var e},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Category","b-blocks")]})}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Filter Bar","b-blocks"),checked:!!i.show,onChange:e=>n("filterBar",!!e,"show"),help:(0,x.__)("Lets visitors show only the markers in one category.","b-blocks"),__nextHasNoMarginBottom:!0}),i.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Include an “All” chip","b-blocks"),checked:!1!==i.showAll,onChange:e=>n("filterBar",!!e,"showAll"),__nextHasNoMarginBottom:!0}),!1!==i.showAll&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("“All” Label","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"flex1",value:i.allLabel||"",onChange:e=>n("filterBar",e,"allLabel"),placeholder:(0,x.__)("All","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Filter Bar Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.align||"left",onChange:e=>n("filterBar",e||"left","align"),children:zj.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]})]})},KS=({clustering:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Clustering","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,
436 -x.__)("Group nearby markers","b-blocks"),checked:!!e.enabled,onChange:e=>t("clustering",!!e,"enabled"),help:(0,x.__)("Collapses dense marker groups into a single counted bubble as the visitor zooms out.","b-blocks"),__nextHasNoMarginBottom:!0}),e.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Bubble Background","b-blocks"),value:e.background,onChange:e=>t("clustering",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Count Color:","b-blocks"),value:e.textColor,onChange:e=>t("clustering",e,"textColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Bubble Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:NS,value:e.size,onChange:e=>t("clustering",e,"size"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Zoom in on cluster click","b-blocks"),checked:!1!==e.clickToZoom,onChange:e=>t("clustering",!!e,"clickToZoom"),__nextHasNoMarginBottom:!0})]})]}),QS=({controls:e={},updateObj:t})=>{const n=!!e.disableDefaultUI;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Controls","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Hide all default controls","b-blocks"),checked:n,onChange:e=>t("controls",!!e,"disableDefaultUI"),__nextHasNoMarginBottom:!0}),n&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("All built-in controls are hidden. Turn this off to pick them individually.","b-blocks")}),!n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Zoom Buttons","b-blocks"),checked:!!e.zoom,onChange:e=>t("controls",!!e,"zoom"),__nextHasNoMarginBottom:!0}),e.zoom&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Zoom Control Position","b-blocks"),value:e.zoomPosition||"RIGHT_BOTTOM",options:BS,onChange:e=>t("controls",e,"zoomPosition"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Map Type Switcher","b-blocks"),checked:!!e.mapType,onChange:e=>t("controls",!!e,"mapType"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Street View (Pegman)","b-blocks"),checked:!!e.streetView,onChange:e=>t("controls",!!e,"streetView"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fullscreen","b-blocks"),checked:!!e.fullscreen,onChange:e=>t("controls",!!e,"fullscreen"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Scale","b-blocks"),checked:!!e.scale,onChange:e=>t("controls",!!e,"scale"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rotate / Tilt","b-blocks"),checked:!!e.rotate,onChange:e=>t("controls",!!e,"rotate"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Keyboard Shortcuts","b-blocks"),checked:!1!==e.keyboardShortcuts,onChange:e=>t("controls",!!e,"keyboardShortcuts"),help:(0,x.__)("Lets keyboard users pan and zoom the map. Keep this on for accessibility.","b-blocks"),__nextHasNoMarginBottom:!0})]})},ZS=({directions:e={},updateObj:t})=>{const n=e.waypoints||[];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Directions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show a route","b-blocks"),checked:!!e.enabled,onChange:e=>t("directions",!!e,"enabled"),__nextHasNoMarginBottom:!0}),e.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Travel Mode","b-blocks"),value:e.mode||"DRIVING",options:zS,onChange:e=>t("directions",e,"mode"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Origin","b-blocks"),value:e.origin?.address||"",onChange:e=>t("directions",e,"origin","address"),placeholder:(0,x.__)("Address or place name","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Destination","b-blocks"),value:e.destination?.address||"",onChange:e=>t("directions",e,"destination","address"),placeholder:(0,x.__)("Address or place name","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt15",children:(0,x.__)("Waypoints","b-blocks")}),n.map(((e,o)=>(0,l.jsxs)(y.Flex,{align:"flex-end",gap:2,className:"mt5",children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:e.address||"",onChange:e=>((e,o)=>t("directions",Rb(n,(t=>{t[e].address=o})),"waypoints"))(o,e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.Button,{isDestructive:!0,label:(0,x.__)("Remove","b-blocks"),onClick:()=>t("directions",n.filter(((e,t)=>t!==o)),"waypoints"),children:(0,l.jsx)(y.Dashicon,{icon:"no"})})]},o))),(0,l.jsx)(y.Flex,{justify:"center",className:"addItem mt10",children:(0,l.jsxs)(y.Button,{variant:"secondary",onClick:()=>t("directions",[...n,{address:""}],"waypoints"),children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add Waypoint","b-blocks")]})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show turn-by-turn panel","b-blocks"),checked:!!e.showPanel,onChange:e=>t("directions",!!e,"showPanel"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Route Color:","b-blocks"),value:e.routeColor,onChange:e=>t("directions",e,"routeColor")})]})]})},XS=({layers:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Traffic","b-blocks"),checked:!!e.traffic,onChange:e=>t("layers",!!e,"traffic"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Transit","b-blocks"),checked:!!e.transit,onChange:e=>t("layers",!!e,"transit"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Bicycling","b-blocks"),checked:!!e.bicycling,onChange:e=>t("layers",!!e,"bicycling"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("KML / KMZ URL","b-blocks"),value:e.kmlUrl||"",onChange:e=>t("layers",e.trim(),"kmlUrl"),placeholder:"https://example.com/route.kml",help:(0,x.__)("Must be a publicly reachable URL — Google fetches it from their servers, not the visitor’s browser. Note that Google has deprecated KML layers; the GeoJSON field below is the supported route.","b-blocks"),__nextHasNoMarginBottom:!0}),Yj(e.kmlUrl)&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("This URL only resolves on your own machine. Google fetches KML server-side, so a local address can never load — host the file publicly, or use GeoJSON below, which is parsed in the browser.","b-blocks")}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("GeoJSON","b-blocks"),value:e.geoJson||"",onChange:e=>t("layers",e,"geoJson"),rows:5,placeholder:'{ "type": "FeatureCollection", "features": [] }',__nextHasNoMarginBottom:!0}),qj(e.geoJson).error&&(0,l.jsx)(ja,{status:"danger",isIcon:!0,children:qj(e.geoJson).error})]}),JS=({map:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Zoom","b-blocks"),value:Kj(e.zoom,12),min:1,max:22,onChange:e=>t("map",Kj(e,12),"zoom"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Min Zoom","b-blocks"),min:1,max:Kj(e.maxZoom)??22,value:e.minZoom??"",onChange:e=>t("map",e,"minZoom"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Max Zoom","b-blocks"),min:Kj(e.minZoom)??1,max:22,value:e.maxZoom??"",onChange:e=>t("map",e,"maxZoom"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Map Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{
437 -className:"flex1",value:e.mapType||"roadmap",options:ES,onChange:e=>t("map",e,"mapType"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Let visitors switch map type","b-blocks"),checked:!1!==e.allowTypeSwitch,onChange:e=>t("map",!!e,"allowTypeSwitch"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Gesture Handling","b-blocks"),value:e.gestureHandling||"cooperative",options:AS,onChange:e=>t("map",e,"gestureHandling"),help:(0,x.__)("Cooperative requires Ctrl/⌘ + scroll to zoom, so the page never traps the visitor’s scroll.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Draggable","b-blocks"),checked:!1!==e.draggable,onChange:e=>t("map",!!e,"draggable"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Zoom on scroll wheel","b-blocks"),checked:!!e.scrollwheel,onChange:e=>t("map",!!e,"scrollwheel"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fit map to all markers","b-blocks"),checked:!!e.fitBounds,onChange:e=>t("map",!!e,"fitBounds"),help:(0,x.__)("Overrides the center and zoom above when two or more markers have coordinates.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Use Aspect Ratio","b-blocks"),checked:!!e.useAspectRatio,onChange:e=>t("map",!!e,"useAspectRatio"),help:(0,x.__)("When on, the map sizes by a fixed aspect ratio (fluid). When off, fixed heights per breakpoint.","b-blocks"),__nextHasNoMarginBottom:!0}),e.useAspectRatio?(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Aspect Ratio","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:e.aspectRatio?.[n]||"",options:[{label:(0,x.__)("Inherit","b-blocks"),value:""},...Rj],onChange:e=>t("map",e,"aspectRatio",n),__nextHasNoMarginBottom:!0})]}):(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:Xj(e,n,"height"),units:NS,onChange:e=>t("map",e,n,"height"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:Xj(e,n,"maxWidth"),units:NS,onChange:e=>t("map",e,n,"maxWidth"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(v,{className:"mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Map Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:Xj(e,n,"align"),onChange:e=>t("map",e,n,"align"),children:zj.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),eT=e=>{const{attributes:t,setAttributes:n,arrKey:o="markers",index:i,setActiveIndex:a,apiKey:s=""}=e,r=t[o]||[],c=r[i],{data:d}=jd("bBlocksUtils"),{refetch:u}=Cd("b-blocks-enable-svg-mime-type",{_wpnonce:d?.nonce},!1),p=new Tt,[h,g]=(0,m.useState)(""),[b,f]=(0,m.useState)(""),k=(0,m.useRef)(null),w=(0,m.useMemo)((()=>xe((e=>k.current?.("content",e)),600)),[]),[_,C]=(0,m.useState)(""),j=(0,m.useRef)(!1),$=(0,m.useMemo)((()=>xe((e=>{k.current?.("image",e,"alt"),j.current=!1}),600)),[]),S=r[i]?.image?.alt||"";if((0,m.useEffect)((()=>{j.current||C(S)}),[i,S]),!c)return null;const T=t.categories||[],N=(e,t,s=null,l=null)=>{n({[o]:Rb(r,(n=>{null!==l?n[i][e][s][l]=t:null!==s?n[i][e][s]=t:n[i][e]=t}))}),a&&a(i)};k.current=N;const M=async()=>{const e=(c.address||"").trim();if(e&&s){g("loading");try{const{Geocoder:t}=await vS(s,["geocoding"]),{results:a}=await(new t).geocode({address:e}),l=a?.[0]?.geometry?.location;if(!l)throw new Error("not-found");n({[o]:Rb(r,(e=>{e[i].address=a[0].formatted_address,e[i].lat=Number(l.lat().toFixed(6)),e[i].lng=Number(l.lng().toFixed(6))}))}),g("done")}catch(e){f(Hj(e)),g("error")}}};return(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small markerItemSettingsTabPanel",activeClass:"activeTab",tabs:WS,initialTabName:"icon",children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:["location"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Address","b-blocks")}),(0,l.jsxs)(y.Flex,{align:"flex-end",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:c.address||"",onChange:e=>N("address",e),placeholder:(0,x.__)("Search an address","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.Button,{variant:"secondary",onClick:M,disabled:!s||!c.address||"loading"===h,children:"loading"===h?(0,x.__)("Locating…","b-blocks"):(0,x.__)("Locate","b-blocks")})]}),"error"===h&&(0,l.jsx)(ja,{status:"danger",isIcon:!0,children:b}),(null===Kj(c.lat)||null===Kj(c.lng))&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("This marker has no coordinates, so it will not appear on the map. Use Locate above, or type a latitude and longitude below.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Latitude","b-blocks"),step:1e-6,value:c.lat??"",onChange:e=>N("lat",Kj(e,0)),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Longitude","b-blocks"),step:1e-6,value:c.lng??"",onChange:e=>N("lng",Kj(e,0)),__next40pxDefaultSize:!0})]}),(0,l.jsx)("br",{}),(0,l.jsxs)(y.Flex,{className:"m10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Category","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:c.category||"",options:[{label:(0,x.__)("None","b-blocks"),value:""},...T.map((e=>({label:e.label,value:e.id})))],onChange:e=>N("category",e),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.CheckboxControl,{className:"mt10",label:(0,x.__)("Draggable in the editor","b-blocks"),checked:!1!==c.draggable,onChange:e=>N("draggable",!!e)}),(0,l.jsx)("br",{}),(0,l.jsx)(y.CheckboxControl,{className:"m10",label:(0,x.__)("Open its info window by default","b-blocks"),checked:!!c.openByDefault,onChange:e=>N("openByDefault",!!e)})]}),"content"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Title","b-blocks"),value:c.title||"",onChange:e=>N("title",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Info Window Content","b-blocks")}),(0,l.jsx)(La,{value:c.content,onChange:w}),(0,l.jsx)("div",{className:"mt15",children:(0,l.jsx)(we,{label:(0,x.__)("Image","b-blocks"),width:"90%",height:"90%",value:{url:c.image?.url},onChange:e=>N("image",e?.url||"","url")})}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Image Alt Text","b-blocks"),value:_,onChange:e=>{j.current=!0,C(e),$(e)},__nextHasNoMarginBottom:!0})]}),"icon"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Pin Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",options:HS,value:c.icon?.type||"default",onChange:e=>N("icon",e,"type")})]}),(0,l.jsxs)("div",{className:"mt15",children:["library"===c.icon?.type&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:c.icon.url.library,onChange:e=>N("icon",e,"url","library")}),"upload"===c.icon?.type&&(0,l.jsx)(we,{label:(0,x.__)("Upload SVG","b-blocks"),types:["image/svg+xml"],value:{url:c?.icon?.url?.upload},onClick:async()=>($d(),await u()),onChange:async e=>{const t=e?.url?await p.sanitizeFile(e.url):"";N("icon",t,"url","upload")},isSvgEnabled:!0}),"image"===c.icon?.type&&(0,l.jsx)(we,{label:(0,x.__)("Pin Image","b-blocks"),
438 -value:{url:c.image?.url},onChange:e=>N("image",e?.url||"","url")})]}),"default"===(c.icon?.type||"default")&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Pin Color:","b-blocks"),value:c.pinColor,onChange:e=>N("pinColor",e)}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Glyph Color:","b-blocks"),value:c.glyphColor,onChange:e=>N("glyphColor",e)})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Animation","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex2",value:c.animation||"",options:[{label:(0,x.__)("Inherit","b-blocks"),value:""},...IS],onChange:e=>N("animation",e),__nextHasNoMarginBottom:!0})]})]})]})})},tT=({attributes:e,setAttributes:t,updateObj:n,activeIdx:o,setActiveIdx:i,device:a,isPremium:s,apiKey:r})=>{const{source:c={},infoWindow:d={}}=e,u=(e.markers?.length||0)+1,p=e$(e.theme||{}).length>0,h=(0,m.useCallback)((e=>(0,l.jsx)(eT,{...e,apiKey:r,device:a})),[r,a]);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Markers","b-blocks"),initialOpen:!1,children:[!c.mapId&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("Markers stay hidden until you add a Map ID. Google Advanced Markers cannot render without one — create a Map ID in the Google Cloud console and paste it into Map Source → Map ID.","b-blocks")}),c.mapId&&p&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Your Map ID is active, so markers work but the Style tab’s themes are ignored. Style this map in the Google Cloud console instead.","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Info Window Opens On","b-blocks"),help:(0,x.__)("Always open shows every marker’s info window as soon as the map loads.","b-blocks"),value:d.trigger||"click",options:OS,onChange:e=>n("infoWindow",e,"trigger"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),"always"!==(d.trigger||"click")&&"none"!==d.trigger&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Only one open at a time","b-blocks"),checked:!1!==d.singleOpen,onChange:e=>n("infoWindow",!!e,"singleOpen"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(_a,{attributes:e,setAttributes:t,arrKey:"markers",itemLabel:"Marker",design:s?"sortable":"single",ItemSettings:h,newItem:US(u,c.center),activeIndex:o,setActiveIndex:i,minItem:0}),!s&&(0,l.jsxs)("small",{children:[(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("Upgrade to Premium","b-blocks")})})," ",(0,x.__)("to unlock sorting and more features.","b-blocks")]})]})},nT=({performance:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Performance","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Load the map","b-blocks"),value:e.lazyLoad||"onView",options:FS,onChange:e=>t("performance",e,"lazyLoad"),help:(0,x.__)("Deferring the load keeps Google’s scripts off the page until the visitor actually needs them.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("The editor always loads the map immediately so you can see your changes.","b-blocks")})]}),oT=({tools:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Search & Location","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Search Box","b-blocks"),checked:!!e.searchBox,onChange:e=>t("tools",!!e,"searchBox"),help:(0,x.__)("Adds a Places autocomplete field above the map. Requires the Places API (New) on your key.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Find my location button","b-blocks"),checked:!!e.geolocation,onChange:e=>t("tools",!!e,"geolocation"),__nextHasNoMarginBottom:!0}),e.geolocation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Nearby Radius (metres)","b-blocks"),min:0,step:100,value:e.nearbyRadius??0,onChange:e=>t("tools",Kj(e,0),"nearbyRadius"),__next40pxDefaultSize:!0}),(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Browsers only allow location access on HTTPS, and the visitor must approve the prompt.","b-blocks")})]})]}),iT=e=>{const{attributes:t,setAttributes:n,arrKey:o="shapes",index:i}=e,a=t[o]||[],s=a[i];if(!s)return null;const r=(e,t,s=null)=>n({[o]:Rb(a,(n=>{null!==s?n[i][e][s]=t:n[i][e]=t}))}),c="polyline"===s.type||"polygon"===s.type,d="polyline"!==s.type,u=c?_S(s.path).length<2:"circle"===s.type?null===Kj(s.center?.lat)||null===Kj(s.center?.lng)||!Kj(s.radius):["north","south","east","west"].some((e=>null===Kj(s.bounds?.[e])));return(0,l.jsxs)(l.Fragment,{children:[u&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:c?(0,x.__)('This shape needs at least two "latitude,longitude" points before it appears on the map.',"b-blocks"):"circle"===s.type?(0,x.__)("This circle needs a centre latitude, longitude and radius before it appears on the map.","b-blocks"):(0,x.__)("This rectangle needs all four bounds before it appears on the map.","b-blocks")}),u&&(0,l.jsx)(y.Button,{className:"mt10",variant:"secondary",onClick:()=>n({[o]:Rb(a,(e=>{Object.assign(e[i],GS(t.source?.center,i))}))}),children:(0,x.__)("Fill from map centre","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label","b-blocks"),value:s.label||"",onChange:e=>r("label",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Type","b-blocks"),value:s.type,options:DS,onChange:e=>r("type",e),__nextHasNoMarginBottom:!0}),c&&(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Path","b-blocks"),value:s.path||"",onChange:e=>r("path",e),rows:4,placeholder:"23.8103,90.4125\n23.7900,90.4000",help:(0,x.__)('One "latitude,longitude" pair per line — or paste a JSON array of {lat, lng} objects.',"b-blocks"),__nextHasNoMarginBottom:!0}),"circle"===s.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Center Latitude","b-blocks"),step:1e-6,value:s.center?.lat??"",onChange:e=>r("center",Kj(e,0),"lat"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Center Longitude","b-blocks"),step:1e-6,value:s.center?.lng??"",onChange:e=>r("center",Kj(e,0),"lng"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Radius (metres)","b-blocks"),min:1,step:50,value:s.radius??1e3,onChange:e=>r("radius",Kj(e,1e3)),__next40pxDefaultSize:!0})]}),"rectangle"===s.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Bounds","b-blocks")}),(0,l.jsxs)(y.Flex,{gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("North","b-blocks"),step:1e-6,value:s.bounds?.north??"",onChange:e=>r("bounds",Kj(e,0),"north"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("South","b-blocks"),step:1e-6,value:s.bounds?.south??"",onChange:e=>r("bounds",Kj(e,0),"south"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt5",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("East","b-blocks"),step:1e-6,value:s.bounds?.east??"",onChange:e=>r("bounds",Kj(e,0),"east"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("West","b-blocks"),step:1e-6,value:s.bounds?.west??"",onChange:e=>r("bounds",Kj(e,0),"west"),__next40pxDefaultSize:!0})]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Stroke Color:","b-blocks"),value:s.strokeColor,onChange:e=>r("strokeColor",e)}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Stroke Opacity","b-blocks"),value:Kj(s.strokeOpacity,.9),min:0,max:1,step:.05,onChange:e=>r("strokeOpacity",Kj(e,.9)),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,
439 -x.__)("Stroke Weight","b-blocks"),value:Kj(s.strokeWeight,3),min:1,max:20,onChange:e=>r("strokeWeight",Kj(e,3)),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Fill Color:","b-blocks"),value:s.fillColor,onChange:e=>r("fillColor",e)}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Fill Opacity","b-blocks"),value:Kj(s.fillOpacity,.25),min:0,max:1,step:.05,onChange:e=>r("fillOpacity",Kj(e,.25)),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})]})},aT=({attributes:e,setAttributes:t})=>(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Shapes","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,arrKey:"shapes",itemLabel:"Shape",design:"sortable",minItem:0,ItemSettings:iT,newItem:VS((e.shapes?.length||0)+1,e.source?.center)})}),sT=({source:e={},updateObj:t,apiKey:n=""})=>{const o=e.type||(e.embedUrl?"embed":"interactive"),i=e.center||{},a=e.embedUrl||"",s=a&&!Fj(a),[r,c]=(0,m.useState)(i.address||""),[d,u]=(0,m.useState)(""),[p,h]=(0,m.useState)(""),g=(0,m.useRef)(i.address||"");(0,m.useEffect)((()=>{c(i.address||""),g.current=i.address||""}),[i.address]);const b=async e=>{const o=(e??r).trim();if(o&&n){u("loading");try{const{Geocoder:e}=await vS(n,["geocoding"]),{results:i}=await(new e).geocode({address:o}),a=i?.[0]?.geometry?.location;if(!a)throw new Error("not-found");g.current=i[0].formatted_address,t("source",{lat:Number(a.lat().toFixed(6)),lng:Number(a.lng().toFixed(6)),address:i[0].formatted_address},"center"),u("done")}catch(e){h(Hj(e)),u("error")}}};return(0,m.useEffect)((()=>{if("interactive"!==o||!n)return;const e=r.trim();if(!e||e===g.current)return;const t=setTimeout((()=>b(e)),900);return()=>clearTimeout(t)}),[r,o,n]),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Source","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Tn,{label:(0,x.__)("Mode","b-blocks"),options:PS,value:o,onChange:e=>t("source",e,"type")}),"embed"===o?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Google Maps Embed","b-blocks"),value:a,onChange:e=>t("source",(e=>{if(!e||"string"!=typeof e)return"";const t=e.trim();if(!t)return"";if(/<iframe\b/i.test(t)){const e=t.match(/\bsrc\s*=\s*["']([^"']+)["']/i);return e&&e[1]?e[1].trim():""}return t})(e),"embedUrl"),placeholder:"https://www.google.com/maps/embed?pb=...",help:(0,x.__)("In Google Maps, click Share → Embed a map → Copy HTML. Paste the full iframe code OR just the src URL — we will extract it for you.","b-blocks"),rows:4,__nextHasNoMarginBottom:!0}),s&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("This does not look like a Google Maps embed URL. Only https://www.google.com/maps/embed URLs are allowed.","b-blocks")})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt15",children:(0,x.__)("Center Address","b-blocks")}),(0,l.jsxs)(y.Flex,{align:"flex-end",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:r,onChange:c,placeholder:(0,x.__)("e.g. 1600 Amphitheatre Parkway, Mountain View","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.Button,{variant:"secondary",onClick:()=>b(),disabled:!n||!r.trim()||"loading"===d,children:"loading"===d?(0,x.__)("Locating…","b-blocks"):(0,x.__)("Locate","b-blocks")})]}),!n&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("Add a Google Maps API key to look up addresses.","b-blocks")}),"error"===d&&(0,l.jsx)(ja,{status:"danger",isIcon:!0,children:p}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Latitude","b-blocks"),value:i.lat??"",step:1e-6,onChange:e=>t("source",e,"center","lat"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Longitude","b-blocks"),value:i.lng??"",step:1e-6,onChange:e=>t("source",e,"center","lng"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Map ID","b-blocks"),value:e.mapId||"",onChange:e=>t("source",e,"mapId"),help:(0,x.__)("Optional. A Map ID from Google Cloud console enables cloud-based styling. Leave empty to use the JSON themes in the Style tab.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Language","b-blocks"),value:e.language||"",onChange:e=>t("source",e.trim(),"language"),placeholder:"en",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Region","b-blocks"),value:e.region||"",onChange:e=>t("source",e.trim(),"region"),placeholder:"US",__nextHasNoMarginBottom:!0})]})]})]})},rT=({attributes:e,updateObj:t})=>{const{theme:n={},source:o={},markers:i=[],clustering:a={}}=e,s=n.preset||"default",r=e$(n).length>0,c=i.length>0||!!a.enabled;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Theme","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Theme","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:s,options:RS,onChange:e=>t("theme",e,"preset"),__nextHasNoMarginBottom:!0})]}),r&&o.mapId&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("Your Map ID overrides these themes — Google applies the map’s cloud styling instead. Style it in the Google Cloud console, or clear the Map ID under Map Source to use the themes here.","b-blocks")}),!o.mapId&&c&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Themes apply because no Map ID is set — which is also why markers stay hidden. Google cannot combine JSON themes with Advanced Markers; add a Map ID under Map Source for markers, and style that map in the Google Cloud console.","b-blocks")}),"custom"===s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Custom Style JSON","b-blocks")}),(0,l.jsx)(wt,{value:n.customJson||"",onChange:e=>t("theme",e,"customJson"),height:"220px"}),!t$(n.customJson)&&(0,l.jsx)(ja,{status:"danger",isIcon:!0,children:(0,x.__)("This is not a valid style array. Paste the JSON from the Google Maps Styling Wizard.","b-blocks")})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Grayscale","b-blocks"),value:Kj(n.grayscale,0),min:0,max:100,onChange:e=>t("theme",Kj(e,0),"grayscale"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Saturation","b-blocks"),value:Kj(n.saturation,0),min:-100,max:100,onChange:e=>t("theme",Kj(e,0),"saturation"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ge,{className:"mt10",label:(0,x.__)("Hue:","b-blocks"),value:n.hue,onChange:e=>t("theme",e,"hue")})]})},lT=e=>{const{attributes:t,updateObj:n,device:o="desktop"}=e,{map:i={},controls:a={},clustering:s={},layers:r={},directions:c={},tools:d={},performance:u={},caption:p={}}=t,h=Qj(t).source,g="embed"!==h.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(sT,{source:h,updateObj:n,apiKey:e.apiKey}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(JS,{map:i,updateObj:n,device:o}),(0,l.jsx)(QS,{controls:a,updateObj:n}),(0,l.jsx)(rT,{attributes:t,updateObj:n}),(0,l.jsx)(tT,{...e}),(0,l.jsx)(KS,{clustering:s,updateObj:n}),(0,l.jsx)(YS,{...e}),(0,l.jsx)(XS,{layers:r,updateObj:n,markerCount:t.markers?.length||0,plottableCount:(t.markers||[]).filter((e=>null!==wS(e))).length}),(0,l.jsx)(aT,{...e}),(0,l.jsx)(ZS,{directions:c,updateObj:n}),(0,l.jsx)(oT,{tools:d,updateObj:n}),(0,l.jsx)(nT,{performance:u,updateObj:n})]}),!g&&(0,l.jsx)(JS,{map:i,updateObj:n,device:o}),(0,l.jsx)(qS,{caption:p,updateObj:n})]})},cT=({caption:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:e.color,onChange:e=>t("caption",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,
440 -onChange:e=>t("caption",e,"typo")})]}),dT=({filterBar:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Filter Bar","b-blocks"),initialOpen:!1,children:[!e.show&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Turn the filter bar on under General → Categories & Filter Bar to see these styles.","b-blocks")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Chip Color:","b-blocks"),value:e.color,onChange:e=>t("filterBar",e,"color")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Chip Background:","b-blocks"),value:e.bgColor,onChange:e=>t("filterBar",e,"bgColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Active Background:","b-blocks"),value:e.activeColor,onChange:e=>t("filterBar",e,"activeColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Active Text:","b-blocks"),value:e.activeTextColor,onChange:e=>t("filterBar",e,"activeTextColor")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("filterBar",e,"typo")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:NS,value:e?.[n]?.gap,onChange:e=>t("filterBar",e,n,"gap"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Chip Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:NS,values:e?.[n]?.padding,resetValues:MS,onChange:e=>t("filterBar",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Chip Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:NS,values:e?.[n]?.radius,resetValues:MS,onChange:e=>t("filterBar",e,n,"radius")})]}),uT=({infoWindow:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Info Window","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:e.bgColor,onChange:e=>t("infoWindow",e,"bgColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:e.textColor,onChange:e=>t("infoWindow",e,"textColor")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("infoWindow",e,"typo")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:NS,value:e?.[n]?.maxWidth,onChange:e=>t("infoWindow",e,n,"maxWidth"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:NS,values:e?.[n]?.padding,resetValues:MS,onChange:e=>t("infoWindow",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:NS,values:e?.[n]?.radius,resetValues:MS,onChange:e=>t("infoWindow",e,n,"radius")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:e.shadow,onChange:e=>t("infoWindow",e,"shadow")})]}),pT=({map:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:NS,values:e.borderRadius?.[n],resetValues:MS,onChange:e=>t("map",e,"borderRadius",n)}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:e.shadow,onChange:e=>t("map",e,"shadow")})]}),hT=({marker:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Markers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Pin Color:","b-blocks"),value:e.pinColor,onChange:e=>t("marker",e,"pinColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Glyph Color:","b-blocks"),value:e.glyphColor,onChange:e=>t("marker",e,"glyphColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Border Color:","b-blocks"),value:e.borderColor,onChange:e=>t("marker",e,"borderColor")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Pin Scale","b-blocks"),value:Kj(e.scale,1),min:.5,max:3,step:.1,onChange:e=>t("marker",Kj(e,1),"scale"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Custom Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:NS,value:e?.[n]?.size,onChange:e=>t("marker",e,n,"size"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Default Animation","b-blocks"),value:e.animation||"none",options:IS,onChange:e=>t("marker",e,"animation"),help:(0,x.__)("Skipped automatically for visitors who prefer reduced motion.","b-blocks"),__nextHasNoMarginBottom:!0})]}),gT=e=>{const{attributes:t,updateObj:n,device:o="desktop"}=e,{map:i={},marker:a={},infoWindow:s={},filterBar:r={},caption:c={}}=t,d="embed"!==Qj(t).source.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pT,{map:i,updateObj:n,device:o}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hT,{marker:a,updateObj:n,device:o}),(0,l.jsx)(uT,{infoWindow:s,updateObj:n,device:o}),(0,l.jsx)(dT,{filterBar:r,updateObj:n,device:o})]}),(0,l.jsx)(cT,{caption:c,updateObj:n})]})},mT=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,[a,s]=(0,m.useState)(0);return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:LS,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(lT,{...e,activeIdx:a,setActiveIdx:s}),"style"===t.name&&(0,l.jsx)(gT,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},bT=(0,w.compose)((0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}}))),(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop",selectBlock:a}=e,s="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,r=fe(t,n),c=(0,h.useBlockProps)({id:`block-${o}`}),d=window.bBlocksCursorDataConfig?.nonce,{data:u,isLoading:p}=Cd("bblocks_api_keys",{_wpnonce:d},!0),[g,b]=(0,m.useState)("");(0,m.useEffect)((()=>{b(u?.googleMaps?.key||"")}),[u,p]);const f="embed"!==Qj(t).source.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(mT,{...e,updateObj:r,isPremium:s,apiKey:g}),(0,l.jsxs)("div",{...c,onClick:()=>a(o),onDragStart:e=>e.stopPropagation(),draggable:!1,children:[(0,l.jsx)(n$,{attributes:t,id:`block-${o}`,isBackend:!0}),f&&!p&&!g&&(0,l.jsxs)(ja,{status:"warning",isIcon:!1,className:"mb10",children:[(0,x.__)("Add your Google Maps API key in","b-blocks")," ",(0,l.jsx)("a",{href:vn,target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("bBlocks → Settings","b-blocks")})," ",(0,x.__)("to show an interactive map.","b-blocks")]}),(0,l.jsx)("div",{children:(0,l.jsx)(TS,{attributes:t,apiKey:g,isBackend:!0,device:i,onMarkerDrag:(e,{lat:o,lng:i})=>{n({markers:Rb(t.markers||[],(t=>{t[e]&&(t[e].lat=Number(o.toFixed(6)),t[e].lng=Number(i.toFixed(6)))}))})}})})]})]})}));Ll(Bj.name)&&(0,p.registerBlockType)(Bj,{icon:bl,edit:bT,save:()=>null})
441 -;const fT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/hero-section","version":"2.0.71","title":"Hero Section","category":"bBlocks","description":"Landing-page hero with an eyebrow, headline, sub-headline, and a CTA button.","keywords":["hero","hero section","landing page","banner","jumbotron","masthead","page header","cta"],"textdomain":"b-blocks","attributes":{"layout":{"type":"object","default":{"minHeight":"60vh","verticalAlign":{"desktop":"middle","tablet":"","mobile":""},"contentAlign":{"desktop":"center","tablet":"","mobile":""},"btnGap":{"desktop":"16px","tablet":"","mobile":""}}},"eyebrow":{"type":"object","default":{"show":false,"text":"New — Summer 2026","color":"#ffffff","bg":{"type":"solid","color":"rgba(255,255,255,0.14)"},"typo":{"fontSize":{"desktop":"13px","tablet":"","mobile":""},"fontWeight":"600","letterSpace":"2px","textTransform":"uppercase"},"padding":{"desktop":{"top":"6px","right":"14px","bottom":"6px","left":"14px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"50px","right":"50px","bottom":"50px","left":"50px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"heading":{"type":"object","default":{"text":"Build Something Amazing","tag":"h1","color":"#ffffff","typo":{"fontSize":{"desktop":"56px","tablet":"40px","mobile":"28px"},"fontWeight":"700","lineHeight":"1.2"},"bg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"subHeading":{"type":"object","default":{"show":true,"text":"The easiest way to launch your next big idea — no code required.","color":"rgba(255,255,255,0.85)","typo":{"fontSize":{"desktop":"18px","tablet":"","mobile":"15px"},"lineHeight":"1.55"},"bg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"button":{"type":"object","default":{"show":true,"text":"Get Started","url":"","newTab":false,"normal":{"bg":{"type":"solid","color":"#ffffff"},"color":"#1a1a2e","border":{}},"hover":{"bg":{},"color":"","border":{}},"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":"600"},"padding":{"desktop":{"top":"14px","right":"28px","bottom":"14px","left":"28px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"30px","right":"","bottom":"30px","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"#1A1A2E","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),xT={top:"flex-start",middle:"center",bottom:"flex-end"},yT={left:"flex-start",center:"center",right:"flex-end"},vT={left:"flex-start",center:"center",right:"flex-end"},kT=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,wT=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:a={},eyebrow:s={},heading:r={},subHeading:c={},button:d={},advanced:u}=e,{minHeight:p="60vh",verticalAlign:h={},contentAlign:g={},btnGap:m={}}=a,b=`#${o} .b-blocks-hero-section`,f=`${b} .b-blocks-hero-section-container`,x=`${b} .b-blocks-hero-section-eyebrow`,y=`${b} .b-blocks-hero-section-heading`,v=`${b} .b-blocks-hero-section-subheading`,k=`${b} .b-blocks-hero-section-actions`,w=`${b} .b-blocks-hero-section-cta--primary`,_=(e,t,n)=>ns(e,hs(t?.[n])),C=e=>{const t=kT(h,e)||"middle",n=kT(g,e)||"center",o=null==(i=kT(m,e))||""===i?"":"number"==typeof i?`${i}px`:i;var i;return`\n\t\t\t${b}{ align-items:${xT[t]||"center"}; }\n\t\t\t${f}{ ${ns("text-align",n)} align-items:${yT[n]||"center"}; }\n\t\t\t${v}{ ${"center"===n?"margin-left:auto;margin-right:auto;":"margin-left:0;margin-right:0;"} }\n\t\t\t${k}{ ${ns("gap",o)} justify-content:${vT[n]||"center"}; }\n\t\t`},j=e=>`\n\t\t${x}{ ${_("padding",s.padding,e)} ${_("margin",s.margin,e)} ${_("border-radius",s.borderRadius,e)} }\n\t\t${y}{ ${_("padding",r.padding,e)} ${_("margin",r.margin,e)} ${_("border-radius",r.borderRadius,e)} }\n\t\t${v}{ ${_("padding",c.padding,e)} ${_("margin",c.margin,e)} ${_("border-radius",c.borderRadius,e)} }\n\t\t${w}{ ${_("padding",d.padding,e)} ${_("margin",d.margin,e)} ${_("border-radius",d.radius,e)} }\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
442 -__html:`\n\t\t\t${ps("",s.typo).googleFontLink}\n\t\t\t${ps("",r.typo).googleFontLink}\n\t\t\t${ps("",c.typo).googleFontLink}\n\t\t\t${ps("",d.typo).googleFontLink}\n\t\t\t${b}{\n\t\t\t\t${"auto"===p?"min-height:auto;":`min-height:${p};`}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${ns("color",s.color)}\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${is(s.border)}\n\t\t\t}\n\t\t\t${ps(x,s.typo).styles}\n\t\t\t${y}{\n\t\t\t\t${ns("color",r.color)}\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${is(r.border)}\n\t\t\t}\n\t\t\t${ps(y,r.typo).styles}\n\t\t\t${v}{\n\t\t\t\t${ns("color",c.color)}\n\t\t\t\t${os(c.bg)}\n\t\t\t\t${is(c.border)}\n\t\t\t}\n\t\t\t${ps(v,c.typo).styles}\n\t\t\t${w}{\n\t\t\t\t${os(d.normal?.bg)}\n\t\t\t\t${ns("color",d.normal?.color)}\n\t\t\t\t${is(d.normal?.border)}\n\t\t\t\ttransition:all ${d.transition??.2}s ease;\n\t\t\t}\n\t\t\t${ps(w,d.typo).styles}\n\t\t\t${w}:hover, ${w}:focus-visible{\n\t\t\t\t${os(d.hover?.bg)}\n\t\t\t\t${ns("color",d.hover?.color)}\n\t\t\t\t${is(d.hover?.border)}\n\t\t\t}\n\t\t\t${C("desktop")}\n\t\t\t${j("desktop")}\n\t\t\t${t}{ ${C("tablet")} ${j("tablet")} }\n\t\t\t${n}{ ${C("mobile")} ${j("mobile")} }\n\t\t\t${_s(o,u,i,!1)}\n\t\t\t`}})},_T=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],CT={top:"",right:"",bottom:"",left:""},jT=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],$T=[{label:(0,x.__)("Full viewport (100vh)","b-blocks"),value:"100vh"},{label:(0,x.__)("Almost full (90vh)","b-blocks"),value:"90vh"},{label:(0,x.__)("Three-quarter (75vh)","b-blocks"),value:"75vh"},{label:(0,x.__)("Default (60vh)","b-blocks"),value:"60vh"},{label:(0,x.__)("Half viewport (50vh)","b-blocks"),value:"50vh"},{label:(0,x.__)("Auto (fits content)","b-blocks"),value:"auto"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}],ST=["100vh","90vh","75vh","60vh","50vh","auto"],TT=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Middle","b-blocks"),value:"middle"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],NT=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],MT=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"}],LT=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},eyebrow:a={},heading:s={},subHeading:r={},button:c={}}=e,{minHeight:d="60vh",verticalAlign:u={},contentAlign:p={},btnGap:h={}}=i,g=!ST.includes(d),m=e=>e&&"object"==typeof e?e[o]||"":"desktop"===o&&e||"",b=(e,n)=>{const a=i[e],s=a&&"object"==typeof a?a:{};t({layout:{...i,[e]:{...s,[o]:n}}})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Section min-height","b-blocks"),value:g?"custom":d,options:$T,onChange:e=>n("layout","custom"===e?"600px":e,"minHeight"),__nextHasNoMarginBottom:!0}),g&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Custom min-height","b-blocks"),value:d,units:[{label:"px",value:"px"},{label:"vh",value:"vh"},{label:"%",value:"%"},{label:"rem",value:"rem"},{label:"em",value:"em"}],onChange:e=>n("layout",e||"600px","minHeight"),__next40pxDefaultSize:!0}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Vertical Align","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:m(u),onChange:e=>b("verticalAlign",e||""),children:TT.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:"top"===e.value?"arrow-up-alt2":"bottom"===e.value?"arrow-down-alt2":"minus"},e.value)))})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Text Align","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:m(p),onChange:e=>b("contentAlign",e||""),children:NT.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:`editor-align${e.value}`},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Gap between buttons","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:m(h),units:_T,onChange:e=>b("btnGap",e),__next40pxDefaultSize:!0})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Eyebrow","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show eyebrow label","b-blocks"),checked:!!a.show,onChange:e=>n("eyebrow",!!e,"show")}),!!a.show&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Eyebrow text","b-blocks"),value:a.text||"",onChange:e=>n("eyebrow",e,"text"),placeholder:(0,x.__)("NEW — SUMMER 2026","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Headline text","b-blocks"),value:s.text||"",onChange:e=>n("heading",e,"text"),placeholder:(0,x.__)("Build Something Amazing","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Heading HTML tag","b-blocks"),labelPosition:"edge",value:s.tag||"h1",options:MT,onChange:e=>n("heading",e,"tag"),help:(0,x.__)("Use H1 only once per page. Other instances should be H2 or H3.","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sub-headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show sub-headline","b-blocks"),checked:!!r.show,onChange:e=>n("subHeading",!!e,"show")}),!!r.show&&(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Sub-headline text","b-blocks"),value:r.text||"",onChange:e=>n("subHeading",e,"text"),placeholder:(0,x.__)("The easiest way to launch your next big idea…","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),rows:3,__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Buttons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show primary button","b-blocks"),checked:!!c.show,onChange:e=>n("button",!!e,"show")}),!!c.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Primary button label","b-blocks"),value:c.text||"",onChange:e=>n("button",e,"text"),placeholder:(0,x.__)("Get Started","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Primary button URL","b-blocks"),type:"url",value:c.url||"",onChange:e=>n("button",e,"url"),placeholder:"https://…",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open primary in new tab","b-blocks"),checked:!!c.newTab,onChange:e=>n("button",!!e,"newTab")})]})]})]})},PT=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,m.useState)("normal"),{eyebrow:a={},heading:s={},subHeading:r={},button:c={}}=e,d=c[o]||{},u=(e,o,i,a,s)=>(0,l.jsx)(k,{className:s,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:_T,values:a?.[n],resetValues:CT,onChange:e=>t(o,e,i,n)})
443 -;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Eyebrow","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:a.color||"#ffffff",onChange:e=>t("eyebrow",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:a.bg,onChange:e=>t("eyebrow",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typo,onChange:e=>t("eyebrow",e,"typo")}),u((0,x.__)("Padding","b-blocks"),"eyebrow","padding",a.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"eyebrow","margin",a.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("eyebrow",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"eyebrow","borderRadius",a.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:s.color||"#ffffff",onChange:e=>t("heading",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:s.bg,onChange:e=>t("heading",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typo,onChange:e=>t("heading",e,"typo")}),u((0,x.__)("Padding","b-blocks"),"heading","padding",s.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"heading","margin",s.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("heading",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"heading","borderRadius",s.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sub-headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:r.color||"rgba(255,255,255,0.85)",onChange:e=>t("subHeading",e,"color"),defaultColor:"rgba(255,255,255,0.85)"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:r.bg,onChange:e=>t("subHeading",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.typo,onChange:e=>t("subHeading",e,"typo")}),u((0,x.__)("Padding","b-blocks"),"subHeading","padding",r.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"subHeading","margin",r.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>t("subHeading",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"subHeading","borderRadius",r.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:c.typo,onChange:e=>t("button",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:d.bg,onChange:e=>t("button",e,o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:d.color,onChange:e=>t("button",e,o,"color"),defaultColor:"#1a1a2e"}),u((0,x.__)("Padding","b-blocks"),"button","padding",c.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"button","margin",c.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:d.border,onChange:e=>t("button",e||{},o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"button","radius",c.radius),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:c.transition??.2,onChange:e=>t("button",e,"transition"),min:0,max:5,step:.01,__nextHasNoMarginBottom:!0})]})]})},ET=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:"b-blocks"}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:jT,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(LT,{...e}),"style"===t.name&&(0,l.jsx)(PT,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},AT=["left","center","right"],BT=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop"}=e,{layout:a={},eyebrow:s={},heading:r={},subHeading:c={},button:d={}}=t,u="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,p=fe(t,n),{contentAlign:g={}}=a,m=g&&"object"==typeof g?g[i]||"":"desktop"===i&&g||"",b=["h1","h2","h3"].includes(r.tag)?r.tag:"h1",f=(0,h.useBlockProps)({id:`block-${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ET,{...e,updateObj:p,isPremium:u}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:m,onChange:e=>(e=>{const t=g&&"object"==typeof g?g:{};n({layout:{...a,contentAlign:{...t,[i]:e}}})})(AT.includes(e)?e:"")})}),(0,l.jsxs)("div",{...f,children:[(0,l.jsx)(wT,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"b-blocks-hero-section",children:(0,l.jsxs)("div",{className:"b-blocks-hero-section-container",children:[!!s.show&&(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-hero-section-eyebrow",value:s.text,onChange:e=>p("eyebrow",e,"text"),placeholder:(0,x.__)("Eyebrow label","b-blocks"),allowedFormats:["core/bold","core/italic"],inlineToolbar:!0}),(0,l.jsx)(h.RichText,{tagName:b,className:"b-blocks-hero-section-heading",value:r.text,onChange:e=>p("heading",e,"text"),placeholder:(0,x.__)("Add a powerful headline…","b-blocks"),allowedFormats:["core/bold","core/italic"],inlineToolbar:!0}),!!c.show&&(0,l.jsx)(h.RichText,{tagName:"p",className:"b-blocks-hero-section-subheading",value:c.text,onChange:e=>p("subHeading",e,"text"),placeholder:(0,x.__)("Add supporting copy…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"],inlineToolbar:!0}),!!d.show&&(0,l.jsx)("div",{className:"b-blocks-hero-section-actions",children:(0,l.jsx)(h.RichText,{tagName:"a",className:"b-blocks-hero-section-cta b-blocks-hero-section-cta--primary",value:d.text,onChange:e=>p("button",e,"text"),placeholder:(0,x.__)("Primary CTA","b-blocks"),allowedFormats:[],withoutInteractiveFormatting:!0,onClick:e=>e.preventDefault()})})]})})})]})]})}));Ll(fT.name)&&(0,p.registerBlockType)(fT,{icon:vl,edit:BT})
444 -;const IT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/html","version":"1.0.0","title":"HTML","category":"bBlocks","description":"Use the HTML block to add and preview HTML code in your posts or pages, enhancing your website\'s content and functionality.","keywords":["html","custom code","js","css"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"htmlCode":{"type":"string","default":""},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),OT=function(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 16 16",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M4.854 4.146a.5.5 0 010 .708L1.707 8l3.147 3.146a.5.5 0 01-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 01.708 0zm6.292 0a.5.5 0 000 .708L14.293 8l-3.147 3.146a.5.5 0 00.708.708l3.5-3.5a.5.5 0 000-.708l-3.5-3.5a.5.5 0 00-.708 0zm-.999-3.124a.5.5 0 01.33.625l-4 13a.5.5 0 01-.955-.294l4-13a.5.5 0 01.625-.33z",clipRule:"evenodd"})})},RT=["script","object","embed","link","meta","base"],zT=["href","src","action","formaction","data","poster","background"],DT=/^(?:javascript:|vbscript:|data:text\/html)/i,FT=({attributes:e,id:t,isBackend:n=!1})=>{const{advanced:o}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${Cs(t,o,n)}\n\t`}})},HT=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}];var WT=s(470);s(47),s(3158),s(1289),s(9072),s(9289);const UT=e=>{const{value:t,onChange:n,height:o="300px",width:i="100%"}=e,a=Math.floor(99999999*Math.random()),s=(0,m.useRef)(null),r=(0,m.useCallback)((e=>{clearTimeout(s.current),s.current=setTimeout((()=>{n(e)}),600)}),[n]);return(0,l.jsx)("div",{children:(0,l.jsx)(WT.Ay,{mode:"html",theme:"monokai",name:`advEditor-${a}`,onChange:r,fontSize:12,lineHeight:19,height:o,width:i,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:t,setOptions:{useWorker:!1,enableBasicAutocompletion:!0,enableLiveAutocompletion:!1,enableSnippets:!0,enableMobileMenu:!0,showLineNumbers:!0,tabSize:2}})})},GT=e=>{const{attributes:t,setAttributes:n}=e,{htmlCode:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("HTML Code","b-blocks"),initialOpen:!0,children:(0,l.jsx)(UT,{value:o,onChange:e=>n({htmlCode:e})})})]})},VT=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Ra,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:HT,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(GT,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e})})})]})})]})})},qT=/^(?:text|application)\/(?:x-)?(?:java|ecma)script$/i;Ll(IT.name)&&(0,p.registerBlockType)(IT,{icon:kr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{htmlCode:i}=t,a=Boolean(window?.bBlocksGlobal?.canUnfilteredHtml),s=(0,m.useMemo)((()=>a?i:(e=>{if("string"!=typeof e||""===e.trim())return"";const t=(new DOMParser).parseFromString(e,"text/html");return Array.from(t.body.querySelectorAll("*")).forEach((e=>{RT.includes(e.localName.toLowerCase())?e.remove():Array.from(e.attributes).forEach((({name:t,value:n})=>{const o=t.toLowerCase();(o.startsWith("on")||"srcdoc"===o||zT.includes(o)&&DT.test((e=>[...String(e||"")].filter((e=>e.charCodeAt(0)>32)).join(""))(n)))&&e.removeAttribute(t)}))})),t.body.innerHTML})(i)),[i,a]),r=((e,t=300,n=!0)=>{const o=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const i=o?.current;if(!n||!e||!i)return;const a=[],s=setTimeout((()=>{i?.querySelectorAll("script")?.forEach((e=>{if(!(e=>{const t=(e||"").trim();return!t||"module"===t.toLowerCase()||qT.test(t)})(e.getAttribute("type")))return;const t=document?.createElement("script");Array.from(e?.attributes)?.forEach((({name:e,value:n})=>t?.setAttribute(e,n))),e.src||(t.textContent=e?.textContent),e?.replaceWith(t),a.push(t)}))}),t);return()=>{clearTimeout(s),a?.forEach((e=>e?.remove()))}}),[e,t,n]),o})(s,1e3,a);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(VT,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),id:`html-block-${o}`,children:[(0,l.jsx)(FT,{attributes:t,id:`html-block-${o}`,isBackend:!0}),i?(0,l.jsx)("div",{ref:r,dangerouslySetInnerHTML:{__html:s}}):(0,l.jsx)("div",{children:(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"html-placeholder",children:(0,l.jsx)(OT,{})})})})]})]})}})
445 -;const YT=JSON.parse('{"apiVersion":3,"name":"b-blocks/icon-box","title":"Icon Box","description":"Display awesome icon in a box.","category":"bBlocks","keywords":["icon","box","library","icon library"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"wrapper":{"type":"object","default":{"width":"","height":"","alignment":{"desktop":"flex-start","tablet":"","mobile":""},"wrapperLink":{"url":"","linkText":"","openInNewTab":false,"nofollow":false}}},"icon":{"type":"object","default":{"svg":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'info-circle-fill\'><path d=\'M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2\'/></svg>","color":"#fff","size":"30px","shadow":{"type":"text"},"hover":{"color":"","shadow":{}}}},"animation":{"type":"object","default":{"type":"none","duration":1000,"delay":0,"iteration":"infinite","iterationCount":1,"hover":{"type":"none","duration":1000,"delay":0,"iteration":"initial","iterationCount":1}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"15px","right":"15px","bottom":"15px","left":"15px"}}},"background":{"normal":{"type":"color","color":"#111"}},"borderShadow":{"normal":{"radius":"50%"}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),KT=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Bounce","b-blocks"),value:"nBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"nPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"nSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"nShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"nWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"nPing"},{label:(0,x.__)("Float","b-blocks"),value:"nFloat"}],QT=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Bounce","b-blocks"),value:"hBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"hPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"hSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"hShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"hWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"hPing"},{label:(0,x.__)("Float","b-blocks"),value:"hFloat"}],ZT=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Infinite","b-blocks"),value:"infinite"},{label:(0,x.__)("Number","b-blocks"),value:"number"}],XT=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),JT=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),eN=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),tN=e=>{const{attributes:t,setAttributes:n,updateObj:o,device:i}=e,{icon:a,wrapper:s,animation:r}=t,{svg:c,size:d,color:u,shadow:p,hover:h}=a,{width:g,height:m,alignment:b={}}=s;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Zn,{value:c,onChange:e=>n({icon:{...a,svg:e}})}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"left",value:d,onChange:e=>n({icon:{...a,size:e}})})]}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:5,children:[(0,l.jsxs)(y.Flex,{gap:2,className:"flex1",children:[(0,l.jsx)(v,{className:"mb0",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:b?.[i],onChange:e=>o("wrapper",e,"alignment",i),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:XT}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:JT}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:eN})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt20",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color","b-blocks"),value:u,onChange:e=>n({icon:{...a,color:e}})}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:p,onChange:e=>n({icon:{...a,shadow:e}}),type:"text"})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color","b-blocks"),value:h?.color,onChange:e=>o("icon",e,"hover","color")}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:h?.shadow,onChange:e=>o("icon",e,"hover","shadow"),type:"text"})]})]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Wrapper / Box","b-blocks"),initialOpen:!1,children:[(0,l.jsx)("small",{children:(0,x.__)(`Minimum width and height must be greater then ${d}`,"b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt15",label:(0,x.__)("Width","b-blocks"),labelPosition:"left",value:g,onChange:e=>n({wrapper:{...s,width:e}})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height","b-blocks"),labelPosition:"left",value:m,onChange:e=>n({wrapper:{...s,height:e}})})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation","b-blocks"),options:KT,value:r.type,onChange:e=>o("animation",e,"type")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:ZT,value:r.iteration,onChange:e=>o("animation",e,"iteration")}),"number"==r.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:r.iterationCount,onChange:e=>o("animation",e,"iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),
446 -min:0,max:2e4,step:50,value:r.duration,onChange:e=>o("animation",e,"duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:r.delay,onChange:e=>o("animation",e,"delay")})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation","b-blocks"),options:QT,value:r.hover.type,onChange:e=>o("animation",e,"hover","type")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:ZT,value:r.hover.iteration,onChange:e=>o("animation",e,"hover","iteration")}),"number"===r.hover.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:r.hover.iterationCount,onChange:e=>o("animation",e,"hover","iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),min:0,max:2e4,step:50,value:r.hover.duration,onChange:e=>o("animation",e,"hover","duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:r.hover.delay,onChange:e=>o("animation",e,"hover","delay")})]})]})})})]})},nN=e=>{const{attributes:t,setAttributes:n,device:o}=e,{advanced:i}=t,a=fe(t,n);return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(tN,{attributes:t,setAttributes:n,updateObj:a,device:o})]}),"style"===e.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),enabled:{dimension:["padding","margin"],background:["normal","hover"],borderShadow:["normal","hover","border","shadow"],visibility:["zIndex"]}})]})})})},oN="bBlocksIconBox",iN=({attributes:e,id:o,isBackend:i=!1})=>{const{wrapper:a,icon:s,animation:r,advanced:c}=e,{size:d,color:u,shadow:p}=s,{width:h,height:g}=a,{duration:m,delay:b,type:f,iteration:x,iterationCount:y,hover:v}=r,k=`#${o} .${oN}`,w=`${k} svg`,_=(e,t,n,o,i)=>`${t} ${n}ms ${t==e+"Spin"?"linear":t===e+"Ping"?"cubic-bezier(0, 0, 0.2, 1)":"ease-in-out"} ${o}ms ${i};`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${k}{\n\t\t\t\twidth: ${h&&0!==parseInt(h)?h:"auto"};\n\t\t\t\theight: ${g&&0!==parseInt(g)?g:"auto"};\n\t\t\t}\n\t\t\t#${o}{\n\t\t\t\t${ns("justify-content",a?.alignment?.desktop)}\n\t\t\t}\n\t\t\t${w}{\n\t\t\t\tfill: ${u};\n\t\t\t\theight: ${d};\n\t\t\t\twidth: ${d};\n\t\t\t\tfilter: drop-shadow(${ds(p,"text")});\n\t\t\t}\n\n\t\t\t${k}:hover svg {\n\t\t\t\t${ns("fill",s?.hover?.color)}\n\t\t\t\t${ns("filter",jt(s?.hover?.shadow)?`drop-shadow(${ds(s?.hover?.shadow,"text")})`:"")}\n\t\t\t}\n\n\t\t\t${k}.${f} {\n\t\t\t\tanimation: ${_("n",f,m,b,"number"===x?y:x)}\n\t\t\t}\n\t\t\t\t\n\t\t\t${k}.${v?.type}:hover{\n\t\t\t\tanimation: ${_("h",v?.type,v?.duration,v?.delay,"number"===v?.iteration?v?.iterationCount:v?.iteration)}\n\t\t\t}\n\n\t\t\t${t}{\n\t\t\t\t#${o}{\n\t\t\t\t\t${ns("justify-content",a?.alignment?.tablet)}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t#${o}{\n\t\t\t\t\t${ns("justify-content",a?.alignment?.mobile)}\n\t\t\t\t}\n\t\t\t}\n\t\t\t${Cs(o,c,i)}\n\n`.replace(/\s+/g," ")}})},aN=({attributes:e})=>{const{icon:t,animation:n}=e,{type:o,hover:i={}}=n,a=(0,m.useMemo)((()=>(e=>Nt.sanitize(e))(t?.svg)),[t?.svg]);return(0,l.jsx)("div",{className:`${oN} b-blocks-icon-box-animation ${o} ${i?.type}`,dangerouslySetInnerHTML:{__html:a}})},sN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nN,{attributes:t,setAttributes:n,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(iN,{attributes:t,id:a,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(aN,{attributes:t})})]})]})}));Ll(YT.name)&&(0,p.registerBlockType)(YT,{icon:wr,edit:sN})
447 -;const rN=JSON.parse('{"apiVersion":3,"name":"b-blocks/image-comparison","title":"Image Comparison","description":"Compare between two images.","category":"bBlocks","keywords":["image comparison","image compare","image filter","visual comparison","before and after image","beaf","before after","before after image"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"alignment":{"type":"string","default":"center"},"theme":{"type":"string","default":"default"},"width":{"type":"string","default":"100%"},"border":{"type":"object","default":{}},"beforeImg":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"afterImg":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"orientation":{"type":"string","default":"horizontal"},"isSwap":{"type":"boolean","default":false},"isLabel":{"type":"boolean","default":true},"label":{"type":"object","default":{"hAlign":"bottom","vAlign":"center","isShowHover":false}},"beforeLabel":{"type":"string","selector":".beforeLabel","default":""},"afterLabel":{"type":"string","selector":".afterLabel","default":""},"labelTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"labelColors":{"type":"object","default":{"color":"#fff","bg":"#00000080"}},"labelPadding":{"type":"object","default":{"vertical":"10px","horizontal":"15px"}},"isCap":{"type":"boolean","default":true},"cap":{"type":"string","selector":".caption","default":""},"capAlign":{"type":"string","default":"center"},"capTypo":{"type":"object","default":{"fontSize":{"desktop":"14px"}}},"capColors":{"type":"object","default":{"color":"#333","bg":"#f4f4f4"}},"capPadding":{"type":"object","default":{"vertical":"10px","horizontal":"15px"}},"dragg":{"type":"object","default":{"handleType":"default","shapeType":"default"}},"styles":{"type":"object","default":{"container":{"height":{"desktop":"","tablet":"","mobile":""}},"dragg":{"line":{"bg":{"color":"#fff"},"size":2},"icon":{"color":""},"handler":{"color":""}}}},"options":{"type":"object","default":{"defaultOffset":0.5,"moveMouseOver":false,"isMoveClick":false,"autoSlide":{"isAutoSlide":false,"speed":5,"isHoverStop":true}}},"sliderOptions":{"type":"object","default":{"arrowType":"style1","height":{"desktop":"400px","tablet":"400px","mobile":"400px"},"autoplay":true,"dots":false,"speed":500,"autoplaySpeed":2500,"pauseOnHover":true,"infinite":true,"arrows":true,"slidesView":{"desktop":1,"tablet":1,"mobile":1}}},"sliderStyle":{"type":"object","default":{"pagination":{"active":"#146EF5"},"navigation":{"icon":{"normal":{"color":"#000","size":"22px"},"hover":{"color":"","size":"22px"}},"container":{"height":"","width":"","normal":{"bg":{"color":"#fff"},"border":{},"radius":{"left":"30px","right":"30px","top":"30px","bottom":"30px"}},"hover":{"bg":{"color":"#fff"},"border":{},"radius":{}}}}}},"slider":{"type":"array","default":[{"beforeImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},"beforeLabel":"Before Label"},"afterImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},"afterLabel":"After Label"},"caption":"Before After Image Caption"},{"beforeImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},"beforeLabel":"Before Label"},"afterImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},"afterLabel":"After Label"},"caption":"Before After Image Caption"},{"beforeImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},"beforeLabel":"Before Label"},"afterImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},"afterLabel":"After Label"},"caption":"Before After Image Caption"}]}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","jquery"]}'),lN="b-blocks-ImageCompare",cN=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),dN=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),uN=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),pN=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 24 24",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M15 19L15 5 7 12z"})}),hN=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 24 24",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M9 19L17 12 9 5z"})}),gN=e=>({defaulthorizontal:`inset(0 0 0 ${e}%)`,defaultvertical:`inset(${e}% 0 0 0)`,zigzaghorizontal:`polygon(0% 0%, ${e}% 0%, ${e-6}% 9%, ${e}% 18%, ${e-6}% 27%, ${e}% 36%, ${e-6}% 45%, ${e}% 54%, ${e-6}% 63%, ${e}% 72%, ${e-6}% 81%, ${e}% 90%, ${e-6}% 100%, 0% 100%)`,zigzagvertical:`polygon(0% 0%,0% ${e}%,9% ${e+6}% ,18% ${e}%,27% ${e+6}%,36% ${e}%,45% ${e+6}%, 54% ${e}%,63% ${e+6}%,72% ${e}%, 81% ${e+6}%,90% ${e}%, 100% ${e+6}%,100% 0% )`,
427 +error:t.type?(0,x.sprintf)((0,x.__)('Unrecognised GeoJSON type "%s". Expected a Feature, a FeatureCollection, or a geometry.',"b-blocks"),String(t.type)):(0,x.__)('This GeoJSON has no "type" property.',"b-blocks")}},Kj=e=>{if(!e||"string"!=typeof e)return!1;try{const{hostname:t}=new URL(e);return/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(t)||/\.(local|test|localhost|internal|invalid)$/i.test(t)||/^(10\.|192\.168\.|172\.(1[6-9]|2\d|3[01])\.)/.test(t)}catch(e){return!1}},Qj=(e,t=null)=>{const n=parseFloat(e);return Number.isFinite(n)?n:t},Zj=(e={})=>{const t=e.source||{},n=t.type||(t.embedUrl?"embed":"interactive");return{...e,source:{...t,type:n,center:{...Rj,...t.center||{}}}}},Xj=(e,t,n)=>{if(!e)return;const o=t=>{const o=e?.[t]?.[n];if(void 0!==o&&""!==o)return o;const i=e?.[n]?.[t];return void 0!==i&&""!==i?i:void 0};return"mobile"===t?o("mobile")??o("tablet")??o("desktop"):"tablet"===t?o("tablet")??o("desktop"):o("desktop")},Jj=(e,t,n)=>e?.[t]?.[n]??e?.[n]?.[t]??"",e$={default:[],silver:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],retro:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]}],dark:[{elementType:"geometry",stylers:[{color:"#212121"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{elementType:"labels.text.stroke",stylers:[{color:"#212121"}]},{featureType:"administrative",elementType:"geometry",stylers:[{color:"#757575"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#181818"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#2c2c2c"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#8a8a8a"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#3c3c3c"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#3d3d3d"}]}],night:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]}],aubergine:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]},t$=(e={})=>{const{preset:t="default",customJson:n="",grayscale:o=0,saturation:i=0,hue:a=""}=e;let s=[];if("custom"===t)try{const e=JSON.parse(n||"[]");Array.isArray(e)&&(s=e)}catch(e){s=[]}else s=e$[t]||[];const r=[];return Qj(o,0)&&r.push({saturation:-Math.abs(Qj(o,0))}),Qj(i,0)&&r.push({saturation:Qj(i,0)}),a&&r.push({hue:a}),r.length?[...s,{elementType:"all",stylers:r}]:s},n$=e=>{if(!e||!e.trim())return!0;try{return Array.isArray(JSON.parse(e))}catch(e){return!1}},o$=({attributes:e,id:o,isBackend:i=!1})=>{const{map:a={},marker:s={},infoWindow:r={},clustering:c={},categories:d=[],filterBar:u={},caption:p={},advanced:h}=e,g=`#${o}`,m=`${g} .${Oj}-wrapper`,b=`${g} .${Oj}-canvas`,f=`${g} .${Oj}-iframe`,x=`${g} .${Oj}-caption`,y=`${g} .${Oj}-pin`,v=`${g} .${Oj}-cluster`,k=`${g} .${Oj}-filter-chip`,w=`${g} .${Oj}-filter-bar`,_=`${g} .gm-style-iw-c`,C=`${g} .gm-style-iw-d`,j=`${g} .${Oj}-figure, ${g} .${Oj}-placeholder`,$=(d||[]).filter((e=>e?.id&&e?.color)).map((e=>{const t=String(e.id).replace(/["'\\\]]/g,"");return`\n\t\t\t\t${k}[data-category="${t}"] .${Oj}-filter-dot{ background: ${e.color}; }\n\t\t\t\t${k}[data-category="${t}"].active{ background: ${e.color}; }\n\t\t\t`})).join(""),S=e=>{return`\n\t\t${g}{ ${ns("text-align",Xj(a,e,"align"))} }\n\n\t\t${j}{\n\t\t\tmargin: ${t=Xj(a,e,"align"),
428 +"left"===t?"0 auto 0 0":"right"===t?"0 0 0 auto":"0 auto"};\n\t\t\t${ns("max-width",Xj(a,e,"maxWidth"))}\n\t\t}\n\n\t\t${m}{\n\t\t\t${((e,t,n)=>ns("border-radius",hs(t?.[n])))(0,a.borderRadius,e)}\n\t\t\t${a.useAspectRatio?ns("aspect-ratio",((e,t)=>"string"==typeof e?e:e?"mobile"===t?e.mobile||e.tablet||e.desktop:"tablet"===t&&e.tablet||e.desktop:void 0)(a.aspectRatio,e)||"16/9"):ns("height",Xj(a,e,"height"))}\n\t\t}\n\n\t\t${y}{\n\t\t\t${ns("width",s?.[e]?.size)}\n\t\t\t${ns("height",s?.[e]?.size)}\n\t\t}\n\n\t\t${_}{\n\t\t\t${ns("max-width",r?.[e]?.maxWidth)}\n\t\t\t${ns("border-radius",hs(r?.[e]?.radius))}\n\t\t}\n\n\t\t${C}{ ${ns("padding",hs(r?.[e]?.padding))} }\n\n\t\t${w}{ ${ns("gap",u?.[e]?.gap)} }\n\n\t\t${k}{\n\t\t\t${ns("padding",hs(u?.[e]?.padding))}\n\t\t\t${ns("border-radius",hs(u?.[e]?.radius))}\n\t\t}\n\t`;var t};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",p.typo).googleFontLink}\n\t\t\t${ps("",u.typo).googleFontLink}\n\t\t\t${ps("",r.typo).googleFontLink}\n\n\t\t\t${g}{ display: block; }\n\n\t\t\t${j}{ width: 100%; }\n\n\t\t\t${m}{\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow: hidden;\n\t\t\t\t${ns("box-shadow",ls(a.shadow||[]))}\n\t\t\t\t${a.useAspectRatio?"height: auto;":""}\n\t\t\t}\n\n\t\t\t${b}, ${f}{\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 0;\n\t\t\t\tdisplay: block;\n\t\t\t\t${a.useAspectRatio?"position: absolute; inset: 0;":""}\n\t\t\t}\n\n\t\t\t${v}{\n\t\t\t\t${c.background?os(c.background):ns("background",c.color)}\n\t\t\t\t${ns("color",c.textColor)}\n\t\t\t\t${ns("width",c.size)}\n\t\t\t\t${ns("height",c.size)}\n\t\t\t}\n\n\t\t\t${w}{ ${ns("justify-content","right"===u.align?"flex-end":"center"===u.align?"center":"flex-start")} }\n\n\t\t\t${k}{\n\t\t\t\t${ns("color",u.color)}\n\t\t\t\t${ns("background",u.bgColor)}\n\t\t\t}\n\t\t\t${ps(k,u.typo).styles}\n\n\t\t\t${k}.active{\n\t\t\t\t${ns("background",u.activeColor)}\n\t\t\t\t${ns("color",u.activeTextColor)}\n\t\t\t}\n\n\t\t\t/* After the generic .active rule so a category colour wins. */\n\t\t\t${$}\n\n\t\t\t${_}{\n\t\t\t\t${ns("background",r.bgColor)}\n\t\t\t\t${is(r.border)}\n\t\t\t\t${ns("box-shadow",ls(r.shadow||[]))}\n\t\t\t}\n\n\t\t\t/* The tail is a separate rotated box; without this a recoloured\n\t\t\t info window keeps a white arrow. Both class names are emitted —\n\t\t\t Google renamed it from -t to -tc. */\n\t\t\t${g} .gm-style-iw-t::after,\n\t\t\t${g} .gm-style-iw-tc::after{\n\t\t\t\t${ns("background",r.bgColor)}\n\t\t\t}\n\n\t\t\t${C}, ${g} .${Oj}-info{\n\t\t\t\t${ns("color",r.textColor)}\n\t\t\t}\n\t\t\t${ps(`${g} .${Oj}-info`,r.typo).styles}\n\n\t\t\t${x}{\n\t\t\t\t${ns("text-align",p.align)}\n\t\t\t\t${ns("color",p.color)}\n\t\t\t}\n\t\t\t${ps(x,p.typo).styles}\n\n\t\t\t${S("desktop")}\n\t\t\t${t}{ ${S("tablet")} }\n\t\t\t${n}{ ${S("mobile")} }\n\n\t\t\t${_s(o,h,i,!1)}\n\t\t\t`}})},{getOwnPropertyNames:i$,getOwnPropertySymbols:a$}=Object,{hasOwnProperty:s$}=Object.prototype;function r$(e,t){return function(n,o,i){return e(n,o,i)&&t(n,o,i)}}function l$(e){return function(t,n,o){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,o);const{cache:i}=o,a=i.get(t),s=i.get(n);if(a&&s)return a===n&&s===t;i.set(t,n),i.set(n,t);const r=e(t,n,o);return i.delete(t),i.delete(n),r}}function c$(e){return i$(e).concat(a$(e))}const d$=Object.hasOwn||((e,t)=>s$.call(e,t));function u$(e,t){return e===t||!e&&!t&&e!=e&&t!=t}const{getOwnPropertyDescriptor:p$,keys:h$}=Object;function g$(e,t){return e.byteLength===t.byteLength&&S$(new Uint8Array(e),new Uint8Array(t))}function m$(e,t,n){let o=e.length;if(t.length!==o)return!1;for(;o-- >0;)if(!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function b$(e,t){return e.byteLength===t.byteLength&&S$(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function f$(e,t){return u$(e.getTime(),t.getTime())}function x$(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function y$(e,t){return e===t}function v$(e,t,n){const o=e.size;if(o!==t.size)return!1;if(!o)return!0;const i=new Array(o),a=e.entries();let s,r,l=0;for(;(s=a.next())&&!s.done;){const o=t.entries();let a=!1,c=0;for(;(r=o.next())&&!r.done;){if(i[c]){c++;continue}const o=s.value,d=r.value;if(n.equals(o[0],d[0],l,c,e,t,n)&&n.equals(o[1],d[1],o[0],d[0],e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1;l++}return!0}const k$=u$;function w$(e,t,n){const o=h$(e);let i=o.length;if(h$(t).length!==i)return!1;for(;i-- >0;)if(!N$(e,t,n,o[i]))return!1;return!0}function _$(e,t,n){const o=c$(e);let i,a,s,r=o.length;if(c$(t).length!==r)return!1;for(;r-- >0;){if(i=o[r],!N$(e,t,n,i))return!1;if(a=p$(e,i),s=p$(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable))return!1}return!0}function C$(e,t){return u$(e.valueOf(),t.valueOf())}function j$(e,t){return e.source===t.source&&e.flags===t.flags}function $$(e,t,n){const o=e.size;if(o!==t.size)return!1;if(!o)return!0;const i=new Array(o),a=e.values();let s,r;for(;(s=a.next())&&!s.done;){const o=t.values();let a=!1,l=0;for(;(r=o.next())&&!r.done;){if(!i[l]&&n.equals(s.value,r.value,s.value,r.value,e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1}return!0}function S$(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function T$(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function N$(e,t,n,o){return!("_owner"!==o&&"__o"!==o&&"__v"!==o||!e.$$typeof&&!t.$$typeof)||d$(t,o)&&n.equals(e[o],t[o],o,o,e,t,n)}const M$={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},L$=Object.prototype.toString;const P$=E$();function E$(e={}){const{circular:t=!1,createInternalComparator:n,createState:o,strict:i=!1}=e,a=function({circular:e,createCustomConfig:t,strict:n}){let o={areArrayBuffersEqual:g$,areArraysEqual:n?_$:m$,areDataViewsEqual:b$,areDatesEqual:f$,areErrorsEqual:x$,areFunctionsEqual:y$,areMapsEqual:n?r$(v$,_$):v$,areNumbersEqual:k$,areObjectsEqual:n?_$:w$,arePrimitiveWrappersEqual:C$,areRegExpsEqual:j$,areSetsEqual:n?r$($$,_$):$$,areTypedArraysEqual:n?r$(S$,_$):S$,areUrlsEqual:T$,unknownTagComparators:void 0};if(t&&(o=Object.assign({},o,t(o))),e){const e=l$(o.areArraysEqual),t=l$(o.areMapsEqual),n=l$(o.areObjectsEqual),i=l$(o.areSetsEqual);o=Object.assign({},o,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return o}(e),s=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:o,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:r,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:u,areTypedArraysEqual:p,areUrlsEqual:h,unknownTagComparators:g}){return function(m,b,f){if(m===b)return!0;if(null==m||null==b)return!1;const x=typeof m;if(x!==typeof b)return!1;if("object"!==x)return"number"===x?r(m,b,f):"function"===x&&a(m,b,f);const y=m.constructor;if(y!==b.constructor)return!1;if(y===Object)return l(m,b,f);if(Array.isArray(m))return t(m,b,f);if(y===Date)return o(m,b,f);if(y===RegExp)return d(m,b,f);if(y===Map)return s(m,b,f);if(y===Set)return u(m,b,f);const v=L$.call(m);if("[object Date]"===v)return o(m,b,f);if("[object RegExp]"===v)return d(m,b,f);if("[object Map]"===v)return s(m,b,f);if("[object Set]"===v)return u(m,b,f);if("[object Object]"===v)return"function"!=typeof m.then&&"function"!=typeof b.then&&l(m,b,f);if("[object URL]"===v)return h(m,b,f);if("[object Error]"===v)return i(m,b,f);if("[object Arguments]"===v)return l(m,b,f);if(M$[v])return p(m,b,f)
429 +;if("[object ArrayBuffer]"===v)return e(m,b,f);if("[object DataView]"===v)return n(m,b,f);if("[object Boolean]"===v||"[object Number]"===v||"[object String]"===v)return c(m,b,f);if(g){let e=g[v];if(!e){const t=null!=(k=m)?k[Symbol.toStringTag]:void 0;t&&(e=g[t])}if(e)return e(m,b,f)}var k;return!1}}(a),r=n?n(s):(l=s,function(e,t,n,o,i,a,s){return l(e,t,s)});var l;return function({circular:e,comparator:t,createState:n,equals:o,strict:i}){if(n)return function(a,s){const{cache:r=(e?new WeakMap:void 0),meta:l}=n();return t(a,s,{cache:r,equals:o,meta:l,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};const a={cache:void 0,equals:o,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}({circular:t,comparator:s,createState:o,equals:r,strict:i})}E$({strict:!0}),E$({circular:!0}),E$({circular:!0,strict:!0}),E$({createInternalComparator:()=>u$}),E$({strict:!0,createInternalComparator:()=>u$}),E$({circular:!0,createInternalComparator:()=>u$}),E$({circular:!0,createInternalComparator:()=>u$,strict:!0});const A$=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],B$=new Uint32Array(96);class I${static from(e){if(!e||void 0===e.byteLength||e.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[t,n]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(1!==o)throw new Error(`Got v${o} data when expected v1.`);const i=A$[15&n];if(!i)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(e,2,1),[s]=new Uint32Array(e,4,1);return new I$(s,a,i,void 0,e)}constructor(e,t=64,n=Float64Array,o=ArrayBuffer,i){if(isNaN(e)||e<0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const a=A$.indexOf(this.ArrayType),s=2*e*this.ArrayType.BYTES_PER_ELEMENT,r=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-r%8)%8;if(a<0)throw new Error(`Unexpected typed array class: ${n}.`);if(i)this.data=i,this.ids=new this.IndexArrayType(i,8,e),this.coords=new n(i,8+r+l,2*e),this._pos=2*e,this._finished=!0;else{const i=this.data=new o(8+s+r+l);this.ids=new this.IndexArrayType(i,8,e),this.coords=new n(i,8+r+l,2*e),this._pos=0,this._finished=!1,new Uint8Array(i,0,2).set([219,16+a]),new Uint16Array(i,2,1)[0]=t,new Uint32Array(i,4,1)[0]=e}}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return O$(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:a,nodeSize:s}=this;B$[0]=0,B$[1]=i.length-1,B$[2]=0;let r=3;const l=[];for(;r>0;){const c=B$[--r],d=B$[--r],u=B$[--r];if(d-u<=s){for(let s=u;s<=d;s++){const r=a[2*s],c=a[2*s+1];r>=e&&r<=n&&c>=t&&c<=o&&l.push(i[s])}continue}const p=u+d>>1,h=a[2*p],g=a[2*p+1];h>=e&&h<=n&&g>=t&&g<=o&&l.push(i[p]),(0===c?e<=h:t<=g)&&(B$[r++]=u,B$[r++]=p-1,B$[r++]=1-c),(0===c?n>=h:o>=g)&&(B$[r++]=p+1,B$[r++]=d,B$[r++]=1-c)}return l}within(e,t,n){const o=[];return this.withinInto(e,t,n,o),o}withinInto(e,t,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:a,nodeSize:s}=this;B$[0]=0,B$[1]=i.length-1,B$[2]=0;let r=3,l=0;const c=n*n;for(;r>0;){const d=B$[--r],u=B$[--r],p=B$[--r];if(u-p<=s){for(let n=p;n<=u;n++)F$(a[2*n],a[2*n+1],e,t)<=c&&(o[l++]=i[n]);continue}const h=p+u>>1,g=a[2*h],m=a[2*h+1];F$(g,m,e,t)<=c&&(o[l++]=i[h]),(0===d?e-n<=g:t-n<=m)&&(B$[r++]=p,B$[r++]=h-1,B$[r++]=1-d),(0===d?e+n>=g:t+n>=m)&&(B$[r++]=h+1,B$[r++]=u,B$[r++]=1-d)}return l}}function O$(e,t,n,o,i,a){if(i-o<=n)return;const s=o+i>>1;R$(e,t,s,o,i,a),O$(e,t,n,o,s-1,1-a),O$(e,t,n,s+1,i,1-a)}function R$(e,t,n,o,i,a){for(;i>o;){if(i-o>600){const s=i-o+1,r=n-o+1,l=Math.log(s),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(s-c)/s)*(r-s/2<0?-1:1);R$(e,t,n,Math.max(o,Math.floor(n-r*c/s+d)),Math.min(i,Math.floor(n+(s-r)*c/s+d)),a)}const s=t[2*n+a];let r=o,l=i;for(z$(e,t,o,n),t[2*i+a]>s&&z$(e,t,o,i);r<l;){for(z$(e,t,r,l),r++,l--;t[2*r+a]<s;)r++;for(;t[2*l+a]>s;)l--}t[2*o+a]===s?z$(e,t,o,l):(l++,z$(e,t,l,i)),l<=n&&(o=l+1),n<=l&&(i=l-1)}}function z$(e,t,n,o){D$(e,n,o),D$(t,2*n,2*o),D$(t,2*n+1,2*o+1)}function D$(e,t,n){const o=e[t];e[t]=e[n],e[n]=o}function F$(e,t,n,o){const i=e-n,a=t-o;return i*i+a*a}const H$={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},W$=Math.fround||(U$=new Float32Array(1),e=>(U$[0]=+e,U$[0]));var U$;class G${constructor(e){this.options=Object.assign(Object.create(H$),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:o}=this.options;t&&console.time("total time");const i=`prepare ${e.length} points`;t&&console.time(i),this.points=e;const a=[];for(let t=0;t<e.length;t++){const n=e[t];if(!n.geometry)continue;const[o,i]=n.geometry.coordinates,s=W$(Y$(o)),r=W$(K$(i));a.push(s,r,1/0,t,-1,1),this.options.reduce&&a.push(0)}let s=this.trees[o+1]=this._createTree(a);t&&console.timeEnd(i);for(let e=o;e>=n;e--){const n=+Date.now();s=this.trees[e]=this._createTree(this._cluster(s,e)),t&&console.log("z%d: %d clusters in %dms",e,s.numItems,+Date.now()-n)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let i=180===e[2]?180:((e[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){const e=this.getClusters([n,o,180,a],t),s=this.getClusters([-180,o,i,a],t);return e.concat(s)}const s=this.trees[this._limitZoom(t)],r=s.range(Y$(n),K$(a),Y$(i),K$(o)),l=s.data,c=[];for(const e of r){const t=this.stride*e;c.push(l[t+5]>1?V$(l,t,this.clusterProps):this.points[l[t+3]])}return c}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),o="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(o);const a=i.data;if(t*this.stride>=a.length)throw new Error(o);const s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),r=a[t*this.stride],l=a[t*this.stride+1],c=i.within(r,l,s),d=[];for(const t of c){const n=t*this.stride;a[n+4]===e&&d.push(a[n+5]>1?V$(a,n,this.clusterProps):this.points[a[n+3]])}if(0===d.length)throw new Error(o);return d}getLeaves(e,t,n){t=t||10,n=n||0;const o=[];return this._appendLeaves(o,e,t,n,0),o}getTile(e,t,n){const o=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:a,radius:s}=this.options,r=s/a,l=(n-r)/i,c=(n+1+r)/i,d={features:[]};return this._addTileFeatures(o.range((t-r)/i,l,(t+1+r)/i,c),o.data,t,n,i,d),0===t&&this._addTileFeatures(o.range(1-r/i,l,1,c),o.data,i,n,i,d),t===i-1&&this._addTileFeatures(o.range(0,l,r/i,c),o.data,-1,n,i,d),d.features.length?d:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,o,i){const a=this.getChildren(t);for(const t of a){const a=t.properties;if(a&&a.cluster?i+a.point_count<=o?i+=a.point_count:i=this._appendLeaves(e,a.cluster_id,n,o,i):i<o?i++:e.push(t),e.length===n)break}return i}_createTree(e){const t=new I$(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)t.add(e[n],e[n+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,n,o,i,a){for(const s of e){const e=s*this.stride,r=t[e+5]>1;let l,c,d;if(r)l=q$(t,e,this.clusterProps),c=t[e],d=t[e+1];else{const n=this.points[t[e+3]];l=n.properties;const[o,i]=n.geometry.coordinates;c=Y$(o),d=K$(i)}const u={type:1,
430 +geometry:[[Math.round(this.options.extent*(c*i-n)),Math.round(this.options.extent*(d*i-o))]],tags:l};let p;p=r||this.options.generateId?t[e+3]:this.points[t[e+3]].id,void 0!==p&&(u.id=p),a.features.push(u)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:n,extent:o,reduce:i,minPoints:a}=this.options,s=n/(o*Math.pow(2,t)),r=e.data,l=[],c=this.stride;for(let n=0;n<r.length;n+=c){if(r[n+2]<=t)continue;r[n+2]=t;const o=r[n],d=r[n+1],u=e.within(r[n],r[n+1],s),p=r[n+5];let h=p;for(const e of u){const n=e*c;r[n+2]>t&&(h+=r[n+5])}if(h>p&&h>=a){let e,a=o*p,s=d*p,g=-1;const m=(n/c<<5)+(t+1)+this.points.length;for(const o of u){const l=o*c;if(r[l+2]<=t)continue;r[l+2]=t;const d=r[l+5];a+=r[l]*d,s+=r[l+1]*d,r[l+4]=m,i&&(e||(e=this._map(r,n,!0),g=this.clusterProps.length,this.clusterProps.push(e)),i(e,this._map(r,l)))}r[n+4]=m,l.push(a/h,s/h,1/0,m,-1,h),i&&l.push(g)}else{for(let e=0;e<c;e++)l.push(r[n+e]);if(h>1)for(const e of u){const n=e*c;if(!(r[n+2]<=t)){r[n+2]=t;for(let e=0;e<c;e++)l.push(r[n+e])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+5]>1){const o=this.clusterProps[e[t+6]];return n?Object.assign({},o):o}const o=this.points[e[t+3]].properties,i=this.options.map(o);return n&&i===o?Object.assign({},i):i}}function V$(e,t,n){return{type:"Feature",id:e[t+3],properties:q$(e,t,n),geometry:{type:"Point",coordinates:[(o=e[t],360*(o-.5)),Q$(e[t+1])]}};var o}function q$(e,t,n){const o=e[t+5],i=o>=1e4?`${Math.round(o/1e3)}k`:o>=1e3?Math.round(o/100)/10+"k":o,a=e[t+6],s=-1===a?{}:Object.assign({},n[a]);return Object.assign(s,{cluster:!0,cluster_id:e[t+3],point_count:o,point_count_abbreviated:i})}function Y$(e){return e/360+.5}function K$(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Q$(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}"function"==typeof SuppressedError&&SuppressedError;class Z${static isAdvancedMarkerAvailable(e){return google.maps.marker&&!0===e.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(Number.isFinite(e.position.lat)&&Number.isFinite(e.position.lng))return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return!!this.isAdvancedMarker(e)||e.getVisible()}}class X${constructor({markers:e,position:t}){this.markers=[],e&&(this.markers=e),t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(0===this.markers.length&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(Z$.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((e=>Z$.getVisible(e))).length}push(e){this.markers.push(e)}delete(){this.marker&&(Z$.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function J$(e,t="assertion failed"){if(null==e)throw Error(t)}class eS{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return tS(e)}}const tS=e=>e.map((e=>new X$({position:Z$.getPosition(e),markers:[e]})));class nS extends eS{constructor(e){var{maxZoom:t,radius:n=60}=e,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["maxZoom","radius"]);super({maxZoom:t}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new G$(Object.assign({maxZoom:this.maxZoom,radius:n},o))}calculate(e){let t=!1,n=e.map.getZoom();J$(n),n=Math.round(n);const o={zoom:n};if(!P$(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map((e=>{const t=Z$.getPosition(e);return{type:"Feature",geometry:{type:"Point",coordinates:[t.lng(),t.lat()]},properties:{marker:e}}}));this.superCluster.load(n)}return t||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(t=!P$(this.state,o)),this.state=o,0===e.markers.length?(this.clusters=[],{clusters:this.clusters,changed:t}):(t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t})}cluster({map:e}){const t=e.getZoom();return J$(t),this.superCluster.getClusters([-180,-90,180,90],Math.round(t)).map((e=>this.transformCluster(e)))}transformCluster({geometry:{coordinates:[e,t]},properties:n}){if(n.cluster)return new X$({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map((e=>e.properties.marker)),position:{lat:t,lng:e}});const o=n.marker;return new X$({markers:[o],position:Z$.getPosition(o)})}}class oS{constructor(e,t){this.markers={sum:e.length};const n=t.map((e=>e.count)),o=n.reduce(((e,t)=>e+t),0);this.clusters={count:t.length,markers:{mean:o/t.length,sum:o,min:Math.min(...n),max:Math.max(...n)}}}}class iS{render({count:e,position:t},n,o){const i=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>\n</svg>`,a=`Cluster of ${e} markers`,s=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Z$.isAdvancedMarkerAvailable(o)){const e=(new DOMParser).parseFromString(i,"image/svg+xml").documentElement;e.setAttribute("transform","translate(0 25)");const n={map:o,position:t,zIndex:s,title:a,content:e};return new google.maps.marker.AdvancedMarkerElement(n)}const r={position:t,zIndex:s,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(r)}}class aS{constructor(){!function(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}(aS,google.maps.OverlayView)}}var sS;!function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click",e.GMP_CLICK="gmp-click"}(sS||(sS={}));const rS=(e,t,n)=>{t.bounds&&n.fitBounds(t.bounds)};class lS extends aS{constructor({map:e,markers:t=[],algorithmOptions:n={},algorithm:o=new nS(n),renderer:i=new iS,onClusterClick:a=rS}){super(),this.map=null,this.idleListener=null,this.markers=[...t],this.clusters=[],this.algorithm=o,this.renderer=i,this.onClusterClick=a,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach((e=>{this.addMarker(e,!0)})),t||this.render()}removeMarker(e,t){const n=this.markers.indexOf(e);return-1!==n&&(Z$.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){let n=!1;return e.forEach((e=>{n=this.removeMarker(e,!0)||n})),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,sS.CLUSTERING_BEGIN,this);const{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||null==n){const e=new Set;for(const n of t)1==n.markers.length&&e.add(n.markers[0]);const n=[];for(const t of this.clusters)null!=t.marker&&(1==t.markers.length?e.has(t.marker)||Z$.setMap(t.marker,null):n.push(t.marker));this.clusters=t,this.renderClusters(),
431 +requestAnimationFrame((()=>n.forEach((e=>Z$.setMap(e,null)))))}google.maps.event.trigger(this,sS.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();J$(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((e=>Z$.setMap(e,null))),this.clusters.forEach((e=>e.delete())),this.clusters=[]}renderClusters(){const e=new oS(this.markers,this.clusters),t=this.getMap();this.clusters.forEach((n=>{if(1===n.markers.length)n.marker=n.markers[0];else if(n.marker=this.renderer.render(n,e,t),n.markers.forEach((e=>Z$.setMap(e,null))),this.onClusterClick){const e=Z$.isAdvancedMarker(n.marker)?sS.GMP_CLICK:sS.CLUSTER_CLICK;n.marker.addListener(e,(e=>{google.maps.event.trigger(this,sS.CLUSTER_CLICK,n),this.onClusterClick(e,n,t)}))}Z$.setMap(n.marker,t)}))}}const cS="b-blocks-google-map-heat",dS=[[0,[0,0,255,0]],[.2,[0,0,255,255]],[.4,[0,255,255,255]],[.6,[0,255,0,255]],[.8,[255,255,0,255]],[1,[255,0,0,255]]],uS=({OverlayView:e,LatLng:t})=>class extends e{constructor({points:e=[],radius:t=20,opacity:n=.6}={}){super();const o=(e,t)=>Number.isFinite(Number(e))?Number(e):t;this.points=e,this.radius=Math.max(4,o(t,20)),this.opacity=Math.min(1,Math.max(0,o(n,.6))),this.blur=Math.max(4,.65*this.radius),this.canvas=null,this.ctx=null,this.stamp=null,this.stampRadius=null,this.gradient=null,this.idleListener=null}setOptions({points:e,radius:t,opacity:n}={}){const o=(e,t)=>Number.isFinite(Number(e))?Number(e):t;Array.isArray(e)&&(this.points=e),void 0!==t&&(this.radius=Math.max(4,o(t,this.radius)),this.blur=Math.max(4,.65*this.radius)),void 0!==n&&(this.opacity=Math.min(1,Math.max(0,o(n,this.opacity)))),this.draw()}onAdd(){const e=document.createElement("canvas");e.className=cS,e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.zIndex="1",e.style.pointerEvents="none",this.canvas=e,this.ctx=e.getContext("2d"),this.gradient=(()=>{const e=document.createElement("canvas");e.width=1,e.height=256;const t=e.getContext("2d"),n=t.createLinearGradient(0,0,0,256);return dS.forEach((([e,[t,o,i,a]])=>{n.addColorStop(e,`rgba(${t},${o},${i},${a/255})`)})),t.fillStyle=n,t.fillRect(0,0,1,256),t.getImageData(0,0,1,256).data})();const t=this.getMap()?.getDiv();t?.querySelectorAll(`.${cS}`).forEach((e=>e.remove())),t?.appendChild(e),this.idleListener=this.getMap()?.addListener("idle",(()=>this.draw()))}draw(){const e=this.getProjection(),n=this.getMap()?.getDiv();if(!(e&&n&&this.canvas&&this.ctx))return;const o=Math.min(n.clientWidth||0,4096),i=Math.min(n.clientHeight||0,4096);if(o<=0||i<=0)return;this.canvas.width!==o&&(this.canvas.width=o),this.canvas.height!==i&&(this.canvas.height=i),this.canvas.style.width=`${o}px`,this.canvas.style.height=`${i}px`,this.canvas.style.opacity=String(this.opacity),this.stamp&&this.stampRadius===this.radius||(this.stamp=((e,t)=>{const n=e+t,o=document.createElement("canvas");o.width=2*n,o.height=2*n;const i=o.getContext("2d");return i.shadowOffsetX=2*n,i.shadowOffsetY=2*n,i.shadowBlur=t,i.shadowColor="#000",i.beginPath(),i.arc(-n,-n,e,0,2*Math.PI,!0),i.closePath(),i.fill(),o})(this.radius,this.blur),this.stampRadius=this.radius);const a=this.ctx,s=this.radius+this.blur;a.clearRect(0,0,o,i),a.globalAlpha=.55;let r=0;if(this.points.forEach((n=>{const l=e.fromLatLngToContainerPixel(new t(n.lat,n.lng));l&&(l.x<-s||l.y<-s||l.x>o+s||l.y>i+s||(a.drawImage(this.stamp,l.x-s,l.y-s),r++))})),a.globalAlpha=1,!r)return;const l=a.getImageData(0,0,o,i),c=l.data;for(let e=3;e<c.length;e+=4){const t=c[e];if(!t)continue;const n=4*t;c[e-3]=this.gradient[n],c[e-2]=this.gradient[n+1],c[e-1]=this.gradient[n+2]}a.putImageData(l,0,0)}onRemove(){this.idleListener?.remove(),this.idleListener=null,this.canvas?.parentNode?.removeChild(this.canvas),this.canvas=null,this.ctx=null,this.stamp=null,this.stampRadius=null,this.gradient=null}},pS="__bBlocksMapsCb__",hS=new Map;let gS=!1,mS="",bS=!1,fS=!1;const xS=new Set,yS=e=>(hS.has(e)||hS.set(e,window.google.maps.importLibrary(e).catch((t=>{throw hS.delete(e),t}))),hS.get(e)),vS=(e={})=>{const{markers:t=[],shapes:n=[],directions:o={},tools:i={},clustering:a={},source:s={}}=e,r=new Set(["core","maps"]);return s.mapId&&(t.length||a.enabled)&&r.add("marker"),i.searchBox&&r.add("places"),o.enabled&&r.add("routes"),n.length&&r.add("geometry"),[...r]},kS=(e,t=["maps"],n={})=>e?(gS&&mS&&mS!==e&&!bS&&(bS=!0,console.warn("[b-blocks] The Google Maps API is already loaded with a different API key; the first key wins.")),((e,{version:t="weekly",language:n="",region:o=""}={})=>{const i=window.google=window.google||{},a=i.maps=i.maps||{};if((()=>{const e=window.gm_authFailure;if(e?.bBlocksHooked)return;const t=()=>{fS=!0,xS.forEach((e=>e())),"function"==typeof e&&e()};t.bBlocksHooked=!0,window.gm_authFailure=t})(),a.importLibrary)return gS=!0,void(mS=mS||e);const s=new Set;let r=null;a.importLibrary=(i,...l)=>(s.add(i),(r||(r=Promise.resolve().then((()=>new Promise(((i,l)=>{const c=new URLSearchParams;c.set("key",e),c.set("v",t),c.set("loading","async"),c.set("libraries",[...s].join(",")),c.set("callback",`google.maps.${pS}`),n&&c.set("language",n),o&&c.set("region",o);const d=document.createElement("script");d.src=`https://maps.googleapis.com/maps/api/js?${c.toString()}`,d.async=!0,d.nonce=document.querySelector("script[nonce]")?.nonce||"",d.onerror=()=>{r=null,l(new Error("google-maps-load-failed"))},a[pS]=i,document.head.append(d)})))))).then((()=>a.importLibrary(i,...l)))),gS=!0,mS=e})(e,n),Promise.all(t.map(yS)).then((e=>Object.assign({},...e)))):Promise.reject(new Error("missing-key")),wS=(e="")=>{if(!e||"string"!=typeof e)return"";const t=(new DOMParser).parseFromString(e,"text/html");return t.body.querySelectorAll("script, style, iframe, object, embed, form, link, meta").forEach((e=>e.remove())),t.body.querySelectorAll("*").forEach((e=>{[...e.attributes].forEach((({name:t,value:n})=>{const o=/^on/i.test(t),i=/^\s*javascript:/i.test(n||"");(o||i&&("href"===t||"src"===t))&&e.removeAttribute(t)}))})),t.body.innerHTML},_S=(e={})=>{const t=Qj(e.lat),n=Qj(e.lng);return null===t||null===n?null:{lat:t,lng:n}},CS=(e="")=>{if(!e||"string"!=typeof e)return[];const t=e.trim();if(!t)return[];if(t.startsWith("["))try{const e=JSON.parse(t);return Array.isArray(e)?e.map((e=>({lat:Qj(e?.lat??e?.[0]),lng:Qj(e?.lng??e?.[1])}))).filter((e=>null!==e.lat&&null!==e.lng)):[]}catch(e){return[]}return t.split(/[\n;|]+/).map((e=>{const[t,n]=e.split(",").map((e=>Qj(e)));return{lat:t,lng:n}})).filter((e=>null!==e.lat&&null!==e.lng))},jS=(e,t=[])=>t.find((t=>t.id===e?.category))||null,$S=({address:e="",message:t="",status:n="info",onActivate:o=null,actionLabel:i=""})=>{return(0,l.jsxs)("div",{className:`${Oj}-fallback ${Oj}-fallback-${n}`,role:"note",children:[t?(0,l.jsx)("p",{className:`${Oj}-fallback-message`,children:t}):null,e?(0,l.jsx)("p",{className:`${Oj}-fallback-address`,children:e}):null,o?(0,l.jsx)("button",{type:"button",className:`${Oj}-fallback-button`,onClick:o,children:i||(0,x.__)("Load map","b-blocks")}):(0,l.jsx)("a",{className:`${Oj}-fallback-link`,href:(a=e,`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(a||"")}`),target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("Open in Google Maps","b-blocks")})]});var a},SS=({categories:e=[],filterBar:t={},active:n="",onChange:o=()=>{}})=>{if(!e.length)return null;const{showAll:i=!0,allLabel:a=""}=t,s=i?[{id:"",label:a||(0,x.__)("All","b-blocks")},...e]:e;return(0,l.jsx)("div",{className:`${Oj}-filter-bar`,role:"group","aria-label":(0,x.__)("Filter map locations by category","b-blocks"),children:s.map((e=>{const t=n===e.id;return(0,l.jsxs)("button",{type:"button",className:`${Oj}-filter-chip${t?" active":""}`,"data-category":e.id||"","aria-pressed":t,onClick:()=>o(e.id),children:[e.id?(0,l.jsx)("span",{className:`${Oj}-filter-dot`,"aria-hidden":"true"}):null,e.label]},e.id||"all")}))})},TS=({embedUrl:e,captionText:t})=>{
432 +if(!Hj(e))return(0,l.jsx)("div",{className:`${Oj}-placeholder`,role:"note",children:(0,x.__)("Paste a valid Google Maps embed URL from Google Maps → Share → Embed a map.","b-blocks")});const n=t
433 +/* translators: %s: caption text describing the map location */?(0,x.sprintf)((0,x.__)("Google Map of %s","b-blocks"),t):(0,x.__)("Google Map","b-blocks");return(0,l.jsx)("div",{className:`${Oj}-wrapper`,children:(0,l.jsx)("iframe",{className:`${Oj}-iframe`,src:e,title:n,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",allowFullScreen:!0})})},NS=({attributes:e,apiKey:t="",isBackend:n=!1,device:o="desktop",onMarkerDrag:i=null})=>{const a=(0,m.useMemo)((()=>Zj(e)),[e]),{source:s={},map:r={},controls:c={},markers:d=[],marker:u={},infoWindow:p={},clustering:h={},categories:g=[],filterBar:b={},theme:f={},layers:y={},shapes:v=[],directions:k={},tools:w={},performance:_={},caption:C={}}=a,j="embed"===s.type,$=C.text||"",S=(0,m.useRef)(null),T=(0,m.useRef)(null),N=(0,m.useRef)(null),M=(0,m.useRef)(null),L=(0,m.useRef)(null),P=(0,m.useRef)([]),E=(0,m.useRef)(null),A=(0,m.useRef)(null),B=(0,m.useRef)([]),I=(0,m.useRef)([]),O=(0,m.useRef)(""),R=(0,m.useRef)(null),[z,D]=(0,m.useState)(null),[F,H]=(0,m.useState)(""),[W,U]=(0,m.useState)(0),[G,V]=(0,m.useState)(""),[q,Y]=(0,m.useState)(!1),K=_.lazyLoad||"onView",[Q,Z]=(0,m.useState)(n||j||"none"===K),X=(0,m.useMemo)((()=>t$(f)),[JSON.stringify(f)]),J=s.mapId||"",ee=e=>z?.[e]||window.google?.maps?.[e],te=JSON.stringify([s.center,r,c,X]),ne=JSON.stringify([d,u,p,g,h,G,o]),oe=JSON.stringify(y),ie=!!y.heatmap?.enabled,ae=(0,m.useMemo)((()=>d.map((e=>_S(e))).filter(Boolean)),[JSON.stringify(d)]),se=JSON.stringify(ae),re=JSON.stringify([y.heatmap?.radius,y.heatmap?.opacity]),le=JSON.stringify(v),ce=JSON.stringify(k);if((0,m.useEffect)((()=>{if(Q||"onView"!==K||!S.current)return;if(!("IntersectionObserver"in window))return void Z(!0);const e=new IntersectionObserver((t=>{t.some((e=>e.isIntersecting))&&(Z(!0),e.disconnect())}),{rootMargin:"200px"});return e.observe(S.current),()=>e.disconnect()}),[Q,K]),(0,m.useEffect)((()=>{if(j||!Q)return;let e=!1;if(t)return H(""),kS(t,vS(a),{language:s.language,region:s.region}).then((t=>{e||D(t)})).catch((t=>{e||H(t?.message||"google-maps-load-failed")})),()=>{e=!0};H("missing-key")}),[j,Q,t,s.language,s.region,JSON.stringify(vS(a))]),(0,m.useEffect)((()=>{return e=()=>H("auth"),fS&&e(),xS.add(e),()=>xS.delete(e);var e}),[]),(0,m.useEffect)((()=>{if(!z?.Map||!T.current)return;const e=new z.Map(T.current,{center:{lat:Qj(s.center?.lat,23.8103),lng:Qj(s.center?.lng,90.4125)},zoom:Qj(r.zoom,12),mapTypeId:r.mapType||"roadmap",mapId:J||void 0,styles:J?void 0:X});L.current=e,U((e=>e+1));const t=new MutationObserver((()=>{const e=T.current;if(!e)return;const t=e.querySelector(".gm-err-container, .gm-err-content"),n=e.querySelector(".gm-style-moc"),o=!!n&&n.textContent.trim().length>0&&"0"!==(window.getComputedStyle(n)?.opacity||"0");(t||o)&&H("auth")}));return t.observe(T.current,{childList:!0,subtree:!0}),()=>{t.disconnect(),I.current.forEach((e=>e?.remove?.())),I.current=[],A.current?.close(),A.current=null,E.current?.clearMarkers(),E.current=null,P.current.forEach((e=>{e.map=null})),P.current=[],B.current.forEach((e=>{e?.setMap?.(null)})),B.current=[],L.current=null,T.current&&(T.current.innerHTML="")}}),[z,J]),(0,m.useEffect)((()=>{const e=L.current;if(!e)return;const t=(o=c.zoomPosition||"RIGHT_BOTTOM",window.google?.maps?.ControlPosition?.[o]??void 0);var o;const i=Qj(r.minZoom),a=Qj(r.maxZoom),l=null!==i&&null!==a,d=l?Math.min(i,a):i,u=l?Math.max(i,a):a;try{e.setOptions({center:{lat:Qj(s.center?.lat,23.8103),lng:Qj(s.center?.lng,90.4125)},zoom:Qj(r.zoom,12),minZoom:d??void 0,maxZoom:u??void 0,mapTypeId:r.mapType||"roadmap",gestureHandling:n?"none":r.gestureHandling||"cooperative",draggable:!1!==r.draggable,scrollwheel:!!r.scrollwheel,keyboardShortcuts:!1!==c.keyboardShortcuts,disableDefaultUI:!!c.disableDefaultUI,zoomControl:!!c.zoom,zoomControlOptions:t?{position:t}:void 0,mapTypeControl:!!c.mapType&&!1!==r.allowTypeSwitch,streetViewControl:!!c.streetView,fullscreenControl:!!c.fullscreen,scaleControl:!!c.scale,rotateControl:!!c.rotate,styles:J?void 0:X})}catch(e){console.warn("[b-blocks] Google Maps rejected a map option:",e?.message||e)}}),[W,te,J,n]),(0,m.useEffect)((()=>{const e=L.current;if(!e||!J||!z?.AdvancedMarkerElement)return;const{AdvancedMarkerElement:t,PinElement:a,InfoWindow:s}=z,l=[],c=[],m=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,b=parseInt(p.desktop?.maxWidth,10)||280,f=[],x=()=>f.forEach((e=>e?.close()));A.current={close:x},d.forEach(((r,d)=>{if(G&&r.category!==G)return;const h=_S(r);if(!h)return;let y=((e={},t={},n="desktop",o=[])=>{const{type:i="default",url:a={}}=e.icon||{},s=t?.[n]?.size||t?.desktop?.size||"40px",r=e.pinColor||jS(e,o)?.color||t.pinColor||"#8a2be2";if("library"===i||"upload"===i){const e="library"===i?a.library:a.upload;if(!e)return;const t=document.createElement("div");return t.className="b-blocks-google-map-pin b-blocks-google-map-pin-svg",t.style.width=s,t.style.height=s,t.style.color=r,t.innerHTML=wS(e),t}if("image"===i){const t=e.image?.url;if(!t)return;const n=document.createElement("div");n.className="b-blocks-google-map-pin b-blocks-google-map-pin-image",n.style.width=s,n.style.height=s;const o=document.createElement("img");return o.src=t,o.alt=e.image?.alt||e.title||"",n.append(o),n}})(r,u,o,g);!y&&a&&(y=new a(((e={},t={},n=[])=>{const o=jS(e,n);return{background:e.pinColor||o?.color||t.pinColor||"#8a2be2",borderColor:t.borderColor||"#ffffff",glyphColor:e.glyphColor||t.glyphColor||"#ffffff",scale:Qj(t.scale,1)??1}})(r,u,g)).element);const v=r.animation||u.animation||"none";y&&"none"!==v&&!m&&y.classList.add(`${Oj}-anim-${v}`);const k=new t({map:e,position:h,title:r.title||"",content:y||void 0,gmpClickable:!0,gmpDraggable:n&&!1!==r.draggable,zIndex:d+1}),w=p.trigger||"click",_="always"===w,C=s?new s({maxWidth:b}):null;f.push(C);const j=()=>{C&&(_||!1===p.singleOpen||x(),C.setContent(((e={})=>{const t=document.createElement("div");if(t.className="b-blocks-google-map-info",e.image?.url&&"image"!==e.icon?.type){const n=document.createElement("img");n.className="b-blocks-google-map-info-image",n.src=e.image.url,n.alt=e.image.alt||e.title||"",n.loading="lazy",t.append(n)}if(e.title){const n=document.createElement("h4");n.className="b-blocks-google-map-info-title",n.textContent=e.title,t.append(n)}const n=document.createElement("div");if(n.className="b-blocks-google-map-info-body",n.innerHTML=wS(e.content||""),t.append(n),e.address){const n=document.createElement("p");n.className="b-blocks-google-map-info-address",n.textContent=e.address,t.append(n)}return t})(r)),C.open({map:e,anchor:k}))};"hover"===w&&k.content?(k.content.addEventListener("mouseenter",j),k.content.addEventListener("mouseleave",(()=>C?.close()))):"click"===w&&l.push(k.addListener("gmp-click",j)),n&&i&&!1!==r.draggable&&l.push(k.addListener("dragend",(e=>{const t=e?.latLng;t&&i(d,{lat:t.lat(),lng:t.lng()})}))),(_||r.openByDefault)&&j(),c.push(k)})),P.current=c,I.current=[...I.current,...l],h.enabled&&c.length&&(E.current=new lS({map:e,markers:c,onClusterClick:!1===h.clickToZoom?()=>{}:void 0,renderer:{render:({count:e,position:n})=>{const o=document.createElement("div");return o.className=`${Oj}-cluster`,o.textContent=String(e),new t({position:n,content:o,zIndex:9999})}}}));const y=ee("LatLngBounds");if(r.fitBounds&&c.length>1&&y){const t=new y;c.forEach((e=>t.extend(e.position))),e.fitBounds(t)}return()=>{l.forEach((e=>e?.remove?.())),I.current=I.current.filter((e=>!l.includes(e))),x(),A.current=null,E.current?.clearMarkers(),E.current=null,c.forEach((e=>{e.map=null})),P.current=[]}}),[W,ne,J,n]),(0,m.useEffect)((()=>{const e=L.current;if(!e)return;const t=ee("TrafficLayer"),n=ee("TransitLayer"),o=ee("BicyclingLayer"),i=ee("KmlLayer"),a=[];y.traffic&&t&&a.push(new t),y.transit&&n&&a.push(new n),y.bicycling&&o&&a.push(new o),y.kmlUrl&&i&&a.push(new i({url:y.kmlUrl,preserveViewport:!0})),a.forEach((t=>t.setMap(e)));const s=[],r=Yj(y.geoJson);if(r.data&&e.data)try{s.push(...e.data.addGeoJson(r.data))}catch(e){
434 +console.warn("[b-blocks] Google rejected this GeoJSON:",e?.message||e)}const l=ee("LatLngBounds");if(!1===y.fitGeoJson&&(O.current=""),s.length&&!1!==y.fitGeoJson&&l&&O.current!==y.geoJson){const t=new l;s.forEach((e=>{const n=e?.getGeometry?.();"function"==typeof n?.forEachLatLng&&n.forEachLatLng((e=>t.extend(e)))})),t.isEmpty()||(e.fitBounds(t),O.current=y.geoJson)}return B.current=a.filter(Boolean),()=>{a.forEach((e=>e.setMap(null))),s.forEach((t=>e.data.remove(t))),B.current=[]}}),[W,oe,ne,z]),(0,m.useEffect)((()=>{const e=L.current;if(!e||!ie)return;const t=ee("OverlayView"),n=ee("LatLng");if(!t||!n)return void console.warn("[b-blocks] Heatmap needs google.maps.OverlayView and LatLng; neither the imported library nor the namespace provided them.");const o=new(uS({OverlayView:t,LatLng:n}))({points:ae,radius:Qj(y.heatmap?.radius,20),opacity:Qj(y.heatmap?.opacity,.6)});return o.setMap(e),R.current=o,()=>{o.setMap(null),R.current===o&&(R.current=null)}}),[W,ie,z]),(0,m.useEffect)((()=>{ie&&(ae.length?R.current?.setOptions({points:ae,radius:Qj(y.heatmap?.radius,20),opacity:Qj(y.heatmap?.opacity,.6)}):console.warn(`[b-blocks] Heatmap is on but none of the ${d.length} marker(s) have coordinates, so there is nothing to draw.`))}),[ie,re,se]),(0,m.useEffect)((()=>{const e=L.current;if(!e||!v.length)return;const t=ee("Circle"),n=ee("Rectangle"),o=ee("Polygon"),i=ee("Polyline");if(!i)return;const a=v.map((e=>{const a={strokeColor:e.strokeColor||"#2A6DF0",strokeOpacity:Qj(e.strokeOpacity,.9),strokeWeight:Qj(e.strokeWeight,3)},s={fillColor:e.fillColor||"#2A6DF0",fillOpacity:Qj(e.fillOpacity,.25)};if("circle"===e.type){const n=_S(e.center||{});return n&&t?new t({...a,...s,center:n,radius:Qj(e.radius,1e3)}):null}if("rectangle"===e.type){const{north:t,south:o,east:i,west:r}=e.bounds||{},l={north:Qj(t),south:Qj(o),east:Qj(i),west:Qj(r)};return Object.values(l).some((e=>null===e))?null:n?new n({...a,...s,bounds:l}):null}const r=CS(e.path);return r.length<2?null:"polygon"===e.type&&o?new o({...a,...s,paths:r}):new i({...a,path:r})})).filter(Boolean);return a.forEach((t=>t.setMap(e))),()=>a.forEach((e=>e.setMap(null)))}),[W,le,z]),(0,m.useEffect)((()=>{const e=L.current;if(!(e&&k.enabled&&z?.DirectionsService&&z?.DirectionsRenderer))return;const t=k.origin?.address||_S(k.origin||{}),n=k.destination?.address||_S(k.destination||{});if(!t||!n)return;const o=new z.DirectionsRenderer({map:e,panel:k.showPanel&&M.current?M.current:null,polylineOptions:{strokeColor:k.routeColor||"#2A6DF0",strokeWeight:5}});let i=!1;return(new z.DirectionsService).route({origin:t,destination:n,travelMode:k.mode||"DRIVING",waypoints:(k.waypoints||[]).map((e=>e?.address||_S(e||{}))).filter(Boolean).map((e=>({location:e,stopover:!0})))}).then((e=>{i||o.setDirections(e)})).catch((()=>{})),()=>{i=!0,o.setMap(null),M.current&&(M.current.innerHTML="")}}),[W,ce,z]),(0,m.useEffect)((()=>{const e=L.current;if(!(e&&w.searchBox&&z?.PlaceAutocompleteElement&&N.current))return;let t;try{t=new z.PlaceAutocompleteElement}catch(e){return}t.className=`${Oj}-search-input`,N.current.append(t);const n=async({placePrediction:t})=>{try{const n=t.toPlace();await n.fetchFields({fields:["location","formattedAddress"]}),n.location&&(e.setCenter(n.location),e.setZoom(Math.max(Qj(r.zoom,12),14)))}catch(e){}};return t.addEventListener("gmp-select",n),()=>{t.removeEventListener("gmp-select",n),t.remove()}}),[W,w.searchBox,z]),j)return(0,l.jsx)("div",{className:`${Oj}-container`,ref:S,children:(0,l.jsxs)("figure",{className:`${Oj}-figure`,children:[(0,l.jsx)(TS,{embedUrl:s.embedUrl,captionText:$}),$?(0,l.jsx)("figcaption",{className:`${Oj}-caption`,children:$}):null]})});const de=s.center?.address||d[0]?.address||$,ue=Q||"onClick"!==K?"auth"===F?(0,l.jsx)($S,{address:de,status:"warning",message:n?(0,x.__)("Google rejected this API key. Check that billing is enabled on the Google Cloud project, that the Maps JavaScript API is turned on, and that the key’s HTTP referrer restriction allows this site.","b-blocks"):(0,x.__)("This map is temporarily unavailable.","b-blocks")}):"missing-key"===F?(0,l.jsx)($S,{address:de,status:"warning",message:(0,x.__)("A Google Maps API key is required to show this map.","b-blocks")}):F?(0,l.jsx)($S,{address:de,status:"warning",message:(0,x.__)("The Google Maps API could not be loaded.","b-blocks")}):null:(0,l.jsx)($S,{address:de,status:"idle",message:(0,x.__)("Map ready to load.","b-blocks"),onActivate:()=>Z(!0),actionLabel:(0,x.__)("Load map","b-blocks")});return(0,l.jsx)("div",{className:`${Oj}-container`,ref:S,children:(0,l.jsxs)("figure",{className:`${Oj}-figure`,children:[!ue&&b.show&&g.length?(0,l.jsx)(SS,{categories:g,filterBar:b,active:G,onChange:V}):null,ue||!w.searchBox&&!w.geolocation?null:(0,l.jsxs)("div",{className:`${Oj}-tools`,children:[w.searchBox?(0,l.jsx)("div",{className:`${Oj}-search`,ref:N}):null,w.geolocation?(0,l.jsx)("button",{type:"button",className:`${Oj}-locate`,onClick:()=>{const e=L.current;e&&navigator.geolocation&&(Y(!0),navigator.geolocation.getCurrentPosition((({coords:t})=>{Y(!1);const n={lat:t.latitude,lng:t.longitude};e.panTo(n),e.setZoom(14);const o=Qj(w.nearbyRadius,0),i=ee("Circle");if(o>0&&i){const t=new i({map:e,center:n,radius:o,strokeColor:"#2A6DF0",strokeOpacity:.6,fillColor:"#2A6DF0",fillOpacity:.12});B.current.push(t)}}),(()=>Y(!1)),{enableHighAccuracy:!0,timeout:1e4}))},disabled:q,children:q?(0,x.__)("Locating…","b-blocks"):(0,x.__)("Find my location","b-blocks")}):null]}),(0,l.jsx)("div",{className:`${Oj}-wrapper`,children:ue||(0,l.jsx)("div",{className:`${Oj}-canvas`,ref:T,role:"region","aria-label":$
435 +/* translators: %s: caption text describing the map location */?(0,x.sprintf)((0,x.__)("Interactive map of %s","b-blocks"),$):(0,x.__)("Interactive Google Map","b-blocks")})}),!ue&&k.enabled&&k.showPanel?(0,l.jsx)("div",{className:`${Oj}-directions-panel`,ref:M}):null,$?(0,l.jsx)("figcaption",{className:`${Oj}-caption`,children:$}):null]})})},MS=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"},{label:"vh",value:"vh"}],LS={top:"",right:"",bottom:"",left:""},PS=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],ES=[{label:(0,x.__)("Interactive","b-blocks"),value:"interactive"},{label:(0,x.__)("Embed URL","b-blocks"),value:"embed"}],AS=[{label:(0,x.__)("Roadmap","b-blocks"),value:"roadmap"},{label:(0,x.__)("Satellite","b-blocks"),value:"satellite"},{label:(0,x.__)("Hybrid","b-blocks"),value:"hybrid"},{label:(0,x.__)("Terrain","b-blocks"),value:"terrain"}],BS=[{label:(0,x.__)("Cooperative (Ctrl + scroll)","b-blocks"),value:"cooperative"},{label:(0,x.__)("Greedy (always pans)","b-blocks"),value:"greedy"},{label:(0,x.__)("None (locked)","b-blocks"),value:"none"},{label:(0,x.__)("Auto","b-blocks"),value:"auto"}],IS=[{label:(0,x.__)("Top Left","b-blocks"),value:"TOP_LEFT"},{label:(0,x.__)("Top Center","b-blocks"),value:"TOP_CENTER"},{label:(0,x.__)("Top Right","b-blocks"),value:"TOP_RIGHT"},{label:(0,x.__)("Left Top","b-blocks"),value:"LEFT_TOP"},{label:(0,x.__)("Left Center","b-blocks"),value:"LEFT_CENTER"},{label:(0,x.__)("Left Bottom","b-blocks"),value:"LEFT_BOTTOM"},{label:(0,x.__)("Right Top","b-blocks"),value:"RIGHT_TOP"},{label:(0,x.__)("Right Center","b-blocks"),value:"RIGHT_CENTER"},{label:(0,x.__)("Right Bottom","b-blocks"),value:"RIGHT_BOTTOM"},{label:(0,x.__)("Bottom Left","b-blocks"),value:"BOTTOM_LEFT"},{label:(0,x.__)("Bottom Center","b-blocks"),value:"BOTTOM_CENTER"},{label:(0,x.__)("Bottom Right","b-blocks"),value:"BOTTOM_RIGHT"}],OS=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Drop","b-blocks"),value:"drop"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"}],RS=[{label:(0,x.__)("Click","b-blocks"),value:"click"},{label:(0,x.__)("Hover","b-blocks"),value:"hover"},{label:(0,x.__)("Always open","b-blocks"),value:"always"},{label:(0,x.__)("Never","b-blocks"),value:"none"}],zS=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Silver","b-blocks"),value:"silver"},{label:(0,x.__)("Retro","b-blocks"),value:"retro"},{label:(0,x.__)("Dark","b-blocks"),value:"dark"},{label:(0,x.__)("Night","b-blocks"),value:"night"},{label:(0,x.__)("Aubergine","b-blocks"),value:"aubergine"},{label:(0,x.__)("Custom JSON","b-blocks"),value:"custom"}],DS=[{label:(0,x.__)("Driving","b-blocks"),value:"DRIVING"},{label:(0,x.__)("Walking","b-blocks"),value:"WALKING"},{label:(0,x.__)("Bicycling","b-blocks"),value:"BICYCLING"},{label:(0,x.__)("Transit","b-blocks"),value:"TRANSIT"}],FS=[{label:(0,x.__)("Polyline","b-blocks"),value:"polyline"},{label:(0,x.__)("Polygon","b-blocks"),value:"polygon"},{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Rectangle","b-blocks"),value:"rectangle"}],HS=[{label:(0,x.__)("When scrolled into view","b-blocks"),value:"onView"},{label:(0,x.__)("On click","b-blocks"),value:"onClick"},{label:(0,x.__)("Load immediately","b-blocks"),value:"none"}],WS=[{label:(0,x.__)("Default Pin","b-blocks"),value:"default"},{label:(0,x.__)("Icon Library","b-blocks"),value:"library"},{label:(0,x.__)("Upload SVG","b-blocks"),value:"upload"},{label:(0,x.__)("Image","b-blocks"),value:"image"}],US=[{name:"location",title:(0,x.__)("Location","b-blocks")},{name:"content",title:(0,x.__)("Content","b-blocks")},{name:"icon",title:(0,x.__)("Icon","b-blocks")}],GS=(e,t={})=>{const n=.004*Math.max(0,Number(e)-1);return{id:`marker-${e}`,title:(0,x.__)("New Location","b-blocks"),content:"<p>Describe this location.</p>",address:"",lat:Number((Qj(t.lat,Rj.lat)+n).toFixed(6)),lng:Number((Qj(t.lng,Rj.lng)+n).toFixed(6)),category:"",icon:{type:"default",url:{library:"",upload:""}},image:{url:"",alt:""},pinColor:"",glyphColor:"",animation:"",draggable:!0,openByDefault:!1}},VS=(e={},t=0)=>{const n=.006*Math.max(0,t),o=Qj(e.lat,Rj.lat)+n,i=Qj(e.lng,Rj.lng)+n,a=e=>Number(e.toFixed(6)),s=.012;return{path:`${a(o-s)},${a(i-s)}\n${a(o+s)},${a(i+s)}`,center:{lat:a(o),lng:a(i)},radius:1e3,bounds:{north:a(o+s),south:a(o-s),east:a(i+s),west:a(i-s)}}},qS=(e,t={})=>({id:`shape-${e}`,type:"polyline",label:(0,x.__)("New Shape","b-blocks"),...VS(t,Number(e)-1),strokeColor:"#2A6DF0",strokeOpacity:.9,strokeWeight:3,fillColor:"#2A6DF0",fillOpacity:.25}),YS=({caption:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Caption Text","b-blocks"),value:e.text||"",onChange:e=>t("caption",e,"text"),placeholder:(0,x.__)("e.g. 123 Main St, Anytown","b-blocks"),help:(0,x.__)("Optional. Shown below the map and used as the map’s accessible name.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Caption Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:e.align||"center",onChange:e=>t("caption",e||"center","align"),children:Dj.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),KS=({attributes:e,setAttributes:t,updateObj:n})=>{const{categories:o=[],filterBar:i={}}=e,a=(e,n,i)=>t({categories:zb(o,(t=>{t[e][n]=i}))});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Categories & Filter Bar","b-blocks"),initialOpen:!1,children:[o.map(((e,n)=>(0,l.jsxs)(y.Flex,{className:"mt10",align:"flex-end",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:e.label,onChange:e=>a(n,"label",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ge,{label:"",value:e.color,onChange:e=>a(n,"color",e)}),(0,l.jsx)(y.Button,{isDestructive:!0,label:(0,x.__)("Remove","b-blocks"),onClick:()=>(e=>t({categories:o.filter(((t,n)=>n!==e))}))(n),children:(0,l.jsx)(y.Dashicon,{icon:"no"})})]},e.id))),(0,l.jsx)(y.Flex,{justify:"center",className:"addItem mt15",children:(0,l.jsxs)(y.Button,{variant:"primary",onClick:()=>{return t({categories:[...o,(e=o.length+1,{id:`cat-${e}`,label:(0,x.__)("Category","b-blocks"),color:"#8a2be2"})]});var e},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Category","b-blocks")]})}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Filter Bar","b-blocks"),checked:!!i.show,onChange:e=>n("filterBar",!!e,"show"),help:(0,x.__)("Lets visitors show only the markers in one category.","b-blocks"),__nextHasNoMarginBottom:!0}),i.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Include an “All” chip","b-blocks"),checked:!1!==i.showAll,onChange:e=>n("filterBar",!!e,"showAll"),__nextHasNoMarginBottom:!0}),!1!==i.showAll&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("“All” Label","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"flex1",value:i.allLabel||"",onChange:e=>n("filterBar",e,"allLabel"),placeholder:(0,x.__)("All","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Filter Bar Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.align||"left",onChange:e=>n("filterBar",e||"left","align"),children:Dj.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]})]})},QS=({clustering:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Clustering","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,
436 +x.__)("Group nearby markers","b-blocks"),checked:!!e.enabled,onChange:e=>t("clustering",!!e,"enabled"),help:(0,x.__)("Collapses dense marker groups into a single counted bubble as the visitor zooms out.","b-blocks"),__nextHasNoMarginBottom:!0}),e.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Bubble Background","b-blocks"),value:e.background,onChange:e=>t("clustering",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Count Color:","b-blocks"),value:e.textColor,onChange:e=>t("clustering",e,"textColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Bubble Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:MS,value:e.size,onChange:e=>t("clustering",e,"size"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Zoom in on cluster click","b-blocks"),checked:!1!==e.clickToZoom,onChange:e=>t("clustering",!!e,"clickToZoom"),__nextHasNoMarginBottom:!0})]})]}),ZS=({controls:e={},updateObj:t})=>{const n=!!e.disableDefaultUI;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Controls","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Hide all default controls","b-blocks"),checked:n,onChange:e=>t("controls",!!e,"disableDefaultUI"),__nextHasNoMarginBottom:!0}),n&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("All built-in controls are hidden. Turn this off to pick them individually.","b-blocks")}),!n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Zoom Buttons","b-blocks"),checked:!!e.zoom,onChange:e=>t("controls",!!e,"zoom"),__nextHasNoMarginBottom:!0}),e.zoom&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Zoom Control Position","b-blocks"),value:e.zoomPosition||"RIGHT_BOTTOM",options:IS,onChange:e=>t("controls",e,"zoomPosition"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Map Type Switcher","b-blocks"),checked:!!e.mapType,onChange:e=>t("controls",!!e,"mapType"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Street View (Pegman)","b-blocks"),checked:!!e.streetView,onChange:e=>t("controls",!!e,"streetView"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fullscreen","b-blocks"),checked:!!e.fullscreen,onChange:e=>t("controls",!!e,"fullscreen"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Scale","b-blocks"),checked:!!e.scale,onChange:e=>t("controls",!!e,"scale"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rotate / Tilt","b-blocks"),checked:!!e.rotate,onChange:e=>t("controls",!!e,"rotate"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Keyboard Shortcuts","b-blocks"),checked:!1!==e.keyboardShortcuts,onChange:e=>t("controls",!!e,"keyboardShortcuts"),help:(0,x.__)("Lets keyboard users pan and zoom the map. Keep this on for accessibility.","b-blocks"),__nextHasNoMarginBottom:!0})]})},XS=({directions:e={},updateObj:t})=>{const n=e.waypoints||[];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Directions","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show a route","b-blocks"),checked:!!e.enabled,onChange:e=>t("directions",!!e,"enabled"),__nextHasNoMarginBottom:!0}),e.enabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Travel Mode","b-blocks"),value:e.mode||"DRIVING",options:DS,onChange:e=>t("directions",e,"mode"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Origin","b-blocks"),value:e.origin?.address||"",onChange:e=>t("directions",e,"origin","address"),placeholder:(0,x.__)("Address or place name","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Destination","b-blocks"),value:e.destination?.address||"",onChange:e=>t("directions",e,"destination","address"),placeholder:(0,x.__)("Address or place name","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt15",children:(0,x.__)("Waypoints","b-blocks")}),n.map(((e,o)=>(0,l.jsxs)(y.Flex,{align:"flex-end",gap:2,className:"mt5",children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:e.address||"",onChange:e=>((e,o)=>t("directions",zb(n,(t=>{t[e].address=o})),"waypoints"))(o,e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.Button,{isDestructive:!0,label:(0,x.__)("Remove","b-blocks"),onClick:()=>t("directions",n.filter(((e,t)=>t!==o)),"waypoints"),children:(0,l.jsx)(y.Dashicon,{icon:"no"})})]},o))),(0,l.jsx)(y.Flex,{justify:"center",className:"addItem mt10",children:(0,l.jsxs)(y.Button,{variant:"secondary",onClick:()=>t("directions",[...n,{address:""}],"waypoints"),children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add Waypoint","b-blocks")]})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show turn-by-turn panel","b-blocks"),checked:!!e.showPanel,onChange:e=>t("directions",!!e,"showPanel"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Route Color:","b-blocks"),value:e.routeColor,onChange:e=>t("directions",e,"routeColor")})]})]})},JS=({layers:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Traffic","b-blocks"),checked:!!e.traffic,onChange:e=>t("layers",!!e,"traffic"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Transit","b-blocks"),checked:!!e.transit,onChange:e=>t("layers",!!e,"transit"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Bicycling","b-blocks"),checked:!!e.bicycling,onChange:e=>t("layers",!!e,"bicycling"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("KML / KMZ URL","b-blocks"),value:e.kmlUrl||"",onChange:e=>t("layers",e.trim(),"kmlUrl"),placeholder:"https://example.com/route.kml",help:(0,x.__)("Must be a publicly reachable URL — Google fetches it from their servers, not the visitor’s browser. Note that Google has deprecated KML layers; the GeoJSON field below is the supported route.","b-blocks"),__nextHasNoMarginBottom:!0}),Kj(e.kmlUrl)&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("This URL only resolves on your own machine. Google fetches KML server-side, so a local address can never load — host the file publicly, or use GeoJSON below, which is parsed in the browser.","b-blocks")}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("GeoJSON","b-blocks"),value:e.geoJson||"",onChange:e=>t("layers",e,"geoJson"),rows:5,placeholder:'{ "type": "FeatureCollection", "features": [] }',__nextHasNoMarginBottom:!0}),Yj(e.geoJson).error&&(0,l.jsx)(ja,{status:"danger",isIcon:!0,children:Yj(e.geoJson).error})]}),eT=({map:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Zoom","b-blocks"),value:Qj(e.zoom,12),min:1,max:22,onChange:e=>t("map",Qj(e,12),"zoom"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Min Zoom","b-blocks"),min:1,max:Qj(e.maxZoom)??22,value:e.minZoom??"",onChange:e=>t("map",e,"minZoom"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Max Zoom","b-blocks"),min:Qj(e.minZoom)??1,max:22,value:e.maxZoom??"",onChange:e=>t("map",e,"maxZoom"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Map Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{
437 +className:"flex1",value:e.mapType||"roadmap",options:AS,onChange:e=>t("map",e,"mapType"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Let visitors switch map type","b-blocks"),checked:!1!==e.allowTypeSwitch,onChange:e=>t("map",!!e,"allowTypeSwitch"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Gesture Handling","b-blocks"),value:e.gestureHandling||"cooperative",options:BS,onChange:e=>t("map",e,"gestureHandling"),help:(0,x.__)("Cooperative requires Ctrl/⌘ + scroll to zoom, so the page never traps the visitor’s scroll.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Draggable","b-blocks"),checked:!1!==e.draggable,onChange:e=>t("map",!!e,"draggable"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Zoom on scroll wheel","b-blocks"),checked:!!e.scrollwheel,onChange:e=>t("map",!!e,"scrollwheel"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fit map to all markers","b-blocks"),checked:!!e.fitBounds,onChange:e=>t("map",!!e,"fitBounds"),help:(0,x.__)("Overrides the center and zoom above when two or more markers have coordinates.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Use Aspect Ratio","b-blocks"),checked:!!e.useAspectRatio,onChange:e=>t("map",!!e,"useAspectRatio"),help:(0,x.__)("When on, the map sizes by a fixed aspect ratio (fluid). When off, fixed heights per breakpoint.","b-blocks"),__nextHasNoMarginBottom:!0}),e.useAspectRatio?(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Aspect Ratio","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:e.aspectRatio?.[n]||"",options:[{label:(0,x.__)("Inherit","b-blocks"),value:""},...zj],onChange:e=>t("map",e,"aspectRatio",n),__nextHasNoMarginBottom:!0})]}):(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:Jj(e,n,"height"),units:MS,onChange:e=>t("map",e,n,"height"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:Jj(e,n,"maxWidth"),units:MS,onChange:e=>t("map",e,n,"maxWidth"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(v,{className:"mt10",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Map Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:Jj(e,n,"align"),onChange:e=>t("map",e,n,"align"),children:Dj.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),tT=e=>{const{attributes:t,setAttributes:n,arrKey:o="markers",index:i,setActiveIndex:a,apiKey:s=""}=e,r=t[o]||[],c=r[i],{data:d}=$d("bBlocksUtils"),{refetch:u}=jd("b-blocks-enable-svg-mime-type",{_wpnonce:d?.nonce},!1),p=new Tt,[h,g]=(0,m.useState)(""),[b,f]=(0,m.useState)(""),k=(0,m.useRef)(null),w=(0,m.useMemo)((()=>xe((e=>k.current?.("content",e)),600)),[]),[_,C]=(0,m.useState)(""),j=(0,m.useRef)(!1),$=(0,m.useMemo)((()=>xe((e=>{k.current?.("image",e,"alt"),j.current=!1}),600)),[]),S=r[i]?.image?.alt||"";if((0,m.useEffect)((()=>{j.current||C(S)}),[i,S]),!c)return null;const T=t.categories||[],N=(e,t,s=null,l=null)=>{n({[o]:zb(r,(n=>{null!==l?n[i][e][s][l]=t:null!==s?n[i][e][s]=t:n[i][e]=t}))}),a&&a(i)};k.current=N;const M=async()=>{const e=(c.address||"").trim();if(e&&s){g("loading");try{const{Geocoder:t}=await kS(s,["geocoding"]),{results:a}=await(new t).geocode({address:e}),l=a?.[0]?.geometry?.location;if(!l)throw new Error("not-found");n({[o]:zb(r,(e=>{e[i].address=a[0].formatted_address,e[i].lat=Number(l.lat().toFixed(6)),e[i].lng=Number(l.lng().toFixed(6))}))}),g("done")}catch(e){f(Wj(e)),g("error")}}};return(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small markerItemSettingsTabPanel",activeClass:"activeTab",tabs:US,initialTabName:"icon",children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:["location"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Address","b-blocks")}),(0,l.jsxs)(y.Flex,{align:"flex-end",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:c.address||"",onChange:e=>N("address",e),placeholder:(0,x.__)("Search an address","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.Button,{variant:"secondary",onClick:M,disabled:!s||!c.address||"loading"===h,children:"loading"===h?(0,x.__)("Locating…","b-blocks"):(0,x.__)("Locate","b-blocks")})]}),"error"===h&&(0,l.jsx)(ja,{status:"danger",isIcon:!0,children:b}),(null===Qj(c.lat)||null===Qj(c.lng))&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("This marker has no coordinates, so it will not appear on the map. Use Locate above, or type a latitude and longitude below.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Latitude","b-blocks"),step:1e-6,value:c.lat??"",onChange:e=>N("lat",Qj(e,0)),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Longitude","b-blocks"),step:1e-6,value:c.lng??"",onChange:e=>N("lng",Qj(e,0)),__next40pxDefaultSize:!0})]}),(0,l.jsx)("br",{}),(0,l.jsxs)(y.Flex,{className:"m10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Category","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:c.category||"",options:[{label:(0,x.__)("None","b-blocks"),value:""},...T.map((e=>({label:e.label,value:e.id})))],onChange:e=>N("category",e),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.CheckboxControl,{className:"mt10",label:(0,x.__)("Draggable in the editor","b-blocks"),checked:!1!==c.draggable,onChange:e=>N("draggable",!!e)}),(0,l.jsx)("br",{}),(0,l.jsx)(y.CheckboxControl,{className:"m10",label:(0,x.__)("Open its info window by default","b-blocks"),checked:!!c.openByDefault,onChange:e=>N("openByDefault",!!e)})]}),"content"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Title","b-blocks"),value:c.title||"",onChange:e=>N("title",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Info Window Content","b-blocks")}),(0,l.jsx)(La,{value:c.content,onChange:w}),(0,l.jsx)("div",{className:"mt15",children:(0,l.jsx)(we,{label:(0,x.__)("Image","b-blocks"),width:"90%",height:"90%",value:{url:c.image?.url},onChange:e=>N("image",e?.url||"","url")})}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Image Alt Text","b-blocks"),value:_,onChange:e=>{j.current=!0,C(e),$(e)},__nextHasNoMarginBottom:!0})]}),"icon"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Pin Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",options:WS,value:c.icon?.type||"default",onChange:e=>N("icon",e,"type")})]}),(0,l.jsxs)("div",{className:"mt15",children:["library"===c.icon?.type&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:c.icon.url.library,onChange:e=>N("icon",e,"url","library")}),"upload"===c.icon?.type&&(0,l.jsx)(we,{label:(0,x.__)("Upload SVG","b-blocks"),types:["image/svg+xml"],value:{url:c?.icon?.url?.upload},onClick:async()=>(Sd(),await u()),onChange:async e=>{const t=e?.url?await p.sanitizeFile(e.url):"";N("icon",t,"url","upload")},isSvgEnabled:!0}),"image"===c.icon?.type&&(0,l.jsx)(we,{label:(0,x.__)("Pin Image","b-blocks"),
438 +value:{url:c.image?.url},onChange:e=>N("image",e?.url||"","url")})]}),"default"===(c.icon?.type||"default")&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Pin Color:","b-blocks"),value:c.pinColor,onChange:e=>N("pinColor",e)}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Glyph Color:","b-blocks"),value:c.glyphColor,onChange:e=>N("glyphColor",e)})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Animation","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex2",value:c.animation||"",options:[{label:(0,x.__)("Inherit","b-blocks"),value:""},...OS],onChange:e=>N("animation",e),__nextHasNoMarginBottom:!0})]})]})]})})},nT=({attributes:e,setAttributes:t,updateObj:n,activeIdx:o,setActiveIdx:i,device:a,isPremium:s,apiKey:r})=>{const{source:c={},infoWindow:d={}}=e,u=(e.markers?.length||0)+1,p=t$(e.theme||{}).length>0,h=(0,m.useCallback)((e=>(0,l.jsx)(tT,{...e,apiKey:r,device:a})),[r,a]);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Markers","b-blocks"),initialOpen:!1,children:[!c.mapId&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("Markers stay hidden until you add a Map ID. Google Advanced Markers cannot render without one — create a Map ID in the Google Cloud console and paste it into Map Source → Map ID.","b-blocks")}),c.mapId&&p&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Your Map ID is active, so markers work but the Style tab’s themes are ignored. Style this map in the Google Cloud console instead.","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Info Window Opens On","b-blocks"),help:(0,x.__)("Always open shows every marker’s info window as soon as the map loads.","b-blocks"),value:d.trigger||"click",options:RS,onChange:e=>n("infoWindow",e,"trigger"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),"always"!==(d.trigger||"click")&&"none"!==d.trigger&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Only one open at a time","b-blocks"),checked:!1!==d.singleOpen,onChange:e=>n("infoWindow",!!e,"singleOpen"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(_a,{attributes:e,setAttributes:t,arrKey:"markers",itemLabel:"Marker",design:s?"sortable":"single",ItemSettings:h,newItem:GS(u,c.center),activeIndex:o,setActiveIndex:i,minItem:0}),!s&&(0,l.jsxs)("small",{children:[(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("Upgrade to Premium","b-blocks")})})," ",(0,x.__)("to unlock sorting and more features.","b-blocks")]})]})},oT=({performance:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Performance","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Load the map","b-blocks"),value:e.lazyLoad||"onView",options:HS,onChange:e=>t("performance",e,"lazyLoad"),help:(0,x.__)("Deferring the load keeps Google’s scripts off the page until the visitor actually needs them.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("The editor always loads the map immediately so you can see your changes.","b-blocks")})]}),iT=({tools:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Search & Location","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Search Box","b-blocks"),checked:!!e.searchBox,onChange:e=>t("tools",!!e,"searchBox"),help:(0,x.__)("Adds a Places autocomplete field above the map. Requires the Places API (New) on your key.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Find my location button","b-blocks"),checked:!!e.geolocation,onChange:e=>t("tools",!!e,"geolocation"),__nextHasNoMarginBottom:!0}),e.geolocation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Nearby Radius (metres)","b-blocks"),min:0,step:100,value:e.nearbyRadius??0,onChange:e=>t("tools",Qj(e,0),"nearbyRadius"),__next40pxDefaultSize:!0}),(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Browsers only allow location access on HTTPS, and the visitor must approve the prompt.","b-blocks")})]})]}),aT=e=>{const{attributes:t,setAttributes:n,arrKey:o="shapes",index:i}=e,a=t[o]||[],s=a[i];if(!s)return null;const r=(e,t,s=null)=>n({[o]:zb(a,(n=>{null!==s?n[i][e][s]=t:n[i][e]=t}))}),c="polyline"===s.type||"polygon"===s.type,d="polyline"!==s.type,u=c?CS(s.path).length<2:"circle"===s.type?null===Qj(s.center?.lat)||null===Qj(s.center?.lng)||!Qj(s.radius):["north","south","east","west"].some((e=>null===Qj(s.bounds?.[e])));return(0,l.jsxs)(l.Fragment,{children:[u&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:c?(0,x.__)('This shape needs at least two "latitude,longitude" points before it appears on the map.',"b-blocks"):"circle"===s.type?(0,x.__)("This circle needs a centre latitude, longitude and radius before it appears on the map.","b-blocks"):(0,x.__)("This rectangle needs all four bounds before it appears on the map.","b-blocks")}),u&&(0,l.jsx)(y.Button,{className:"mt10",variant:"secondary",onClick:()=>n({[o]:zb(a,(e=>{Object.assign(e[i],VS(t.source?.center,i))}))}),children:(0,x.__)("Fill from map centre","b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label","b-blocks"),value:s.label||"",onChange:e=>r("label",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Type","b-blocks"),value:s.type,options:FS,onChange:e=>r("type",e),__nextHasNoMarginBottom:!0}),c&&(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Path","b-blocks"),value:s.path||"",onChange:e=>r("path",e),rows:4,placeholder:"23.8103,90.4125\n23.7900,90.4000",help:(0,x.__)('One "latitude,longitude" pair per line — or paste a JSON array of {lat, lng} objects.',"b-blocks"),__nextHasNoMarginBottom:!0}),"circle"===s.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Center Latitude","b-blocks"),step:1e-6,value:s.center?.lat??"",onChange:e=>r("center",Qj(e,0),"lat"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("Center Longitude","b-blocks"),step:1e-6,value:s.center?.lng??"",onChange:e=>r("center",Qj(e,0),"lng"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Radius (metres)","b-blocks"),min:1,step:50,value:s.radius??1e3,onChange:e=>r("radius",Qj(e,1e3)),__next40pxDefaultSize:!0})]}),"rectangle"===s.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Bounds","b-blocks")}),(0,l.jsxs)(y.Flex,{gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("North","b-blocks"),step:1e-6,value:s.bounds?.north??"",onChange:e=>r("bounds",Qj(e,0),"north"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("South","b-blocks"),step:1e-6,value:s.bounds?.south??"",onChange:e=>r("bounds",Qj(e,0),"south"),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt5",gap:2,children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("East","b-blocks"),step:1e-6,value:s.bounds?.east??"",onChange:e=>r("bounds",Qj(e,0),"east"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",label:(0,x.__)("West","b-blocks"),step:1e-6,value:s.bounds?.west??"",onChange:e=>r("bounds",Qj(e,0),"west"),__next40pxDefaultSize:!0})]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Stroke Color:","b-blocks"),value:s.strokeColor,onChange:e=>r("strokeColor",e)}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Stroke Opacity","b-blocks"),value:Qj(s.strokeOpacity,.9),min:0,max:1,step:.05,onChange:e=>r("strokeOpacity",Qj(e,.9)),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,
439 +x.__)("Stroke Weight","b-blocks"),value:Qj(s.strokeWeight,3),min:1,max:20,onChange:e=>r("strokeWeight",Qj(e,3)),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Fill Color:","b-blocks"),value:s.fillColor,onChange:e=>r("fillColor",e)}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Fill Opacity","b-blocks"),value:Qj(s.fillOpacity,.25),min:0,max:1,step:.05,onChange:e=>r("fillOpacity",Qj(e,.25)),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})]})},sT=({attributes:e,setAttributes:t})=>(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Shapes","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,arrKey:"shapes",itemLabel:"Shape",design:"sortable",minItem:0,ItemSettings:aT,newItem:qS((e.shapes?.length||0)+1,e.source?.center)})}),rT=({source:e={},updateObj:t,apiKey:n=""})=>{const o=e.type||(e.embedUrl?"embed":"interactive"),i=e.center||{},a=e.embedUrl||"",s=a&&!Hj(a),[r,c]=(0,m.useState)(i.address||""),[d,u]=(0,m.useState)(""),[p,h]=(0,m.useState)(""),g=(0,m.useRef)(i.address||"");(0,m.useEffect)((()=>{c(i.address||""),g.current=i.address||""}),[i.address]);const b=async e=>{const o=(e??r).trim();if(o&&n){u("loading");try{const{Geocoder:e}=await kS(n,["geocoding"]),{results:i}=await(new e).geocode({address:o}),a=i?.[0]?.geometry?.location;if(!a)throw new Error("not-found");g.current=i[0].formatted_address,t("source",{lat:Number(a.lat().toFixed(6)),lng:Number(a.lng().toFixed(6)),address:i[0].formatted_address},"center"),u("done")}catch(e){h(Wj(e)),u("error")}}};return(0,m.useEffect)((()=>{if("interactive"!==o||!n)return;const e=r.trim();if(!e||e===g.current)return;const t=setTimeout((()=>b(e)),900);return()=>clearTimeout(t)}),[r,o,n]),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Source","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Tn,{label:(0,x.__)("Mode","b-blocks"),options:ES,value:o,onChange:e=>t("source",e,"type")}),"embed"===o?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Google Maps Embed","b-blocks"),value:a,onChange:e=>t("source",(e=>{if(!e||"string"!=typeof e)return"";const t=e.trim();if(!t)return"";if(/<iframe\b/i.test(t)){const e=t.match(/\bsrc\s*=\s*["']([^"']+)["']/i);return e&&e[1]?e[1].trim():""}return t})(e),"embedUrl"),placeholder:"https://www.google.com/maps/embed?pb=...",help:(0,x.__)("In Google Maps, click Share → Embed a map → Copy HTML. Paste the full iframe code OR just the src URL — we will extract it for you.","b-blocks"),rows:4,__nextHasNoMarginBottom:!0}),s&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("This does not look like a Google Maps embed URL. Only https://www.google.com/maps/embed URLs are allowed.","b-blocks")})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt15",children:(0,x.__)("Center Address","b-blocks")}),(0,l.jsxs)(y.Flex,{align:"flex-end",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex2",value:r,onChange:c,placeholder:(0,x.__)("e.g. 1600 Amphitheatre Parkway, Mountain View","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.Button,{variant:"secondary",onClick:()=>b(),disabled:!n||!r.trim()||"loading"===d,children:"loading"===d?(0,x.__)("Locating…","b-blocks"):(0,x.__)("Locate","b-blocks")})]}),!n&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("Add a Google Maps API key to look up addresses.","b-blocks")}),"error"===d&&(0,l.jsx)(ja,{status:"danger",isIcon:!0,children:p}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Latitude","b-blocks"),value:i.lat??"",step:1e-6,onChange:e=>t("source",e,"center","lat"),__next40pxDefaultSize:!0}),(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Longitude","b-blocks"),value:i.lng??"",step:1e-6,onChange:e=>t("source",e,"center","lng"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Map ID","b-blocks"),value:e.mapId||"",onChange:e=>t("source",e,"mapId"),help:(0,x.__)("Optional. A Map ID from Google Cloud console enables cloud-based styling. Leave empty to use the JSON themes in the Style tab.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:2,children:[(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Language","b-blocks"),value:e.language||"",onChange:e=>t("source",e.trim(),"language"),placeholder:"en",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"flex1",label:(0,x.__)("Region","b-blocks"),value:e.region||"",onChange:e=>t("source",e.trim(),"region"),placeholder:"US",__nextHasNoMarginBottom:!0})]})]})]})},lT=({attributes:e,updateObj:t})=>{const{theme:n={},source:o={},markers:i=[],clustering:a={}}=e,s=n.preset||"default",r=t$(n).length>0,c=i.length>0||!!a.enabled;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map Theme","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Theme","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:s,options:zS,onChange:e=>t("theme",e,"preset"),__nextHasNoMarginBottom:!0})]}),r&&o.mapId&&(0,l.jsx)(ja,{status:"warning",isIcon:!0,children:(0,x.__)("Your Map ID overrides these themes — Google applies the map’s cloud styling instead. Style it in the Google Cloud console, or clear the Map ID under Map Source to use the themes here.","b-blocks")}),!o.mapId&&c&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Themes apply because no Map ID is set — which is also why markers stay hidden. Google cannot combine JSON themes with Advanced Markers; add a Map ID under Map Source for markers, and style that map in the Google Cloud console.","b-blocks")}),"custom"===s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Custom Style JSON","b-blocks")}),(0,l.jsx)(wt,{value:n.customJson||"",onChange:e=>t("theme",e,"customJson"),height:"220px"}),!n$(n.customJson)&&(0,l.jsx)(ja,{status:"danger",isIcon:!0,children:(0,x.__)("This is not a valid style array. Paste the JSON from the Google Maps Styling Wizard.","b-blocks")})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Grayscale","b-blocks"),value:Qj(n.grayscale,0),min:0,max:100,onChange:e=>t("theme",Qj(e,0),"grayscale"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Saturation","b-blocks"),value:Qj(n.saturation,0),min:-100,max:100,onChange:e=>t("theme",Qj(e,0),"saturation"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ge,{className:"mt10",label:(0,x.__)("Hue:","b-blocks"),value:n.hue,onChange:e=>t("theme",e,"hue")})]})},cT=e=>{const{attributes:t,updateObj:n,device:o="desktop"}=e,{map:i={},controls:a={},clustering:s={},layers:r={},directions:c={},tools:d={},performance:u={},caption:p={}}=t,h=Zj(t).source,g="embed"!==h.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(rT,{source:h,updateObj:n,apiKey:e.apiKey}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eT,{map:i,updateObj:n,device:o}),(0,l.jsx)(ZS,{controls:a,updateObj:n}),(0,l.jsx)(lT,{attributes:t,updateObj:n}),(0,l.jsx)(nT,{...e}),(0,l.jsx)(QS,{clustering:s,updateObj:n}),(0,l.jsx)(KS,{...e}),(0,l.jsx)(JS,{layers:r,updateObj:n,markerCount:t.markers?.length||0,plottableCount:(t.markers||[]).filter((e=>null!==_S(e))).length}),(0,l.jsx)(sT,{...e}),(0,l.jsx)(XS,{directions:c,updateObj:n}),(0,l.jsx)(iT,{tools:d,updateObj:n}),(0,l.jsx)(oT,{performance:u,updateObj:n})]}),!g&&(0,l.jsx)(eT,{map:i,updateObj:n,device:o}),(0,l.jsx)(YS,{caption:p,updateObj:n})]})},dT=({caption:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:e.color,onChange:e=>t("caption",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,
440 +onChange:e=>t("caption",e,"typo")})]}),uT=({filterBar:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Filter Bar","b-blocks"),initialOpen:!1,children:[!e.show&&(0,l.jsx)(ja,{status:"info",isIcon:!0,children:(0,x.__)("Turn the filter bar on under General → Categories & Filter Bar to see these styles.","b-blocks")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Chip Color:","b-blocks"),value:e.color,onChange:e=>t("filterBar",e,"color")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Chip Background:","b-blocks"),value:e.bgColor,onChange:e=>t("filterBar",e,"bgColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Active Background:","b-blocks"),value:e.activeColor,onChange:e=>t("filterBar",e,"activeColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Active Text:","b-blocks"),value:e.activeTextColor,onChange:e=>t("filterBar",e,"activeTextColor")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("filterBar",e,"typo")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:MS,value:e?.[n]?.gap,onChange:e=>t("filterBar",e,n,"gap"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Chip Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:MS,values:e?.[n]?.padding,resetValues:LS,onChange:e=>t("filterBar",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Chip Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:MS,values:e?.[n]?.radius,resetValues:LS,onChange:e=>t("filterBar",e,n,"radius")})]}),pT=({infoWindow:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Info Window","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:e.bgColor,onChange:e=>t("infoWindow",e,"bgColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color:","b-blocks"),value:e.textColor,onChange:e=>t("infoWindow",e,"textColor")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("infoWindow",e,"typo")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Max Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:MS,value:e?.[n]?.maxWidth,onChange:e=>t("infoWindow",e,n,"maxWidth"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:MS,values:e?.[n]?.padding,resetValues:LS,onChange:e=>t("infoWindow",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:MS,values:e?.[n]?.radius,resetValues:LS,onChange:e=>t("infoWindow",e,n,"radius")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:e.shadow,onChange:e=>t("infoWindow",e,"shadow")})]}),hT=({map:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Map","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:MS,values:e.borderRadius?.[n],resetValues:LS,onChange:e=>t("map",e,"borderRadius",n)}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:e.shadow,onChange:e=>t("map",e,"shadow")})]}),gT=({marker:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Markers","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Pin Color:","b-blocks"),value:e.pinColor,onChange:e=>t("marker",e,"pinColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Glyph Color:","b-blocks"),value:e.glyphColor,onChange:e=>t("marker",e,"glyphColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Border Color:","b-blocks"),value:e.borderColor,onChange:e=>t("marker",e,"borderColor")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Pin Scale","b-blocks"),value:Qj(e.scale,1),min:.5,max:3,step:.1,onChange:e=>t("marker",Qj(e,1),"scale"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Custom Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:MS,value:e?.[n]?.size,onChange:e=>t("marker",e,n,"size"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Default Animation","b-blocks"),value:e.animation||"none",options:OS,onChange:e=>t("marker",e,"animation"),help:(0,x.__)("Skipped automatically for visitors who prefer reduced motion.","b-blocks"),__nextHasNoMarginBottom:!0})]}),mT=e=>{const{attributes:t,updateObj:n,device:o="desktop"}=e,{map:i={},marker:a={},infoWindow:s={},filterBar:r={},caption:c={}}=t,d="embed"!==Zj(t).source.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hT,{map:i,updateObj:n,device:o}),d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(gT,{marker:a,updateObj:n,device:o}),(0,l.jsx)(pT,{infoWindow:s,updateObj:n,device:o}),(0,l.jsx)(uT,{filterBar:r,updateObj:n,device:o})]}),(0,l.jsx)(dT,{caption:c,updateObj:n})]})},bT=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,[a,s]=(0,m.useState)(0);return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:PS,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(cT,{...e,activeIdx:a,setActiveIdx:s}),"style"===t.name&&(0,l.jsx)(mT,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},fT=(0,w.compose)((0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}}))),(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop",selectBlock:a}=e,s="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,r=fe(t,n),c=(0,h.useBlockProps)({id:`block-${o}`}),d=window.bBlocksCursorDataConfig?.nonce,{data:u,isLoading:p}=jd("bblocks_api_keys",{_wpnonce:d},!0),[g,b]=(0,m.useState)("");(0,m.useEffect)((()=>{b(u?.googleMaps?.key||"")}),[u,p]);const f="embed"!==Zj(t).source.type;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(bT,{...e,updateObj:r,isPremium:s,apiKey:g}),(0,l.jsxs)("div",{...c,onClick:()=>a(o),onDragStart:e=>e.stopPropagation(),draggable:!1,children:[(0,l.jsx)(o$,{attributes:t,id:`block-${o}`,isBackend:!0}),f&&!p&&!g&&(0,l.jsxs)(ja,{status:"warning",isIcon:!1,className:"mb10",children:[(0,x.__)("Add your Google Maps API key in","b-blocks")," ",(0,l.jsx)("a",{href:vn,target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("bBlocks → Settings","b-blocks")})," ",(0,x.__)("to show an interactive map.","b-blocks")]}),(0,l.jsx)("div",{children:(0,l.jsx)(NS,{attributes:t,apiKey:g,isBackend:!0,device:i,onMarkerDrag:(e,{lat:o,lng:i})=>{n({markers:zb(t.markers||[],(t=>{t[e]&&(t[e].lat=Number(o.toFixed(6)),t[e].lng=Number(i.toFixed(6)))}))})}})})]})]})}));Pl(Ij.name)&&(0,p.registerBlockType)(Ij,{icon:bl,edit:fT,save:()=>null})
441 +;const xT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/hero-section","version":"2.0.71","title":"Hero Section","category":"bBlocks","description":"Landing-page hero with an eyebrow, headline, sub-headline, and a CTA button.","keywords":["hero","hero section","landing page","banner","jumbotron","masthead","page header","cta"],"textdomain":"b-blocks","attributes":{"layout":{"type":"object","default":{"minHeight":"60vh","verticalAlign":{"desktop":"middle","tablet":"","mobile":""},"contentAlign":{"desktop":"center","tablet":"","mobile":""},"btnGap":{"desktop":"16px","tablet":"","mobile":""}}},"eyebrow":{"type":"object","default":{"show":false,"text":"New — Summer 2026","color":"#ffffff","bg":{"type":"solid","color":"rgba(255,255,255,0.14)"},"typo":{"fontSize":{"desktop":"13px","tablet":"","mobile":""},"fontWeight":"600","letterSpace":"2px","textTransform":"uppercase"},"padding":{"desktop":{"top":"6px","right":"14px","bottom":"6px","left":"14px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"50px","right":"50px","bottom":"50px","left":"50px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"heading":{"type":"object","default":{"text":"Build Something Amazing","tag":"h1","color":"#ffffff","typo":{"fontSize":{"desktop":"56px","tablet":"40px","mobile":"28px"},"fontWeight":"700","lineHeight":"1.2"},"bg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"subHeading":{"type":"object","default":{"show":true,"text":"The easiest way to launch your next big idea — no code required.","color":"rgba(255,255,255,0.85)","typo":{"fontSize":{"desktop":"18px","tablet":"","mobile":"15px"},"lineHeight":"1.55"},"bg":{"type":"solid","color":""},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"border":{},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"button":{"type":"object","default":{"show":true,"text":"Get Started","url":"","newTab":false,"normal":{"bg":{"type":"solid","color":"#ffffff"},"color":"#1a1a2e","border":{}},"hover":{"bg":{},"color":"","border":{}},"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":"600"},"padding":{"desktop":{"top":"14px","right":"28px","bottom":"14px","left":"28px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"transition":0.2}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"30px","right":"","bottom":"30px","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"#1A1A2E","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),yT={top:"flex-start",middle:"center",bottom:"flex-end"},vT={left:"flex-start",center:"center",right:"flex-end"},kT={left:"flex-start",center:"center",right:"flex-end"},wT=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,_T=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:a={},eyebrow:s={},heading:r={},subHeading:c={},button:d={},advanced:u}=e,{minHeight:p="60vh",verticalAlign:h={},contentAlign:g={},btnGap:m={}}=a,b=`#${o} .b-blocks-hero-section`,f=`${b} .b-blocks-hero-section-container`,x=`${b} .b-blocks-hero-section-eyebrow`,y=`${b} .b-blocks-hero-section-heading`,v=`${b} .b-blocks-hero-section-subheading`,k=`${b} .b-blocks-hero-section-actions`,w=`${b} .b-blocks-hero-section-cta--primary`,_=(e,t,n)=>ns(e,hs(t?.[n])),C=e=>{const t=wT(h,e)||"middle",n=wT(g,e)||"center",o=null==(i=wT(m,e))||""===i?"":"number"==typeof i?`${i}px`:i;var i;return`\n\t\t\t${b}{ align-items:${yT[t]||"center"}; }\n\t\t\t${f}{ ${ns("text-align",n)} align-items:${vT[n]||"center"}; }\n\t\t\t${v}{ ${"center"===n?"margin-left:auto;margin-right:auto;":"margin-left:0;margin-right:0;"} }\n\t\t\t${k}{ ${ns("gap",o)} justify-content:${kT[n]||"center"}; }\n\t\t`},j=e=>`\n\t\t${x}{ ${_("padding",s.padding,e)} ${_("margin",s.margin,e)} ${_("border-radius",s.borderRadius,e)} }\n\t\t${y}{ ${_("padding",r.padding,e)} ${_("margin",r.margin,e)} ${_("border-radius",r.borderRadius,e)} }\n\t\t${v}{ ${_("padding",c.padding,e)} ${_("margin",c.margin,e)} ${_("border-radius",c.borderRadius,e)} }\n\t\t${w}{ ${_("padding",d.padding,e)} ${_("margin",d.margin,e)} ${_("border-radius",d.radius,e)} }\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
442 +__html:`\n\t\t\t${ps("",s.typo).googleFontLink}\n\t\t\t${ps("",r.typo).googleFontLink}\n\t\t\t${ps("",c.typo).googleFontLink}\n\t\t\t${ps("",d.typo).googleFontLink}\n\t\t\t${b}{\n\t\t\t\t${"auto"===p?"min-height:auto;":`min-height:${p};`}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${ns("color",s.color)}\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${is(s.border)}\n\t\t\t}\n\t\t\t${ps(x,s.typo).styles}\n\t\t\t${y}{\n\t\t\t\t${ns("color",r.color)}\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${is(r.border)}\n\t\t\t}\n\t\t\t${ps(y,r.typo).styles}\n\t\t\t${v}{\n\t\t\t\t${ns("color",c.color)}\n\t\t\t\t${os(c.bg)}\n\t\t\t\t${is(c.border)}\n\t\t\t}\n\t\t\t${ps(v,c.typo).styles}\n\t\t\t${w}{\n\t\t\t\t${os(d.normal?.bg)}\n\t\t\t\t${ns("color",d.normal?.color)}\n\t\t\t\t${is(d.normal?.border)}\n\t\t\t\ttransition:all ${d.transition??.2}s ease;\n\t\t\t}\n\t\t\t${ps(w,d.typo).styles}\n\t\t\t${w}:hover, ${w}:focus-visible{\n\t\t\t\t${os(d.hover?.bg)}\n\t\t\t\t${ns("color",d.hover?.color)}\n\t\t\t\t${is(d.hover?.border)}\n\t\t\t}\n\t\t\t${C("desktop")}\n\t\t\t${j("desktop")}\n\t\t\t${t}{ ${C("tablet")} ${j("tablet")} }\n\t\t\t${n}{ ${C("mobile")} ${j("mobile")} }\n\t\t\t${_s(o,u,i,!1)}\n\t\t\t`}})},CT=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],jT={top:"",right:"",bottom:"",left:""},$T=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],ST=[{label:(0,x.__)("Full viewport (100vh)","b-blocks"),value:"100vh"},{label:(0,x.__)("Almost full (90vh)","b-blocks"),value:"90vh"},{label:(0,x.__)("Three-quarter (75vh)","b-blocks"),value:"75vh"},{label:(0,x.__)("Default (60vh)","b-blocks"),value:"60vh"},{label:(0,x.__)("Half viewport (50vh)","b-blocks"),value:"50vh"},{label:(0,x.__)("Auto (fits content)","b-blocks"),value:"auto"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}],TT=["100vh","90vh","75vh","60vh","50vh","auto"],NT=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Middle","b-blocks"),value:"middle"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],MT=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],LT=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"}],PT=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},eyebrow:a={},heading:s={},subHeading:r={},button:c={}}=e,{minHeight:d="60vh",verticalAlign:u={},contentAlign:p={},btnGap:h={}}=i,g=!TT.includes(d),m=e=>e&&"object"==typeof e?e[o]||"":"desktop"===o&&e||"",b=(e,n)=>{const a=i[e],s=a&&"object"==typeof a?a:{};t({layout:{...i,[e]:{...s,[o]:n}}})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Section min-height","b-blocks"),value:g?"custom":d,options:ST,onChange:e=>n("layout","custom"===e?"600px":e,"minHeight"),__nextHasNoMarginBottom:!0}),g&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Custom min-height","b-blocks"),value:d,units:[{label:"px",value:"px"},{label:"vh",value:"vh"},{label:"%",value:"%"},{label:"rem",value:"rem"},{label:"em",value:"em"}],onChange:e=>n("layout",e||"600px","minHeight"),__next40pxDefaultSize:!0}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Vertical Align","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:m(u),onChange:e=>b("verticalAlign",e||""),children:NT.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:"top"===e.value?"arrow-up-alt2":"bottom"===e.value?"arrow-down-alt2":"minus"},e.value)))})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Text Align","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",style:{padding:"2px"},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:m(p),onChange:e=>b("contentAlign",e||""),children:MT.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:`editor-align${e.value}`},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Gap between buttons","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:m(h),units:CT,onChange:e=>b("btnGap",e),__next40pxDefaultSize:!0})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Eyebrow","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show eyebrow label","b-blocks"),checked:!!a.show,onChange:e=>n("eyebrow",!!e,"show")}),!!a.show&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Eyebrow text","b-blocks"),value:a.text||"",onChange:e=>n("eyebrow",e,"text"),placeholder:(0,x.__)("NEW — SUMMER 2026","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Headline text","b-blocks"),value:s.text||"",onChange:e=>n("heading",e,"text"),placeholder:(0,x.__)("Build Something Amazing","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Heading HTML tag","b-blocks"),labelPosition:"edge",value:s.tag||"h1",options:LT,onChange:e=>n("heading",e,"tag"),help:(0,x.__)("Use H1 only once per page. Other instances should be H2 or H3.","b-blocks"),__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sub-headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show sub-headline","b-blocks"),checked:!!r.show,onChange:e=>n("subHeading",!!e,"show")}),!!r.show&&(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Sub-headline text","b-blocks"),value:r.text||"",onChange:e=>n("subHeading",e,"text"),placeholder:(0,x.__)("The easiest way to launch your next big idea…","b-blocks"),help:(0,x.__)("Also editable inline on the block canvas.","b-blocks"),rows:3,__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Buttons","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show primary button","b-blocks"),checked:!!c.show,onChange:e=>n("button",!!e,"show")}),!!c.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Primary button label","b-blocks"),value:c.text||"",onChange:e=>n("button",e,"text"),placeholder:(0,x.__)("Get Started","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Primary button URL","b-blocks"),type:"url",value:c.url||"",onChange:e=>n("button",e,"url"),placeholder:"https://…",__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open primary in new tab","b-blocks"),checked:!!c.newTab,onChange:e=>n("button",!!e,"newTab")})]})]})]})},ET=({attributes:e,updateObj:t,device:n="desktop"})=>{const[o,i]=(0,m.useState)("normal"),{eyebrow:a={},heading:s={},subHeading:r={},button:c={}}=e,d=c[o]||{},u=(e,o,i,a,s)=>(0,l.jsx)(k,{className:s,label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[e," ",(0,l.jsx)(_,{})]}),units:CT,values:a?.[n],resetValues:jT,onChange:e=>t(o,e,i,n)})
443 +;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Eyebrow","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:a.color||"#ffffff",onChange:e=>t("eyebrow",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:a.bg,onChange:e=>t("eyebrow",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typo,onChange:e=>t("eyebrow",e,"typo")}),u((0,x.__)("Padding","b-blocks"),"eyebrow","padding",a.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"eyebrow","margin",a.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>t("eyebrow",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"eyebrow","borderRadius",a.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:s.color||"#ffffff",onChange:e=>t("heading",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:s.bg,onChange:e=>t("heading",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typo,onChange:e=>t("heading",e,"typo")}),u((0,x.__)("Padding","b-blocks"),"heading","padding",s.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"heading","margin",s.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("heading",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"heading","borderRadius",s.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sub-headline","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:r.color||"rgba(255,255,255,0.85)",onChange:e=>t("subHeading",e,"color"),defaultColor:"rgba(255,255,255,0.85)"}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:r.bg,onChange:e=>t("subHeading",e,"bg")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.typo,onChange:e=>t("subHeading",e,"typo")}),u((0,x.__)("Padding","b-blocks"),"subHeading","padding",r.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"subHeading","margin",r.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>t("subHeading",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"subHeading","borderRadius",r.borderRadius)]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:c.typo,onChange:e=>t("button",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:d.bg,onChange:e=>t("button",e,o,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:d.color,onChange:e=>t("button",e,o,"color"),defaultColor:"#1a1a2e"}),u((0,x.__)("Padding","b-blocks"),"button","padding",c.padding,"mt10"),u((0,x.__)("Margin","b-blocks"),"button","margin",c.margin),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:d.border,onChange:e=>t("button",e||{},o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),u((0,x.__)("Border Radius","b-blocks"),"button","radius",c.radius),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (s)","b-blocks"),value:c.transition??.2,onChange:e=>t("button",e,"transition"),min:0,max:5,step:.01,__nextHasNoMarginBottom:!0})]})]})},AT=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:"b-blocks"}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:$T,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(PT,{...e}),"style"===t.name&&(0,l.jsx)(ET,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})]})},BT=["left","center","right"],IT=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop"}=e,{layout:a={},eyebrow:s={},heading:r={},subHeading:c={},button:d={}}=t,u="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,p=fe(t,n),{contentAlign:g={}}=a,m=g&&"object"==typeof g?g[i]||"":"desktop"===i&&g||"",b=["h1","h2","h3"].includes(r.tag)?r.tag:"h1",f=(0,h.useBlockProps)({id:`block-${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(AT,{...e,updateObj:p,isPremium:u}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:m,onChange:e=>(e=>{const t=g&&"object"==typeof g?g:{};n({layout:{...a,contentAlign:{...t,[i]:e}}})})(BT.includes(e)?e:"")})}),(0,l.jsxs)("div",{...f,children:[(0,l.jsx)(_T,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"b-blocks-hero-section",children:(0,l.jsxs)("div",{className:"b-blocks-hero-section-container",children:[!!s.show&&(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-hero-section-eyebrow",value:s.text,onChange:e=>p("eyebrow",e,"text"),placeholder:(0,x.__)("Eyebrow label","b-blocks"),allowedFormats:["core/bold","core/italic"],inlineToolbar:!0}),(0,l.jsx)(h.RichText,{tagName:b,className:"b-blocks-hero-section-heading",value:r.text,onChange:e=>p("heading",e,"text"),placeholder:(0,x.__)("Add a powerful headline…","b-blocks"),allowedFormats:["core/bold","core/italic"],inlineToolbar:!0}),!!c.show&&(0,l.jsx)(h.RichText,{tagName:"p",className:"b-blocks-hero-section-subheading",value:c.text,onChange:e=>p("subHeading",e,"text"),placeholder:(0,x.__)("Add supporting copy…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"],inlineToolbar:!0}),!!d.show&&(0,l.jsx)("div",{className:"b-blocks-hero-section-actions",children:(0,l.jsx)(h.RichText,{tagName:"a",className:"b-blocks-hero-section-cta b-blocks-hero-section-cta--primary",value:d.text,onChange:e=>p("button",e,"text"),placeholder:(0,x.__)("Primary CTA","b-blocks"),allowedFormats:[],withoutInteractiveFormatting:!0,onClick:e=>e.preventDefault()})})]})})})]})]})}));Pl(xT.name)&&(0,p.registerBlockType)(xT,{icon:vl,edit:IT})
444 +;const OT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/html","version":"1.0.0","title":"HTML","category":"bBlocks","description":"Use the HTML block to add and preview HTML code in your posts or pages, enhancing your website\'s content and functionality.","keywords":["html","custom code","js","css"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"htmlCode":{"type":"string","default":""},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),RT=function(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 16 16",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M4.854 4.146a.5.5 0 010 .708L1.707 8l3.147 3.146a.5.5 0 01-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 01.708 0zm6.292 0a.5.5 0 000 .708L14.293 8l-3.147 3.146a.5.5 0 00.708.708l3.5-3.5a.5.5 0 000-.708l-3.5-3.5a.5.5 0 00-.708 0zm-.999-3.124a.5.5 0 01.33.625l-4 13a.5.5 0 01-.955-.294l4-13a.5.5 0 01.625-.33z",clipRule:"evenodd"})})},zT=["script","object","embed","link","meta","base"],DT=["href","src","action","formaction","data","poster","background"],FT=/^(?:javascript:|vbscript:|data:text\/html)/i,HT=({attributes:e,id:t,isBackend:n=!1})=>{const{advanced:o}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${Cs(t,o,n)}\n\t`}})},WT=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}];var UT=s(470);s(47),s(3158),s(1289),s(9072),s(9289);const GT=e=>{const{value:t,onChange:n,height:o="300px",width:i="100%"}=e,a=Math.floor(99999999*Math.random()),s=(0,m.useRef)(null),r=(0,m.useCallback)((e=>{clearTimeout(s.current),s.current=setTimeout((()=>{n(e)}),600)}),[n]);return(0,l.jsx)("div",{children:(0,l.jsx)(UT.Ay,{mode:"html",theme:"monokai",name:`advEditor-${a}`,onChange:r,fontSize:12,lineHeight:19,height:o,width:i,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,value:t,setOptions:{useWorker:!1,enableBasicAutocompletion:!0,enableLiveAutocompletion:!1,enableSnippets:!0,enableMobileMenu:!0,showLineNumbers:!0,tabSize:2}})})},VT=e=>{const{attributes:t,setAttributes:n}=e,{htmlCode:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("HTML Code","b-blocks"),initialOpen:!0,children:(0,l.jsx)(GT,{value:o,onChange:e=>n({htmlCode:e})})})]})},qT=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Ra,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:WT,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(VT,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e})})})]})})]})})},YT=/^(?:text|application)\/(?:x-)?(?:java|ecma)script$/i;Pl(OT.name)&&(0,p.registerBlockType)(OT,{icon:kr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{htmlCode:i}=t,a=Boolean(window?.bBlocksGlobal?.canUnfilteredHtml),s=(0,m.useMemo)((()=>a?i:(e=>{if("string"!=typeof e||""===e.trim())return"";const t=(new DOMParser).parseFromString(e,"text/html");return Array.from(t.body.querySelectorAll("*")).forEach((e=>{zT.includes(e.localName.toLowerCase())?e.remove():Array.from(e.attributes).forEach((({name:t,value:n})=>{const o=t.toLowerCase();(o.startsWith("on")||"srcdoc"===o||DT.includes(o)&&FT.test((e=>[...String(e||"")].filter((e=>e.charCodeAt(0)>32)).join(""))(n)))&&e.removeAttribute(t)}))})),t.body.innerHTML})(i)),[i,a]),r=((e,t=300,n=!0)=>{const o=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const i=o?.current;if(!n||!e||!i)return;const a=[],s=setTimeout((()=>{i?.querySelectorAll("script")?.forEach((e=>{if(!(e=>{const t=(e||"").trim();return!t||"module"===t.toLowerCase()||YT.test(t)})(e.getAttribute("type")))return;const t=document?.createElement("script");Array.from(e?.attributes)?.forEach((({name:e,value:n})=>t?.setAttribute(e,n))),e.src||(t.textContent=e?.textContent),e?.replaceWith(t),a.push(t)}))}),t);return()=>{clearTimeout(s),a?.forEach((e=>e?.remove()))}}),[e,t,n]),o})(s,1e3,a);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qT,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),id:`html-block-${o}`,children:[(0,l.jsx)(HT,{attributes:t,id:`html-block-${o}`,isBackend:!0}),i?(0,l.jsx)("div",{ref:r,dangerouslySetInnerHTML:{__html:s}}):(0,l.jsx)("div",{children:(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"html-placeholder",children:(0,l.jsx)(RT,{})})})})]})]})}})
445 +;const KT=JSON.parse('{"apiVersion":3,"name":"b-blocks/icon-box","title":"Icon Box","description":"Display awesome icon in a box.","category":"bBlocks","keywords":["icon","box","library","icon library"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"wrapper":{"type":"object","default":{"width":"","height":"","alignment":{"desktop":"flex-start","tablet":"","mobile":""},"wrapperLink":{"url":"","linkText":"","openInNewTab":false,"nofollow":false}}},"icon":{"type":"object","default":{"svg":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' id=\'info-circle-fill\'><path d=\'M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2\'/></svg>","color":"#fff","size":"30px","shadow":{"type":"text"},"hover":{"color":"","shadow":{}}}},"animation":{"type":"object","default":{"type":"none","duration":1000,"delay":0,"iteration":"infinite","iterationCount":1,"hover":{"type":"none","duration":1000,"delay":0,"iteration":"initial","iterationCount":1}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"15px","right":"15px","bottom":"15px","left":"15px"}}},"background":{"normal":{"type":"color","color":"#111"}},"borderShadow":{"normal":{"radius":"50%"}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),QT=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Bounce","b-blocks"),value:"nBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"nPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"nSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"nShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"nWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"nPing"},{label:(0,x.__)("Float","b-blocks"),value:"nFloat"}],ZT=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Bounce","b-blocks"),value:"hBounce"},{label:(0,x.__)("Pulse","b-blocks"),value:"hPulse"},{label:(0,x.__)("Spin","b-blocks"),value:"hSpin"},{label:(0,x.__)("Shake","b-blocks"),value:"hShake"},{label:(0,x.__)("Wiggle","b-blocks"),value:"hWiggle"},{label:(0,x.__)("Ping","b-blocks"),value:"hPing"},{label:(0,x.__)("Float","b-blocks"),value:"hFloat"}],XT=[{label:(0,x.__)("None","b-blocks"),value:""},{label:(0,x.__)("Infinite","b-blocks"),value:"infinite"},{label:(0,x.__)("Number","b-blocks"),value:"number"}],JT=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),eN=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),tN=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),nN=e=>{const{attributes:t,setAttributes:n,updateObj:o,device:i}=e,{icon:a,wrapper:s,animation:r}=t,{svg:c,size:d,color:u,shadow:p,hover:h}=a,{width:g,height:m,alignment:b={}}=s;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Zn,{value:c,onChange:e=>n({icon:{...a,svg:e}})}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"left",value:d,onChange:e=>n({icon:{...a,size:e}})})]}),(0,l.jsxs)(y.Flex,{className:"mt10",gap:5,children:[(0,l.jsxs)(y.Flex,{gap:2,className:"flex1",children:[(0,l.jsx)(v,{className:"mb0",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:b?.[i],onChange:e=>o("wrapper",e,"alignment",i),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:JT}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:eN}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:tN})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt20",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color","b-blocks"),value:u,onChange:e=>n({icon:{...a,color:e}})}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:p,onChange:e=>n({icon:{...a,shadow:e}}),type:"text"})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color","b-blocks"),value:h?.color,onChange:e=>o("icon",e,"hover","color")}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:h?.shadow,onChange:e=>o("icon",e,"hover","shadow"),type:"text"})]})]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Wrapper / Box","b-blocks"),initialOpen:!1,children:[(0,l.jsx)("small",{children:(0,x.__)(`Minimum width and height must be greater then ${d}`,"b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt15",label:(0,x.__)("Width","b-blocks"),labelPosition:"left",value:g,onChange:e=>n({wrapper:{...s,width:e}})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height","b-blocks"),labelPosition:"left",value:m,onChange:e=>n({wrapper:{...s,height:e}})})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation","b-blocks"),options:QT,value:r.type,onChange:e=>o("animation",e,"type")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:XT,value:r.iteration,onChange:e=>o("animation",e,"iteration")}),"number"==r.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:r.iterationCount,onChange:e=>o("animation",e,"iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),
446 +min:0,max:2e4,step:50,value:r.duration,onChange:e=>o("animation",e,"duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:r.delay,onChange:e=>o("animation",e,"delay")})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation","b-blocks"),options:ZT,value:r.hover.type,onChange:e=>o("animation",e,"hover","type")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Animation Iteration","b-blocks"),options:XT,value:r.hover.iteration,onChange:e=>o("animation",e,"hover","iteration")}),"number"===r.hover.iteration&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Iteration Count","b-blocks"),min:0,max:10,step:1,value:r.hover.iterationCount,onChange:e=>o("animation",e,"hover","iterationCount")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),min:0,max:2e4,step:50,value:r.hover.duration,onChange:e=>o("animation",e,"hover","duration")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Delay (ms)","b-blocks"),min:0,max:2e4,step:50,value:r.hover.delay,onChange:e=>o("animation",e,"hover","delay")})]})]})})})]})},oN=e=>{const{attributes:t,setAttributes:n,device:o}=e,{advanced:i}=t,a=fe(t,n);return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(nN,{attributes:t,setAttributes:n,updateObj:a,device:o})]}),"style"===e.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),enabled:{dimension:["padding","margin"],background:["normal","hover"],borderShadow:["normal","hover","border","shadow"],visibility:["zIndex"]}})]})})})},iN="bBlocksIconBox",aN=({attributes:e,id:o,isBackend:i=!1})=>{const{wrapper:a,icon:s,animation:r,advanced:c}=e,{size:d,color:u,shadow:p}=s,{width:h,height:g}=a,{duration:m,delay:b,type:f,iteration:x,iterationCount:y,hover:v}=r,k=`#${o} .${iN}`,w=`${k} svg`,_=(e,t,n,o,i)=>`${t} ${n}ms ${t==e+"Spin"?"linear":t===e+"Ping"?"cubic-bezier(0, 0, 0.2, 1)":"ease-in-out"} ${o}ms ${i};`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${k}{\n\t\t\t\twidth: ${h&&0!==parseInt(h)?h:"auto"};\n\t\t\t\theight: ${g&&0!==parseInt(g)?g:"auto"};\n\t\t\t}\n\t\t\t#${o}{\n\t\t\t\t${ns("justify-content",a?.alignment?.desktop)}\n\t\t\t}\n\t\t\t${w}{\n\t\t\t\tfill: ${u};\n\t\t\t\theight: ${d};\n\t\t\t\twidth: ${d};\n\t\t\t\tfilter: drop-shadow(${ds(p,"text")});\n\t\t\t}\n\n\t\t\t${k}:hover svg {\n\t\t\t\t${ns("fill",s?.hover?.color)}\n\t\t\t\t${ns("filter",jt(s?.hover?.shadow)?`drop-shadow(${ds(s?.hover?.shadow,"text")})`:"")}\n\t\t\t}\n\n\t\t\t${k}.${f} {\n\t\t\t\tanimation: ${_("n",f,m,b,"number"===x?y:x)}\n\t\t\t}\n\t\t\t\t\n\t\t\t${k}.${v?.type}:hover{\n\t\t\t\tanimation: ${_("h",v?.type,v?.duration,v?.delay,"number"===v?.iteration?v?.iterationCount:v?.iteration)}\n\t\t\t}\n\n\t\t\t${t}{\n\t\t\t\t#${o}{\n\t\t\t\t\t${ns("justify-content",a?.alignment?.tablet)}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t#${o}{\n\t\t\t\t\t${ns("justify-content",a?.alignment?.mobile)}\n\t\t\t\t}\n\t\t\t}\n\t\t\t${Cs(o,c,i)}\n\n`.replace(/\s+/g," ")}})},sN=({attributes:e})=>{const{icon:t,animation:n}=e,{type:o,hover:i={}}=n,a=(0,m.useMemo)((()=>(e=>Nt.sanitize(e))(t?.svg)),[t?.svg]);return(0,l.jsx)("div",{className:`${iN} b-blocks-icon-box-animation ${o} ${i?.type}`,dangerouslySetInnerHTML:{__html:a}})},rN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(oN,{attributes:t,setAttributes:n,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(aN,{attributes:t,id:a,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(sN,{attributes:t})})]})]})}));Pl(KT.name)&&(0,p.registerBlockType)(KT,{icon:wr,edit:rN})
447 +;const lN=JSON.parse('{"apiVersion":3,"name":"b-blocks/image-comparison","title":"Image Comparison","description":"Compare between two images.","category":"bBlocks","keywords":["image comparison","image compare","image filter","visual comparison","before and after image","beaf","before after","before after image"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"alignment":{"type":"string","default":"center"},"theme":{"type":"string","default":"default"},"width":{"type":"string","default":"100%"},"border":{"type":"object","default":{}},"beforeImg":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"afterImg":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"orientation":{"type":"string","default":"horizontal"},"isSwap":{"type":"boolean","default":false},"isLabel":{"type":"boolean","default":true},"label":{"type":"object","default":{"hAlign":"bottom","vAlign":"center","isShowHover":false}},"beforeLabel":{"type":"string","selector":".beforeLabel","default":""},"afterLabel":{"type":"string","selector":".afterLabel","default":""},"labelTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"labelColors":{"type":"object","default":{"color":"#fff","bg":"#00000080"}},"labelPadding":{"type":"object","default":{"vertical":"10px","horizontal":"15px"}},"isCap":{"type":"boolean","default":true},"cap":{"type":"string","selector":".caption","default":""},"capAlign":{"type":"string","default":"center"},"capTypo":{"type":"object","default":{"fontSize":{"desktop":"14px"}}},"capColors":{"type":"object","default":{"color":"#333","bg":"#f4f4f4"}},"capPadding":{"type":"object","default":{"vertical":"10px","horizontal":"15px"}},"dragg":{"type":"object","default":{"handleType":"default","shapeType":"default"}},"styles":{"type":"object","default":{"container":{"height":{"desktop":"","tablet":"","mobile":""}},"dragg":{"line":{"bg":{"color":"#fff"},"size":2},"icon":{"color":""},"handler":{"color":""}}}},"options":{"type":"object","default":{"defaultOffset":0.5,"moveMouseOver":false,"isMoveClick":false,"autoSlide":{"isAutoSlide":false,"speed":5,"isHoverStop":true}}},"sliderOptions":{"type":"object","default":{"arrowType":"style1","height":{"desktop":"400px","tablet":"400px","mobile":"400px"},"autoplay":true,"dots":false,"speed":500,"autoplaySpeed":2500,"pauseOnHover":true,"infinite":true,"arrows":true,"slidesView":{"desktop":1,"tablet":1,"mobile":1}}},"sliderStyle":{"type":"object","default":{"pagination":{"active":"#146EF5"},"navigation":{"icon":{"normal":{"color":"#000","size":"22px"},"hover":{"color":"","size":"22px"}},"container":{"height":"","width":"","normal":{"bg":{"color":"#fff"},"border":{},"radius":{"left":"30px","right":"30px","top":"30px","bottom":"30px"}},"hover":{"bg":{"color":"#fff"},"border":{},"radius":{}}}}}},"slider":{"type":"array","default":[{"beforeImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},"beforeLabel":"Before Label"},"afterImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},"afterLabel":"After Label"},"caption":"Before After Image Caption"},{"beforeImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},"beforeLabel":"Before Label"},"afterImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},"afterLabel":"After Label"},"caption":"Before After Image Caption"},{"beforeImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},"beforeLabel":"Before Label"},"afterImg":{"img":{"url":"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},"afterLabel":"After Label"},"caption":"Before After Image Caption"}]}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","jquery"]}'),cN="b-blocks-ImageCompare",dN=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),uN=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),pN=(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),hN=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 24 24",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M15 19L15 5 7 12z"})}),gN=e=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 24 24",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M9 19L17 12 9 5z"})}),mN=e=>({defaulthorizontal:`inset(0 0 0 ${e}%)`,defaultvertical:`inset(${e}% 0 0 0)`,zigzaghorizontal:`polygon(0% 0%, ${e}% 0%, ${e-6}% 9%, ${e}% 18%, ${e-6}% 27%, ${e}% 36%, ${e-6}% 45%, ${e}% 54%, ${e-6}% 63%, ${e}% 72%, ${e-6}% 81%, ${e}% 90%, ${e-6}% 100%, 0% 100%)`,zigzagvertical:`polygon(0% 0%,0% ${e}%,9% ${e+6}% ,18% ${e}%,27% ${e+6}%,36% ${e}%,45% ${e+6}%, 54% ${e}%,63% ${e+6}%,72% ${e}%, 81% ${e+6}%,90% ${e}%, 100% ${e+6}%,100% 0% )`,
448 448 wavehorizontal:`polygon(\n ${e+7.778-8.8}% 0%,\n ${e+7.5-8.8}% 2.383%,\n ${e+7.5-8.8}% 2.383%,\n ${e+7.407-8.8}% 3.172%,\n ${e+7.292-8.8}% 4.088%,\n ${e+7.15-8.8}% 5.118%,\n ${e+6.973-8.8}% 6.247%,\n ${e+6.757-8.8}% 7.46%,\n ${e+6.496-8.8}% 8.745%,\n ${e+6.184-8.8}% 10.085%,\n ${e+5.816-8.8}% 11.467%,\n ${e+5.387-8.8}% 12.877%,\n ${e+4.889-8.8}% 14.3%,\n ${e+4.889-8.8}% 14.3%,\n ${e+4.324-8.8}% 15.725%,\n ${e+3.718-8.8}% 17.148%,\n ${e+3.102-8.8}% 18.571%,\n ${e+2.508-8.8}% 19.994%,\n ${e+1.968-8.8}% 21.417%,\n ${e+1.514-8.8}% 22.839%,\n ${e+1.177-8.8}% 24.262%,\n ${e+.989-8.8}% 25.685%,\n ${e+.983-8.8}% 27.109%,\n ${e+1.189-8.8}% 28.533%,\n ${e+1.189-8.8}% 28.533%,\n ${e+1.624-8.8}% 29.959%,\n ${e+2.256-8.8}% 31.385%,\n ${e+3.039-8.8}% 32.813%,\n ${e+3.925-8.8}% 34.241%,\n ${e+4.867-8.8}% 35.671%,\n ${e+5.816-8.8}% 37.101%,\n ${e+6.726-8.8}% 38.533%,\n ${e+7.549-8.8}% 39.965%,\n ${e+8.238-8.8}% 41.399%,\n ${e+8.744-8.8}% 42.833%,\n ${e+8.744-8.8}% 42.833%,\n ${e+9.034-8.8}% 44.268%,\n ${e+9.119-8.8}% 45.702%,\n ${e+9.024-8.8}% 47.135%,\n ${e+8.775-8.8}% 48.567%,\n ${e+8.396-8.8}% 50%,\n ${e+7.912-8.8}% 51.433%,\n ${e+7.347-8.8}% 52.865%,\n ${e+6.728-8.8}% 54.298%,\n ${e+6.078-8.8}% 55.732%,\n ${e+5.422-8.8}% 57.167%,\n ${e+5.422-8.8}% 57.167%,\n ${e+4.785-8.8}% 58.601%,\n ${e+4.186-8.8}% 60.035%,\n ${e+3.645-8.8}% 61.467%,\n ${e+3.181-8.8}% 62.899%,\n ${e+2.813-8.8}% 64.329%,\n ${e+2.559-8.8}% 65.759%,\n ${e+2.44-8.8}% 67.187%,\n ${e+2.474-8.8}% 68.615%,\n ${e+2.68-8.8}% 70.041%,\n ${e+3.078-8.8}% 71.467%,\n ${e+3.078-8.8}% 71.467%,\n ${e+3.676-8.8}% 72.891%,\n ${e+4.443-8.8}% 74.315%,\n ${e+5.338-8.8}% 75.738%,\n ${e+6.317-8.8}% 77.161%,\n ${e+7.34-8.8}% 78.583%,\n ${e+8.365-8.8}% 80.006%,\n ${e+9.35-8.8}% 81.429%,\n ${e+10.252-8.8}% 82.852%,\n ${e+11.031-8.8}% 84.275%,\n ${e+11.644-8.8}% 85.7%,\n ${e+11.644-8.8}% 85.7%,\n ${e+12.062-8.8}% 87.123%,\n ${e+12.298-8.8}% 88.533%,\n ${e+12.378-8.8}% 89.915%,\n ${e+12.328-8.8}% 91.255%,\n ${e+12.175-8.8}% 92.54%,\n ${e+11.944-8.8}% 93.753%,\n ${e+11.66-8.8}% 94.882%,\n ${e+11.35-8.8}% 95.912%,\n ${e+11.04-8.8}% 96.828%,\n ${e+10.756-8.8}% 97.617%,\n ${e+9.889-8.8}% 100%,\n 0% 100%,0% 97.617%,0% 97.617%,0% 96.828%,0% 95.912%,0% 94.882%,0% 93.753%,0% 92.54%,0% 91.255%,0% 89.915%,0% 88.533%,0% 87.123%,0% 85.7%,0% 85.7%,0% 84.275%,0% 82.852%,0% 81.429%,0% 80.006%,0% 78.583%,0% 77.161%,0% 75.738%,0% 74.315%,0% 72.891%,0% 71.467%,0% 71.467%,0% 70.041%,0% 68.615%,0% 67.187%,0% 65.759%,0% 64.329%,0% 62.899%,0% 61.467%,0% 60.035%,0% 58.601%,0% 57.167%,0% 57.167%,0% 55.732%,0% 54.298%,0% 52.865%,0% 51.433%,0% 50%,0% 48.567%,0% 47.135%,0% 45.702%,0% 44.268%,0% 42.833%,0% 42.833%,0% 41.399%,0% 39.965%,0% 38.533%,0% 37.101%,0% 35.671%,0% 34.241%,0% 32.813%,0% 31.385%,0% 29.959%,0% 28.533%,0% 28.533%,0% 27.109%,0% 25.685%,0% 24.262%,0% 22.839%,0% 21.417%,0% 19.994%,0% 18.571%,0% 17.148%,0% 15.725%,0% 14.3%,0% 14.3%,0% 12.877%,0% 11.467%,0% 10.085%,0% 8.745%,0% 7.46%,0% 6.247%,0% 5.118%,0% 4.088%,0% 3.172%,0% 2.383%,0% 0%,57.778% 0% )`,
449 -wavevertical:`polygon(\n 0% ${42.167+e-41}%,\n 2.389% ${42.45+e-41}%,\n 2.389% ${42.45+e-41}%,\n 3.175% ${42.54+e-41}%,\n 4.09% ${42.653+e-41}%,\n 5.119% ${42.795+e-41}%,\n 6.248% ${42.972+e-41}%,\n 7.463% ${43.188+e-41}%,\n 8.748% ${43.448+e-41}%,\n 10.09% ${43.76+e-41}%,\n 11.474% ${44.127+e-41}%,\n 12.886% ${44.555+e-41}%,\n 14.311% ${45.05+e-41}%,\n 14.311% ${45.05+e-41}%,\n 15.74% ${45.616+e-41}%,\n 17.168% ${46.224+e-41}%,\n 18.594% ${46.84+e-41}%,\n 20.019% ${47.435+e-41}%,\n 21.444% ${47.975+e-41}%,\n 22.87% ${48.429+e-41}%,\n 24.295% ${48.766+e-41}%,\n 25.721% ${48.952+e-41}%,\n 27.149% ${48.958+e-41}%,\n 28.578% ${48.75+e-41}%,\n 28.578% ${48.75+e-41}%,\n 30.005% ${48.31+e-41}%,\n 31.433% ${47.673+e-41}%,\n 32.863% ${46.886+e-41}%,\n 34.292% ${45.997+e-41}%,\n 35.722% ${45.052+e-41}%,\n 37.152% ${44.1+e-41}%,\n 38.582% ${43.188+e-41}%,\n 40.011% ${42.363+e-41}%,\n 41.439% ${41.674+e-41}%,\n 42.867% ${41.167+e-41}%,\n 42.867% ${41.167+e-41}%,\n 44.296% ${40.878+e-41}%,\n 45.723% ${40.793+e-41}%,\n 47.149% ${40.889+e-41}%,\n 48.575% ${41.14+e-41}%,\n 50% ${41.521+e-41}%,\n 51.425% ${42.007+e-41}%,\n 52.851% ${42.573+e-41}%,\n 54.277% ${43.193+e-41}%,\n 55.704% ${43.844+e-41}%,\n 57.133% ${44.5+e-41}%,\n 57.133% ${44.5+e-41}%,\n 58.561% ${45.137+e-41}%,\n 59.989% ${45.735+e-41}%,\n 61.418% ${46.275+e-41}%,\n 62.848% ${46.737+e-41}%,\n 64.278% ${47.104+e-41}%,\n 65.708% ${47.356+e-41}%,\n 67.137% ${47.474+e-41}%,\n 68.567% ${47.439+e-41}%,\n 69.995% ${47.232+e-41}%,\n 71.422% ${46.833+e-41}%,\n 71.422% ${46.833+e-41}%,\n 72.851% ${46.235+e-41}%,\n 74.279% ${45.469+e-41}%,\n 75.705% ${44.576+e-41}%,\n 77.13% ${43.598+e-41}%,\n 78.556% ${42.577+e-41}%,\n 79.981% ${41.555+e-41}%,\n 81.406% ${40.572+e-41}%,\n 82.832% ${39.672+e-41}%,\n 84.26% ${38.895+e-41}%,\n 85.689% ${38.283+e-41}%,\n 85.689% ${38.283+e-41}%,\n 87.114% ${37.863+e-41}%,\n 88.526% ${37.625+e-41}%,\n 89.91% ${37.542+e-41}%,\n 91.252% ${37.589+e-41}%,\n 92.538% ${37.74+e-41}%,\n 93.752% ${37.968+e-41}%,\n 94.881% ${38.247+e-41}%,\n 95.91% ${38.552+e-41}%,\n 96.825% ${38.856+e-41}%,\n 97.611% ${39.133+e-41}%,\n 100% ${40+e-41}%,\n 100% 100.167%,\n 97.611% 100.167%,\n 97.611% 100.167%,\n 96.825% 100.167%,\n 95.91% 100.167%,\n 94.881% 100.167%,\n 93.752% 100.167%,\n 92.538% 100.167%,\n 91.252% 100.167%,\n 89.91% 100.167%,\n 88.526% 100.167%,\n 87.114% 100.167%,\n 85.689% 100.167%,\n 85.689% 100.167%,\n 84.26% 100.167%,\n 82.832% 100.167%,\n 81.406% 100.167%,\n 79.981% 100.167%,\n 78.556% 100.167%,\n 77.13% 100.167%,\n 75.705% 100.167%,\n 74.279% 100.167%,\n 72.851% 100.167%,\n 71.422% 100.167%,\n 71.422% 100.167%,\n 69.995% 100.167%,\n 68.567% 100.167%,\n 67.137% 100.167%,\n 65.708% 100.167%,\n 64.278% 100.167%,\n 62.848% 100.167%,\n 61.418% 100.167%,\n 59.989% 100.167%,\n 58.561% 100.167%,\n 57.133% 100.167%,\n 57.133% 100.167%,\n 55.704% 100.167%,\n 54.277% 100.167%,\n 52.851% 100.167%,\n 51.425% 100.167%,\n 50% 100.167%,\n 48.575% 100.167%,\n 47.149% 100.167%,\n 45.723% 100.167%,\n 44.296% 100.167%,\n 42.867% 100.167%,\n 42.867% 100.167%,\n 41.439% 100.167%,\n 40.011% 100.167%,\n 38.582% 100.167%,\n 37.152% 100.167%,\n 35.722% 100.167%,\n 34.292% 100.167%,\n 32.863% 100.167%,\n 31.433% 100.167%,\n 30.005% 100.167%,\n 28.578% 100.167%,\n 28.578% 100.167%,\n 27.149% 100.167%,\n 25.721% 100.167%,\n 24.295% 100.167%,\n 22.87% 100.167%,\n 21.444% 100.167%,\n 20.019% 100.167%,\n 18.594% 100.167%,\n 17.168% 100.167%,\n 15.74% 100.167%,\n 14.311% 100.167%,\n 14.311% 100.167%,\n 12.886% 100.167%,\n 11.474% 100.167%,\n 10.09% 100.167%,\n 8.748% 100.167%,\n 7.463% 100.167%,\n 6.248% 100.167%,\n 5.119% 100.167%,\n 4.09% 100.167%,\n 3.175% 100.167%,\n 2.389% 100.167%,\n 0% 100.167%\n )`}),mN=({beforeLabelEl:e,height:t,afterLabelEl:n,beforeImg:o,afterImg:i,orientation:a,options:s,dragg:r,label:c,captionEl:d,...u})=>{const{defaultOffset:p,isMoveClick:h,autoSlide:g,moveMouseOver:b}=s,{isAutoSlide:f,isHoverStop:x,speed:y}=g,[v,k]=(0,m.useState)(100*p),[w,_]=(0,m.useState)(!1),C=(0,m.useRef)(null),{handleClick:j}=((e,t,n,o,i,a=!1,s,r=50,l=!1)=>{const[c,d]=(0,m.useState)(!0),u=(0,m.useRef)(),p=(0,m.useRef)(1),h=o=>{if(!e||!t.current)return;const a=t.current.getBoundingClientRect(),s="touches"in o?o.touches[0]:o,r=("horizontal"===i?s.clientX-a.left:s.clientY-a.top)/("horizontal"===i?a.width:a.height)*100;n(Math.min(Math.max(r,0),100))};return(0,m.useEffect)((()=>{if(!e)return;const t=()=>o(!1),n=e=>h(e),i=e=>h(e);return window.addEventListener("mousemove",n),window.addEventListener("mouseup",t),window.addEventListener("touchmove",i),window.addEventListener("touchend",t),()=>{window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",t),window.removeEventListener("touchmove",i),window.removeEventListener("touchend",t)}}),[e]),(0,m.useEffect)((()=>{if(!a||!c||e)return;let t;const o=e=>{t||(t=e);const i=(e-t)/1e3;t=e,n((e=>{let t=e+p.current*(10*r)*i;return t>=100&&(p.current=-1,t=100),t<=0&&(p.current=1,t=0),t})),u.current=requestAnimationFrame(o)};return u.current=requestAnimationFrame(o),()=>cancelAnimationFrame(u.current)}),[a,c,e,s,r]),(0,m.useEffect)((()=>{if(!t.current)return;const e=()=>d(!s),n=()=>d(!0);return t?.current?.addEventListener("mouseenter",e),t?.current?.addEventListener("mouseleave",n),()=>{t?.current?.removeEventListener("mouseenter",e),t?.current?.removeEventListener("mouseleave",n)}}),[t.current,s]),{handleClick:o=>{if(e||!t.current||!l)return;const a=t.current.getBoundingClientRect(),s=("horizontal"===i?o.clientX-a.left:o.clientY-a.top)/("horizontal"===i?a.width:a.height)*100;n(Math.min(Math.max(s,0),100))}}})(w,C,k,_,a,f,x,y,h),$=()=>{const e=C.current;if(!e)return;const n=Array.from(e.querySelectorAll("img"));if(!n.length)return;const o=parseInt(t,10);let i;if(!isNaN(o)&&o>0)i=o;else{const e=n.map((e=>e.getBoundingClientRect().height)).filter((e=>e>0));if(!e.length)return;i=Math.max(...e)}e.style.height=`${i}px`,n.forEach((e=>{e.style.height=`${i}px`}))};return(0,m.useEffect)((()=>{const e=C.current;if(!e)return;const t=new ResizeObserver($);return t.observe(e),()=>t.disconnect()}),[]),(0,l.jsxs)("div",{...u,className:lN,children:[(0,l.jsxs)("div",{ref:C,className:"b-blocks-comparison-wrapper "+(c.isShowHover?"b-blocks-label-hover":""),onMouseDown:()=>_(!0),onTouchStart:()=>_(!0),...b?{onMouseMove:()=>_(!0),onMouseLeave:()=>_(!1)}:{},onClick:j,children:[(0,l.jsxs)("div",{className:"b-blocks-image-wrapper",children:[(0,l.jsx)("img",{src:o?.url,alt:o?.alt||o?.title,onLoad:$}),e]}),(0,l.jsxs)("div",{className:"b-blocks-image-wrapper",style:{clipPath:gN(v)[r.shapeType+a]},children:[(0,l.jsx)("img",{src:i?.url,alt:i?.alt||i?.title,onLoad:$}),n]}),(0,l.jsx)("div",{className:`b-blocks-comparison-slider-handle b-blocks-slider-${a} ${r.handleType} ${"default"!==r.shapeType?"circle-outline-line-none":""} `,style:{left:"horizontal"===a?`${v}%`:"",
450 -top:"vertical"===a?`${v}%`:""},children:"default"===r.handleType?(0,l.jsx)("div",{className:"b-blocks-default-icon"},r.handleType):(0,l.jsx)("div",{className:`b-blocks-${r.handleType}-icon`,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(pN,{}),(0,l.jsx)(hN,{})]})},r.handleType)})]}),d]})};var bN=s(4589);const fN={style1:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5303 18.5303C14.2374 18.8232 13.7626 18.8232 13.4697 18.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697L13.4697 5.46967C13.7626 5.17678 14.2374 5.17678 14.5303 5.46967C14.8232 5.76256 14.8232 6.23744 14.5303 6.53033L9.06066 12L14.5303 17.4697C14.8232 17.7626 14.8232 18.2374 14.5303 18.5303Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.46967 5.46967C9.76256 5.17678 10.2374 5.17678 10.5303 5.46967L16.5303 11.4697C16.8232 11.7626 16.8232 12.2374 16.5303 12.5303L10.5303 18.5303C10.2374 18.8232 9.76256 18.8232 9.46967 18.5303C9.17678 18.2374 9.17678 17.7626 9.46967 17.4697L14.9393 12L9.46967 6.53033C9.17678 6.23744 9.17678 5.76256 9.46967 5.46967Z"})})},style2:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4939 20.5644C11.1821 20.8372 10.7083 20.8056 10.4356 20.4939L3.43557 12.4939C3.18814 12.2111 3.18814 11.7889 3.43557 11.5061L10.4356 3.50613C10.7083 3.1944 11.1822 3.16281 11.4939 3.43557C11.8056 3.70834 11.8372 4.18216 11.5644 4.49388L5.65283 11.25L20 11.25C20.4142 11.25 20.75 11.5858 20.75 12C20.75 12.4142 20.4142 12.75 20 12.75L5.65283 12.75L11.5644 19.5061C11.8372 19.8179 11.8056 20.2917 11.4939 20.5644Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5061 3.43557C12.8178 3.16281 13.2917 3.19439 13.5644 3.50612L20.5644 11.5061C20.8119 11.7889 20.8119 12.2111 20.5644 12.4939L13.5644 20.4939C13.2917 20.8056 12.8178 20.8372 12.5061 20.5644C12.1944 20.2917 12.1628 19.8178 12.4356 19.5061L18.3472 12.75H4C3.58579 12.75 3.25 12.4142 3.25 12C3.25 11.5858 3.58579 11.25 4 11.25H18.3472L12.4356 4.49388C12.1628 4.18215 12.1944 3.70833 12.5061 3.43557Z"})})},style3:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M11 20.74C10.9012 20.7423 10.803 20.7238 10.7118 20.686C10.6205 20.6481 10.5382 20.5916 10.47 20.52L2.47 12.52C2.32955 12.3794 2.25066 12.1888 2.25066 11.99C2.25066 11.7913 2.32955 11.6007 2.47 11.46L10.47 3.46003C10.576 3.35806 10.7096 3.2895 10.8542 3.26288C10.9989 3.23626 11.1481 3.25274 11.2835 3.31029C11.4188 3.36783 11.5342 3.4639 11.6154 3.58653C11.6966 3.70917 11.7399 3.85296 11.74 4.00003V7.30003H21C21.1981 7.30262 21.3874 7.38247 21.5275 7.52256C21.6676 7.66265 21.7474 7.85192 21.75 8.05003V16.05C21.7474 16.2481 21.6676 16.4374 21.5275 16.5775C21.3874 16.7176 21.1981 16.7974 21 16.8H11.74V19.99C11.7402 20.139 11.6954 20.2845 11.6116 20.4076C11.5277 20.5307 11.4087 20.6257 11.27 20.68C11.1848 20.7175 11.0931 20.7379 11 20.74ZM4.07 12L10.25 18.18V16.05C10.25 15.8511 10.329 15.6603 10.4697 15.5197C10.6103 15.379 10.8011 15.3 11 15.3H20.25V8.80003H11C10.8019 8.79744 10.6126 8.71759 10.4725 8.57749C10.3324 8.4374 10.2526 8.24813 10.25 8.05003V5.82003L4.07 12Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M13 20.74C12.9039 20.7541 12.8062 20.7541 12.71 20.74C12.5724 20.6823 12.4551 20.5849 12.3732 20.4602C12.2912 20.3355 12.2484 20.1892 12.25 20.04V16.7H3.00001C2.81189 16.6956 2.63208 16.6216 2.49538 16.4923C2.35868 16.363 2.27481 16.1876 2.26001 16V8.00002C2.25463 7.89856 2.26965 7.79706 2.30417 7.7015C2.3387 7.60595 2.39204 7.51829 2.46103 7.44371C2.53002 7.36913 2.61326 7.30913 2.70584 7.26727C2.79841 7.22542 2.89844 7.20255 3.00001 7.20002H12.25V4.01002C12.2498 3.86106 12.2946 3.71551 12.3784 3.59241C12.4623 3.4693 12.5813 3.37436 12.72 3.32002C12.8551 3.26039 13.0053 3.24376 13.1502 3.27238C13.2951 3.301 13.4277 3.37349 13.53 3.48002L21.53 11.48C21.6705 11.6206 21.7493 11.8113 21.7493 12.01C21.7493 12.2088 21.6705 12.3994 21.53 12.54L13.53 20.54C13.4601 20.6079 13.377 20.6608 13.2858 20.6952C13.1946 20.7296 13.0973 20.7448 13 20.74ZM3.76001 15.2H13C13.1981 15.2026 13.3874 15.2825 13.5275 15.4226C13.6676 15.5626 13.7474 15.7519 13.75 15.95V18.18L19.93 12L13.75 5.83002V8.00002C13.7477 8.19843 13.6689 8.3883 13.53 8.53002C13.3817 8.65257 13.1919 8.71343 13 8.70002H3.76001V15.2Z"})})},style4:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"M1.02698 11.9929L5.26242 16.2426L6.67902 14.8308L4.85766 13.0033L22.9731 13.0012L22.9728 11.0012L4.85309 11.0033L6.6886 9.17398L5.27677 7.75739L1.02698 11.9929Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"M23.0677 11.9929L18.818 7.75739L17.4061 9.17398L19.2415 11.0032L0.932469 11.0012L0.932251 13.0012L19.2369 13.0032L17.4155 14.8308L18.8321 16.2426L23.0677 11.9929Z"})})},style5:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"m4.431 12.822 13 9A1 1 0 0 0 19 21V3a1 1 0 0 0-1.569-.823l-13 9a1.003 1.003 0 0 0 0 1.645z"})}),right:(0,l.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"M5.536 21.886a1.004 1.004 0 0 0 1.033-.064l13-9a1 1 0 0 0 0-1.644l-13-9A1 1 0 0 0 5 3v18a1 1 0 0 0 .536.886z"})})},style6:{left:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M16.5 8L13 11.5L16.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M10.5 8L7 11.5L10.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),right:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M7 8L10.5 11.5L7 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M13 8L16.5 11.5L13 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},xN=({icon:e,...t})=>(0,l.jsx)("div",{...t,children:e}),yN=({attributes:e,device:t,setActiveIndex:n})=>{const{orientation:o,options:i,dragg:a,label:s,slider:r,sliderOptions:c,isLabel:d,isCap:u,align:p}=e,h=(0,m.useRef)(),{hAlign:g,vAlign:b}=s,{height:f,autoplay:x,speed:y,autoplaySpeed:v,pauseOnHover:k,infinite:w,dots:_,arrows:C,slidesView:j,arrowType:$}=c;(0,m.useEffect)((()=>{h.current&&r.length<2&&h.current.innerSlider.list.querySelectorAll(".slick-cloned").forEach((e=>{e.style.display="none"}))}),[h.current]);const S={className:"center",centerMode:!0,arrows:C,dots:_,infinite:w,centerPadding:"15%",draggable:!1,autoplay:x,slidesToShow:j[t],speed:y,autoplaySpeed:v,pauseOnHover:k,nextArrow:(0,l.jsx)(xN,{className:"slick-arrow slick-prev",icon:fN[$].right}),
451 -prevArrow:(0,l.jsx)(xN,{className:"slick-arrow slick-next",icon:fN[$].left})};return(0,l.jsx)(bN.A,{...S,className:"b-blocks-image-compare-slider-wrapper",ref:h,children:r.map(((e,c)=>{const{beforeImg:h,afterImg:m,caption:x}=e,y={beforeLabelEl:d&&h.beforeLabel&&(0,l.jsx)("div",{className:`b-blocks-label b-blocks-before-label b-blocks-${o} ${"horizontal"===o?g:b}`,dangerouslySetInnerHTML:{__html:h.beforeLabel}}),afterLabelEl:d&&m.afterLabel&&(0,l.jsx)("div",{className:`b-blocks-label b-blocks-after-label b-blocks-${o} ${"horizontal"===o?g:b}`,dangerouslySetInnerHTML:{__html:m.afterLabel}}),captionEl:u&&x&&(0,l.jsx)("div",{className:"b-blocks-caption",dangerouslySetInnerHTML:{__html:x}}),orientation:o,options:i,dragg:a,label:s},v=`${t}-${h?.img?.url}-${m?.img?.url}-${r.length}-${JSON.stringify(f)}-${p}-${i.autoSlide.isMouseOver}`;return(0,l.jsx)(mN,{...y,height:f[t],beforeImg:h.img,afterImg:m.img,onClick:()=>n(c)},v)}))})},vN=({attributes:e,afterLabelEl:t,beforeLabelEl:n,captionEl:o,isBackend:i=!1,backDevice:a="desktop",activeIndex:s,setActiveIndex:r=()=>{}})=>{const{beforeImg:c,afterImg:d,orientation:u,styles:p,options:h,dragg:g,label:m,align:b,theme:f,slider:x,sliderOptions:y}=e,{device:v}=_d(),k=i?a:v,w=`${c?.url}-${d?.url}-${JSON.stringify(p.container.height)}-${b}-${h.autoSlide.isMouseOver}-${k}`;return(0,l.jsxs)(l.Fragment,{children:["default"===f&&(0,l.jsx)(mN,{beforeLabelEl:n,afterLabelEl:t,captionEl:o,beforeImg:c,afterImg:d,orientation:u,options:h,dragg:g,label:m,device:k,height:p.container.height[k]},w),"slider"===f&&(0,l.jsx)(yN,{attributes:e,device:k,activeIndex:s,setActiveIndex:r},`${x.length}-${JSON.stringify(y)}`)]})},kN=[{name:"before-img",title:(0,x.__)("Before Img","image-compare")},{name:"after-img",title:(0,x.__)("After Img","image-compare")}],wN=[{label:"Horizontal",value:"horizontal",icon:"image-flip-horizontal"},{label:"Vertical",value:"vertical",icon:"image-flip-vertical"}],_N=[{label:"Top",value:"top",icon:cN},{label:"Middle",value:"middle",icon:dN},{label:"Bottom",value:"bottom",icon:uN}],CN=[{label:"Left",value:"left",icon:"editor-alignleft"},{label:"Center",value:"center",icon:"editor-aligncenter"},{label:"Right",value:"right",icon:"editor-alignright"}],jN=[{name:"general",title:(0,x.__)("General","textdomain")},{name:"style",title:(0,x.__)("Style","textdomain")}],$N=[{label:"Default",value:"default",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-default.png"},{label:"Rectangle Stroke",value:"rectangle-caret",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-rectangle-stroke.png",isPro:!0},{label:"Circle Small",value:"circle-caret",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-small.png",isPro:!0},{label:"Circle Big",value:"circle-big-caret",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-big.png",isPro:!0},{label:"Circle Outline",value:"circle-outline",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-outline.png",isPro:!0},{label:"Circle Outline Line None",value:"circle-outline-line-none",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-outline-line-none.png",isPro:!0},{label:"Capsule Fill",value:"capsule-fill",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-fill.png",isPro:!0},{label:"Capsule Stroke",value:"capsule-stroke",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-stroke.png",isPro:!0},{label:"Capsule Tiny Fill Big",value:"capsule-tiny-fill-big",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-fill-big.png",isPro:!0},{label:"Capsule Tiny Stroke Big",value:"capsule-tiny-stroke-big",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-stroke-big.png",isPro:!0},{label:"Capsule Tiny Fill Small",value:"capsule-tiny-fill-small",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-fill-small.png",isPro:!0},{label:"Capsule Tiny Stroke Small",value:"capsule-tiny-stroke-small",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-stroke-small.png",isPro:!0}],SN=["rectangle-caret","circle-caret","circle-big-caret","capsule-stroke","capsule-tiny-stroke-big","capsule-tiny-stroke-small"],TN=[{label:(0,x.__)("Style 1","b-blocks"),value:"style1",icon:fN.style1.right},{label:(0,x.__)("Style 2","b-blocks"),value:"style2",icon:fN.style2.right},{label:(0,x.__)("Style 3","b-blocks"),value:"style3",icon:fN.style3.right},{label:(0,x.__)("Style 4","b-blocks"),value:"style4",icon:fN.style4.right},{label:(0,x.__)("Style 5","b-blocks"),value:"style5",icon:fN.style5.right},{label:(0,x.__)("Style 6","b-blocks"),value:"style6",icon:fN.style6.right}],NN=[{name:"navigation",title:(0,x.__)("Navigation","textdomain")},{name:"pagination",title:(0,x.__)("Pagination","textdomain")}],MN=({attributes:e,id:t})=>{const{alignment:n,width:o,border:i,dragg:a,labelTypo:s,labelColors:r,labelPadding:c,capTypo:d,capColors:u,capPadding:p,styles:h,theme:g,sliderStyle:m}=e,{dragg:b}=h,{pagination:f,navigation:x}=m,{icon:y,container:v}=x,k=`#${t}`,w=`${k} .${lN}`,_=`${w} .b-blocks-comparison-wrapper`,C=`${_} .b-blocks-label`,j=`${w} .b-blocks-caption`,$=`${_} .b-blocks-comparison-slider-handle`,S=`${k} .b-blocks-image-compare-slider-wrapper`,T=`${S} .slick-arrow`,N=`${S} .slick-dots`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",s)?.googleFontLink}\n\t\t${ps("",d)?.googleFontLink}\n\t\t${ps(C,s)?.styles}\n\t\t${ps(j,d)?.styles}\n\n\t\t${k}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${w}{\n\t\t\twidth: ${o};\n\t\t\t${is(i)}\n\t\t}\n\n\t\t${C}{\n\t\t\t${ss(r)}\n\t\t\tpadding: ${us(c)};\n\t\t}\n\t\t${j}{\n\t\t\t${ss(u)}\n\t\t\tpadding: ${us(p)};\n\t\t}\n\n\t\t${M=a.handleType,SN.includes(M)?`${$} .b-blocks-${a.handleType}-icon{\n\t\t${ns("border-color",b.handler.color)}\n\t\t${ns("border-width",jt(b.line.size)?b.line.size+"px":"")}\n\t\t\t}`:`${$} .b-blocks-${a.handleType}-icon{\n\t\t\t\t${ns("background-color",b.handler.color)}\n\t\t\t\t${ns("border-color",b.handler.color)}\n\t\t\t}`}\n\n\t\t${$} :where(svg){\n\t\t\t${ns("color",b.icon.color)}\n\t\t\t${ns("fill",b.icon.color)}\n\t\t}\n\t\t${$}::before{\n\t\t\tcontent:"";\n\t\t\t${ns("width",jt(b.line.size)?b.line.size+"px":"")}\n\t\t\t${os(b.line.bg)}\n\t\t}\n\t\t${$}::after{\n\t\t\tcontent:"";\n\t\t\t${ns("width",jt(b.line.size)?b.line.size+"px":"")}\n\t\t\t${os(b.line.bg)}\n\t\t}\n\t\t${"slider"===g?`\n\t\t\t\t${T}{\n\t\t\t\t\t${ns("height",v.height)}\n\t\t\t\t\t${ns("width",v.width)}\n\t\t\t\t\t${os(v.normal.bg)}\n\t\t\t\t\t${as(v.normal.border)}\n\t\t\t\t\t${ns("border-radius",hs(v.normal.radius))}\n\t\t\t\t}\n\n\t\t\t\t${T}:hover{\n\t\t\t\t\t${os(v.hover.bg)}\n\t\t\t\t\t${as(v.hover.border)}\n\t\t\t\t\t${ns("border-radius",hs(v.hover.radius))}\n\t\t\t\t}\n\n\t\t\t\t${T} > svg{\n\t\t\t\t\t${ns("width",y.normal.size)}\n\t\t\t\t\t${ns("fill",y.normal.color)}\n\t\t\t\t}\n\t\t\t\t${T}:hover svg{\n\t\t\t\t\t${ns("fill",y.hover.color)}\n\t\t\t\t\t${ns("width",y.hover.size)}\n\t\t\t\t}\n\t\t\t\t${N}>li>button::before{\n\t\t\t\t\t${ns("background-color",f.active)}\n\t\t\t\t}\n\t\t\t\t${N}>li.slick-active>button::before{\n\t\t\t\t\t${ns("background-color",f.active)}\n\t\t\t\t}\n\t\t\t\t`:""}\n\t\t`.replace(/\s+/g," ")}});var M},LN=({attributes:e,updateObj:t,index:n,setIsProModalOpen:o,premiumProps:i})=>{const{slider:a}=e,s=a[n],{beforeImg:r,afterImg:c,caption:d}=s;return(0,l.jsx)("div",{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:kN,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["before-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{isPremium:i,setIsProModalOpen:o,className:"mt10",label:(0,x.__)("Label","image-compare"),value:r.beforeLabel,onChange:e=>t("slider",e,n,"beforeImg","beforeLabel"),Component:y.TextControl}),(0,l.jsx)(Ya,{
452 -isPremium:i,setIsProModalOpen:o,className:"mt10",value:r.img,onChange:e=>t("slider",e,n,"beforeImg","img"),placeholder:(0,x.__)("Enter Image URL","image-compare"),Component:ke})]}),"after-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{isPremium:i,setIsProModalOpen:o,className:"mt10",label:(0,x.__)("Label","image-compare"),value:c.afterLabel,onChange:e=>t("slider",e,n,"afterImg","afterLabel"),Component:y.TextControl}),(0,l.jsx)(Ya,{isPremium:i,setIsProModalOpen:o,className:"mt10",value:c.img,onChange:e=>t("slider",e,n,"afterImg","img"),placeholder:(0,x.__)("Enter Image URL","image-compare"),Component:ke})]}),(0,l.jsx)(Ya,{isPremium:i,setIsProModalOpen:o,className:"mt10",label:(0,x.__)("Caption","image-compare"),value:d,onChange:e=>t("slider",e,n,"caption"),Component:y.TextControl})]})})})},PN=({value:e,options:t,onChange:n,isPremium:o=!1,setIsProModalOpen:i})=>(0,l.jsx)("div",{className:"icb-preset-items-wrapper",children:t.map(((t,a)=>(0,l.jsx)(y.Tooltip,{position:"top",text:`${t.label}`,delay:100,children:(0,l.jsxs)("div",{onClick:()=>"default"!==t.value&&!o&&t.isPro?i(!0):n(t.value),className:`icb-preset-item ${e===t.value?"active":""} ${"default"!==t.value&&!o&&t.isPro?"icb-premium":""}`,children:[(0,l.jsx)("img",{src:t.img}),(0,l.jsx)("div",{className:"icb-preset-badge",children:"Pro"})]})},a)))}),EN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n,isPremium:o,setIsProModalOpen:i})=>{const{sliderOptions:a}=e,{autoplay:s,speed:r,autoplaySpeed:c,pauseOnHover:d,infinite:u,dots:p,arrows:h,slidesView:g,arrowType:m}=a;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Settings","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Enable Autoplay","image-compare"),checked:s,value:s,onChange:e=>t("sliderOptions",e,"autoplay"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Stop Slider On Mouse Over"),checked:d,value:d,onChange:e=>t("sliderOptions",e,"pauseOnHover"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Enable Infinite Loop"),checked:u,value:u,onChange:e=>t("sliderOptions",e,"infinite"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Enable Pagination"),checked:p,value:p,onChange:e=>t("sliderOptions",e,"dots"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Enable Navigation"),checked:h,value:h,onChange:e=>t("sliderOptions",e,"arrows"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Slides To Show")," ",(0,l.jsx)(_,{})," "]}),step:1,min:1,max:10,value:g[n],onChange:e=>t("sliderOptions",e,"slidesView",n),Component:y.RangeControl}),s?(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Slider Speed (ms)"),step:50,min:0,max:1e4,value:c,onChange:e=>t("sliderOptions",e,"autoplaySpeed"),Component:y.RangeControl}):null,(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Slider Delay (ms)"),step:50,min:0,max:1e4,value:r,onChange:e=>t("sliderOptions",e,"speed"),Component:y.RangeControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Arrow","image-compare"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,x.__)("Arrow Style","image-compare")}),(0,l.jsx)(Ka,{isPremium:o,setIsProModalOpen:i,isIcon:!0,value:m,onChange:e=>t("sliderOptions",e,"arrowType"),options:TN,proValues:["style1","style2","style3","style4","style5","style6"],size:"default"})]})]})})),AN=({attributes:e,setAttributes:t,updateObj:n,isPremium:o,setIsProModalOpen:i,activeIndex:a,setActiveIndex:s})=>{const{beforeImg:r,afterImg:c,orientation:d,isSwap:u,isLabel:p,label:h,beforeLabel:g,afterLabel:m,isCap:b,cap:f,options:v,dragg:k,styles:w,theme:_}=e,C=["default","rectangle-caret","circle-caret"];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"before-after-image-compare",docsLink:"https://bblockswp.com/docs/image-compare"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image Comparison","image-compare"),initialOpen:!0,children:[(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,labelPosition:"edge",label:(0,x.__)("Theme","image-compare"),value:_,options:[{label:"Default",value:"default"},{label:"Slider",value:"slider"}],onChange:e=>t({theme:e}),Component:y.SelectControl}),(0,l.jsx)(Tn,{className:"mb10",label:(0,x.__)("Orientation","image-compare"),options:wN,value:d,onChange:e=>n("orientation",e),isIcon:!0}),"slider"===_&&(0,l.jsx)(_a,{premiumProps:o,attributes:e,setAttributes:t,activeIndex:a,setActiveIndex:s,updateObj:n,setIsProModalOpen:i,newItem:{beforeImg:{img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},beforeLabel:"Before Label"},afterImg:{img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},afterLabel:"After Label"},caption:"Before After Image Caption"},itemLabel:"Slide",arrKey:"slider",design:"sortable",ItemSettings:LN}),"default"===_&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:kN,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["before-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ke,{className:"mt10",value:r,onChange:e=>n("beforeImg",e),placeholder:(0,x.__)("Enter Image URL","image-compare")}),(0,l.jsx)(td,{className:"mt20",value:r,onChange:e=>n("beforeImg",e)})]}),"after-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ke,{className:"mt10",value:c,onChange:e=>n("afterImg",e),placeholder:(0,x.__)("Enter Image URL","image-compare")}),(0,l.jsx)(td,{className:"mt20",value:c,onChange:e=>n("afterImg",e)})]})]})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Swap Images","image-compare"),checked:u,onChange:e=>t({isSwap:e,beforeImg:{...c},afterImg:{...r}})})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Labels","image-compare"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Labels","image-compare"),checked:p,onChange:e=>n("isLabel",e)}),p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show labels on hover","image-compare"),checked:h.isShowHover,onChange:e=>n("label",e,"isShowHover")}),"horizontal"===d&&(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Label Position","image-compare"),options:_N,value:h.hAlign,onChange:e=>n("label",{...h,hAlign:e}),isIcon:!0,Component:Tn}),"vertical"===d&&(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Label Position","image-compare"),options:CN,value:h.vAlign,onChange:e=>n("label",{...h,vAlign:e}),isIcon:!0,Component:Tn}),"default"===_&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Before Label","image-compare"),value:g,onChange:e=>n("beforeLabel",e),placeholder:(0,x.__)("Before image label","image-compare")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("After Label","image-compare"),value:m,onChange:e=>n("afterLabel",e),placeholder:(0,x.__)("After image label","image-compare")})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","image-compare"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Caption","image-compare"),checked:b,onChange:e=>n("isCap",e)}),"default"===_?b&&(0,l.jsx)(y.__experimentalInputControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Caption","image-compare"),value:f,onChange:e=>n("cap",e)}):""]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Default Offset","image-compare"),step:.1,max:1,min:0,value:v.defaultOffset,
453 -onChange:e=>n("options",e,"defaultOffset"),Component:y.RangeControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Move Slider On Click","image-compare"),checked:v.isMoveClick,onChange:e=>n("options",e,"isMoveClick"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Move Slider On Mouse Over","image-compare"),checked:v.moveMouseOver,onChange:e=>n("options",e,"moveMouseOver"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Auto Slide","image-compare"),checked:v.autoSlide.isAutoSlide,onChange:e=>n("options",e,"autoSlide","isAutoSlide"),Component:y.ToggleControl}),v.autoSlide.isAutoSlide&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Auto Slide Speed","image-compare"),step:1,max:20,maxLength:20,minLength:0,min:0,value:v.autoSlide.speed,onChange:e=>n("options",e,"autoSlide","speed"),Component:y.RangeControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Stop Slider On Mouse Over","image-compare"),checked:v.autoSlide.isHoverStop,onChange:e=>n("options",e,"autoSlide","isHoverStop"),Component:y.ToggleControl})]})]}),"slider"===_&&(0,l.jsx)(EN,{attributes:e,updateObj:n,isPremium:o,setIsProModalOpen:i}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Presets","image-compare"),initialOpen:!1,children:(0,l.jsx)(PN,{value:k.handleType,setIsProModalOpen:i,options:$N,onChange:e=>C.includes(e)?t({dragg:{...k,handleType:e},styles:{...w,dragg:{...w.dragg,line:{...w.dragg.line,size:2}}}}):t({dragg:{...k,handleType:e},styles:{...w,dragg:{...w.dragg,line:{...w.dragg.line,size:3}}}}),isPremium:o})})]})},BN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,isPremium:t,setIsProModalOpen:n,updateObj:o,device:i})=>{const{styles:a,width:s,isLabel:r,labelTypo:c,labelColors:d,labelPadding:u,isCap:p,capTypo:h,capColors:g,capPadding:m,theme:b,sliderOptions:f,sliderStyle:v}=e,{container:w,dragg:C}=a,{height:j}=f,{pagination:$,navigation:S}=v;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Container","image-compare"),className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","image-compare"),labelPosition:"left",value:s,onChange:e=>o("width",e),units:[Pe(),Ee(),Ae(),Ie()]}),"default"===b&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height:","image-compare"),(0,l.jsx)(_,{})]}),value:w.height[i],onChange:e=>o("styles",e,"container","height",i),units:[Pe(),Ae(),Ie()]}),"slider"===b&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height:","image-compare"),(0,l.jsx)(_,{})]}),value:j[i],onChange:e=>o("sliderOptions",e,"height",i),units:[Pe(),Ae(),Ie()]})]}),r&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Labels","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:c,onChange:e=>o("labelTypo",e),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(On,{value:d,onChange:e=>o("labelColors",e),defaults:{color:"#fff",bg:"#00000080"}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","image-compare"),value:u,onChange:e=>o("labelPadding",e),defaults:{vertical:"10px",horizontal:"15px"}})]})}),p&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:h,onChange:e=>o("capTypo",e),defaults:{fontSize:{desktop:14,tablet:14,mobile:14}}}),(0,l.jsx)(On,{value:g,onChange:e=>o("capColors",e),defaults:{color:"#333",bg:"#f4f4f4"}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","image-compare"),value:m,onChange:e=>o("capPadding",e),defaults:{vertical:"10px",horizontal:"15px"}})]})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Divider","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Line Size","image-compare"),min:1,max:10,step:1,value:C.line.size,onChange:e=>o("styles",e,"dragg","line","size"),Component:y.RangeControl}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Line Color","image-compare"),value:C.line.bg,onChange:e=>o("styles",e,"dragg","line","bg"),isImage:!1,Component:An}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Handler Color","image-compare"),value:C.handler.color,onChange:e=>o("styles",e,"dragg","handler","color"),Component:Ue}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Icon Color","image-compare"),value:C.icon.color,onChange:e=>o("styles",e,"dragg","icon","color"),isImage:!1,Component:Ue})]}),"slider"===b&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Styles","image-compare"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:NN,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["navigation"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt10",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,className:"mt10",labelPosition:"edge",label:(0,x.__)("Container Width","image-compare"),value:S.container.width,onChange:e=>o("sliderStyle",e,"navigation","container","width"),Component:y.__experimentalUnitControl}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,className:"mt10",labelPosition:"edge",label:(0,x.__)("Container Height","image-compare"),value:S.container.height,onChange:e=>o("sliderStyle",e,"navigation","container","height"),Component:y.__experimentalUnitControl})]}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,className:"mt10",labelPosition:"edge",label:(0,x.__)("Icon Size","image-compare"),value:S.icon[e.name].size,onChange:t=>o("sliderStyle",t,"navigation","icon",e.name,"size"),Component:y.__experimentalUnitControl}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Icon Color","image-compare"),value:S.icon[e.name].color,onChange:t=>o("sliderStyle",t,"navigation","icon",e.name,"color"),Component:Ue}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Background","image-compare"),value:S.container[e.name].bg,onChange:t=>o("sliderStyle",t,"navigation","container",e.name,"bg"),Component:An}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Border","image-compare"),value:S.container[e.name].border,onChange:t=>o("sliderStyle",t,"navigation","container",e.name,"border"),Component:y.__experimentalBorderBoxControl}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,className:"mt10",label:(0,x.__)("Border Radius","image-compare"),values:S.container[e.name].radius,onChange:t=>o("sliderStyle",t,"navigation","container",e.name,"radius"),Component:k})]})})}),"pagination"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Active Color","image-compare"),value:$.active,onChange:e=>o("sliderStyle",e,"pagination","active"),Component:Ue})})]})})})]})})),IN=({attributes:e,setAttributes:t,isPremium:n,activeIndex:o,setActiveIndex:i})=>{const{alignment:a,beforeImg:s,afterImg:r,theme:c}=e,[d,u]=(0,m.useState)(!1),p=(n,o,...i)=>{t({[n]:be(e[n],o,...i)})},g={isPremium:n,setIsProModalOpen:u};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Ra,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:jN,onSelect:me,children:n=>(0,l.jsxs)(l.Fragment,{children:["general"===n.name&&(0,l.jsx)(AN,{...g,attributes:e,setAttributes:t,updateObj:p,activeIndex:o,setActiveIndex:i}),"style"===n.name&&(0,l.jsx)(BN,{...g,attributes:e,setAttributes:t,updateObj:p})]})})]}),(0,l.jsxs)(jn,{isProModalOpen:d,
454 -setIsProModalOpen:u,block:"Image Comparison",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Theme: ","b-blocks")}),(0,x.__)("Create stunning before & after image comparisons in both single view and slider formats.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Label Position: ","b-blocks")}),(0,x.__)("Customize the label position to suit your needs.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Default Offset: ","b-blocks")}),(0,x.__)("Adjusts the initial position of the slider.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Move Slider On Click: ","b-blocks")}),(0,x.__)("Enable the option to move the slider when the user clicks on it.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Move Slider On Mouse Over: ","b-blocks")}),(0,x.__)("Enable the option to move the slider when the mouse hover over it.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Auto Slide: ","b-blocks")}),(0,x.__)("Activate automatic sliding on the compare images.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Auto Slide Speed: ","b-blocks")}),(0,x.__)("Set the speed of the auto moving slider.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Stop Slider On Mouse Over: ","b-blocks")}),(0,x.__)("Pause the sliding movement when the mouse is over the images.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Line Size: ","b-blocks")}),(0,x.__)("Adjust the line size to your preferred thickness.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Line Color: ","b-blocks")}),(0,x.__)("Choose a desired color for the line.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Handler Color: ","b-blocks")}),(0,x.__)("Choose a desired color for the handler.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Icon Color: ","b-blocks")}),(0,x.__)("Select the icon color from the options provided to match your design.","b-blocks")]})]}),"default"===c&&(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(Ce,{label:(0,x.__)("Edit Before Image:","b-blocks"),value:s,onChange:e=>t({beforeImg:e})}),(0,l.jsx)(Ce,{label:(0,x.__)("Edit After Image:","b-blocks"),value:r,onChange:e=>t({afterImg:e})}),(0,l.jsx)(h.AlignmentToolbar,{value:a,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Image Comparison Alignment"),alignmentControls:[{title:(0,x.__)("Image Comparison in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Image Comparison in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Image Comparison in right","b-blocks"),align:"right",icon:"align-right"}]})]})]})},ON=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{beforeImg:a,afterImg:s,isLabel:r,label:c,beforeLabel:d,afterLabel:u,isCap:p,cap:g,orientation:b,theme:f}=t,{url:y,alt:v,title:k}=a||{},{url:w,alt:_,title:C}=s||{},{hAlign:j,vAlign:$}=c,S=bBlocksPremiumChecker,[T,N]=(0,m.useState)(0),M=r&&(0,l.jsx)(h.RichText,{className:`b-blocks-label b-blocks-before-label b-blocks-${b} ${"horizontal"===b?j:$}`,tagName:"div",value:d,onChange:e=>n({beforeLabel:e}),placeholder:(0,x.__)("Before image label","image-compare"),inlineToolbar:!0}),L=r&&(0,l.jsx)(h.RichText,{className:`b-blocks-label b-blocks-after-label b-blocks-${b} ${"horizontal"===b?j:$}`,tagName:"div",value:u,onChange:e=>n({afterLabel:e}),placeholder:(0,x.__)("After image label","image-compare"),inlineToolbar:!0}),P=p&&(0,l.jsx)(h.RichText,{className:"b-blocks-caption",tagName:"div",value:g,onChange:e=>n({cap:e}),placeholder:(0,x.__)("Caption of the image comparison","image-compare"),inlineToolbar:!0});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(IN,{attributes:t,setAttributes:n,isPremium:S,attributes:t,setAttributes:n,isPremium:S,activeIndex:T,setActiveIndex:N}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({draggable:!1}),children:[(0,l.jsx)(MN,{attributes:t,id:`block-${o}`}),(()=>{switch(f){case"default":return y&&w?(0,l.jsx)(vN,{afterLabelEl:L,beforeLabelEl:M,captionEl:P,activeIndex:T,setActiveIndex:N,attributes:t,isBackend:!0,backDevice:i}):(0,l.jsxs)("div",{className:"imgPlaceholder",children:[(0,l.jsx)("div",{className:"beforeImg",children:y?(0,l.jsx)("img",{src:y,alt:v||k}):(0,l.jsx)(_e,{label:(0,x.__)("Before Image:","image-compare"),value:a,onChange:({id:e,url:t,alt:o,title:i,caption:a})=>n({beforeImg:{id:e,url:t,alt:o,title:i,caption:a}})})}),(0,l.jsx)("div",{className:"afterImg",children:w?(0,l.jsx)("img",{src:w,alt:_||C}):(0,l.jsx)(_e,{label:(0,x.__)("After Image:","image-compare"),value:s,onChange:({id:e,url:t,alt:o,title:i,caption:a})=>n({afterImg:{id:e,url:t,alt:o,title:i,caption:a}})})})]});case"slider":return(0,l.jsx)(vN,{afterLabelEl:L,beforeLabelEl:M,captionEl:P,activeIndex:T,setActiveIndex:N,attributes:t,isBackend:!0,backDevice:i})}})()]})]})}));Ll(rN.name)&&(0,p.registerBlockType)(rN,{icon:_r,transforms:{from:[{type:"block",blocks:["icb/image-compare"],transform:e=>(0,p.createBlock)("b-blocks/image-comparison",e)},{type:"prefix",prefix:"image-compare",transform:()=>(0,p.createBlock)("b-blocks/image-comparison")}],to:[{type:"block",blocks:["icb/image-compare"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("icb/image-compare",e)}]},edit:ON,save:()=>null});const RN=JSON.parse('{"apiVersion":3,"name":"b-blocks/image-gallery","title":"Image Gallery","description":"Display Multiple Images as Gallery.","category":"bBlocks","keywords":["images","photos","gallery"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"images":{"type":"array","default":[]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"imgPadding":{"type":"object","default":{}},"imgBorder":{"type":"object","default":{}},"imgShadow":{"type":"object","default":{}},"isPreview":{"type":"boolean","default":true},"isCap":{"type":"boolean","default":true},"capAlign":{"type":"string","default":"left"},"capColor":{"type":"string","default":"#333"},"capTitleTypo":{"type":"object","default":{"fontSize":{"desktop":"18px","tablet":"17px","mobile":"16px"}}},"capDescTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fancybox"],"render":"file:./render.php","viewScript":["file:./view.js","fancybox"]}'),zN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({settings:e,filterImages:t,device:n})=>{const{attributes:{images:o,columns:i,imgPadding:a,imgBorder:s,imgShadow:r,isPreview:c,isCap:d,capAlign:u,capColor:p,capTitleTypo:g,capDescTypo:m},setAttributes:b}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layouts Settings"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:i[n],onChange:e=>{b({columns:{...i,[n]:e}})},min:1,max:9,step:1})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(id,{label:(0,x.__)("Padding:","b-blocks"),value:a,onChange:e=>b({imgPadding:e})}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:s,onChange:e=>b({imgBorder:e})}),(0,l.jsx)(od,{label:(0,x.__)("Shadow:","b-blocks"),value:r,onChange:e=>b({imgShadow:e}),defaults:{type:"text"},type:"text"}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Preview Image?","b-blocks"),checked:c,
455 -onChange:e=>b({isPreview:e})}),(0,l.jsx)("small",{children:(0,x.__)("Preview will only for frontend!","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Caption","b-blocks"),checked:d,onChange:e=>b({isCap:e})}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:u,onChange:e=>b({capAlign:e}),options:Jt,isIcon:!0})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:p,onChange:e=>b({capColor:e}),defaultColor:"#333"}),(0,l.jsx)(Oa,{label:(0,x.__)("Title Typography:","b-blocks"),value:g,onChange:e=>b({capTitleTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16}}}),(0,l.jsx)(Oa,{label:(0,x.__)("Description Typography:","b-blocks"),value:m,onChange:e=>b({capDescTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16}}})]})]}),0<o.length&&(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(Ce,{label:(0,x.__)("Edit Gallery","b-blocks"),icon:"format-gallery",value:o,onChange:e=>b({images:t(e)}),isMultiple:!0})})]})})),DN=(0,y.withNotices)((e=>{const{attributes:{images:t,columns:n,imgPadding:o,imgBorder:i,imgShadow:a,isCap:s,capAlign:r,capColor:c,capTitleTypo:d,capDescTypo:u},setAttributes:p,clientId:g,isSelected:m,noticeUI:b}=e;let f=[];t.map((e=>f.push(e.url)));const v=e=>e||0!==e.length?e.map((e=>({id:e?.id,url:e?.url,alt:e?.alt,name:e?.name,title:e?.title,sizes:e?.sizes,caption:e?.caption,description:e?.description,link:e?.link}))):[],k=`#block-${g} .imgGalleryWrapper .imgGalleryImgLink`,w=`${k} .imgGalleryImgCaption`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(zN,{settings:e,filterImages:v}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${ps("",d)?.googleFontLink}\n\t\t\t\t${ps("",u)?.googleFontLink}\n\t\t\t\t${ps(`${w} h4`,d)?.styles}\n\t\t\t\t${ps(`${w} p`,u)?.styles}\n\n\t\t\t\t${k} .imgGalleryImg{\n\t\t\t\t\tpadding: ${us(o)};\n\t\t\t\t\t${is(i)}\n\t\t\t\t\tfilter: drop-shadow(${ds(a,"text")})\n\t\t\t\t}\n\t\t\t\t${w}{\n\t\t\t\t\ttext-align: ${r};\n\t\t\t\t\tcolor: ${c};\n\t\t\t\t\tmargin: ${us(o)};\n\t\t\t\t\twidth: calc((100% - 10px) - (${o?.horizontal||"0px"} * 2));\n\t\t\t\t\theight: calc((100% - 10px) - (${o?.vertical||"0px"} * 2));\n\t\t\t\t\tborder-radius: ${i?.radius||"0px"};\n\t\t\t\t}\n\t\t\t`}}),0===t.length?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.Placeholder,{className:"bBlocksImageGalleryUpload",label:(0,x.__)(" Gallery Images","b-blocks"),instructions:(0,x.__)("Select image files from your library.","b-blocks"),icon:"format-gallery",notices:b,children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],accept:"image/*",multiple:!0,value:Array.isArray(t)?t.map((({id:e})=>e)):t.id,onSelect:e=>p({images:v(e)}),render:({open:e})=>(0,l.jsx)(y.Button,{className:"components-button is-primary",label:(0,x.__)("Media Library","b-blocks"),onClick:e,children:(0,x.__)("Media Library","b-blocks")})})})}):(0,l.jsx)("div",{className:`imgGalleryWrapper columns-${n.desktop} columns-tablet-${n.tablet} columns-mobile-${n.mobile}`,children:t.length>0?t.map(((e,n)=>(0,l.jsxs)("a",{className:"imgGalleryImgLink",children:[(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],accept:"image/*",value:e.id,onSelect:e=>{const o=structuredClone(t);o[n]=e,p({images:v(o)})},render:({open:e})=>(0,l.jsx)(y.Dashicon,{className:"imgGalleryEditButton",icon:"plus-alt",onClick:e})}),(0,l.jsx)(y.Dashicon,{className:"imgGalleryImgDeleteButton",onClick:()=>{const e=t.filter(((e,t)=>n!==t));p({images:v(e)})},icon:"trash"}),(0,l.jsx)("img",{src:e.url,alt:e.alt||e.title,className:"imgGalleryImg"}),s&&e.caption&&(0,l.jsx)("div",{className:"imgGalleryImgCaption",children:(0,l.jsxs)("div",{className:"captionContent",children:[(0,l.jsx)("h4",{children:e.caption}),(0,l.jsx)("p",{children:e.description})]})})]},e.id))):null}),m&&0<t.length&&(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],accept:"image/*",multiple:!0,value:t[t.length-1].id,onSelect:e=>{let n=[...t,...e];p({images:v(n)})},render:({open:e})=>(0,l.jsx)(y.Button,{className:"imgGalleryUploadButton",label:(0,x.__)("Add Images","b-blocks"),icon:"plus-alt",onClick:e,children:" Add Images"})})]})]})}));Ll(RN.name)&&(0,p.registerBlockType)(RN,{icon:Cr,edit:DN,save:()=>null})
456 -;const FN=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/image-hotspot","version":"1.0.0","title":"Image Hotspot","category":"bBlocks","description":"Image Hotspot allows you to add interactive hotspots to your images.","keywords":["image hotspot","hotspot","image"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"image":{"type":"object","default":{"url":"","desktop":{"height":"400px","width":"100%"},"tablet":{"height":"400px","width":"100%"},"mobile":{"height":"400px","width":"100%"},"objectFit":"fill"}},"options":{"type":"object","default":{"speed":400,"delay":200}},"preset":{"type":"string","default":"default"},"spots":{"type":"object","default":{"normal":{"color":{"bg":"#8a2be2","icon":"#fff"},"border":{}},"hover":{"color":{"bg":"#8a2be2","icon":"#fff"},"border":{}},"desktop":{"height":"40px","width":"40px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"50px","right":"50px","top":"50px","bottom":"50px"},"iconSize":"12px"},"tablet":{"height":"40px","width":"40px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"50px","right":"50px","top":"50px","bottom":"50px"},"iconSize":"12px"},"mobile":{"height":"40px","width":"40px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"50px","right":"50px","top":"50px","bottom":"50px"},"iconSize":"12px"}}},"tooltip":{"type":"object","default":{"desktop":{"width":"200px","padding":{"left":"5px","right":"5px","top":"5px","bottom":"5px"},"radius":{"left":"3px","right":"3px","top":"3px","bottom":"3px"}},"tablet":{"width":"","padding":{},"radius":{}},"mobile":{"width":"","padding":{},"radius":{}},"typo":{"fontSize":{"desktop":"15px"}},"textColor":"#fff","bgColor":"#8a2be2","border":{"width":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"hotspot":{"type":"array","default":[{"borderColor":"","bgColor":"","spotsSize":"","option":"spot","spotOption":"text","spotText":"+","icon":{"url":{"upload":"","library":""},"type":"library"},"image":"","tooltip":"<p>Tooltip contents</p>","tooltipPosition":"left","position":{"desktop":{"x":0,"y":0},"tablet":{},"mobile":{}},"iconColor":"","iconSize":"12px","spotLink":"","newWindow":false},{"borderColor":"","bgColor":"","spotsSize":"","option":"spot","spotOption":"text","spotText":"+","icon":{"url":{"upload":"","library":""},"type":"library"},"image":"","tooltip":"<p>Tooltip contents</p>","tooltipPosition":"left","position":{"desktop":{"x":30,"y":40},"tablet":{},"mobile":{}},"iconColor":"","iconSize":"12px","spotLink":"","newWindow":false}]},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),HN=({attributes:e,id:o,isBackend:i=!1})=>{const{image:a,options:s,spots:r,tooltip:c,advanced:d,hotspot:u}=e,p=`#${o} .b-blocks-hotspot-image-wrapper`,h=`${p} .b-blocks-hotspot-image`,g=`${p} .b-blocks-bphb-hotspot-container`,m=`${g} .b-blocks-bphb-hotspot`,b=`${m} .b-blocks-imghp-upload-icon`,f=`${m} .b-blocks-imghp-text-icon`,x=`${m} .b-blocks-tooltip-reader`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
457 -__html:`\n\t\t${ps("",c.typo).googleFontLink}\n\t\t${ps(x,c.typo).styles}\n\t\t${p}{\n\t\t\t${ns("width",a.desktop.width)}\n\t\t\t${ns("height",a.desktop.height)}\n\t\t}\n\t\t${u?.map(((e,t)=>`${g}#b-blocks-bphb-hotspot-container-${t}{\n\t\t\t\t${ns("left",`${e.position.desktop.x}%`)}\n\t\t\t\t${ns("top",`${e.position.desktop.y}%`)}\n\t\t\t}`)).join(" ")}\n\t\t${m} .b-blocks-imghp-library-icon>svg{\n\t\t\t${ns("fill",r.normal.color.icon)}\n\t\t\t${ns("color",r.iconColor)}\n\t\t\t${ns("height",r.desktop.iconSize)}\n\t\t\t${ns("width",r.desktop.iconSize)}\n\t\t}\n\t\t${m}{\n\t\t\t${ns("height",r.desktop.height)}\n\t\t\t${ns("width",r.desktop.width)}\n\t\t\t${ns("border-radius",hs(r.desktop.radius))}\n\t\t\t${ns("background-color",r.normal.color.bg)}\n\t\t\t${ns("padding",hs(r.desktop.padding))}\n\t\t\t${as(r.normal.border)}\n\t\t}\n ${b}{\n ${ns("fill",r.normal.color.icon)}\n\t\t\t${ns("color",r.iconColor)}\n\t\t\t${ns("height",r.desktop.iconSize)}\n\t\t\t${ns("width",r.desktop.iconSize)}\n }\n ${f}{\n ${ns("color",r.normal.color.icon)}\n\t\t\t${ns("font-size",r.desktop.iconSize)}\n }\n\t\t\t${m}.three{\n\t\t\tborder:unset;\n\t\t\t}\n\t\t\t${m}.three>span{\n\t\t\t${as(r.normal.border)}\n\t\t\t}\n\n\t\t\t${m}>svg{\n\t\t\t${ns("color",r.normal.color.icon)}\n\t\t\t${ns("height",r.desktop.iconSize)}\n\t\t\t${ns("width",r.desktop.iconSize)}\n\t\t}\n\t\t${m}>svg path{\n\t\t\t${ns("fill",r.normal.color.icon)}\n\t\t}\n\t\t${m}:hover{\n\t\t\t${ns("background-color",r.hover.color.bg)}\n\t\t\t${as(r.hover.border)}\n\t\t}\n\t\t${m}:hover>span{\n\t\t\t${ns("color",r.hover.color.icon)}\n\t\t}\n\t\t${m}:hover>svg{\n\t\t\t${ns("color",r.hover.color.icon)}\n\t\t}\n\t\t${m}:hover>svg path{\n\t\t\t${ns("fill",r.hover.color.icon)}\n\t\t}\n\t\t${m}:where(span,img){\n\t\t\t${ns("color",r.normal.color.icon)}\n\t\t\t${ns("font-size",r.desktop.iconSize)}\n\t\t\t${as(r.normal.border)}\n\t\t}\n\n\t\t${x}{\n\t\t\ttransition-duration: ${s.speed}ms;\n\t\t\ttransition-delay: ${s.delay}ms;\n\t\t\t${as(c.border)}\n\t\t\t${ns("box-shadow",ls(c?.shadow||[]))}\n\t\t\t${ns("width",c.desktop.width)}\n\t\t\t${ns("background-color",c.bgColor)}\n\t\t\t${ns("padding",hs(c.desktop.padding))}\n\t\t\t${ns("border-radius",hs(c.desktop.radius))}\n\t\t}\n\t\t${x} .b-blocks-bphb-tooltip-content>*{\n\t\t\t\tcolor: ${c.textColor} !important;\n\t\t\t\tmargin:0px;\n\t\t\t}\n\t\t\t${h}{\n\t\t\t${ns("width",a.desktop.width)};\n\t\t\t${ns("height",a.desktop.height)};\n\t\t\t${ns("object-fit",a.objectFit)}\n\t\t\t}\n\t\t${t} {\n\n\t\t${m} .b-blocks-imghp-library-icon>svg{\n\t\t\t${ns("height",r.tablet.iconSize)}\n\t\t\t${ns("width",r.tablet.iconSize)}\n\t\t}\n\t\t${m}{\n\t\t\t${ns("height",r.tablet.height)}\n\t\t\t${ns("width",r.tablet.width)}\n\t\t\t${ns("border-radius",hs(r.tablet.radius))}\n\t\t\t${ns("padding",hs(r.tablet.padding))}\n\t\t}\n ${f}{\n\t\t\t${ns("font-size",r.tablet.iconSize)}\n }\n\t\t${m}>span{\n\t\t\t${ns("font-size",r.tablet.iconSize)}\n\t\t}\n\n\t\t${x}{\n\t\t\t${ns("width",c.tablet.width)}\n\t\t\t${ns("padding",hs(c.tablet.padding))}\n\t\t\t${ns("border-radius",hs(c.tablet.radius))}\n\t\t}\n }\n\t\t${n} {\n\t\t${m} .b-blocks-imghp-library-icon>svg{\n\t\t\t${ns("height",r.mobile.iconSize)}\n\t\t\t${ns("width",r.mobile.iconSize)}\n\t\t}\n\t\t${m}{\n\t\t\t${ns("height",r.mobile.height)}\n\t\t\t${ns("width",r.mobile.width)}\n\t\t\t${ns("border-radius",r.mobile.radius)}\n\t\t\t${ns("padding",hs(r.mobile.padding))}\n\t\t}\n\t\t${m}>span{\n\t\t\t${ns("font-size",r.mobile.iconSize)}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t${ns("font-size",r.mobile.iconSize)}\n\t\t\t}\n\n\t\t${x}{\n\t\t\t${ns("width",c.mobile.width)}\n\t\t\t${ns("padding",hs(c.mobile.padding))}\n\t\t\t${ns("border-radius",hs(c.mobile.radius))}\n\t\t}\n\t}\n\t\t${_s(o,d,i,!1)}\n\t\t`}})},WN=({value:e,onChange:t=()=>{},preset:n,element:o,setActiveIdx:i,index:a,wrapperEl:s,align:r,isSelected:c,...d})=>{const[u,p]=(0,m.useState)(e||{x:0,y:0}),[h,g]=(0,m.useState)({x:0,y:0}),[b,f]=(0,m.useState)(!1),x=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const e=x.current;if(!e||!s)return;const t=(e,t)=>{const n=s.getBoundingClientRect(),o=(e-n.left)/n.width*100,i=(t-n.top)/n.height*100;return{x:Math.min(Math.max(o,0),100),y:Math.min(Math.max(i,0),100)}},n=e=>{f(!0);const n=t(e.clientX,e.clientY);g({x:n.x-u.x,y:n.y-u.y})},o=e=>{if(b){const n=t(e.clientX,e.clientY);p({x:n.x-h.x,y:n.y-h.y})}},i=()=>{f(!1)};return s.addEventListener("mouseup",i),s.addEventListener("mousemove",o),e.addEventListener("mousedown",n),document.addEventListener("mouseup",i),()=>{e.removeEventListener("mousedown",n),s.removeEventListener("mousemove",o),s.removeEventListener("mouseup",i),document.removeEventListener("mouseup",i)}}),[c,b,s,u,o.spotOption,o.tooltipPosition,r]),(0,m.useEffect)((()=>{p(e)}),[e,o.spotOption]),(0,m.useEffect)((()=>{t(u)}),[u,o.spotOption]),(0,l.jsxs)(l.Fragment,{children:["text"===o.spotOption&&(0,l.jsx)("div",{onClick:()=>i(a),onMouseDown:()=>i(a),...d,ref:x,style:{position:"absolute",cursor:"move"},className:"b-blocks-bphb-hotspot-container",id:`b-blocks-bphb-hotspot-container-${a}`,children:(0,l.jsxs)("div",{className:"b-blocks-bphb-hotspot "+("default"===n?"circle":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"),children:[o.tooltip&&(0,l.jsx)("div",{className:`b-blocks-tooltip-reader ${"default"===n?"one":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"} b-blocks-tooltip-${o.tooltipPosition}`,children:(0,l.jsx)("div",{className:"b-blocks-bphb-tooltip-content",dangerouslySetInnerHTML:{__html:o.tooltip}})}),(0,l.jsx)("span",{className:"b-blocks-imghp-text-icon",children:o.spotText})]})}),"icon"===o.spotOption&&(0,l.jsx)("div",{...d,ref:x,onClick:()=>i(a),onMouseDown:()=>i(a),style:{position:"absolute",cursor:"move"},className:"b-blocks-bphb-hotspot-container",id:`b-blocks-bphb-hotspot-container-${a}`,children:(0,l.jsxs)("div",{className:"b-blocks-bphb-hotspot "+("default"===n?"circle":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"),children:[o.tooltip&&(0,l.jsx)("div",{className:`b-blocks-tooltip-reader ${"default"===n?"one":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"} b-blocks-tooltip-${o.tooltipPosition}`,children:(0,l.jsx)("div",{className:"b-blocks-bphb-tooltip-content",dangerouslySetInnerHTML:{__html:o.tooltip}})}),"upload"===o.icon.type&&(0,l.jsx)("span",{className:"b-blocks-imghp-upload-icon",dangerouslySetInnerHTML:{__html:o.icon.url.upload}}),"library"===o.icon.type&&(0,l.jsx)("span",{className:"b-blocks-imghp-library-icon",dangerouslySetInnerHTML:{__html:o.icon.url.library}})]})}),"image"===o.spotOption&&(0,l.jsx)("div",{...d,ref:x,onClick:()=>i(a),onMouseDown:()=>i(a),style:{position:"absolute",cursor:"move"},className:"b-blocks-bphb-hotspot-container",id:`b-blocks-bphb-hotspot-container-${a}`,children:(0,l.jsxs)("div",{className:"b-blocks-bphb-hotspot "+("default"===n?"circle":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"),children:[o.tooltip&&(0,l.jsx)("div",{className:`b-blocks-tooltip-reader ${"default"===n?"one":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"} b-blocks-tooltip-${o.tooltipPosition}`,children:(0,l.jsx)("div",{className:"b-blocks-bphb-tooltip-content",dangerouslySetInnerHTML:{__html:o.tooltip}})}),o.image&&(0,l.jsx)("img",{src:o.image,style:{width:"100%",height:"100%",borderRadius:"inherit",objectFit:"cover"},alt:""})]})})]})},UN=({attributes:e,setAttributes:t,setActiveIdx:n,isSelected:o})=>{const{hotspot:i,image:a,preset:s,align:r}=e,[c,d]=(0,m.useState)(null),u=(0,m.useCallback)((e=>d(e)),[]);return(0,l.jsxs)("div",{ref:u,className:"b-blocks-hotspot-image-wrapper",children:[(0,l.jsx)("img",{src:a?.url||kn,alt:a?.alt||"Hotspot Image",className:"b-blocks-hotspot-image"}),i.map(((e,a)=>(0,l.jsx)(WN,{setActiveIdx:n,preset:s,align:r,isSelected:o,
458 -value:e.position.desktop,wrapperEl:c,element:e,index:a,onChange:e=>t({hotspot:Rb(i,(t=>{t[a].position.desktop=e}))})},a)))]})},GN=[{label:"Default",value:"left"},{label:"Left",value:"left"},{label:"Top",value:"top"},{label:"Right",value:"right"},{label:"Bottom",value:"bottom"},{label:"Top Left",value:"topleft"},{label:"Top Right",value:"topright"},{label:"Bottom Left",value:"bottomleft"},{label:"Bottom Right",value:"bottomright"}],VN={desktop:{height:"40px",width:"40px",padding:{left:"0px",right:"0px",top:"0px",bottom:"0px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"12px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#8a2be2",icon:"#fff"},border:{width:"0px"}},hover:{color:{bg:"",icon:"#fff"},border:{}}},qN={desktop:{height:"40px",width:"40px",padding:{left:"0px",right:"0px",top:"0px",bottom:"0px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"5px"},iconSize:"12px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#cd7418",icon:"#fff"},border:{width:"0px"}},hover:{color:{bg:"",icon:"#fff"},border:{}}},YN={desktop:{height:"40px",width:"40px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"12px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#cd18bf",icon:"#fff"},border:{color:"#fff",style:"solid",width:"1px"}},hover:{color:{bg:"",icon:"#fff"},border:{}}},KN={desktop:{height:"40px",width:"40px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"16px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"",icon:"#77cd18"},border:{color:"#77cd18",style:"solid",width:"2px"}},hover:{color:{bg:"",icon:"#77cd18"},border:{color:"#77cd18",style:"solid",width:"2px"}}},QN={desktop:{height:"40px",width:"100px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"25px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#3cbcd1a3",icon:"#fff"},border:{width:"0px"}},hover:{color:{bg:"",icon:"#fff"},border:{width:"0px"}}},ZN=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],XN=[{label:"None",value:""},{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"Fill",value:"fill"}],JN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,device:n,updateObj:o})=>{const{image:i}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Image","b-blocks"),children:[(0,l.jsx)(we,{label:(0,x.__)("Choose Image","b-blocks"),height:"100%",width:"100%",value:i?.url?{url:i.url}:{url:kn},default:kn,onChange:e=>t({image:{...i,url:e.url}})}),(0,l.jsx)(v,{children:(0,x.__)("Image Fit","b-blocks")}),(0,l.jsx)(Tn,{options:XN,size:"small",value:i.objectFit,onChange:e=>o("image",e,"objectFit")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",isUnitSelectTabbable:!0,value:i[n].height,min:1,max:1e3,onChange:e=>o("image",e,n,"height")})]})})),eM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},bgColor:"#8a2be2",boxShadow:"0px 0px 0px 0px #707070"},tM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#cd7418",boxShadow:"0px 0px 0px 0px #707070"},nM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#cd18bf",boxShadow:"0px 0px 0px 0px #707070"},oM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#77cd18",boxShadow:"0px 0px 0px 0px #707070"},iM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#3cbcd1",boxShadow:"0px 0px 0px 0px #707070"},aM=({attributes:e,setAttributes:t})=>{const{preset:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Presets","b-blocks"),children:[(0,l.jsx)("span",{children:"Templates"}),(0,l.jsx)("div",{className:"presets-container",children:[{value:"default",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/default.png"},{value:"themetwo",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-160416.png"},{value:"themethree",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-160945.png"},{value:"themefour",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-161051.png"},{value:"themefive",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-161736.png"}].map(((e,o)=>(0,l.jsxs)("div",{onClick:()=>{const n=e.value;t({preset:n,spots:"default"===n?VN:"themetwo"===n?qN:"themethree"===n?YN:"themefour"===n?KN:QN,tooltip:"default"===n?eM:"themetwo"===n?tM:"themethree"===n?nM:"themefour"===n?oM:iM})},className:"single-preset "+(n===e.value?"active":""),children:[(0,l.jsx)("div",{className:"preset-tooltip-container",children:(0,l.jsxs)("div",{className:"preset-tooltip",children:[(0,l.jsx)("i",{className:"fa-solid fa-caret-down"}),(0,l.jsxs)("span",{children:["Design ",o+1]})]})}),(0,l.jsx)("img",{src:e.img,alt:""})]},o)))})]})},sM=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M292.6 407.78l-120-320a22 22 0 00-41.2 0l-120 320a22 22 0 0041.2 15.44l36.16-96.42a2 2 0 011.87-1.3h122.74a2 2 0 011.87 1.3l36.16 96.42a22 22 0 0041.2-15.44zm-185.84-129l43.37-115.65a2 2 0 013.74 0l43.37 115.67a2 2 0 01-1.87 2.7h-86.74a2 2 0 01-1.87-2.7zM400.77 169.5c-41.72-.3-79.08 23.87-95 61.4a22 22 0 0040.5 17.2c8.88-20.89 29.77-34.44 53.32-34.6 32.32-.22 58.41 26.5 58.41 58.85a1.5 1.5 0 01-1.45 1.5c-21.92.61-47.92 2.07-71.12 4.8-54.75 6.44-87.43 36.29-87.43 79.85 0 23.19 8.76 44 24.67 58.68C337.6 430.93 358 438.5 380 438.5c31 0 57.69-8 77.94-23.22h.06a22 22 0 1044 .19v-143c0-56.18-45-102.56-101.23-102.97zM380 394.5c-17.53 0-38-9.43-38-36 0-10.67 3.83-18.14 12.43-24.23 8.37-5.93 21.2-10.16 36.14-11.92 21.12-2.49 44.82-3.86 65.14-4.47a2 2 0 012 2.1C455 370.1 429.46 394.5 380 394.5z"})}),rM=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{
459 -d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"})}),lM=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})}),cM=e=>{const{attributes:t,setAttributes:n,arrKey:o,index:i,setActiveIndex:a}=e,s=t[o],r=s[i],{data:c}=jd("bBlocksUtils"),{refetch:d}=Cd("b-blocks-enable-svg-mime-type",{_wpnonce:c?.nonce},!1),u=async()=>{$d(),await d()},p=new Tt,h=(e,t,o=null,r=null)=>{const l=Rb(s,(n=>{null!==r?n[i][e][o][r]=t:null!==o?n[i][e][o]=t:n[i][e]=t}));n({hotspot:l}),a&&a(i)};return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",initialTabName:r.option,tabs:[{title:"Spot",name:"spot"},{title:"Tooltip",name:"tooltip"}],onSelect:e=>h("option",e),children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:["spot"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Tn,{options:[{label:"Text",icon:(0,l.jsx)(sM,{}),value:"text"},{label:"Icon",icon:(0,l.jsx)(rM,{}),value:"icon"},{label:"Image",icon:(0,l.jsx)(lM,{}),value:"image"}],value:r?.spotOption,label:"Type",onChange:e=>h("spotOption",e),isIcon:!0}),"text"===r.spotOption&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)("p",{style:{margin:0},children:"Text"}),(0,l.jsx)(y.__experimentalInputControl,{className:"bpl-bphb-hostpot-block",value:r?.spotText,onChange:e=>h("spotText",e)})]}),(0,l.jsx)(v,{children:(0,x.__)("Spot Link","b-blocks")}),(0,l.jsx)(y.__experimentalInputControl,{className:"bpl-bphb-hostpot-block",placeholder:"https://example.com",value:r?.spotLink,onChange:e=>h("spotLink",e)}),(0,l.jsx)(y.CheckboxControl,{label:"Open in new window",className:"mt10",checked:r.newWindow,onChange:e=>h("newWindow",e)})]}),"icon"===r.spotOption&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{label:(0,x.__)("Icon Type","b-blocks"),className:"mt10",options:[{label:"Library",value:"library"},{label:"Upload",value:"upload"}],value:r.icon.type,onChange:e=>h("icon",e,"type")}),(0,l.jsxs)("div",{className:"mt15",children:["library"===r.icon.type&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:r.icon.url.library,onChange:e=>h("icon",e,"url","library")}),"upload"===r.icon.type&&(0,l.jsx)(we,{onClick:u,types:["image/svg+xml"],value:{url:r.icon.url.upload},label:"Upload SVG",onChange:async e=>{const t=e?.url?await p.sanitizeFile(e?.url):"";h("icon",t,"url","upload")},isSvgEnabled:!0})]})]}),"image"===r.spotOption&&(0,l.jsx)("div",{className:"mt15",children:(0,l.jsx)(we,{value:{url:r.image},label:(0,x.__)("Choose Image","b-blocks"),onChange:e=>h("image",e.url)})}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("X Position","b-blocks"),value:r.position.desktop.x,onChange:e=>h("position",e,"x"),min:0,max:100}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Y Position","b-blocks"),value:r.position.desktop.y,onChange:e=>h("position",e,"y"),min:0,max:100})]}),"tooltip"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(La,{value:r.tooltip,onChange:e=>h("tooltip",e),className:"mt10"}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Position","b-blocks"),className:"mt10",labelPosition:"edge",value:r.tooltipPosition,options:GN,onChange:e=>h("tooltipPosition",e)})]})]})})})},dM=({attributes:e,setAttributes:t,activeIdx:n,setActiveIdx:o,device:i})=>{const a={attributes:e,setAttributes:t,arrKey:"hotspot",activeIndex:n,setActiveIndex:o,device:i},s=Math.floor(91*Math.random()),r=Math.floor(91*Math.random());return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Spots","b-blocks"),children:[(0,l.jsx)(_a,{...a,newItem:(c=s,d=r,{borderColor:"",bgColor:"",spotsSize:"",option:"spot",spotOption:"text",spotText:"+",icon:{url:{upload:"",library:""},type:"library"},image:"",tooltip:"<p>Tooltip contents</p>",tooltipPosition:"left",position:{desktop:{x:c,y:d},tablet:{},mobile:{}},iconColor:"",iconSize:"12px",spotLink:"",newWindow:!1}),itemLabel:"Spot",design:"sortable",ItemSettings:cM}),!1]});var c,d},uM=({attributes:e,updateObj:t})=>{const{options:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tooltip Options","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)("span",{children:(0,x.__)("Speed (ms)","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{onChange:e=>t("options",e,"speed"),isDragEnabled:!0,isShiftStepEnabled:!0,shiftStep:10,step:1,min:100,value:Number(n.speed)})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)("span",{children:(0,x.__)("Delay (ms)","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{onChange:e=>t("options",e,"delay"),isDragEnabled:!0,isShiftStepEnabled:!0,shiftStep:10,step:1,min:100,value:Number(n.delay)})]})]})},pM=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(JN,{...e}),(0,l.jsx)(dM,{...e}),(0,l.jsx)(uM,{...e}),(0,l.jsx)(aM,{...e})]}),hM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{image:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Image","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",isUnitSelectTabbable:!0,value:o[t].width,min:1,max:100,onChange:e=>n("image",e,t,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",isUnitSelectTabbable:!0,value:o[t].height,min:1,max:1e3,onChange:e=>n("image",e,t,"height")})]})})),gM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{spots:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Spots","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:[{label:"PX",value:"px"}],isUnitSelectTabbable:!0,value:o[t].width,min:1,max:700,onChange:e=>n("spots",e,t,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[{label:"PX",value:"px"}],isUnitSelectTabbable:!0,value:o[t].height,min:1,max:700,onChange:e=>n("spots",e,t,"height")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[{label:"PX",value:"px"}],isUnitSelectTabbable:!0,value:o[t].iconSize,min:1,max:200,onChange:e=>n("spots",e,t,"iconSize")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].padding,resetValues:{left:"0px",right:"0px",top:"0px",bottom:"0px"},onChange:e=>n("spots",e,t,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{left:"5px",right:"5px",top:"5px",bottom:"5px"},onChange:e=>n("spots",e,t,"radius")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:Me,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:"Text/Icon Color",
460 -value:o[e].color.icon,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:t=>n("spots",t,e,"color","icon")}),(0,l.jsx)(Ue,{label:"Background Color",value:o[e].color.bg,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:t=>n("spots",t,e,"color","bg")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e].border,onChange:t=>n("spots",t,e,"border")})]})})]})})),mM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{tooltip:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Tooltip","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:[{label:"px",value:"px"}],isUnitSelectTabbable:!0,value:o[t].width,min:1,max:800,onChange:e=>n("tooltip",e,t,"width")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[t].padding,resetValues:{left:"5px",right:"5px",top:"5px",bottom:"5px"},onChange:e=>n("tooltip",e,t,"padding")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:o.textColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>n("tooltip",e,"textColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color","b-blocks"),value:o.bgColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>n("tooltip",e,"bgColor")}),(0,l.jsx)(Oa,{value:o.typo,onChange:e=>n("tooltip",e,"typo")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>n("tooltip",e,"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{left:"3px",right:"3px",top:"3px",bottom:"3px"},onChange:e=>n("tooltip",e,t,"radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:o.shadow,onChange:e=>n("tooltip",e,"shadow")})]})})),bM=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hM,{...e}),(0,l.jsx)(gM,{...e}),(0,l.jsx)(mM,{...e})]}),fM=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:ZN,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(pM,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(bM,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})},xM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,device:a}=e,{image:s}=t,[r,c]=(0,m.useState)(0),d=(0,m.useRef)(null),u=bBlocksPremiumChecker,p=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(fM,{attributes:t,setAttributes:n,activeIdx:r,setActiveIdx:c,updateObj:p,isPremium:u,device:a}),(0,l.jsx)("div",{ref:d,...(0,h.useBlockProps)(),onDragStart:e=>e.stopPropagation(),draggable:!1,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(HN,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(UN,{attributes:t,setAttributes:n,activeIdx:r,setActiveIdx:c,isSelected:i,device:a},`${JSON.stringify(s.width)}-${a}`)]})})]})}));Ll(FN.name)&&(0,p.registerBlockType)(FN,{icon:jr,edit:xM});const yM=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/image-scroller","version":"1.0.0","title":"Image Scroller","category":"bBlocks","description":"A dynamic image scroller that smoothly scrolls images on hover, featuring customizable speed, easing, and options for vertical or horizontal scrolling.","keywords":["scroll","image","image scroller"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"image":{"type":"object","default":{"img":{},"height":{"desktop":"200px","tablet":"","mobile":""}}},"options":{"type":"object","default":{"direction":"vertical","isScrollAuto":true,"duration":1000,"easing":"ease-in-out"}},"style":{"type":"object","default":{}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"mask":{"isMask":false,"shape":{"type":"circle","url":""},"size":{"type":"center center","scale":"100%"},"position":{"type":"center center","x":50,"y":50},"repeat":"no-repeat"},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),vM=({attributes:e,device:t})=>{const{image:n,options:o}=e,{direction:i,isScrollAuto:a}=o,s=(0,m.useRef)(null),r=(0,m.useRef)(null),{device:c}=_d(),d=t||c;(0,m.useEffect)((()=>{s.current&&r.current&&a&&(s.current?.addEventListener("mouseover",(()=>{"vertical"===i&&Number(r.current.clientHeight)>parseInt(n.height[d])&&(r.current.style.transform=`translateY(-${Number(r.current.clientHeight)-parseInt(n.height[d])}px)`),"horizontal"===i&&Number(r.current.clientWidth)>Number(s.current.clientWidth)&&(r.current.style.transform=`translateX(-${Number(r.current.clientWidth)-Number(s.current.clientWidth)}px)`)})),s.current?.addEventListener("mouseout",(()=>{"vertical"===i&&(r.current.style.transform="translateY(0px)"),"horizontal"===i&&(r.current.style.transform="translateX(0px)")})))
461 -}),[a,r.current]);const u=()=>(0,l.jsx)("div",{ref:s,className:`b-blocks-image-scroller-wrapper ${i} ${a?"":"scrollable"}`,children:(0,l.jsx)("img",{ref:r,className:"b-blocks-image-scroller",src:n.img.url,alt:n.img.alt})});return(0,l.jsx)(u,{})},kM=({attributes:e,id:o,isBackend:i=!1})=>{const{image:a,options:s,advanced:r}=e,{easing:c,duration:d}=s,u=`#${o} .b-blocks-image-scroller-wrapper`,p=`${u} .b-blocks-image-scroller`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${u}{\n\t\t\t${ns("height",a.height.desktop)}\n\t\t}\n\t\t${p}{\n\t\t\ttransition: transform ${d}ms ${c};\n\t\t}\n\t\t${t}{\n\t\t\t${ns("height",a.height.tablet)}\n\t\t}\n\t\t${n}{\n\t\t\t${ns("height",a.height.mobile)}\n\t\t}\n\t\t${_s(o,r,i)}\n\t\t`}})},wM=[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}],_M=[{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"}],CM=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],jM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,device:o}=e,{image:i,options:a}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(we,{value:i.img,height:"100%",width:"100%",onChange:e=>n({image:be(i,e,"img")})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Container Height","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i.height[o],onChange:e=>n({image:be(i,e,"height",o)})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Scroll Direction","b-blocks"),labelPosition:"edge",className:"mt10",options:wM,value:a.direction,onChange:e=>n({options:be(a,e,"direction")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Auto Scroll","b-blocks"),className:"mt10",value:a.isScrollAuto,checked:a.isScrollAuto,onChange:e=>n({options:be(a,e,"isScrollAuto")})}),a.isScrollAuto&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Scroll Duration (ms)","b-blocks"),className:"mt10",step:50,max:1e4,value:a.duration,onChange:e=>n({options:be(a,e,"duration")})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",className:"mt10",options:_M,value:a.easing,onChange:e=>n({options:be(a,e,"easing")})})]})]})]})})),$M=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Ra,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:CM,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(jM,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})})},SM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{image:a}=t,s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)($M,{attributes:t,setAttributes:n,isPremium:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(kM,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{children:a.img.url?(0,l.jsx)(vM,{attributes:t,device:i}):(0,l.jsx)(h.MediaPlaceholder,{allowedTypes:["image"],multiple:!1,labels:{title:"Upload Image"},accept:"image/*",addToGallery:!0,onSelect:e=>{n({image:be(a,e,"img")})}})})})]})]})}));Ll(yM.name)&&(0,p.registerBlockType)(yM,{icon:$r,edit:SM});const TM=JSON.parse('{"apiVersion":3,"name":"b-blocks/info-box","title":"Info Box","description":"Display information in box style.","category":"bBlocks","keywords":["information box","info box","message"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"infoBoxAlign":{"type":"string","default":"center"},"textAlign":{"type":"string","default":"center"},"width":{"type":"string","default":"100%"},"background":{"type":"object","default":{"color":"#f1f7ff"}},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"50px"}},"border":{"type":"object","default":{"width":"10px","color":"#fff","radius":"5px"}},"shadow":{"type":"object","default":{"blur":"15px"}},"isIcon":{"type":"boolean","default":true},"icon":{"type":"object","default":{"class":"fa fa-info-circle","fontSize":70,"color":"#146EF5"}},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"title":{"type":"string","selector":"h3.infoBoxTitle","default":"Info Box Title"},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"},"fontWeight":600}},"titleColor":{"type":"string","default":"#333"},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"desc":{"type":"string","selector":"p.infoBoxDescription","default":"This content area describes info box descriptions or details."},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"descColor":{"type":"string","default":"#333"},"descMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isBtn":{"type":"boolean","default":false},"btn":{"type":"string","selector":"a.infoBoxButton","default":"Click Me"},"btnLink":{"type":"string","default":"#"},"isLinkNewTab":{"type":"boolean","default":true},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"btnColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"btnHovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"btnPadding":{"type":"object","default":{"vertical":"8px","horizontal":"15px"}},"btnBorder":{"type":"object","default":{"radius":"5px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),NM=({settings:e})=>{const{attributes:{infoBoxAlign:t,textAlign:n,width:i,background:s,padding:r,border:c,shadow:d,isIcon:u,icon:p,iconMargin:g,titleTypo:m,titleColor:b,titleMargin:f,isDesc:k,descTypo:w,descColor:_,descMargin:C,isBtn:j,btnLink:$,isLinkNewTab:S,btnTypo:T,btnColors:N,btnHovColors:M,btnPadding:L,btnBorder:P},setAttributes:E}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Info Box Settings","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:i,onChange:e=>E({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:s,onChange:e=>E({background:e})}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:r,onChange:e=>E({padding:e}),defaults:{vertical:"50px",horizontal:"50px"}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:c,onChange:e=>E({border:e}),defaults:{width:"10px",color:"#fff",radius:"5px"}}),(0,l.jsx)(od,{label:(0,x.__)("Shadow:","b-blocks"),value:d,onChange:e=>E({shadow:e}),defaults:{blur:"15px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:u,onChange:e=>E({
462 -isIcon:e})}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Un,{value:p,onChange:e=>E({icon:e}),defaults:{class:"fa fa-info-circle",fontSize:70,color:o}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:g,onChange:e=>E({iconMargin:e}),defaults:{side:4,bottom:"20px"}})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:m,onChange:e=>E({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20},fontWeight:600}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:b,onChange:e=>E({titleColor:e}),defaultColor:"#333"}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:f,onChange:e=>E({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:k,onChange:e=>E({isDesc:e})}),k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Oa,{value:w,onChange:e=>E({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:_,onChange:e=>E({descColor:e}),defaultColor:"#333"}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>E({descMargin:e}),defaults:{side:4,bottom:"15px"}})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Button","b-blocks"),checked:j,onChange:e=>E({isBtn:e})}),j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:$,onChange:e=>E({btnLink:e}),placeholder:(0,x.__)("Button link","b-blocks")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open link in new tab","b-blocks"),checked:S,onChange:e=>E({isLinkNewTab:e})}),(0,l.jsx)(Oa,{value:T,onChange:e=>E({btnTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(On,{value:N,onChange:e=>E({btnColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:M,onChange:e=>E({btnHovColors:e}),defaults:{color:"#fff",bg:a}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:L,onChange:e=>E({btnPadding:e}),defaults:{vertical:"8px",horizontal:"15px"}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:P,onChange:e=>E({btnBorder:e}),defaults:{radius:"5px"}})]})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.AlignmentToolbar,{value:t,onChange:e=>E({infoBoxAlign:e}),describedBy:(0,x.__)("Info Box Alignment"),alignmentControls:[{title:(0,x.__)("Info Box in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Info Box in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Info Box in right","b-blocks"),align:"right",icon:"align-right"}]}),(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>E({textAlign:e})})]})]})},MM="bBlocksInfoBox";Ll(TM.name)&&(0,p.registerBlockType)(TM,{icon:Sr,edit:e=>{const{attributes:{infoBoxAlign:t,textAlign:n,width:o,background:i,padding:a,border:s,shadow:r,isIcon:c,icon:d,iconMargin:u,title:p,titleTypo:g,titleColor:m,titleMargin:b,isDesc:f,desc:y,descTypo:v,descColor:k,descMargin:w,isBtn:_,btn:C,btnLink:j,isLinkNewTab:$,btnTypo:S,btnColors:T,btnHovColors:N,btnPadding:M,btnBorder:L},setAttributes:P,clientId:E}=e,A=`#block-${E}`,B=`${A} .${MM}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(NM,{settings:e}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${ps("",g)?.googleFontLink}\n\t\t\t\t${ps("",v)?.googleFontLink}\n\t\t\t\t${ps("",S)?.googleFontLink}\n\t\t\t\t${ps(`${B} .infoBoxTitle`,g)?.styles}\n\t\t\t\t${ps(`${B} .infoBoxDescription`,v)?.styles}\n\t\t\t\t${ps(`${B} .infoBoxButton`,S)?.styles}\n\n\t\t\t\t${A}{\n\t\t\t\t\ttext-align: ${t};\n\t\t\t\t}\n\t\t\t\t${B}{\n\t\t\t\t\ttext-align: ${n};\n\t\t\t\t\twidth: ${["0px","0%","0em"].includes(o)?"auto":o};\n\t\t\t\t\t${os(i)}\n\t\t\t\t\tpadding: ${us(a)};\n\t\t\t\t\t${is(s)}\n\t\t\t\t\tbox-shadow: ${ds(r)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxIcon{\n\t\t\t\t\tmargin: ${us(u)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxIcon i{\n\t\t\t\t\t${rs(d)}\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxTitle{\n\t\t\t\t\tcolor: ${m};\n\t\t\t\t\tmargin: ${us(b)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxDescription{\n\t\t\t\t\tcolor: ${k};\n\t\t\t\t\tmargin: ${us(w)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxButton{\n\t\t\t\t\t${ss(T)}\n\t\t\t\t\tpadding: ${us(M)};\n\t\t\t\t\t${is(L)}\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxButton:hover{\n\t\t\t\t\t${ss(N)}\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsxs)("div",{className:MM,children:[c&&d?.class&&(0,l.jsx)("div",{className:"infoBoxIcon",children:(0,l.jsx)("i",{className:d?.class})}),(0,l.jsx)(h.RichText,{className:"infoBoxTitle",tagName:"h3",value:p,onChange:e=>P({title:e}),placeholder:(0,x.__)("Info box title","b-blocks"),inlineToolbar:!0}),f&&(0,l.jsx)(h.RichText,{className:"infoBoxDescription",tagName:"p",value:y,onChange:e=>P({desc:e}),placeholder:(0,x.__)("Info box description","b-blocks"),inlineToolbar:!0}),_&&(0,l.jsx)(h.RichText,{className:"infoBoxButton",tagName:"a",value:C,href:$t(j),target:$?"_blank":"",rel:"noreferrer noopener",onChange:e=>P({btn:e}),placeholder:(0,x.__)("Click Me","b-blocks"),inlineToolbar:!0})]})]})]})},save:()=>null})
463 -;const LM=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/infographic","version":"1.0.0","title":"Infographic Block","category":"bBlocks","description":"Build a circular infographic. Segment circles sit evenly around two decorative rings and reveal their title, divider, text and image inside the center disc on click or hover.","keywords":["infographic","circle","circular","segments","diagram","process","wheel"],"textdomain":"b-blocks","attributes":{"blockId":{"type":"string","default":""},"general":{"type":"object","default":{"desktop":{"alignment":"center"},"tablet":{"alignment":""},"mobile":{"alignment":""},"itemTriggerType":"click"}},"defaults":{"type":"object","default":{"item":"Title 1","itemTitle":"Info Title","itemText":"Select any segment around the circle to reveal its details right here.","image":{"id":null,"url":"","alt":""}}},"button":{"type":"object","default":{"showIcon":true,"showText":true}},"wheel":{"type":"object","default":{"startAngle":"0deg","direction":"clockwise","sweep":"360deg","radiusOffset":"0px","rotateLabels":false,"enableSegmentsType":false,"wedgeGap":"3deg"}},"animation":{"type":"object","default":{"enable":false,"trigger":"load","delay":"0ms","type":"spread","easing":"ease","speed":"500ms","stagger":"","order":"clockwise","rotate":false,"rotateSpeed":"20s","rotateDirection":"clockwise","pauseOnHover":true,"hoverMotion":"none","activePulse":false,"contentType":"fade","contentSpeed":"300ms"}},"elements":{"type":"object","default":{"title":true,"divider":true,"text":true,"image":false}},"items":{"type":"array","default":[{"id":"bBlocksInfographic-item-1","enable":true,"buttonLabel":"Title 1","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120v136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z\'/></svg>","url":""},"title":"Info Title 1","description":"Describe the first part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}},{"id":"bBlocksInfographic-item-2","enable":true,"buttonLabel":"Title 2","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\'/></svg>","url":""},"title":"Info Title 2","description":"Describe the second part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}},{"id":"bBlocksInfographic-item-3","enable":true,"buttonLabel":"Title 3","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM169.8 165.3c-7.9 22.3 3.7 46.8 26 54.6l9.9 3.5c11.1 3.9 18.5 14.4 18.5 26.2s-7.4 22.3-18.5 26.2l-9.9 3.5c-22.3 7.9-33.9 32.3-26 54.6s32.3 33.9 54.6 26l9.9-3.5c11.1-3.9 23.4-.6 31.1 8.3l6.8 7.9c15.4 17.9 42.5 19.9 60.4 4.5s19.9-42.5 4.5-60.4l-6.8-7.9c-7.7-8.9-9.4-21.6-4.2-32.2l4.6-9.4c10.4-21.2 1.6-46.8-19.6-57.2s-46.8-1.6-57.2 19.6l-4.6 9.4c-5.2 10.6-16 17.3-27.8 17.3H209.6c-16.4 0-31-10.4-36.4-25.9l-3.4-9.1z\'/></svg>","url":""},"title":"Info Title 3","description":"Describe the third part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}},{"id":"bBlocksInfographic-item-4","enable":true,"buttonLabel":"Title 4","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm-24-136V232c0-13.3 10.7-24 24-24s24 10.7 24 24v144c0 13.3-10.7 24-24 24s-24-10.7-24-24zm24-224a32 32 0 1 1 0-64 32 32 0 1 1 0 64z\'/></svg>","url":""},"title":"Info Title 4","description":"Describe the fourth part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}}]},"icon":{"type":"object","default":{"view":"framed","shape":"circle","desktop":{"size":"20px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":"18px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":"16px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"color":"","border":{"normal":{},"hover":{}},"transition":"300ms","background":{"type":"solid","color":""},"position":"top","plateColor":"rgba(255, 255, 255, 0.22)"}},"segment":{"type":"object","default":{"normal":{"background":{"type":"solid","color":"#BFA83B"},"color":"#FFFFFF","border":{},"shadow":[]},"hover":{"background":{},"color":"","border":{},"shadow":[]},"active":{"background":{},"color":"","border":{},"shadow":[]},"desktop":{"size":"118px","padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":"96px","padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":"76px","padding":{"top":"","right":"","bottom":"","left":""}},"spacing":"6px","margin":{"top":"","right":"","bottom":"","left":""},"transition":"300ms","shape":"circle","radius":{"top":"","right":"","bottom":"","left":""},"labelTypo":{"fontSize":{"desktop":13,"tablet":12,"mobile":11},"fontWeight":"600"}}},"outerDisc":{"type":"object","default":{"desktop":{"size":"560px","ringGap":"0px"},"tablet":{"size":"460px","ringGap":"0px"},"mobile":{"size":"330px","ringGap":"0px"},"background":{"type":"solid","color":""},"borderColor":"#7E57C2","borderWidth":"2px","borderStyle":"solid","transition":"300ms","shadow":{"normal":[],"hover":[]}}},"innerDisc":{"type":"object","default":{"desktop":{"size":"276px","padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":"220px","padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":"130px","padding":{"top":"","right":"","bottom":"","left":""}},"background":{"type":"solid","color":"#F2F0E4"},"borderColor":"#3F8F4B","borderWidth":"2px","borderStyle":"solid","contentWidth":"78%","contentGap":"10px","contentAlign":"center","transition":"300ms","shadow":{"normal":[],"hover":[]}}},"content":{"type":"object","default":{"title":{"color":"#1F2937","typo":{"fontSize":{"desktop":34,"tablet":28,"mobile":22},"fontWeight":"700","lineHeight":"1.2"},"tag":"h3"},"text":{"color":"#4B5563","typo":{"fontSize":{"desktop":14,"tablet":13,"mobile":12},"lineHeight":"1.6"}},"divider":{"color":"#BFA83B","width":"60px","height":"3px","style":"solid"},"image":{"desktop":{"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"107px"},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":""},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":""},"fit":"cover"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),PM="b-blocks-infographic",EM=(0,
464 -l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),AM=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),BM=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),IM=[{label:(0,x.__)("Left","b-blocks"),value:"left",icon:EM},{label:(0,x.__)("Center","b-blocks"),value:"center",icon:AM},{label:(0,x.__)("Right","b-blocks"),value:"right",icon:BM}],OM=[{label:(0,x.__)("Click","b-blocks"),value:"click"},{label:(0,x.__)("Hover","b-blocks"),value:"hover"}],RM=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],zM=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Stacked","b-blocks"),value:"stacked"},{label:(0,x.__)("Framed","b-blocks"),value:"framed"}],DM=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"}],FM=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],HM=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"}],WM=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],UM=[{label:(0,x.__)("Clockwise","b-blocks"),value:"clockwise"},{label:(0,x.__)("Anti-clockwise","b-blocks"),value:"anticlockwise"}],GM=[{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Back Out","b-blocks"),value:"back-out"},{label:(0,x.__)("Back In Out","b-blocks"),value:"back-in-out"},{label:(0,x.__)("Elastic","b-blocks"),value:"elastic"}],VM={"back-out":"cubic-bezier(0.34, 1.56, 0.64, 1)","back-in-out":"cubic-bezier(0.68, -0.55, 0.27, 1.55)",elastic:"cubic-bezier(0.5, -0.6, 0.35, 1.7)"},qM=(e="ease")=>VM[e]||e||"ease",YM=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],KM=[{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"}],QM=(e,t=[])=>{const n=mL(e,0);return 0<n?`transition: ${t.map((e=>`${e} ${n}ms ease`)).join(", ")};`:""},ZM=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")},{name:"active",title:(0,x.__)("Active","b-blocks")}],XM=["h1","h2","h3","h4","h5","h6","div","p","span"],JM=XM.map((e=>({label:e.toUpperCase(),value:e}))),eL=(e,t)=>{if("normal"===e)return t;const n=[...ZM,...en].find((t=>t.name===e))?.title;return n?`${n} ${t}`:t},tL=[{name:"content",title:(0,x.__)("Content","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],nL=[{label:(0,x.__)("Icon","b-blocks"),value:"icon"},{label:(0,x.__)("Image","b-blocks"),value:"image"}],oL=[{label:(0,x.__)("Spread","b-blocks"),value:"spread"},{label:(0,x.__)("Fade In","b-blocks"),value:"fade"},{label:(0,x.__)("Zoom In","b-blocks"),value:"zoom"},{label:(0,x.__)("Spin In","b-blocks"),value:"spin"},{label:(0,x.__)("Drop In","b-blocks"),value:"drop"},{label:(0,x.__)("Bounce In","b-blocks"),value:"bounce"},{label:(0,x.__)("Flip In","b-blocks"),value:"flip"},{label:(0,x.__)("Blur In","b-blocks"),value:"blur"},{label:(0,x.__)("Swing In","b-blocks"),value:"swing"},{label:(0,x.__)("Roll In","b-blocks"),value:"roll"},{label:(0,x.__)("Unfold","b-blocks"),value:"unfold"}],iL=["fade","blur"],aL=e=>iL.includes(e),sL={spread:"bBlocksInfographicSpread",fade:"bBlocksInfographicFade",zoom:"bBlocksInfographicZoom",spin:"bBlocksInfographicSpin",drop:"bBlocksInfographicDrop",bounce:"bBlocksInfographicBounce",flip:"bBlocksInfographicFlip",blur:"bBlocksInfographicBlur",swing:"bBlocksInfographicSwing",roll:"bBlocksInfographicRoll",unfold:"bBlocksInfographicUnfold"},rL=[{label:(0,x.__)("On page load","b-blocks"),value:"load"},{label:(0,x.__)("When scrolled into view","b-blocks"),value:"scroll"},{label:(0,x.__)("Every time it scrolls into view","b-blocks"),value:"scrollRepeat"}],lL=e=>"scroll"===e||"scrollRepeat"===e,cL=[{label:(0,x.__)("Clockwise","b-blocks"),value:"clockwise"},{label:(0,x.__)("Anti-clockwise","b-blocks"),value:"anticlockwise"},{label:(0,x.__)("From Top Both Ways","b-blocks"),value:"fromTop"},{label:(0,x.__)("From Bottom Both Ways","b-blocks"),value:"fromBottom"},{label:(0,x.__)("Random","b-blocks"),value:"random"}],dL=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Slide Up","b-blocks"),value:"slide-up"},{label:(0,x.__)("Slide Sideways","b-blocks"),value:"slide-side"},{label:(0,x.__)("Zoom","b-blocks"),value:"zoom"},{label:(0,x.__)("Flip","b-blocks"),value:"flip"}],uL=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Grow","b-blocks"),value:"grow"},{label:(0,x.__)("Lift","b-blocks"),value:"lift"},{label:(0,x.__)("Pulse","b-blocks"),value:"pulse"},{label:(0,x.__)("Wobble","b-blocks"),value:"wobble"},{label:(0,x.__)("Rotate","b-blocks"),value:"rotate"}],pL=e=>{let t=2654435761*(e+1)%4294967296;return t^=t>>>15,t},hL=(e=0)=>({value:"ms",label:"ms",default:e}),gL=(e=0)=>({value:"s",label:"s",default:e}),mL=(e,t=500)=>{const n=parseFloat(e);if(isNaN(n))return t;const o=String(e).trim();return/s$/i.test(o)&&!/ms$/i.test(o)?1e3*n:n},bL=(e={},t,n,o)=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},a=i("desktop")??o;if("desktop"===t)return a;const s=i("tablet")??a;return"tablet"===t?s:i("mobile")??s},fL=(e,t="0px")=>{if(null==e||""===e)return t;const n=parseFloat(e);return isNaN(n)?t:/[a-z%]$/i.test(String(e).trim())?String(e).trim():`${n}px`},xL=(e,t)=>`calc(${e/2}px + ${fL(t)} / 2)`,yL=e=>Math.max(Math.floor(e/2),40),vL=(e=0)=>({value:"deg",label:"deg",default:e}),kL=(e=[])=>e.map(((e,t)=>({item:e,index:t}))).filter((({item:e})=>!1!==e?.enable)),wL=(e,t,n={})=>{if(0>=t)return 0
465 -;const o=parseFloat(n.startAngle)||0,i="anticlockwise"===n.direction?-1:1,a=Math.min(Math.abs(parseFloat(n.sweep??360))||360,360);return o+e*(360<=a?a/t:a/Math.max(t-1,1))*i},_L=(e,t,n,o={})=>{const i=parseFloat(e?.position);return isNaN(i)?wL(t,n,o):i},CL=(e=[],t={})=>{const n=Math.max(parseFloat(t.wedgeGap??3)||0,0),o=((e=[],t={})=>kL(e).map((({item:e,index:n},o,i)=>({index:n,angle:_L(e,o,i.length,t)}))))(e,t).map((({index:e,angle:t})=>({index:e,angle:(t%360+360)%360}))),i=o.length;if(!i)return[];const a=[...o].sort(((e,t)=>e.angle-t.angle)),s=a.map(((e,t)=>e.angle-(e=>{if(1===i)return 360;const t=a[e].angle-a[(e-1+i)%i].angle;return 0>=t?t+360:t})(t)/2)),r=[];return a.forEach(((e,t)=>{let o=s[(t+1)%i]-s[t];for(;0>=o;)o+=360;r[e.index]={index:e.index,start:s[t]+n/2,span:Math.max(o-n,0),mid:s[t]+o/2}})),r},jL=(e=[],t)=>e.find((e=>e?.id===t))||null,$L=(e={},t={})=>{const{type:n="spread"}=e,o=sL[n]?n:"spread";return e.enable?t.enableSegmentsType?aL(o)?o:"fade":o:""},SL=(e,t={})=>{const{general:n={},wheel:o={},animation:i={},icon:a={},segment:s={}}=e,r=$L(i,o),l=i.enable&&(!lL(i.trigger)||t.inView),c=l&&!o.enableSegmentsType&&i.rotate;return[PM,"b-blocks-infographic-trigger-"+("hover"===n.itemTriggerType?"hover":"click"),`b-blocks-infographic-icon-view-${a.view||"default"}`,`b-blocks-infographic-icon-shape-${a.shape||"circle"}`,`b-blocks-infographic-segment-shape-${s.shape||"circle"}`,`b-blocks-infographic-icon-pos-${a.position||"top"}`,o.enableSegmentsType?"b-blocks-infographic-has-segments":"",i.enable&&lL(i.trigger)&&!t.inView?"b-blocks-infographic-awaiting-view":"",l?"b-blocks-infographic-has-animation":"",l?`b-blocks-infographic-anim-${r}`:"",c?"b-blocks-infographic-has-rotation":"",c&&"anticlockwise"===i.rotateDirection?"b-blocks-infographic-rotate-reverse":"",c&&i.pauseOnHover?"b-blocks-infographic-pause-on-hover":"",i.enable&&i.hoverMotion&&"none"!==i.hoverMotion?`b-blocks-infographic-hover-motion-${i.hoverMotion}`:"",i.enable&&i.activePulse?"b-blocks-infographic-has-active-pulse":"",i.enable&&i.contentType&&"none"!==i.contentType?`b-blocks-infographic-content-anim-${i.contentType}`:""].filter(Boolean).join(" ")},TL=({buttonIcon:e={},label:t})=>{const{type:n="icon",icon:o="",url:i=""}=e;return"image"===n?i?(0,l.jsx)("span",{className:"b-blocks-infographic-segment-icon",children:(0,l.jsx)("img",{src:i,alt:t||""})}):null:o?(0,l.jsx)("span",{className:"b-blocks-infographic-segment-icon",dangerouslySetInnerHTML:{__html:o}}):null},NL=({image:e={},height:t})=>e?.url?(0,l.jsx)("div",{className:"b-blocks-infographic-center-image",children:(0,l.jsx)("img",{src:e.url,alt:e.alt||"",style:t?{height:fL(t)}:void 0})}):null,ML=({attributes:e,isBackend:t=!1,custom:n={}})=>{const{general:o={},defaults:i={},button:a={},wheel:s={},animation:r={},elements:c={},content:d={}}=e,u=Array.isArray(e?.items)?e.items:[],p=(0,m.useMemo)((()=>kL(u).map((({item:e})=>e))),[u]),{item:h,itemTitle:g,itemText:b,image:f={}}=i,{showIcon:x,showText:y}=a,{itemTriggerType:v}=o,k=$L(r,s),w=r.enable?r.stagger?mL(r.stagger,0):Math.round(.25*mL(r.speed)):0,_=r.enable?mL(r.delay,0):0,C=r.enable&&!s.enableSegmentsType&&r.rotate,j=C?_+Math.max(0,p.length-1)*w+mL(r.speed):0,{title:$,divider:S,text:T,image:N}=c,M=((e=[],t)=>{const n=e.find((e=>e?.buttonLabel===t));return(n||e[0])?.id||""})(p,h),[L,P]=(0,m.useState)(M);(0,m.useEffect)((()=>P(M)),[M]);const E=t?n?.activeIndex:void 0;(0,m.useEffect)((()=>{const e=u[E];e?.id&&P(e.id)}),[E]);const A=e=>{if(!s.rotateLabels)return-e;const t=(e%360+360)%360;return 90<t&&270>t?180:0},B=t&&r.enable?`${k}-${r.easing}-${r.speed}-${r.order}-${r.stagger}-${r.delay}-${r.rotate}`:"",I=(0,m.useRef)(null),[O,R]=(0,m.useState)(t||!lL(r.trigger));(0,m.useEffect)((()=>{if(t||!lL(r.trigger))return void R(!0);const e=I.current;if(!e||"undefined"==typeof IntersectionObserver)return void R(!0);R(!1);const n="scrollRepeat"===r.trigger,o=new IntersectionObserver((([e])=>{e.isIntersecting?(R(!0),!n&&o.disconnect()):n&&R(!1)}),{threshold:.2});return o.observe(e),()=>o.disconnect()}),[t,r.trigger,r.enable]);const z="scrollRepeat"===r.trigger&&O?"in":"out",D=(0,m.useMemo)((()=>((e,t="clockwise")=>{const n=Array.from({length:e},((e,t)=>t));if("anticlockwise"===t)return n.map((t=>e-1-t));if("fromTop"===t)return n.map((t=>Math.min(t,e-t)));if("fromBottom"===t)return n.map((t=>Math.ceil(e/2)-Math.min(t,e-t)));if("random"===t){const e=[...n].sort(((e,t)=>pL(e)-pL(t)));return n.map((t=>e.indexOf(t)))}return n})(p.length,r.order)),[p.length,r.order]),F=(0,m.useMemo)((()=>s.enableSegmentsType?CL(u,s):[]),[s,u]),H=(0,m.useMemo)((()=>kL(u)),[u]),W=jL(u,L)||jL(u,M),U=W?.title||g,G=W?.description||b,V=W?.image?.url?W.image:f,q=u.findIndex((e=>e?.id===W?.id)),Y=W?.image?.url?W?.imageHeight:"",K=W?.imagePosition||"top",Q=e=>{const t=_+(D[e]??e)*w;return C?`${t}ms, ${j}ms`:t?`${t}ms`:""},Z=(e,o)=>{P(e?.id),t&&n?.setActiveIndex&&n.setActiveIndex(o)},X=XM.includes(d?.title?.tag)?d.title.tag:"h3",J=`${r.contentType||"none"}-${r.contentSpeed||""}`,ee=(0,l.jsxs)(l.Fragment,{children:[$&&U&&(0,l.jsx)(X,{className:"b-blocks-infographic-center-title",children:U}),S&&(0,l.jsx)("span",{className:"b-blocks-infographic-center-divider"}),T&&G&&(0,l.jsx)("p",{className:"b-blocks-infographic-center-text",children:G})]});return(0,l.jsx)("div",{className:SL(e,{inView:O}),ref:I,children:(0,l.jsxs)("div",{className:"b-blocks-infographic-circle",children:[(0,l.jsx)("div",{className:"b-blocks-infographic-center-disc","data-item-index":-1<q?q:void 0,children:(0,l.jsxs)("div",{className:"b-blocks-infographic-center-content",children:[N&&"top"===K&&(0,l.jsx)(NL,{image:V,height:Y}),ee,N&&"bottom"===K&&(0,l.jsx)(NL,{image:V,height:Y})]},`${W?.id||"none"}-${J}`)}),H.map((({item:e,index:o},i)=>{const a=!!W&&e?.id===W.id,{url:r="",target:c=!1,nofollow:d=!1,title:u=""}=e?.link||{},p=F[o]||{start:0,span:0,mid:0},h=_L(e,i,H.length,s),g=A(h),m={className:["b-blocks-infographic-segment",a?"active":"",t&&o===n?.activeIndex?"bPlNowEditing":""].filter(Boolean).join(" "),"data-index":o,"data-item-id":e?.id,"aria-pressed":a,style:{"--bbInfographicAngle":`${h}deg`,"--bbInfographicCounter":`${g}deg`,"--bbInfographicCounterEnd":`${s.rotateLabels?g:g-360}deg`,"--bbInfographicMid":`${p.mid}deg`,"--bbInfographicMidCounter":`${A(p.mid)}deg`,...Q(i)?{animationDelay:Q(i)}:{}},onMouseEnter:"hover"===v?()=>Z(e,o):void 0,onFocus:"hover"===v?()=>Z(e,o):void 0,onClick:()=>Z(e,o)},b=(0,l.jsxs)("span",{className:"b-blocks-infographic-segment-inner",children:[x&&(0,l.jsx)(TL,{buttonIcon:e?.buttonIcon,label:e?.buttonLabel}),y&&e?.buttonLabel&&(0,l.jsx)("span",{className:"b-blocks-infographic-segment-label",children:e.buttonLabel})]});return r&&!t?(0,l.jsx)("a",{href:r,title:u||void 0,"aria-label":u||void 0,target:c?"_blank":"_self",rel:"noreferrer noopener"+(d?" nofollow":""),...m,children:b},`${e?.id||o}${B}${z}`):(0,l.jsx)("button",{type:"button",...m,children:b},`${e?.id||o}${B}${z}`)}))]})})},LL=e=>Array.isArray(e)?e.map(LL):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,LL(t)]))):(e=>{if("string"!=typeof e)return e;const t=e.replace(/\/\*|\*\//g,"").replace(/[{};<>\\]/g,"").replace(/[\r\n\t]+/g," "),n=e=>(t.split(e).length-1)%2;return n('"')||n("'")?t.replace(/["']/g,""):t})(e),PL=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:a={}}=e,s=(0,m.useMemo)((()=>LL({...e,advanced:void 0
466 -})),[e]),{general:r={},wheel:c={},animation:d={},icon:u={},segment:p={},outerDisc:h={},innerDisc:g={},content:b={}}=s,f=Array.isArray(s?.items)?s.items:[],{normal:x={},hover:y={},active:v={}}=p,{title:k={},text:w={},divider:_={},image:C={}}=b,j=`#${o} .${PM}`,$=`${j} .b-blocks-infographic-circle`,S=`${$} .b-blocks-infographic-segment`,T=`${$} .b-blocks-infographic-center-disc`,N=`${T} .b-blocks-infographic-center-title`,M=`${T} .b-blocks-infographic-center-text`,L=`${T} .b-blocks-infographic-center-divider`,P=`${S} .b-blocks-infographic-segment-label`,E=`${S} .b-blocks-infographic-segment-inner`,A=`${S} .b-blocks-infographic-segment-icon`,B=`${T} .b-blocks-infographic-center-image img`,I=`${j}:not(.b-blocks-infographic-has-segments) .b-blocks-infographic-circle .b-blocks-infographic-segment`,O=`${j}.b-blocks-infographic-has-segments .b-blocks-infographic-circle .b-blocks-infographic-segment`,R=(e,t)=>fL(e.borderWidth??t),z=R(g,"2px"),D=R(h,"2px"),F=e=>Object.keys(e||{}).length?as(e):"",H=(e,...t)=>{const n=t.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return n?`${e}{ ${n} }`:""},W=g.borderColor||"#3F8F4B",U=h.borderColor||"#7E57C2",G="left: 50%; right: auto;",V=e=>{const{circle:t,outerGap:n,segmentSize:o,iconSize:i,radius:a,disc:s}=(e=>{const t=parseFloat(bL(h,e,"size",560))||560,n=fL(bL(u,e,"size","20px"),"20px"),o=parseFloat(bL(g,e,"size",276))||276,i=parseFloat(h?.[e]?.ringGap)||0,a=t+2*i;return{circle:t,outerGap:i,segmentSize:Math.min(parseFloat(bL(p,e,"size",118))||118,yL(t)),iconSize:n,radius:`calc(${xL(a,D)} + ${fL(c.radiusOffset,"0px")})`,disc:o}})(e),l={tablet:"desktop",mobile:"tablet"}[e],d=bL(r,e,"alignment","center");return`${H(j,l&&d===bL(r,l,"alignment","center")?"":`text-align: ${d};`)}\n\t\t${H($,`width: ${t}px;`,`height: ${t}px;`,`padding: ${n?fL(h[e].ringGap,"0px"):"0px"};`,`background-clip: ${n?"content-box":"border-box"};`)}\n\t\t${H(S,ns("padding",hs(p?.[e]?.padding)))}\n\t\t${c.enableSegmentsType?`${O}{\n\t\t\twidth: ${t}px;\n\t\t\theight: ${t}px;\n\t\t\t${G}\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\t--bbInfographicContentRadius: ${(s/2+t/2)/2}px;\n\t\t}`:`${I}{\n\t\t\twidth: ${o}px;\n\t\t\theight: ${o}px;\n\t\t\t${G}\n\t\t\t--bbInfographicRadius: ${a};\n\t\t\ttransform: translate(-50%, -50%) rotate(var(--bbInfographicAngle, 0deg)) translateY(calc(var(--bbInfographicRadius, 0px) * -1)) rotate(var(--bbInfographicCounter, 0deg));\n\t\t}`}\n\t\t${S} .b-blocks-infographic-segment-icon>svg,\n\t\t${S} .b-blocks-infographic-segment-icon>img{\n\t\t\twidth: ${i};\n\t\t\theight: ${i};\n\t\t}\n\t\t${H(A,ns("padding",hs(u?.[e]?.padding)),ns("border-radius",hs(u?.[e]?.radius)))}\n\t\t${H(B,ns("border-radius",hs(C?.[e]?.radius)),ns("width",fL(C?.[e]?.width,"")),ns("height",fL(C?.[e]?.height,"")))}\n\t\t${H(T,`width: ${s}px;`,`height: ${s}px;`,ns("padding",hs(g?.[e]?.padding)))}`},q=(e,t)=>{const n=os(t?.background),o=F(t?.border),i=ns("box-shadow",ls(t?.shadow)),a=t?.color;return[H(e,n,ns("color",a),o,i),a?`${e} .b-blocks-infographic-segment-icon>svg{ ${ns("fill",a)} }`:""].filter(Boolean).join("\n")},Y=(e,t)=>{const{label:n,icon:o}=t?.color||{},i=os(t?.background),a=F(t?.border);return[i||a?`${e}{ ${i} ${a} }`:"",n?`${e} .b-blocks-infographic-segment-label{ color: ${n}; }`:"",o?`${e} .b-blocks-infographic-segment-icon{ color: ${o}; } ${e} .b-blocks-infographic-segment-icon>svg{ fill: ${o}; }`:""].filter(Boolean).join("\n")},K=(e,t)=>{const{title:n,divider:o,desc:i}=t?.color||{};return[H(`${e} .b-blocks-infographic-center-title`,ns("color",n)),H(`${e} .b-blocks-infographic-center-divider`,ns("border-top-color",o)),H(`${e} .b-blocks-infographic-center-text`,ns("color",i))].filter(Boolean).join("\n")},Q=(0,m.useMemo)((()=>`\n\t\t${ps("",k.typo)?.googleFontLink}\n\t\t${ps("",w.typo)?.googleFontLink}\n\t\t${ps("",p.labelTypo)?.googleFontLink}\n\t\t${ps(N,k.typo)?.styles}\n\t\t${ps(M,w.typo)?.styles}\n\t\t${ps(P,p.labelTypo)?.styles}\n\n\t\t${H(j,...(()=>{const e=$L(d,c);return[`--bbInfographicSpeed: ${mL(d.speed)}ms;`,`--bbInfographicEasing: ${qM(d.easing)};`,ns("--bbInfographicContentSpeed",fL(d.contentSpeed,"")),d.rotate?`--bbInfographicEntranceName: ${sL[e]||"none"};`:"",d.rotate?`--bbInfographicRotateSpeed: ${fL(d.rotateSpeed,"")};`:""]})())}\n\t\t${H(S,QM(p.transition,["background","color","border-color","box-shadow"]),ns("border-radius",hs(p.radius)))}\n\t\t${q(S,x)}\n\t\t${q(`${S}.active`,v)}\n\t\t${q(`${S}:hover`,y)}\n\t\t${q(`${S}:focus-visible`,y)}\n\t\t${f.map(((e,t)=>{const{normal:n,hover:o,active:i}=e?.styles||{},a=`${S}[data-index='${t}']`,s=`${T}[data-item-index='${t}']`;return[Y(a,n),Y(`${a}.active`,i),Y(`${a}:hover`,o),Y(`${a}:focus-visible`,o),K(s,n),K(`${s}:hover`,o),K(`${s}:active`,i)].filter(Boolean).join("\n")})).filter(Boolean).join("\n")}\n\t\t${H(T,QM(g.transition,["background","box-shadow"]),os(g.background),`border: ${z} ${g.borderStyle||"solid"} ${W};`,ns("box-shadow",ls(g.shadow?.normal)))}\n\t\t${H(`${T}:hover`,ns("box-shadow",ls(g.shadow?.hover)))}\n\t\t${H(`${T} .b-blocks-infographic-center-content`,ns("width",fL(g.contentWidth,"")),ns("gap",fL(g.contentGap,"")),ns("text-align",g.contentAlign),ns("align-items","left"===g.contentAlign?"flex-start":"right"===g.contentAlign?"flex-end":"center"))}\n\t\t${H($,QM(h.transition,["background","border-color","box-shadow"]),os(h.background),`border: ${D} ${h.borderStyle||"solid"} ${U};`,ns("box-shadow",ls(h.shadow?.normal)))}\n\t\t${H(`${$}:hover`,ns("box-shadow",ls(h.shadow?.hover)))}\n\t\t${H(N,ns("color",k.color))}\n\t\t${H(M,ns("color",w.color))}\n\t\t${H(L,`width: ${fL(_.width)};`,"height: 0;","background: none;",`border-top: ${fL(_.height)} ${_.style||"solid"} ${_.color||"currentColor"};`)}\n\t\t${H(E,ns("gap",fL(p.spacing,"")),ns("margin",hs(p.margin)))}\n\t\t${H(j,ns("--bbInfographicIconPlate",u.plateColor))}\n\t\t${H(A,QM(u.transition,["background","color","border-color"]),ns("color",u.color),os(u.background),F(u.border?.normal))}\n\t\t${H(`${S}:hover .b-blocks-infographic-segment-icon`,F(u.border?.hover))}\n\t\t${H(`${A}>svg`,ns("fill",u.color))}\n\t\t${H(B,ns("object-fit",C.fit))}\n\n\t\t${c.enableSegmentsType?CL(f,c).map((e=>`${O}[data-index='${e.index}']{ clip-path: ${(({start:e,span:t})=>{if(0>=t)return"none";const n=Math.max(Math.ceil(t/4),2),o=["50% 50%"];for(let i=0;i<=n;i++){const a=(e+t*i/n)*Math.PI/180;o.push(`${(50+50*Math.sin(a)).toFixed(2)}% ${(50-50*Math.cos(a)).toFixed(2)}%`)}return`polygon(${o.join(", ")})`})(e)}; }`)).join("\n"):""}\n\n\t\t${V("desktop")}\n\n\t\t${t}{\n\t\t\t${V("tablet")}\n\t\t}\n\n\t\t${n}{\n\t\t\t${V("mobile")}\n\t\t}\n\n\t\t${_s(o,a,i,!1)}\n\t\t`),[e,o,i]);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:Q}})},EL=({attributes:e,updateObj:t})=>{const{animation:n={},wheel:o={}}=e,i=(e,n)=>t("animation",e,n),a=o.enableSegmentsType;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Animation","b-blocks"),checked:n.enable,onChange:e=>i(e,"enable"),__nextHasNoMarginBottom:!0}),n.enable&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Trigger","b-blocks"),labelPosition:"edge",value:n.trigger||"load",options:rL,onChange:e=>i(e,"trigger"),help:(0,x.__)("Waiting for the scroll keeps a block below the fold from finishing before anyone reaches it.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Delay","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.delay||"",onChange:e=>i(e,"delay"),units:[hL(),gL()]})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:n.type||"spread",options:(s=a,s?oL.filter((({value:e})=>aL(e))):oL),onChange:e=>i(e,"type"),__nextHasNoMarginBottom:!0}),a&&(0,l.jsx)("small",{children:(0,
467 -x.__)("Segments are placed by a clip-path, which the moving entrances cannot work around — so only the two that fade rather than travel are offered here.","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:n.easing||"ease",options:GM,onChange:e=>i(e,"easing"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.speed||"",onChange:e=>i(e,"speed"),units:[hL(),gL()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Stagger","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.stagger||"",onChange:e=>i(e,"stagger"),units:[hL(),gL()],placeholder:`${Math.round(.25*mL(n.speed))}`})]}),(0,l.jsx)("small",{children:(0,x.__)("The gap between one segment arriving and the next. Zero brings them in together; left empty it scales with the speed.","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Order","b-blocks"),labelPosition:"edge",value:n.order||"clockwise",options:cL,onChange:e=>i(e,"order"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Content Transition","b-blocks"),labelPosition:"edge",value:n.contentType||"none",options:dL,onChange:e=>i(e,"contentType"),help:(0,x.__)("How the centre swaps its title, text and image when a new segment is selected.","b-blocks"),__nextHasNoMarginBottom:!0}),"none"!==n.contentType&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.contentSpeed||"",onChange:e=>i(e,"contentSpeed"),units:[hL(),gL()]})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Hover Motion","b-blocks"),labelPosition:"edge",value:n.hoverMotion||"none",options:uL,onChange:e=>i(e,"hoverMotion"),help:(0,x.__)("Movement on hover, separate from the hover colours in the Style tab.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Pulse Active Segment","b-blocks"),checked:n.activePulse,onChange:e=>i(e,"activePulse"),help:(0,x.__)("A soft, continuous pulse on whichever segment is driving the centre.","b-blocks"),__nextHasNoMarginBottom:!0}),!a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rotate Ring","b-blocks"),checked:n.rotate,onChange:e=>i(e,"rotate"),help:(0,x.__)("Keeps the ring turning once the entrance has finished. Combines with any type above.","b-blocks"),__nextHasNoMarginBottom:!0}),n.rotate&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Rotation Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.rotateSpeed||"",onChange:e=>i(e,"rotateSpeed"),units:[gL(),hL()]})]}),(0,l.jsx)("small",{children:(0,x.__)("One full turn. Seconds rather than milliseconds — anything quick reads as a spin.","b-blocks")}),(0,l.jsx)(v,{className:"mb0 mt10 flex1",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.rotateDirection||"clockwise",onChange:e=>i(e,"rotateDirection"),children:UM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Pause On Hover","b-blocks"),checked:n.pauseOnHover,onChange:e=>i(e,"pauseOnHover"),help:(0,x.__)("A turning segment travels away from the pointer, which makes it hard to click.","b-blocks"),__nextHasNoMarginBottom:!0})]})]})]})]});var s},AL=({attributes:e,updateObj:t})=>{const{button:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:n.showIcon,onChange:e=>t("button",e,"showIcon"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Text","b-blocks"),checked:n.showText,onChange:e=>t("button",e,"showText"),__nextHasNoMarginBottom:!0})]})},BL=({attributes:e,updateObj:t})=>{const{items:n=[],defaults:o={}}=e,i=n.map((e=>({label:e?.buttonLabel||(0,x.__)("(untitled)","b-blocks"),value:e?.buttonLabel||""})));return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Default Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Default Item","b-blocks"),labelPosition:"edge",value:o.item,options:i,onChange:e=>t("defaults",e,"item"),help:(0,x.__)("The item shown in the centre before anything is selected.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Default Title","b-blocks"),value:o.itemTitle,onChange:e=>t("defaults",e,"itemTitle"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Default Text","b-blocks"),value:o.itemText,onChange:e=>t("defaults",e,"itemText"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{children:(0,x.__)("Default Image","b-blocks")}),(0,l.jsx)(we,{value:o.image,height:"90%",width:"90%",onChange:e=>t("defaults",e,"image")}),(0,l.jsx)("small",{children:(0,x.__)("Each is a fallback: it shows only when the active item leaves that field empty.","b-blocks")})]})},IL=({attributes:e,updateObj:t})=>{const{elements:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Title","b-blocks"),checked:n.title,onChange:e=>t("elements",e,"title"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Divider","b-blocks"),checked:n.divider,onChange:e=>t("elements",e,"divider"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Text","b-blocks"),checked:n.text,onChange:e=>t("elements",e,"text"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Image","b-blocks"),checked:n.image,onChange:e=>t("elements",e,"image"),__nextHasNoMarginBottom:!0})]})},OL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{general:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("General","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(v,{className:"mb0 flex1",children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1 small mt5",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o?.[n]?.alignment||"",size:"small",onChange:e=>t("general",e,n,"alignment"),isDeselectable:!0,style:{padding:"2px"},children:IM.map((({label:e,value:t,icon:n})=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e,value:t,icon:n},t)))}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Item Trigger Type","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.itemTriggerType,onChange:e=>t("general",e,"itemTriggerType"),children:OM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]})]})},RL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{icon:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,
468 -x.__)("View","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.view,onChange:e=>t("icon",e,"view"),children:zM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(v,{className:"mt10 flex1",children:(0,x.__)("Shape","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.shape,onChange:e=>t("icon",e,"shape"),children:DM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(v,{className:"mt10 flex1",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.position||"top",onChange:e=>t("icon",e,"position"),children:WM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("icon",e,n,"size"),units:[Pe(),Ae(),Be()]})]})]})},zL=({attributes:e,setAttributes:t,index:n})=>{const{items:o=[],elements:i={},wheel:a={}}=e,{enable:s=!0,buttonLabel:r="",position:c="",buttonIcon:d={},title:u="",description:p="",image:h={},imageHeight:g="107px",imagePosition:m="top",link:b={},styles:f={}}=o?.[n]||{},k=fe(e,t),w=(e,t,...o)=>k("items",t,n,e,...o),_=kL(o),C=_.findIndex((e=>e.index===n)),j=Math.round(wL(-1===C?n:C,_.length||o.length,a));return(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small bBlocksSettingInfographicSettings",activeClass:"activeTab",tabs:tL,children:e=>(0,l.jsxs)(l.Fragment,{children:["content"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Item","b-blocks"),checked:!1!==s,onChange:e=>w("enable",e),help:(0,x.__)("Switched off, the item leaves the ring and the rest re-space themselves.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Button Label","b-blocks"),value:r,onChange:e=>w("buttonLabel",e),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:c||"",onChange:e=>w("position",e),units:[vL()],placeholder:`${j}`})]}),(0,l.jsx)("small",{children:(0,x.__)("Clockwise from the top. Leave empty to keep this item evenly spaced with the rest.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Button Icon","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:d?.type||"icon",onChange:e=>w("buttonIcon",e,"type"),children:nL.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]}),"image"===d?.type?(0,l.jsx)(we,{className:"mt10",value:{url:d?.url},height:"90%",width:"90%",onChange:e=>w("buttonIcon",e?.url||"","url")}):(0,l.jsx)(Zn,{className:"mt10",value:d?.icon,onChange:e=>w("buttonIcon",e,"icon")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Title","b-blocks"),value:u,onChange:e=>w("title",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Description","b-blocks"),value:p,onChange:e=>w("description",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{children:(0,x.__)("Image","b-blocks")}),(0,l.jsx)(we,{height:"90%",width:"90%",value:h,onChange:e=>w("image",e)}),!i.image&&(0,l.jsx)("small",{children:(0,x.__)("Nothing will show until Enable Image is switched on in the Elements panel.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Image Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:g||"",onChange:e=>w("imageHeight",e)})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Image Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:m,onChange:e=>w("imagePosition",e),children:RM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link","b-blocks"),value:b?.url||"",onChange:e=>w("link",e,"url"),placeholder:(0,x.__)("https://example.com","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link Title","b-blocks"),value:b?.title||"",onChange:e=>w("link",e,"title"),help:(0,x.__)("Accessible name for the link.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open In New Tab","b-blocks"),checked:!!b?.target,onChange:e=>w("link",e,"target"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Add Nofollow","b-blocks"),checked:!!b?.nofollow,onChange:e=>w("link",e,"nofollow"),__nextHasNoMarginBottom:!0})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10 infographicItemsPanelTabPanel",activeClass:"activeTab",tabs:ZM,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:eL(e.name,(0,x.__)("Button label color","b-blocks")),value:f?.[e.name]?.color?.label,onChange:t=>w("styles",t,e.name,"color","label")}),(0,l.jsx)(Ue,{className:"mt10",label:eL(e.name,(0,x.__)("Button Icon color","b-blocks")),value:f?.[e.name]?.color?.icon,onChange:t=>w("styles",t,e.name,"color","icon")}),(0,l.jsx)(An,{className:"mt10",label:eL(e.name,(0,x.__)("Button BG Color","b-blocks")),value:f?.[e.name]?.background,onChange:t=>w("styles",t,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{label:eL(e.name,(0,x.__)("Border","b-blocks")),value:f?.[e.name]?.border,onChange:t=>w("styles",t,e.name,"border")}),(0,l.jsx)(Ue,{className:"mt10",label:eL(e.name,(0,x.__)("Title color","b-blocks")),value:f?.[e.name]?.color?.title,onChange:t=>w("styles",t,e.name,"color","title")}),(0,l.jsx)(Ue,{className:"mt10",label:eL(e.name,(0,x.__)("Divider color","b-blocks")),value:f?.[e.name]?.color?.divider,onChange:t=>w("styles",t,e.name,"color","divider")}),(0,l.jsx)(Ue,{className:"mt10",label:eL(e.name,(0,x.__)("Description color","b-blocks")),value:f?.[e.name]?.color?.desc,onChange:t=>w("styles",t,e.name,"color","desc")})]})}),(0,l.jsx)("small",{children:(0,x.__)("Button colours follow the segment. Title, Divider and Description colours apply to the centre while this item is the one showing there — hover and active track the centre disc being hovered and pressed.","b-blocks")})]})]})})},DL=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o})=>{const{items:i=[]}=e,a=(0,m.useMemo)((()=>((e=[])=>{const t=e.length+1;return{enable:!0,id:`${PM}-item-${Date.now().toString(36)}${Math.random().toString(36).slice(2,7)}`,buttonLabel:`Title ${t}`,position:"",buttonIcon:{type:"icon",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm-24-136V232c0-13.3 10.7-24 24-24s24 10.7 24 24v144c0 13.3-10.7 24-24 24s-24-10.7-24-24zm24-224a32 32 0 1 1 0-64 32 32 0 1 1 0 64z'/></svg>",url:""},title:`Info Title ${t}`,description:"Describe this part of your process, service or story in a sentence or two.",image:{id:null,url:"",alt:""},imageHeight:"107px",imagePosition:"top",link:{url:"",target:!1,nofollow:!1,title:""},styles:{normal:{color:{
469 -label:"",icon:""},background:{},border:{}},hover:{color:{label:"",icon:""},background:{},border:{}},active:{color:{label:"",icon:""},background:{},border:{}},titleColor:"",dividerColor:"",descColor:""}}})(i)),[i.length]);return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Segment Items","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,arrKey:"items",minItem:1,ItemSettings:zL,itemLabel:(0,x.__)("Segment","b-blocks"),newItem:a,title:"buttonLabel",design:"sortable"})})},FL=({attributes:e,updateObj:t})=>{const{wheel:n={},items:o=[]}=e,i=kL(o).filter((({item:e})=>!isNaN(parseFloat(e?.position)))),a=(e,o,i,a)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:e}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n[o]||"",onChange:e=>t("wheel",e,o),units:i})]}),a&&(0,l.jsx)("small",{children:a})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Arrangement","b-blocks"),initialOpen:!1,children:[a((0,x.__)("Start Angle","b-blocks"),"startAngle",[vL()]),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",value:n.direction||"clockwise",options:UM,onChange:e=>t("wheel",e,"direction"),__nextHasNoMarginBottom:!0}),a((0,x.__)("Sweep","b-blocks"),"sweep",[vL()],(0,x.__)("360° spreads all the way round. Less than that lays the items along an arc — 180° gives a half circle, with the first and last on the two ends.","b-blocks")),!n.enableSegmentsType&&a((0,x.__)("Radius Offset","b-blocks"),"radiusOffset",[Pe()],(0,x.__)("Moves the segments in or out from the ring they sit on. Negative pulls them inward.","b-blocks")),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rotate Labels","b-blocks"),checked:!!n.rotateLabels,onChange:e=>t("wheel",e,"rotateLabels"),help:(0,x.__)("Off, every label stays upright. On, each one turns to face outward from the centre.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Segments Type","b-blocks"),checked:n.enableSegmentsType,onChange:e=>t("wheel",e,"enableSegmentsType"),help:(0,x.__)("Draws the segments as pie wedges filling the ring instead of circles on it.","b-blocks"),__nextHasNoMarginBottom:!0}),n.enableSegmentsType&&a((0,x.__)("Wedge Gap","b-blocks"),"wedgeGap",[vL()],(0,x.__)("White space between neighbouring wedges.","b-blocks")),0<i.length&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.sprintf)(/* translators: %d: how many segments have their own Position set. */ /* translators: %d: how many segments have their own Position set. */
470 -(0,x._n)("%d segment has its own Position, so Start Angle, Direction and Sweep will not move it. Clear that field to put it back on auto spacing.","%d segments have their own Position, so Start Angle, Direction and Sweep will not move them. Clear those fields to put them back on auto spacing.",i.length,"b-blocks"),i.length)}),(0,l.jsx)("small",{children:(0,x.__)("Start Angle, Direction and Sweep only move items left on auto spacing — an item with its own Position stays put.","b-blocks")})]})},HL=({attributes:e,updateObj:t})=>{const{divider:n={}}=e.content||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Divider","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Style","b-blocks"),labelPosition:"edge",value:n.style||"solid",options:YM,onChange:e=>t("content",e,"divider","style"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Weight","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.height||"",onChange:e=>t("content",e,"divider","height"),units:[Pe(),Ae()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.width||"",onChange:e=>t("content",e,"divider","width"),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("content",e,"divider","color"),defaultColor:"#BFA83B"})]})},WL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{icon:o={}}=e,{color:i,background:a={},border:s={}}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i,onChange:e=>t("icon",e,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background Color","b-blocks"),value:a,onChange:e=>t("icon",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Stacked Plate Color","b-blocks"),value:o.plateColor,onChange:e=>t("icon",e,"plateColor"),help:(0,x.__)("Backdrop behind the icon when View is set to Stacked.","b-blocks")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("icon",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("icon",e,n,"radius")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("icon",e,"transition"),units:[hL(),gL()]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:eL(e.name,(0,x.__)("Border","b-blocks")),value:s?.[e.name],onChange:n=>t("icon",n,"border",e.name)})})]})},UL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{image:o={}}=e.content||{},i=(e,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.[i]||"",onChange:e=>t("content",e,"image",n,i),units:[Pe(),Ee()]})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("content",e,"image",n,"radius")}),i((0,x.__)("Width","b-blocks"),"width"),i((0,x.__)("Height","b-blocks"),"height"),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:o.fit||"cover",options:KM,onChange:e=>t("content",e,"image","fit"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("small",{children:(0,x.__)("Height here is the fallback — an item with its own Image Height wins.","b-blocks")})]})},GL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{innerDisc:o={},outerDisc:i={}}=e,a=parseFloat(i?.[n]?.size)||560;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Inner Disc","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("innerDisc",e,n,"size"),units:[Pe()],max:a})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.background,onChange:e=>t("innerDisc",e,"background"),defaults:{color:"#F2F0E4"}}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("innerDisc",e,n,"padding")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Border Color","b-blocks"),value:o.borderColor,onChange:e=>t("innerDisc",e,"borderColor"),defaultColor:"#3F8F4B"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Border Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.borderWidth||"",onChange:e=>t("innerDisc",e,"borderWidth"),units:[Pe()],max:20})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Border Style","b-blocks"),labelPosition:"edge",value:o.borderStyle||"solid",options:FM,onChange:e=>t("innerDisc",e,"borderStyle"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("small",{children:(0,x.__)("This border is the inner ring.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Content Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.contentWidth||"",onChange:e=>t("innerDisc",e,"contentWidth")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Content Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.contentGap||"",onChange:e=>t("innerDisc",e,"contentGap")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Content Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.contentAlign||"center",onChange:e=>t("innerDisc",e,"contentAlign"),children:IM.map((({label:e,value:t,icon:n})=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e,value:t,icon:n},t)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("innerDisc",e,"transition"),units:[hL(),gL()]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsx)(yt,{label:eL(e.name,(0,x.__)("Box Shadow","b-blocks")),value:o.shadow?.[e.name],onChange:n=>t("innerDisc",n,"shadow",e.name)})})]})},VL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{outerDisc:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Outer Disc","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,
471 -l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("outerDisc",e,n,"size"),units:[Pe()],max:1e3})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.background,onChange:e=>t("outerDisc",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Border Color","b-blocks"),value:o.borderColor,onChange:e=>t("outerDisc",e,"borderColor"),defaultColor:"#7E57C2"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Border Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.borderWidth||"",onChange:e=>t("outerDisc",e,"borderWidth"),units:[Pe()],max:20})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Border Style","b-blocks"),labelPosition:"edge",value:o.borderStyle,options:FM,onChange:e=>t("outerDisc",e,"borderStyle"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("small",{children:(0,x.__)("This border is the outer ring — the segments sit centred on it.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Ring Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.ringGap||"",onChange:e=>t("outerDisc",e,n,"ringGap"),units:[Pe()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("outerDisc",e,"transition"),units:[hL(),gL()]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsx)(yt,{label:eL(e.name,(0,x.__)("Box Shadow","b-blocks")),value:o.shadow?.[e.name],onChange:n=>t("outerDisc",n,"shadow",e.name)})})]})},qL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{segment:o={},wheel:i={}}=e,a=!!i.enableSegmentsType,s=parseFloat(bL(e.outerDisc,n,"size",560))||560;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Segment","b-blocks"),initialOpen:!1,children:[!a&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Shape","b-blocks"),labelPosition:"edge",value:o.shape||"circle",options:HM,onChange:e=>t("segment",e,"shape"),__nextHasNoMarginBottom:!0}),!a&&(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:o.radius||{},onChange:e=>t("segment",e,"radius")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("segment",e,n,"padding")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Content Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.spacing||"",onChange:e=>t("segment",e,"spacing"),units:[Pe(),Ae()]})]}),(0,l.jsx)("small",{children:(0,x.__)("Space between the icon and the label inside a segment.","b-blocks")}),(0,l.jsx)(k,{label:(0,x.__)("Content Margin","b-blocks"),values:o.margin||{},onChange:e=>t("segment",e,"margin")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("segment",e,"transition"),units:[hL(),gL()]})]}),!a&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("segment",e,n,"size"),units:[Pe()],max:yL(s)})]})}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Label Typography","b-blocks"),value:o.labelTypo,onChange:e=>t("segment",e,"labelTypo"),defaults:{fontSize:{desktop:13,tablet:12,mobile:11}}}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:ZM,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:eL(e.name,(0,x.__)("Background","b-blocks")),value:o?.[e.name]?.background,onChange:n=>t("segment",n,e.name,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:eL(e.name,(0,x.__)("Text Color","b-blocks")),value:o?.[e.name]?.color,onChange:n=>t("segment",n,e.name,"color"),defaultColor:"#FFFFFF"}),(0,l.jsx)(y.BorderBoxControl,{label:eL(e.name,(0,x.__)("Border","b-blocks")),value:o?.[e.name]?.border,onChange:n=>t("segment",n,e.name,"border")}),(0,l.jsx)(yt,{label:eL(e.name,(0,x.__)("Box Shadow","b-blocks")),value:o?.[e.name]?.shadow,onChange:n=>t("segment",n,e.name,"shadow")})]})})]})},YL=({attributes:e,updateObj:t})=>{const{text:n={}}=e.content||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("content",e,"text","color"),defaultColor:"#4B5563"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("content",e,"text","typo"),defaults:{fontSize:{desktop:14,tablet:13,mobile:12}}})]})},KL=({attributes:e,updateObj:t})=>{const{title:n={}}=e.content||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Heading Tag","b-blocks"),labelPosition:"edge",value:n.tag,options:JM,onChange:e=>t("content",e,"title","tag"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("content",e,"title","color"),defaultColor:"#1F2937"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("content",e,"title","typo"),defaults:{fontSize:{desktop:34,tablet:28,mobile:22}}})]})},QL=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(VL,{...e}),(0,l.jsx)(qL,{...e}),(0,l.jsx)(WL,{...e}),(0,l.jsx)(GL,{...e}),(0,l.jsx)(KL,{...e}),(0,l.jsx)(HL,{...e}),(0,l.jsx)(YL,{...e}),(0,l.jsx)(UL,{...e})]}),ZL=e=>{const{attributes:t,setAttributes:n,updateObj:o,isPremium:i,device:a="desktop"}=e,{general:s={},advanced:r}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:s?.[a]?.alignment,onChange:e=>o("general",e||"",a,"alignment")})}),(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Xt,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(OL,{...e}),(0,l.jsx)(BL,{...e}),(0,l.jsx)(DL,{...e}),(0,l.jsx)(FL,{...e}),(0,l.jsx)(AL,{...e}),(0,l.jsx)(IL,{...e}),(0,l.jsx)(EL,{...e}),(0,l.jsx)(RL,{...e})]}),"style"===t.name&&(0,l.jsx)(QL,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:r,onChange:e=>n({advanced:e}),isPremium:i})]})})})]})},XL=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i}=t,[a,s]=(0,m.useState)(0),r="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,c=fe(t,n),d=o.slice(0,12);(0,m.useEffect)((()=>{i!==d&&n({blockId:d})}),[d]);const u=`block-${o}`,p=(0,h.useBlockProps)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ZL,{...e,updateObj:c,isPremium:r,activeIndex:a,setActiveIndex:s}),(0,l.jsxs)("div",{...p,children:[(0,l.jsx)(PL,{attributes:t,id:u,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(ML,{attributes:t,isBackend:!0,custom:{activeIndex:a,setActiveIndex:s}})})]})]})}));Ll(LM.name)&&(0,p.registerBlockType)(LM,{icon:Tr,edit:XL,save:()=>null})
472 -;const JL=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/input-field","version":"1.0.0","title":"Input Field","category":"bBlocks","description":"Form Input Field","keywords":["input field","text field","input","form field","field"],"ancestor":["b-blocks/form-builder"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"inputField":{"type":"object","default":{"type":"text","placeholder":"Placeholder...","value":"","icon":"","name":"input"}},"label":{"type":"object","default":{"text":"Input Field Label"}},"options":{"type":"object","default":{"isLabel":true,"isRequired":true,"isIcon":true,"isShowRequiredIcon":true}},"password":{"type":"object","default":{"options":{"isWeek":true,"isStrengthMeter":false,"isStrengthText":false,"isVisibilityIcon":true,"passStrengthText":"default","validationText":"default","isUpperCase":true,"isLowerCase":true,"isNumber":true,"isSpecialChar":true,"minLength":8},"strengthText":{"veryWeak":"Very Weak","weak":"Weak Password","medium":"Medium Password","strong":"Strong Password"}}},"validation":{"type":"object","default":{"errorMessage":{"text":{"missing":"This field is required."},"email":{"missing":"This field is required.","invalid":""},"password":{"missing":"This field is required.","invalid":"","customValidation":""},"url":{"missing":"This Field is required."}}}},"styles":{"type":"object","default":{"inputField":{"typo":{"fontSize":{"desktop":"16px"}},"colors":{"text":"","placeholder":""},"desktop":{"padding":{}},"tablet":{"padding":{}},"mobile":{"padding":{}},"normal":{"border":{},"bg":{},"radius":{"desktop":{},"tablet":{},"mobile":{}},"shadow":{}},"focus":{"border":{},"bg":{},"radius":{"desktop":{},"tablet":{},"mobile":{}},"shadow":{}},"hover":{"border":{},"bg":{},"radius":{"desktop":{},"tablet":{},"mobile":{}},"shadow":{}}},"label":{"typo":{"fontSize":{"desktop":"16px"}},"colors":{"required":"","text":""},"desktop":{"margin":{}},"tablet":{"margin":{}},"mobile":{"margin":{}},"position":"top"},"icon":{"field":{"color":"","desktop":{"size":"","position":{"x":"","y":""}},"tablet":{"size":"","position":{"x":"","y":""}},"mobile":{"size":"","position":{"x":"","y":""}}},"password":{"color":"","desktop":{"size":"","position":{"x":"","y":""}},"tablet":{"size":"","position":{"x":"","y":""}},"mobile":{"size":"","position":{"x":"","y":""}}}},"error":{"text":{"typo":{"fontSize":{"desktop":"14px"}},"color":"#f5222d","bg":{},"desktop":{"margin":{},"padding":{},"border":{},"radius":{}},"tablet":{"margin":{},"padding":{},"border":{},"radius":{}},"mobile":{"margin":{},"padding":{},"border":{},"radius":{}}},"input":{"desktop":{"margin":{},"padding":{},"border":{},"radius":{}},"tablet":{"margin":{},"padding":{},"border":{},"radius":{}},"mobile":{"margin":{},"padding":{},"border":{},"radius":{}}}},"password":{"strength":{"container":{"desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{},"bg":{"color":""}},"meter":{"gap":"","desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{}},"text":{"desktop":{"margin":{},"padding":{}},"tablet":{"margin":{},"padding":{}},"mobile":{"margin":{},"padding":{}},"typography":{"fontSize":{"desktop":"15px"}}},"colors":{"veryWeak":"#f5222d","weak":"#fa8c16","medium":"#fadb14","strong":"#7cb305"}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"providesContext":{"b-blocks/inputClientId":"clientId"},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),eP=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],tP=[{label:(0,x.__)("Text","b-blocks"),value:"text"},{label:(0,x.__)("Email","b-blocks"),value:"email"},{label:(0,x.__)("Password","b-blocks"),value:"password"},{label:(0,x.__)("URL","b-blocks"),value:"url"}],nP=e=>{const{attributes:t,updateObj:n}=e,{options:o}=t,{isLabel:i,isRequired:a,isIcon:s,isShowRequiredIcon:r}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Settings","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Label","b-blocks"),value:i,checked:i,onChange:e=>{n("options",e,"isLabel")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Field Required","b-blocks"),value:a,checked:a,onChange:e=>{n("options",e,"isRequired")}}),a&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Required Icon","b-blocks"),value:r,checked:r,onChange:e=>{n("options",e,"isShowRequiredIcon")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),value:s,checked:s,onChange:e=>{n("options",e,"isIcon")}})]})},oP=e=>{const{attributes:t,updateObj:n}=e,{inputField:o,label:i}=t,{type:a,placeholder:s,value:r,icon:c,name:d}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Field","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label","b-blocks"),value:i.text,onChange:e=>{n("label",e,"text")}}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",labelPosition:"edge",value:a,options:tP,onChange:e=>{n("inputField",e,"type")}})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Placeholder","b-blocks"),value:s,onChange:e=>{n("inputField",e,"placeholder")}}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Default Value","b-blocks"),value:r,onChange:e=>{n("inputField",e,"value")}}),(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:c,onChange:e=>{n("inputField",e,"icon")}}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Input Custom name attribute","b-blocks"),value:d,onChange:e=>{n("inputField",e,"name")},help:(0,x.__)("This is for the name attributes which is used to submit form data, Name must be unique.","b-blocks")})]})},iP=({attributes:e,updateObj:t})=>{const{validation:n,inputField:o}=e,{type:i}=o,{errorMessage:a}=n;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Validation Message","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Missing Message","b-blocks"),value:a[i].missing,onChange:e=>t("validation",e,"errorMessage",i,"missing"),help:(0,x.__)("","b-blocks")}),["email"].includes(i)&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Invalid Message","b-blocks"),value:a[i].invalid,onChange:e=>t("validation",e,"errorMessage",i,"invalid"),help:(0,x.__)("","b-blocks")})]})},aP=({attributes:e,updateObj:t})=>{const{password:n,validation:o}=e,{options:i,strengthText:a}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Password Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Password Visibility Icon","b-blocks"),value:i.isVisibilityIcon,checked:i.isVisibilityIcon,onChange:e=>{t("password",e,"options","isVisibilityIcon")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Password Strength Meter","b-blocks"),value:i.isStrengthMeter,checked:i.isStrengthMeter,onChange:e=>{t("password",e,"options","isStrengthMeter")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Password Strength Text","b-blocks"),value:i.isStrengthText,checked:i.isStrengthText,onChange:e=>{t("password",e,"options","isStrengthText")}}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Password Strength Text","b-blocks"),labelPosition:"edge",options:[{label:"Default",value:"default"},{label:"Custom",value:"custom"}],value:i.passStrengthText,onChange:e=>{t("password",e,"options","passStrengthText")}}),"custom"===i.passStrengthText&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,
473 -x.__)("Very Weak Password","b-blocks"),value:a.veryWeak,onChange:e=>t("password",e,"strengthText","veryWeak")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Weak Password","b-blocks"),value:a.weak,onChange:e=>t("password",e,"strengthText","weak")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Medium Password","b-blocks"),value:a.medium,onChange:e=>t("password",e,"strengthText","medium")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Strong Password","b-blocks"),value:a.strong,onChange:e=>t("password",e,"strengthText","strong")})]}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable use of week Password","b-blocks"),value:i.isWeek,checked:i.isWeek,onChange:e=>t("password",e,"options","isWeek")}),!i.isWeek&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Validation Text","b-blocks"),options:[{label:"Default",value:"default"},{label:"Custom",value:"custom"}],labelPosition:"edge",value:i.validationText,onChange:e=>t("password",e,"options","validationText")}),"custom"===i.validationText&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Custom Validation Text","b-blocks"),value:o.errorMessage.password.customValidation,onChange:e=>t("validation",e,"errorMessage","password","customValidation")}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Minimum Password Length","b-blocks"),labelPosition:"edge",value:i.minLength,onChange:e=>t("password",e,"options","minLength")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Uppercase Letter","b-blocks"),value:i.isUpperCase,checked:i.isUpperCase,onChange:e=>t("password",e,"options","isUpperCase")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Lowercase Letter","b-blocks"),value:i.isLowerCase,checked:i.isLowerCase,onChange:e=>t("password",e,"options","isLowerCase")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Number","b-blocks"),value:i.isNumber,checked:i.isNumber,onChange:e=>t("password",e,"options","isNumber")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Special Character","b-blocks"),value:i.isSpecialChar,checked:i.isSpecialChar,onChange:e=>t("password",e,"options","isSpecialChar")})]})]})},sP=e=>{const{attributes:t}=e,{inputField:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(oP,{...e}),(0,l.jsx)(nP,{...e}),(0,l.jsx)(iP,{...e}),"password"===n.type&&(0,l.jsx)(aP,{...e})]})},rP=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{error:i}=o,[a,s]=(0,m.useState)("text");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Error Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>{s(e)},className:"mt10 mb10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Error Text",value:"text"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Error Input",value:"input"})]}),"text"===a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i.text.color,onChange:e=>t("styles",e,"error","text","color"),defaultColor:"#f5222d"}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i.text.bg,onChange:e=>t("styles",e,"error","text","bg"),isImage:!1}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:i.text.typo,onChange:e=>t("styles",e,"error","text","typo")})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[a][n].margin,onChange:e=>t("styles",e,"error",a,n,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[a][n].padding,onChange:e=>t("styles",e,"error",a,n,"padding")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i[a][n].border,onChange:e=>t("styles",e,"error",a,n,"border"),defaultValue:{}}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[a][n].radius,onChange:e=>t("styles",e,"error",a,n,"radius")})]})},lP=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{inputField:i}=o,[a,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Field Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.colors.text,onChange:e=>t("styles",e,"inputField","colors","text")}),(0,l.jsx)(Ue,{label:(0,x.__)("Placeholder Color","b-blocks"),value:i.colors.placeholder,onChange:e=>t("styles",e,"inputField","colors","placeholder")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[n].padding,onChange:e=>t("styles",e,"inputField",n,"padding")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:i.typo,onChange:e=>t("styles",e,"inputField","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>{s(e)},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Focus",value:"focus"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[a].bg,onChange:e=>t("styles",e,"inputField",a,"bg"),isImage:!1}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i[a].border,onChange:e=>t("styles",e,"inputField",a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:i[a].radius[n],onChange:e=>t("styles",e,"inputField",a,"radius",n)}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:i[a].shadow,onChange:e=>t("styles",e,"inputField",a,"shadow")})]})},cP=({attributes:e,updateObj:t,device:n})=>{const{styles:o,inputField:i,password:a}=e,{icon:s}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)("strong",{children:(0,x.__)("Field Icon","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:s.field.color,onChange:e=>t("styles",e,"icon","field","color")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Icon Size","b-blocks"),value:s.field[n].size,onChange:e=>t("styles",e,"icon","field",n,"size"),defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position X","b-blocks"),value:s.field[n].position.x,onChange:e=>t("styles",e,"icon","field",n,"position","x"),min:-100,max:100,defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position Y","b-blocks"),value:s.field[n].position.y,onChange:e=>t("styles",e,"icon","field",n,"position","y"),min:-100,max:100,defaultValue:""}),"password"===i.type&&a.options.isVisibilityIcon&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("strong",{children:(0,x.__)("Password Visibility Icon","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:s.password.color,onChange:e=>t("styles",e,"icon","password","color")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Icon Size","b-blocks"),value:s.password[n].size,onChange:e=>t("styles",e,"icon","password",n,"size"),defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position X","b-blocks"),value:s.password[n].position.x,onChange:e=>t("styles",e,"icon","password",n,"position","x"),min:-100,max:100,defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position Y","b-blocks"),value:s.password[n].position.y,onChange:e=>t("styles",e,"icon","password",n,"position","y"),min:-100,max:100,defaultValue:""})]})]})},dP=(0,l.jsxs)("svg",{id:"Layer_1",height:"512",
474 -viewBox:"0 0 32 32",width:"512",xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",children:[(0,l.jsx)("path",{d:"m27 8h-5v-1a2 2 0 0 1 2-2 1 1 0 0 0 0-2 4 4 0 0 0 -3 1.36 4 4 0 0 0 -3-1.36 1 1 0 0 0 0 2 2 2 0 0 1 2 2v1h-15a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h15v1a2 2 0 0 1 -2 2 1 1 0 1 0 0 2 4 4 0 0 0 3-1.36 4 4 0 0 0 3 1.36 1 1 0 0 0 0-2 2 2 0 0 1 -2-2v-1h5a3 3 0 0 0 3-3v-10a3 3 0 0 0 -3-3zm-22 14a1 1 0 0 1 -1-1v-10a1 1 0 0 1 1-1h15v12zm23-1a1 1 0 0 1 -1 1h-5v-12h5a1 1 0 0 1 1 1z"}),(0,l.jsx)("path",{d:"m11 12h-4a1 1 0 0 0 0 2h1v5a1 1 0 0 0 2 0v-5h1a1 1 0 0 0 0-2z"})]}),uP=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 0C1.22386 0 1 0.223858 1 0.5C1 0.776142 1.22386 1 1.5 1H6V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V1H13.5C13.7761 1 14 0.776142 14 0.5C14 0.223858 13.7761 0 13.5 0H9H6H1.5Z",fill:"currentColor"})}),pP=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 3C9 2.44772 8.55229 2 8 2H7C6.44772 2 6 2.44772 6 3L6 14H1.5C1.22386 14 1 14.2239 1 14.5C1 14.7761 1.22386 15 1.5 15L6 15H9H13.5C13.7761 15 14 14.7761 14 14.5C14 14.2239 13.7761 14 13.5 14H9V3Z",fill:"currentColor"})}),hP=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.499995 0.999995C0.223855 0.999995 -5.58458e-07 1.22385 -5.46388e-07 1.49999L-2.18554e-08 13.4999C-9.78492e-09 13.776 0.223855 13.9999 0.499995 13.9999C0.776136 13.9999 0.999991 13.776 0.999991 13.4999L0.999991 8.99993L12 8.99993C12.5523 8.99993 13 8.55222 13 7.99993L13 6.99994C13 6.44766 12.5523 5.99995 12 5.99995L0.999991 5.99995L0.999991 1.49999C0.999991 1.22385 0.776135 0.999995 0.499995 0.999995Z",fill:"currentColor"})}),gP=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.4999 1C14.2237 1 13.9999 1.22386 13.9999 1.5L13.9999 6L2.99988 6C2.44759 6 1.99988 6.44772 1.99988 7L1.99988 8C1.99988 8.55228 2.44759 9 2.99988 9L13.9999 9L13.9999 13.5C13.9999 13.7761 14.2237 14 14.4999 14C14.776 14 14.9999 13.7761 14.9999 13.5L14.9999 9L14.9999 6L14.9999 1.5C14.9999 1.22386 14.776 1 14.4999 1Z",fill:"currentColor"})});function mP(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",version:"1.1",viewBox:"0 0 16 16",...e,xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M8 3c-3.489 0-6.514 2.032-8 5 1.486 2.968 4.511 5 8 5s6.514-2.032 8-5c-1.486-2.968-4.511-5-8-5zM11.945 5.652c0.94 0.6 1.737 1.403 2.335 2.348-0.598 0.946-1.395 1.749-2.335 2.348-1.181 0.753-2.545 1.152-3.944 1.152s-2.763-0.398-3.945-1.152c-0.94-0.6-1.737-1.403-2.335-2.348 0.598-0.946 1.395-1.749 2.335-2.348 0.061-0.039 0.123-0.077 0.185-0.114-0.156 0.427-0.241 0.888-0.241 1.369 0 2.209 1.791 4 4 4s4-1.791 4-4c0-0.481-0.085-0.942-0.241-1.369 0.062 0.037 0.124 0.075 0.185 0.114v0zM8 6.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5 0.672-1.5 1.5-1.5 1.5 0.672 1.5 1.5z"})})}function bP(e){return(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",version:"1.1",viewBox:"0 0 16 16",...e,height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M14.78 0.22c-0.293-0.293-0.768-0.293-1.061 0l-3.159 3.159c-0.812-0.246-1.671-0.378-2.561-0.378-3.489 0-6.514 2.032-8 5 0.643 1.283 1.573 2.391 2.703 3.236l-2.484 2.484c-0.293 0.293-0.293 0.768 0 1.061 0.146 0.146 0.338 0.22 0.53 0.22s0.384-0.073 0.53-0.22l13.5-13.5c0.293-0.293 0.293-0.768 0-1.061zM6.5 5c0.66 0 1.22 0.426 1.421 1.019l-1.902 1.902c-0.592-0.201-1.019-0.761-1.019-1.421 0-0.828 0.672-1.5 1.5-1.5zM1.721 8c0.598-0.946 1.395-1.749 2.335-2.348 0.061-0.039 0.123-0.077 0.185-0.114-0.156 0.427-0.241 0.888-0.241 1.369 0 0.858 0.27 1.652 0.73 2.303l-0.952 0.952c-0.819-0.576-1.519-1.311-2.057-2.162z"}),(0,l.jsx)("path",{d:"M12 6.906c0-0.424-0.066-0.833-0.189-1.217l-5.028 5.028c0.384 0.123 0.793 0.189 1.217 0.189 2.209 0 4-1.791 4-4z"}),(0,l.jsx)("path",{d:"M12.969 4.531l-1.084 1.084c0.020 0.012 0.040 0.024 0.059 0.037 0.94 0.6 1.737 1.403 2.335 2.348-0.598 0.946-1.395 1.749-2.335 2.348-1.181 0.753-2.545 1.152-3.944 1.152-0.604 0-1.202-0.074-1.781-0.219l-1.201 1.201c0.933 0.335 1.937 0.518 2.982 0.518 3.489 0 6.514-2.032 8-5-0.703-1.405-1.752-2.6-3.031-3.469z"})]})}const fP=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{label:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Label Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Label Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.position,onChange:e=>t("styles",e,"label","position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"top",icon:(0,l.jsx)(uP,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"bottom",icon:(0,l.jsx)(pP,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:(0,l.jsx)(hP,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:(0,l.jsx)(gP,{})})]})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Label Color","b-blocks"),value:i.colors.text,onChange:e=>t("styles",e,"label","colors","text")}),(0,l.jsx)(Ue,{label:(0,x.__)("Required Color","b-blocks"),value:i.colors.required,onChange:e=>t("styles",e,"label","colors","required")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:i.typo,onChange:e=>t("styles",e,"label","typo")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:i[n].margin,onChange:e=>t("styles",e,"label",n,"margin")})]})},xP=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("container"),{styles:a}=e,{password:s}=a,{strength:r}=s;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Password Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)("strong",{children:(0,x.__)("Colors","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Very Weak Password","b-blocks"),value:r.colors.veryWeak,onChange:e=>t("styles",e,"password","strength","colors","veryWeak"),defaultColor:"#f5222d"}),(0,l.jsx)(Ue,{label:(0,x.__)("Weak Password","b-blocks"),value:r.colors.weak,onChange:e=>t("styles",e,"password","strength","colors","weak"),defaultColor:"#fa8c16"}),(0,l.jsx)(Ue,{label:(0,x.__)("Medium Password","b-blocks"),value:r.colors.medium,onChange:e=>t("styles",e,"password","strength","colors","medium"),defaultColor:"#fadb14"}),(0,l.jsx)(Ue,{label:(0,x.__)("Strong Password","b-blocks"),value:r.colors.strong,onChange:e=>t("styles",e,"password","strength","colors","strong"),defaultColor:"#7cb305"}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},className:"mt10 mb10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Container",value:"container"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Meter",value:"meter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Text",value:"text"})]}),"meter"===o&&(0,l.jsxs)(y.Flex,{className:"mb10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Meter Gap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:r.meter.gap,
475 -onChange:e=>t("styles",e,"password","strength","meter","gap")})]}),("meter"===o||"container"===o)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:r[o][n].width,onChange:e=>t("styles",e,"password","strength",o,n,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:r[o][n].height,onChange:e=>t("styles",e,"password","strength",o,n,"height")})]})]}),"container"===o&&(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:r.container.bg,onChange:e=>t("styles",e,"password","strength","container","bg"),isImage:!1}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o][n].margin,onChange:e=>t("styles",e,"password","strength",o,n,"margin")}),("meter"===o||"container"===o)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o][n].padding,onChange:e=>t("styles",e,"password","strength",o,n,"padding")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:r[o].border,onChange:e=>t("styles",e,"password","strength",o,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:r[o].radius,onChange:e=>t("styles",e,"password","strength",o,"radius")})]}),"text"===o&&(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.text.typography,onChange:e=>t("styles",e,"password","strength","text","typography")})]})},yP=e=>{const{attributes:t}=e,{inputField:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(lP,{...e}),(0,l.jsx)(fP,{...e}),(0,l.jsx)(cP,{...e}),"password"===n.type&&(0,l.jsx)(xP,{...e}),(0,l.jsx)(rP,{...e})]})},vP=e=>{const{isPremium:t}=e,[n,o]=(0,m.useState)(!1),i={isPremium:t,setIsProModalOpen:o};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Ra,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:eP,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(sP,{...e,premiumProps:i})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(yP,{...e})})]})})]}),(0,l.jsx)(qa,{isProModalOpen:n,setIsProModalOpen:o,link:"https://bplugins.com/products/advanced-post-block/#pricing",children:(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Feature: ","b-blocks")}),(0,x.__)("Feature details.","b-blocks")]})})]})},kP=({attributes:e,id:t})=>{const{styles:n}=e,{inputField:o,label:i,icon:a,error:s,password:r}=n,{colors:c,normal:d,hover:u,focus:p}=o,{strength:h}=r,{container:g,meter:m,text:b}=h,f=`#${t}`,x=`${f} .b-blocks-input-field-container`,y=`${x} .b-blocks-input-field-label`,v=`${y} .b-blocks-input-field-required`,k=`${x} .b-blocks-input-field`,w=`${x} .b-blocks-input-field-passStrength-container`,_=`${w} .b-blocks-input-field-passStrengthMeter-container`,C=`${w} .b-blocks-input-field-passStrengthMeterText-container`,j=`${k} .b-blocks-input-field-passVisibilityIcon`,$=`${f} .b-blocks-input-field-error-container .b-blocks-input-field`,S=`${x} .b-blocks-input-field-error-message`,T=`${k} input`,N=`${k} .b-blocks-input-field-icon`,M=e=>{const{bg:t,border:n,shadow:o}=e;return`\n\t\t\t${os(t)}\n\t\t\t${as(n)}\n\t\t\t${ns("box-shadow",ls(o))}\n\t`},L=(e,t="desktop")=>`\n\t\t${ns("width",e[t].width)}\n\t\t${ns("height",e[t].height)}\n\t\t${ns("margin",hs(e[t].margin))}\n\t\t${ns("padding",hs(e[t].padding))}\n\t\t${as(e.border)}\n\t\t${ns("border-radius",hs(e.radius))}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",o.typo).googleFontLink}\n\t\t\t${ps("",i.typo).googleFontLink}\n\t\t\t${ps("",b.typography).googleFontLink}\n\t\t\t${ps("",s.text.typo).googleFontLink}\n\t\t\t\n\t\t\t${ps(T,o.typo).styles}\n\t\t\t${ps(y,i.typo).styles}\n\t\t\t${ps(S,s.text.typo).styles}\n\t\t\t${ps(C,b.typography).styles}\n\n\t\t\t${T}{\n\t\t\t\t${ns("color",c.text)}\n\t\t\t\t${M(d)}\n\t\t\t\t${ns("padding",hs(o.desktop.padding))}\n\t\t\t\t${ns("border-radius",hs(d.radius.desktop))}\n\t\t\t}\n\t\t\t${T}::placeholder{\n\t\t\t\t${ns("color",c.placeholder)}\n\t\t\t}\n\t\t\t${T}:hover{\n\t\t\t\t${M(u)}\n\t\t\t\t${ns("border-radius",hs(u.radius.desktop))}\n\t\t\t}\n\t\t\t${T}:focus{\n\t\t\t\t${M(p)}\n\t\t\t\t${ns("border-radius",hs(p.radius.desktop))}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${ns("color",i.colors.text)}\n\t\t\t\t${ns("margin",hs(i.desktop.margin))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\t${ns("color",i.colors.required)}\n\t\t\t}\n\t\t\t${N}{\n\t\t\t\t${ns("left",jt(a.field.desktop.position.x)?a.field.desktop.position.x+"px":"")}\n\t\t\t\t${ns("top",jt(a.field.desktop.position.y)?a.field.desktop.position.y+"px":"")}\n\t\t\t}\n\t\t\t${N}>svg{\n\t\t\t\t${ns("fill",a.field.color)}\n\t\t\t\t${ns("height",jt(a.field.desktop.size)?a.field.desktop.size+"px":"")}\n\t\t\t\t${ns("width",jt(a.field.desktop.size)?a.field.desktop.size+"px":"")}\n\t\t\t}\n\t\t\t${j}{\n\t\t\t\t${ns("fill",a.password.color)}\n\t\t\t\t${ns("height",jt(a.password.desktop.size)?a.password.desktop.size+"px":"")}\n\t\t\t\t${ns("width",jt(a.password.desktop.size)?a.password.desktop.size+"px":"")}\n\t\t\t\t${ns("right",jt(a.password.desktop.position.x)?a.password.desktop.position.x+"px":"")}\n\t\t\t\t${ns("top",jt(a.password.desktop.position.y)?a.password.desktop.position.y+"px":"")}\n\t\t\t}\n\n\t\t\t${$}>input{\n\t\t\t\t\t${ns("margin",hs(s.input.desktop.margin))}\n\t\t\t\t\t${ns("padding",hs(s.input.desktop.padding))}\n\t\t\t\t\t${as(s.input.desktop.border)}\n\t\t\t\t\t${ns("border-radius",hs(s.input.desktop.radius))}\n\t\t\t}\n\t\t\t\n\t\t\t${S}{\n\t\t\t\t\t${ns("color",s.text.color)}\n\t\t\t\t\t${ns("margin",hs(s.text.desktop.margin))}\n\t\t\t\t\t${ns("padding",hs(s.text.desktop.padding))}\n\t\t\t\t\t${as(s.text.desktop.border)}\n\t\t\t\t\t${ns("border-radius",hs(s.text.desktop.radius))}\n\t\t\t\t\t${os(s.text.bg)}\n\t\t\t}\n\n\t\t\t${w}{\n\t\t\t\t${L(g,"desktop")}\n\t\t\t\t${os(g.bg)}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${ns("gap",m.gap)}\n\t\t\t}\n\n\t\t\t${_} .b-blocks-input-field-passStrengthMeter{\n\t\t\t\t${L(m,"desktop")}\n\t\t\t}\n\t\t\t\n\t\t\t${_}>.veryWeakPass{\n\t\t\t\t\t${ns("background-color",r.strength.colors.veryWeak)}\n\t\t\t}\n\t\t\t${_}>.weakPass{\n\t\t\t\t\t${ns("background-color",r.strength.colors.weak)}\n\t\t\t}\n\t\t\t${_}>.mediumPass{\n\t\t\t\t\t${ns("background-color",r.strength.colors.medium)}\n\t\t\t}\n\t\t\t${_}>.strongPass{\n\t\t\t\t\t${ns("background-color",r.strength.colors.strong)}\n\t\t\t}\n\n\t\t\t${C}{\n\t\t\t\t\t${ns("margin",hs(b.desktop.margin))}\n\t\t\t}\n\n\t\t\t${C}>.veryWeakPass{\n\t\t\t\t\t${ns("color",r.strength.colors.veryWeak)}\n\t\t\t}\n\t\t\t${C}>.weakPass{\n\t\t\t\t\t${ns("color",r.strength.colors.weak)}\n\t\t\t}\n\t\t\t${C}>.mediumPass{\n\t\t\t\t\t${ns("color",r.strength.colors.medium)}\n\t\t\t}\n\t\t\t${C}>.strongPass{\n\t\t\t\t\t${ns("color",r.strength.colors.strong)}\n\t\t\t}\n\n\n\t`}})},wP=e=>{let t=0;return e.length>=6&&(t+=1),/[A-Z]/.test(e)&&(t+=1),/[0-9]/.test(e)&&(t+=1),/[^a-zA-Z0-9]/.test(e)&&(t+=1),t},_P=({value:e})=>{const t=wP(e),n=()=>{switch(t){case 1:return"veryWeakPass";case 2:return"weakPass";case 3:return"mediumPass";case 4:return"strongPass";default:return""}};return(0,l.jsxs)("div",{className:"b-blocks-input-field-passStrengthMeter-container",children:[(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeter ${n()}`}),(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeter ${t>1?n():""}`}),(0,l.jsx)("div",{
476 -className:`b-blocks-input-field-passStrengthMeter ${t>2?n():""}`}),(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeter ${t>3?n():""}`})]})},CP=({value:e,validationText:t,strengthText:n})=>{const o=wP(e),i=["veryWeak","weak","medium","strong"];return o>0&&(0,l.jsx)("div",{className:"b-blocks-input-field-passStrengthMeterText-container",children:(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeterText ${i[o-1]}Pass`,children:(a=o-1,("default"===t?{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}:n)[i[a]])})});var a},jP=({attributes:e})=>{const[t,n]=(0,m.useState)(!1),[o,i]=(0,m.useState)(""),{inputField:a,label:s,styles:r,options:c,validation:d,password:u}=e,{type:p,placeholder:h,value:g,icon:b,name:f}=a,{text:x}=s,{label:y}=r,{position:v}=y,{isLabel:k,isRequired:w,isIcon:_,isShowRequiredIcon:C}=c,{errorMessage:j}=d,{options:$,strengthText:S}=u,{isValid:T,message:N}=((e,t,n={},o,i={},a={})=>{const{options:s={}}=i,{errorMessage:r}=a,[l,c]=(0,m.useState)(""),[d,u]=(0,m.useState)(!1),p=function(e,t=12,n=!1,o=!1,i=!1,a=!1){return!(!e?.length>=t||o&&!/[a-z]/.test(e)&&o||n&&!/[A-Z]/.test(e)&&n||i&&!/[0-9]/.test(e)&&i||a&&!/[^a-zA-Z0-9]/.test(e)&&a)}(e,s?.minLength,s?.isUpperCase,s?.isLowerCase,s?.isNumber,s?.isSpecialChar);return(0,m.useEffect)((()=>{!e&&o?(c(n[t].missing),u(!0)):"email"===t?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e)?(c(""),u(!1)):(c(n.email.invalid),u(!0),e||u(!1)):"password"===t?p||s.isWeek?(c(""),u(!1)):("default"===s.validationText?c(`${s.minLength} characters, Number, Uppercase, Lowercase, Special character`):c(r.password.customValidation),u(!0)):(c(""),u(!1))}),[p,o,t,e]),{message:l,isValid:d}})(o,p,j,w,u,d);return(0,l.jsxs)("div",{"data-iserror":T,className:`b-blocks-input-field-container label-position-${v} b-blocks-input-field-validation-${f}`,children:[x&&k&&(0,l.jsxs)("label",{htmlFor:f,className:"b-blocks-input-field-label",children:[x," ",w&&C&&(0,l.jsx)("span",{className:"b-blocks-input-field-required",children:"*"})," "]}),(0,l.jsxs)("div",{className:"b-blocks-input-field",children:[b&&_&&(0,l.jsx)("span",{className:"b-blocks-input-field-icon",dangerouslySetInnerHTML:{__html:b}}),(0,l.jsx)("input",{onChange:e=>i(e.target.value),type:(e=>"password"===e?t?"text":"password":e)(p),name:f,id:f,placeholder:h,...g&&{value:g},..."email"===p?{noValidate:!0}:{},..."password"===p?{autoComplete:"current-password"}:{}}),"password"===p&&$.isVisibilityIcon&&(t?(0,l.jsx)(mP,{onClick:()=>n(!t),className:"b-blocks-input-field-passVisibilityIcon"}):(0,l.jsx)(bP,{onClick:()=>n(!t),className:"b-blocks-input-field-passVisibilityIcon"}))]}),(0,l.jsx)("span",{className:`b-blocks-input-field-error-message b-blocks-input-field-error-${f}`,children:N}),"password"===p&&($.isStrengthMeter||$.isStrengthText)&&(0,l.jsxs)("div",{className:"b-blocks-input-field-passStrength-container",children:[$.isStrengthMeter&&(0,l.jsx)(_P,{value:o}),$.isStrengthText&&(0,l.jsx)(CP,{value:o,validationText:$.passStrengthText,strengthText:S})]})]})},$P=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=fe(t,n);return(0,m.useEffect)((()=>{n({clientId:o})}),[o]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vP,{attributes:t,setAttributes:n,isPremium:!1,updateObj:a,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(kP,{attributes:t,id:`block-${o}`}),(0,l.jsx)(jP,{attributes:t})]})]})}));(0,p.registerBlockType)(JL,{icon:dP,edit:$P})
477 -;const SP=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/instagram","title":"Instagram Feed","category":"bBlocks","description":"Show an Instagram feed as a responsive gallery, with profile header, captions and a lightbox.","keywords":["instagram","feed","social","gallery","photos"],"textdomain":"b-blocks","supports":{"html":false,"align":["wide","full"]},"attributes":{"blockId":{"type":"string","default":""},"align":{"type":"string","default":""},"source":{"type":"object","default":{"account":"","limit":24,"perPage":12,"cacheMinutes":30}},"elements":{"type":"object","default":{"profile":true,"profilePhoto":true,"profileName":false,"profileBio":false,"followButton":true,"followInFooter":false,"followLabel":"Follow On Instagram","caption":true,"stripHashtags":false,"linkHashtags":true,"captionLength":65,"mediaIcon":true,"loadMore":true,"loadMoreLabel":"Load More","lightbox":true,"linkPosts":true,"openInNewTab":true}},"grid":{"type":"object","default":{"desktop":{"columns":4,"columnGap":"15px","rowGap":"15px","ratio":"1/1"},"tablet":{"columns":2,"columnGap":"","rowGap":"","ratio":""},"mobile":{"columns":1,"columnGap":"","rowGap":"","ratio":""}}},"item":{"type":"object","default":{"hoverEffect":"zoom-in","desktop":{"radius":{"top":"","right":"","bottom":"","left":""},"iconSize":"22px"},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"iconSize":""},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"iconSize":""},"border":{},"shadow":[],"overlayColor":"","iconColor":"#ffffff","iconSize":"22px"}},"caption":{"type":"object","default":{"style":"overlay-center","align":"center","color":"#ffffff","linkColor":"#ffffff","onHover":false,"background":{"color":"#00000099"},"padding":{"desktop":{"top":"12px","right":"12px","bottom":"12px","left":"12px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"typo":{"fontSize":{"desktop":15,"tablet":14,"mobile":13}}}},"profile":{"type":"object","default":{"desktop":{"photoSize":"55px","gap":"12px"},"tablet":{"photoSize":"","gap":""},"mobile":{"photoSize":"","gap":""},"photo":"","photoSize":"55px","gap":"12px","usernameColor":"#146ef5","nameColor":"","nameText":"","bioColor":"","bioText":"","usernameTypo":{"fontSize":{"desktop":18,"tablet":"","mobile":""}},"metaTypo":{"fontSize":{"desktop":14,"tablet":"","mobile":""}}}},"followBtn":{"type":"object","default":{"normal":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"10px","right":"18px","bottom":"10px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"hover":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"typo":{"fontSize":{"desktop":13,"tablet":"","mobile":""}},"padding":{"desktop":{"top":"10px","right":"18px","bottom":"10px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"loadMoreBtn":{"type":"object","default":{"normal":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"10px","right":"22px","bottom":"10px","left":"22px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"hover":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"typo":{"fontSize":{"desktop":14,"tablet":"","mobile":""}},"padding":{"desktop":{"top":"10px","right":"22px","bottom":"10px","left":"22px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"lightbox":{"type":"object","default":{"backdrop":"#000000e6","showCaption":true,"showProfile":true,"showLink":true,"closeColor":"","closeBg":"","closeHoverColor":"","closeHoverBg":"","navColor":"","navBg":"","navHoverColor":"","navHoverBg":""}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"position":{}}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),TP="b-blocks-instagram",NP=e=>e?`https://www.instagram.com/${encodeURIComponent(e)}/`:"https://www.instagram.com/",MP=e=>`https://www.instagram.com/explore/tags/${encodeURIComponent(e)}/`,LP=async(e,t={})=>{const n=window?.bBlocksInstagram||null;if(!n?.ajaxUrl)throw new Error("Instagram endpoint is unavailable.");const o=new FormData;o.append("action",e),o.append("nonce",n.nonce),Object.entries(t).forEach((([e,t])=>o.append(e,t)));const i=await fetch(n.ajaxUrl,{method:"POST",body:o,credentials:"same-origin"}),a=await i.json();if(!a?.success)throw new Error(a?.data||"Could not load the feed.");return a.data},PP=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],EP=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")}],AP=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Zoom In","b-blocks"),value:"zoom-in"},{label:(0,x.__)("Zoom Out","b-blocks"),value:"zoom-out"},{label:(0,x.__)("Rotate","b-blocks"),value:"rotate"},{label:(0,x.__)("Grayscale","b-blocks"),value:"grayscale"},{label:(0,x.__)("Blur","b-blocks"),value:"blur"},{label:(0,
478 -x.__)("Lift","b-blocks"),value:"lift"},{label:(0,x.__)("Shine","b-blocks"),value:"shine"}],BP=[{label:(0,x.__)("Overlay Top","b-blocks"),value:"overlay-top"},{label:(0,x.__)("Overlay Center","b-blocks"),value:"overlay-center"},{label:(0,x.__)("Overlay Bottom","b-blocks"),value:"overlay-bottom"},{label:(0,x.__)("Below Image","b-blocks"),value:"below"}],IP=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],OP=[{label:(0,x.__)("Square","b-blocks"),value:"1/1"},{label:(0,x.__)("Portrait","b-blocks"),value:"4/5"},{label:(0,x.__)("Landscape","b-blocks"),value:"16/9"},{label:(0,x.__)("Original","b-blocks"),value:"auto"}],RP=(e,t)=>"normal"===e?t:`${e.charAt(0).toUpperCase()}${e.slice(1)} ${t.charAt(0).toLowerCase()}${t.slice(1)}`,zP=(e={},t,n,o="")=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},a=i("desktop")??o;if("desktop"===t)return a;const s=i("tablet")??a;return"tablet"===t?s:i("mobile")??s},DP=(e,t="")=>{if(null==e||""===e)return t;const n=parseFloat(e);return isNaN(n)?t:/[a-z%]$/i.test(String(e).trim())?String(e).trim():`${n}px`},FP=(e="",{stripHashtags:t=!1,captionLength:n=0}={})=>{let o=String(e||"");t&&(o=o.replace(/#[\p{L}\p{N}_]+/gu,"").replace(/\s{2,}/g," ").trim());const i=parseInt(n,10)||0;return 0<i&&o.length>i?`${o.slice(0,i).trimEnd()}…`:o},HP=(e="",t=!0)=>String(e||"").split(/(#[\p{L}\p{N}_]+)/gu).filter((e=>""!==e)).map(((e,n)=>{const o=t&&/^#[\p{L}\p{N}_]+$/u.test(e)?e.slice(1):"";return o?(0,l.jsx)("a",{className:`${TP}-tag`,href:MP(o),target:"_blank",rel:"noreferrer nofollow noopener",children:e},n):(0,l.jsx)("span",{children:e},n)})),WP=(e={})=>e.thumbnail_url||e.media_url||"",UP=({attributes:e,username:t="",isBackend:n=!1})=>{const{elements:o={}}=e;return o.followButton?(0,l.jsx)("a",{className:`${TP}-follow`,href:n?"#":NP(t),target:n?"_self":"_blank",rel:"noreferrer noopener",onClick:e=>{n&&e.preventDefault()},children:o.followLabel||(0,x.__)("Follow On Instagram","b-blocks")}):null},GP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"18",height:"18",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"})}),VP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M34.8 29.7V11c0-2.9-2.3-5.2-5.2-5.2H11c-2.9 0-5.2 2.3-5.2 5.2v18.7c0 2.9 2.3 5.2 5.2 5.2h18.7c2.8-.1 5.1-2.4 5.1-5.2zM39.2 15v16.1c0 4.5-3.7 8.2-8.2 8.2H14.9c-.6 0-.9.7-.5 1.1 1 1.1 2.4 1.8 4.1 1.8h13.4c5.7 0 10.3-4.6 10.3-10.3V18.5c0-1.6-.7-3.1-1.8-4.1-.5-.4-1.2 0-1.2.6z"})}),qP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M5.888 22.5a3.46 3.46 0 0 1-1.721-.46l-.003-.002a3.451 3.451 0 0 1-1.72-2.982V4.943a3.445 3.445 0 0 1 5.163-2.987l12.226 7.059a3.444 3.444 0 0 1-.001 5.967l-12.22 7.056a3.462 3.462 0 0 1-1.724.462Z"})}),YP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"22",height:"22",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),KP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M14.71 15.88 10.83 12l3.88-3.88a.996.996 0 1 0-1.41-1.41L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42z"})}),QP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M9.29 15.88 13.17 12 9.29 8.12a.996.996 0 1 1 1.41-1.41l4.59 4.59c.39.39.39 1.02 0 1.41L10.7 17.3a.996.996 0 0 1-1.41 0c-.38-.39-.39-1.03 0-1.42z"})}),ZP=({attributes:e,feed:t={},index:n,isBackend:o=!1,onOpen:i})=>{const{elements:a={},caption:s={}}=e,{media_type:r="IMAGE",caption:c=""}=t,d=s.style||"overlay-center",u=o?(0,x.__)("Instagram caption preview text with #hashtags","b-blocks"):"",p=c||u,h=a.caption&&p?FP(p,a):"",g=()=>h?(0,l.jsx)("div",{className:`${TP}-caption`,children:(0,l.jsx)("p",{children:HP(h,a.linkHashtags)})}):null,m=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("figure",{className:`${TP}-figure`,children:[(0,l.jsx)("img",{className:`${TP}-image`,src:WP(t),alt:FP(p,{stripHashtags:!0,captionLength:120}),loading:"lazy"}),(0,l.jsx)("span",{className:`${TP}-overlay`}),a.mediaIcon&&"IMAGE"!==r&&(0,l.jsx)("span",{className:`${TP}-type`,children:"VIDEO"===r?qP:VP}),d.startsWith("overlay")&&(0,l.jsx)(g,{})]}),"below"===d&&(0,l.jsx)(g,{})]});return a.lightbox?(0,l.jsx)("div",{className:`${TP}-item`,children:(0,l.jsx)("button",{type:"button",className:`${TP}-open`,onClick:()=>i(n),children:m})}):a.linkPosts&&t.permalink?(0,l.jsx)("div",{className:`${TP}-item`,children:(0,l.jsx)("a",{className:`${TP}-open`,href:t.permalink,target:a.openInNewTab?"_blank":"_self",rel:"noreferrer noopener",children:m})}):(0,l.jsx)("div",{className:`${TP}-item`,children:m})},XP=({attributes:e,user:t={},compact:n=!1})=>{const{elements:o={},profile:i={}}=e,{username:a="",profile_picture_url:s="",name:r="",biography:c=""}=t,d=NP(a),u=r||i.nameText||"",p=c||i.bioText||"",h=s||i.photo||"";return(0,l.jsxs)("div",{className:`${TP}-profile${n?` ${TP}-profile-compact`:""}`,children:[o.profilePhoto&&h&&(0,l.jsx)("a",{className:`${TP}-photo`,href:d,target:"_blank",rel:"noreferrer noopener",children:(0,l.jsx)("img",{src:h,alt:a,loading:"lazy"})}),(0,l.jsxs)("div",{className:`${TP}-identity`,children:[(0,l.jsxs)("a",{className:`${TP}-username`,href:d,target:"_blank",rel:"noreferrer noopener",children:["@",a]}),!n&&o.profileName&&u&&(0,l.jsx)("p",{className:`${TP}-name`,children:u}),!n&&o.profileBio&&p&&(0,l.jsx)("p",{className:`${TP}-bio`,children:p})]})]})},JP=({feed:e})=>{const t=(0,m.useRef)(null),n=e?.children?.data||[],o=e=>{const n=t.current;n&&n.scrollBy({left:e*n.clientWidth,behavior:"smooth"})};return(0,l.jsxs)("div",{className:`${TP}-carousel`,children:[(0,l.jsx)("div",{className:`${TP}-slides`,ref:t,children:n.map((e=>(0,l.jsx)("div",{className:`${TP}-slide`,children:e.thumbnail_url?(0,l.jsx)("video",{controls:!0,poster:e.thumbnail_url,src:e.media_url}):(0,l.jsx)("img",{src:e.media_url,alt:""})},e.id)))}),1<n.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{type:"button",className:`${TP}-nav ${TP}-nav-prev`,onClick:e=>{e.stopPropagation(),o(-1)},"aria-label":(0,x.__)("Previous slide","b-blocks"),children:KP}),(0,l.jsx)("button",{type:"button",className:`${TP}-nav ${TP}-nav-next`,onClick:e=>{e.stopPropagation(),o(1)},"aria-label":(0,x.__)("Next slide","b-blocks"),children:QP})]})]})},eE=({attributes:e,user:t,feeds:n=[],index:o,blockId:i="",container:a,isBackend:s=!1,onClose:r,onMove:c})=>{const{lightbox:d={},elements:u={}}=e,p=(0,m.useRef)(null),[h,g]=(0,m.useState)(!1),b=n[o],f=(0,
479 -m.useCallback)((e=>{"Escape"===e.key&&r(),"ArrowRight"===e.key&&c(1),"ArrowLeft"===e.key&&c(-1)}),[r,c]);if((0,m.useEffect)((()=>{const e=a?.ownerDocument||document;e.addEventListener("keydown",f);const t=e.body?.style?.overflow;return e.body&&(e.body.style.overflow="hidden"),p.current?.focus(),g(!0),()=>{e.removeEventListener("keydown",f),e.body&&void 0!==t&&(e.body.style.overflow=t)}}),[f,a]),!b)return null;const{media_type:y="IMAGE",media_url:v="",thumbnail_url:k="",caption:w="",permalink:_=""}=b,C=i||"default",j=`\n\t\t.${TP}-lightbox[data-bb-id="${C}"] {\n\t\t\t${d.backdrop?`background: ${d.backdrop} !important;`:""}\n\t\t}\n\t\t.${TP}-lightbox[data-bb-id="${C}"] .${TP}-close {\n\t\t\t${d.closeColor?`color: ${d.closeColor} !important;`:""}\n\t\t\t${d.closeBg?`background: ${d.closeBg} !important;`:""}\n\t\t}\n\t\t.${TP}-lightbox[data-bb-id="${C}"] .${TP}-close svg {\n\t\t\t${d.closeColor?"fill: currentColor !important;":""}\n\t\t}\n\t\t.${TP}-lightbox[data-bb-id="${C}"] .${TP}-close:hover {\n\t\t\t${d.closeHoverColor?`color: ${d.closeHoverColor} !important;`:""}\n\t\t\t${d.closeHoverBg?`background: ${d.closeHoverBg} !important;`:""}\n\t\t}\n\t\t.${TP}-lightbox[data-bb-id="${C}"] .${TP}-nav {\n\t\t\t${d.navColor?`color: ${d.navColor} !important;`:""}\n\t\t\t${d.navBg?`background: ${d.navBg} !important;`:""}\n\t\t}\n\t\t.${TP}-lightbox[data-bb-id="${C}"] .${TP}-nav svg {\n\t\t\t${d.navColor?"fill: currentColor !important;":""}\n\t\t}\n\t\t.${TP}-lightbox[data-bb-id="${C}"] .${TP}-nav:hover {\n\t\t\t${d.navHoverColor?`color: ${d.navHoverColor} !important;`:""}\n\t\t\t${d.navHoverBg?`background: ${d.navHoverBg} !important;`:""}\n\t\t}\n\t`,$=(0,l.jsxs)("div",{className:`${TP}-lightbox${h?" is-open":""}`,"data-bb-id":C,role:"dialog","aria-modal":"true","aria-label":(0,x.__)("Instagram post","b-blocks"),ref:p,tabIndex:-1,onMouseDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation(),e.target===e.currentTarget&&r()},children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:j}}),(0,l.jsx)("button",{type:"button",className:`${TP}-close`,onClick:e=>{e.stopPropagation(),r()},"aria-label":(0,x.__)("Close","b-blocks"),children:YP}),1<n.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{type:"button",className:`${TP}-nav ${TP}-nav-prev`,onClick:e=>{e.stopPropagation(),c(-1)},"aria-label":(0,x.__)("Previous post","b-blocks"),children:KP}),(0,l.jsx)("button",{type:"button",className:`${TP}-nav ${TP}-nav-next`,onClick:e=>{e.stopPropagation(),c(1)},"aria-label":(0,x.__)("Next post","b-blocks"),children:QP})]}),(0,l.jsxs)("div",{className:`${TP}-dialog`,onClick:e=>e.stopPropagation(),children:[(0,l.jsxs)("div",{className:`${TP}-media`,children:["VIDEO"===y&&(0,l.jsx)("video",{controls:!0,autoPlay:!0,poster:k,src:v}),"CAROUSEL_ALBUM"===y&&(0,l.jsx)(JP,{feed:b}),"IMAGE"===y&&(0,l.jsx)("img",{src:v,alt:""})]}),(0,l.jsxs)("div",{className:`${TP}-details`,children:[d.showProfile&&(0,l.jsx)(XP,{attributes:e,user:t,compact:!0}),d.showCaption&&(w||s)&&(0,l.jsx)("div",{className:`${TP}-full-caption`,children:HP(w||(s?(0,x.__)("Instagram caption preview text with #hashtags","b-blocks"):""),u.linkHashtags)}),d.showLink&&_&&(0,l.jsxs)("a",{className:`${TP}-permalink`,href:_,target:"_blank",rel:"noreferrer nofollow noopener",children:[GP," ",(0,x.__)("View on Instagram","b-blocks")]})]})]})]}),S=a?.ownerDocument?.body||("undefined"!=typeof document?document.body:null);return S?(0,Xn.createPortal)($,S):$},tE=({count:e=12})=>(0,l.jsx)("div",{className:`${TP}-grid`,children:Array.from({length:e},((e,t)=>(0,l.jsx)("div",{className:`${TP}-item ${TP}-skeleton`},t)))}),nE=({attributes:e,id:t="",isBackend:n=!1})=>{const o=(0,m.useRef)(null),{source:i={},elements:a={}}=e,[s,r]=(0,m.useState)({status:"loading",user:{},media:[],error:""}),[c,d]=(0,m.useState)(1),[u,p]=(0,m.useState)(-1),{account:h="",limit:g=24,perPage:b=12,cacheMinutes:f=30}=i;(0,m.useEffect)((()=>{let e=!0;return r((e=>({...e,status:"loading",error:""}))),(({account:e="",limit:t=12,cacheMinutes:n=30})=>LP("bBlocksInstagramFeed",{account:e,limit:t,cache:n}))({account:h,limit:g,cacheMinutes:f}).then((t=>e&&r({status:"ready",user:t?.user||{},media:t?.media||[],error:""}))).catch((t=>e&&r({status:"error",user:{},media:[],error:t.message}))),()=>{e=!1}}),[h,g,f]),(0,m.useEffect)((()=>d(1)),[h,b]);const y={user:s.user,media:s.media},v=parseInt(b,10)||12,k=(0,m.useMemo)((()=>y.media.slice(0,v*c)),[y.media,v,c]),w=y.media.length>k.length,_=(e=>{const{elements:t={},item:n={},caption:o={}}=e;return[TP,`${TP}-hover-${n.hoverEffect||"none"}`,`${TP}-caption-${o.style||"overlay-center"}`,o.onHover&&"below"!==o.style?`${TP}-caption-on-hover`:"",t.caption?`${TP}-has-caption`:"",t.profile?`${TP}-has-profile`:""].filter(Boolean).join(" ")})(e);if("loading"===s.status&&!n)return(0,l.jsx)("div",{className:_,children:(0,l.jsx)(tE,{count:v})});if("error"===s.status&&!n&&!y.media.length)return null;if(!y.media.length)return(0,l.jsx)("div",{className:_,children:(0,l.jsx)("p",{className:`${TP}-notice`,children:s.error||(0,x.__)("No posts to show yet.","b-blocks")})});const C=a.profile||a.followButton&&!a.followInFooter,j=a.loadMore&&w||a.followButton&&a.followInFooter;return(0,l.jsxs)("div",{className:_,ref:o,children:[C&&(0,l.jsxs)("div",{className:`${TP}-header`,children:[a.profile&&(0,l.jsx)(XP,{attributes:e,user:y.user}),!a.followInFooter&&(0,l.jsx)(UP,{attributes:e,username:y.user?.username,isBackend:n})]}),(0,l.jsx)("div",{className:`${TP}-grid`,children:k.map(((t,o)=>(0,l.jsx)(ZP,{attributes:e,feed:t,index:o,isBackend:n,onOpen:p},t.id)))}),j&&(0,l.jsxs)("div",{className:`${TP}-footer`,children:[a.loadMore&&w&&(0,l.jsx)("button",{type:"button",className:`${TP}-load-more`,onClick:()=>n?{}:d(c+1),children:a.loadMoreLabel||(0,x.__)("Load More","b-blocks")}),a.followInFooter&&(0,l.jsx)(UP,{attributes:e,username:y.user?.username,isBackend:n})]}),a.lightbox&&-1<u&&(0,l.jsx)(eE,{attributes:e,user:y.user,feeds:k,index:u,blockId:t,container:o.current,isBackend:n,onClose:()=>p(-1),onMove:e=>p((t=>(t+e+k.length)%k.length))})]})},oE=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:a={}}=e,{grid:s={},item:r={},caption:c={},profile:d={},followBtn:u={},loadMoreBtn:p={},lightbox:h={}}=e,g=`#${o} .${TP}`,b=`${g} .${TP}-header`,f=`${g} .${TP}-grid`,x=`${g} .${TP}-item`,y=`${g} .${TP}-figure`,v=`${g} .${TP}-overlay`,k=`${g} .${TP}-type`,w=`${g} .${TP}-caption`,_=`${g} .${TP}-photo`,C=`${g} .${TP}-username`,j=`${g} .${TP}-name, ${g} .${TP}-bio`,$=`${g} .${TP}-follow`,S=`${g} .${TP}-load-more`,T=`.${TP}-lightbox[data-bb-id="${(e=>{if("string"!=typeof e)return e;const t=e.replace(/\/\*|\*\//g,"").replace(/[{};<>\\]/g,"").replace(/[\r\n\t]+/g," "),n=e=>(t.split(e).length-1)%2;return n('"')||n("'")?t.replace(/["']/g,""):t})(o)}"]`,N=(e,...t)=>{const n=t.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return n?`${e}{ ${n} }`:""},M=e=>Object.keys(e||{}).length?as(e):"",L=(e,t)=>e?e.desktop||e.tablet||e.mobile?e[t]||null:"desktop"!==t||void 0===e.top&&void 0===e.right?null:e:null,P=(e,t={},n)=>{const o=L(t.normal?.padding,n)||("desktop"===n?L(t.padding,n):null),i=L(t.normal?.radius,n)||("desktop"===n?L(t.radius,n):null),a=L(t.hover?.padding,n),s=L(t.hover?.radius,n);return`\n\t\t\t${N(e,ns("padding",hs(o)),ns("border-radius",hs(i)))}\n\t\t\t${N(`${e}:hover, ${e}:focus-visible`,ns("padding",hs(a)),ns("border-radius",hs(s)))}\n\t\t`
480 -},E=(e,t={})=>`\n\t\t${N(e,ns("color",t.normal?.color),os(t.normal?.background),M(t.normal?.border),ns("box-shadow",ls(Array.isArray(t.normal?.shadow)?t.normal.shadow:t.shadow||[])))}\n\t\t${N(`${e}:hover, ${e}:focus-visible`,ns("color",t.hover?.color),os(t.hover?.background),M(t.hover?.border),ns("box-shadow",ls(Array.isArray(t.hover?.shadow)?t.hover.shadow:[])))}\n\t\t${P(e,t,"desktop")}\n\t`,A=e=>N(f,ns("grid-template-columns",`repeat(${parseInt(zP(s,e,"columns",4),10)||1}, minmax(0, 1fr))`),ns("column-gap",DP(zP(s,e,"columnGap","15px"),"15px")),ns("row-gap",DP(zP(s,e,"rowGap","15px"),"15px"))),B=e=>`\n\t\t\t${N(x,ns("border-radius",hs(r?.[e]?.radius)))}\n\n\t\t${N(y,ns("aspect-ratio",zP(s,e,"ratio","1/1")))}\n\n\t\t${N(k,ns("font-size",DP(zP(r,e,"iconSize","desktop"===e?r.iconSize||"22px":""),"")))}`,I=e=>`\n\t\t\t${N(b,ns("gap",DP(zP(d,e,"gap","desktop"===e?d.gap||"12px":""),"")))}\n\n\t\t${N(`${_}, ${_} img`,ns("width",DP(zP(d,e,"photoSize","desktop"===e?d.photoSize||"55px":""),"")),ns("height",DP(zP(d,e,"photoSize","desktop"===e?d.photoSize||"55px":""),"")))}`,O=e=>N(w,ns("padding",hs(L(c.padding,e)))),R=(0,m.useMemo)((()=>`\n\t\t${ps("",c.typo)?.googleFontLink}\n\t\t${ps("",d.usernameTypo)?.googleFontLink}\n\t\t${ps("",d.metaTypo)?.googleFontLink}\n\t\t${ps("",u.typo)?.googleFontLink}\n\t\t${ps("",p.typo)?.googleFontLink}\n\t\t${ps(w,c.typo)?.styles}\n\t\t${ps(C,d.usernameTypo)?.styles}\n\t\t${ps(j,d.metaTypo)?.styles}\n\t\t${ps($,u.typo)?.styles}\n\t\t${ps(S,p.typo)?.styles}\n\n\t\t${N(x,M(r.border),ns("box-shadow",ls(Array.isArray(r.shadow)?r.shadow:r.shadow?.normal)))}\n\t\t${r.shadow?.hover?N(`${x}:hover`,ns("box-shadow",ls(r.shadow.hover))):""}\n\n\t\t${N(v,ns("background",r.overlayColor))}\n\t\t${N(k,ns("color",r.iconColor))}\n\n\t\t${N(w,ns("color",c.color),ns("text-align",c.align),ns("padding",hs(L(c.padding,"desktop"))),os(c.background))}\n\t\t${N(`${w} a`,ns("color",c.linkColor))}\n\n\t\t${N(C,ns("color",d.usernameColor))}\n\t\t${N(`${g} .${TP}-name`,ns("color",d.nameColor))}\n\t\t${N(`${g} .${TP}-bio`,ns("color",d.bioColor))}\n\n\t\t${E($,u)}\n\t\t${E(S,p)}\n\n\t\t${N(T,ns("background",h.backdrop))}\n\t\t${N(`${T} .${TP}-close`,ns("color",h.closeColor),ns("background",h.closeBg))}\n\t\t${N(`${T} .${TP}-close svg`,ns("fill",h.closeColor))}\n\t\t${N(`${T} .${TP}-close:hover`,ns("color",h.closeHoverColor),ns("background",h.closeHoverBg))}\n\t\t${N(`${T} .${TP}-close:hover svg`,ns("fill",h.closeHoverColor))}\n\t\t${N(`${T} .${TP}-nav`,ns("color",h.navColor),ns("background",h.navBg))}\n\t\t${N(`${T} .${TP}-nav svg`,ns("fill",h.navColor))}\n\t\t${N(`${T} .${TP}-nav:hover`,ns("color",h.navHoverColor),ns("background",h.navHoverBg))}\n\t\t${N(`${T} .${TP}-nav:hover svg`,ns("fill",h.navHoverColor))}\n\n\t\t${A("desktop")}\n\t\t${B("desktop")}\n\t\t${I("desktop")}\n\n\t\t${t}{\n\t\t\t${A("tablet")}\n\t\t\t${B("tablet")}\n\t\t\t${I("tablet")}\n\t\t\t${O("tablet")}\n\t\t\t${P($,u,"tablet")}\n\t\t\t${P(S,p,"tablet")}\n\t\t}\n\n\t\t${n}{\n\t\t\t${A("mobile")}\n\t\t\t${B("mobile")}\n\t\t\t${I("mobile")}\n\t\t\t${O("mobile")}\n\t\t\t${P($,u,"mobile")}\n\t\t\t${P(S,p,"mobile")}\n\t\t}\n\n\t\t${_s(o,a,i,!1)}\n\t\t`),[e,o,i]);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:R}})},iE=({attributes:e,updateObj:t,instagramKey:n=""})=>{const{source:o={}}=e,[i,a]=(0,m.useState)(Boolean(n)),[s,r]=(0,m.useState)(n?"":"loading");return(0,m.useEffect)((()=>{let e=!0;return n?(a(!0),void r("")):(LP("bBlocksInstagramGetAccount").then((t=>e&&(a(Boolean(t?.hasToken)),r("")))).catch((t=>e&&r(t.message))),()=>{e=!1})}),[n]),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Account","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Posts To Fetch","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{value:o.limit,onChange:e=>t("source",parseInt(e,10)||1,"limit"),min:1,max:100})]}),(0,l.jsx)("small",{children:(0,x.__)("How many posts are pulled from Instagram and cached. The grid shows them a page at a time.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Cache (minutes)","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{value:o.cacheMinutes,onChange:e=>t("source",parseInt(e,10)||0,"cacheMinutes"),min:0,max:10080})]}),(0,l.jsx)("small",{children:(0,x.__)("Zero fetches on every page load, which Instagram rate-limits. Thirty minutes suits most feeds.","b-blocks")}),(0,l.jsx)(y.Button,{className:"mt10",variant:"secondary",onClick:()=>{r("clearing"),LP("bBlocksInstagramClearCache").then((()=>r("cleared"))).catch((e=>r(e.message)))},disabled:"clearing"===s,children:"clearing"===s?(0,x.__)("Clearing…","b-blocks"):(0,x.__)("Clear Cached Feed","b-blocks")}),"cleared"===s&&(0,l.jsx)("small",{children:(0,x.__)("Cache cleared. Reload the editor to see the new posts.","b-blocks")})]})},aE=({attributes:e,updateObj:t})=>{const{elements:n={},source:o={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Follow Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Follow Button","b-blocks"),checked:n.followButton,onChange:e=>t("elements",e,"followButton")}),n.followButton&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Label","b-blocks"),value:n.followLabel||"",onChange:e=>t("elements",e,"followLabel")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Place Below The Grid","b-blocks"),checked:n.followInFooter,onChange:e=>t("elements",e,"followInFooter"),help:(0,x.__)("Off, it sits beside the profile above the grid.","b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Load More","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Load More","b-blocks"),checked:n.loadMore,onChange:e=>t("elements",e,"loadMore")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Posts Per Page","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",value:o.perPage,onChange:e=>t("source",parseInt(e,10)||1,"perPage"),min:1,max:100})]}),(0,l.jsx)("small",{children:(0,x.__)("With Load More off, only this many posts are ever shown.","b-blocks")}),n.loadMore&&(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Label","b-blocks"),value:n.loadMoreLabel||"",onChange:e=>t("elements",e,"loadMoreLabel")})]})]})},sE=({attributes:e,updateObj:t})=>{const{elements:n={},caption:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Caption","b-blocks"),checked:n.caption,onChange:e=>t("elements",e,"caption")}),n.caption&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0 mt10",children:(0,x.__)("Placement","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.style||"overlay-center",onChange:e=>t("caption",e,"style"),children:BP.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),"below"!==o.style&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show on Hover Only","b-blocks"),checked:o.onHover,onChange:e=>t("caption",e,"onHover")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Caption Length","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",value:n.captionLength,onChange:e=>t("elements",parseInt(e,10)||0,"captionLength"),min:0})]}),(0,l.jsx)("small",{children:(0,x.__)("Zero shows the whole caption.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Remove Hashtags","b-blocks"),checked:n.stripHashtags,onChange:e=>t("elements",e,"stripHashtags")}),!n.stripHashtags&&(0,
481 -l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Link Hashtags","b-blocks"),checked:n.linkHashtags,onChange:e=>t("elements",e,"linkHashtags"),help:(0,x.__)("Each hashtag opens its Instagram tag page.","b-blocks")})]})]})},rE=({attributes:e,updateObj:t,device:n="desktop"})=>{const{grid:o={}}=e,i=(e,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.[i]||"",onChange:e=>t("grid",e,n,i),units:[Pe(),Ee(),Ae(),Be()]})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Grid","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(v,{className:"mb0",children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:parseInt(o?.[n]?.columns,10)||1,onChange:e=>t("grid",e,n,"columns"),min:1,max:8}),i((0,x.__)("Column Gap","b-blocks"),"columnGap"),i((0,x.__)("Row Gap","b-blocks"),"rowGap"),(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Tile Shape","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{value:o?.[n]?.ratio??("desktop"===n?"1/1":""),options:"desktop"===n?OP:[{label:(0,x.__)("Inherit","b-blocks"),value:""},...OP],onChange:e=>t("grid",e,n,"ratio")}),(0,l.jsx)("small",{children:(0,x.__)("Original keeps each post at its own proportions, so rows will not line up.","b-blocks")})]})},lE=({attributes:e,updateObj:t})=>{const{elements:n={},lightbox:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Interaction","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open In Lightbox","b-blocks"),checked:n.lightbox,onChange:e=>t("elements",e,"lightbox"),help:(0,x.__)("Off, a tile links straight to the post on Instagram.","b-blocks")}),n.lightbox?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Profile In Lightbox","b-blocks"),checked:o.showProfile,onChange:e=>t("lightbox",e,"showProfile")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Caption In Lightbox","b-blocks"),checked:o.showCaption,onChange:e=>t("lightbox",e,"showCaption")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Instagram Link","b-blocks"),checked:o.showLink,onChange:e=>t("lightbox",e,"showLink")})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Link To Instagram","b-blocks"),checked:n.linkPosts,onChange:e=>t("elements",e,"linkPosts")}),n.linkPosts&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open In New Tab","b-blocks"),checked:n.openInNewTab,onChange:e=>t("elements",e,"openInNewTab")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Video & Album Icon","b-blocks"),checked:n.mediaIcon,onChange:e=>t("elements",e,"mediaIcon"),help:(0,x.__)("Marks which tiles are reels or multi-photo posts.","b-blocks")})]})},cE=({attributes:e,updateObj:t})=>{const{elements:n={},profile:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Profile","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Profile","b-blocks"),checked:n.profile,onChange:e=>t("elements",e,"profile")}),n.profile&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Photo","b-blocks"),checked:n.profilePhoto,onChange:e=>t("elements",e,"profilePhoto")}),n.profilePhoto&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Fallback Photo","b-blocks")}),(0,l.jsx)(ve,{value:o.photo,types:["image"],onChange:e=>t("profile",e,"photo"),placeholder:(0,x.__)("Upload Profile Picture","b-blocks")}),(0,l.jsx)("small",{children:(0,x.__)("Used only when Instagram returns no picture for the account.","b-blocks")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Name","b-blocks"),checked:n.profileName,onChange:e=>t("elements",e,"profileName")}),n.profileName&&(0,l.jsx)(y.TextControl,{className:"mt10",value:o.nameText||"",onChange:e=>t("profile",e,"nameText"),placeholder:(0,x.__)("Display name","b-blocks"),help:(0,x.__)("Shown only when the account itself returns no name.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Biography","b-blocks"),checked:n.profileBio,onChange:e=>t("elements",e,"profileBio")}),n.profileBio&&(0,l.jsx)(y.TextControl,{className:"mt10",value:o.bioText||"",onChange:e=>t("profile",e,"bioText"),placeholder:(0,x.__)("Short bio","b-blocks"),help:(0,x.__)("Shown only when the account itself returns no biography.","b-blocks")})]})]})},dE=({attributes:e,updateObj:t,group:n,title:o,size:i=14,device:a="desktop"})=>{const s=e?.[n]||{},r=(e,t)=>{const n=s?.[e]||{},o=n?.[t]??("normal"===e?s?.[t]:void 0);return void 0!==o?.[a]?o[a]:"desktop"!==a||!o||void 0===o.top&&void 0===o.right?{}:o},c=(e,o,i)=>{const r=s?.[e]?.[o]||("normal"===e?s?.[o]:void 0);!r||void 0!==r.desktop||void 0===r.top&&void 0===r.right?t(n,i,e,o,a):t(n,{desktop:"desktop"===a?i:r,tablet:"tablet"===a?i:{top:"",right:"",bottom:"",left:""},mobile:"mobile"===a?i:{top:"",right:"",bottom:"",left:""}},e,o)};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:o,initialOpen:!1,children:[(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typo,onChange:e=>t(n,e,"typo"),defaults:{fontSize:{desktop:i}}}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:EP,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:RP(e.name,(0,x.__)("Color","b-blocks")),value:s?.[e.name]?.color,onChange:o=>t(n,o,e.name,"color")}),(0,l.jsx)(An,{className:"mt10",label:RP(e.name,(0,x.__)("Background","b-blocks")),value:s?.[e.name]?.background,onChange:o=>t(n,o,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:RP(e.name,(0,x.__)("Border","b-blocks")),value:s?.[e.name]?.border,onChange:o=>t(n,o,e.name,"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[RP(e.name,(0,x.__)("Padding","b-blocks"))," ",(0,l.jsx)(_,{})]}),values:r(e.name,"padding"),onChange:t=>c(e.name,"padding",t)}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[RP(e.name,(0,x.__)("Border Radius","b-blocks"))," ",(0,l.jsx)(_,{})]}),values:r(e.name,"radius"),onChange:t=>c(e.name,"radius",t)}),(0,l.jsx)(yt,{className:"mt10",label:RP(e.name,(0,x.__)("Box Shadow","b-blocks")),value:s?.[e.name]?.shadow||("normal"===e.name?s?.shadow:[])||[],onChange:o=>t(n,o,e.name,"shadow")})]})})]})},uE=({attributes:e,updateObj:t,device:n="desktop"})=>{const{elements:o={},caption:i={}}=e;return o.caption?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i.color,onChange:e=>t("caption",e,"color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hashtag Color","b-blocks"),value:i.linkColor,onChange:e=>t("caption",e,"linkColor")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:i.background,onChange:e=>t("caption",e,"background")}),(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.align||"",onChange:e=>t("caption",e,"align"),children:IP.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:(()=>{const e=i?.padding;return void 0!==e?.[n]?e[n]:"desktop"!==n||!e||void 0===e.top&&void 0===e.right?{}:e})(),onChange:e=>{const o=i?.padding;!o||void 0!==o.desktop||void 0===o.top&&void 0===o.right?t("caption",e,"padding",n):t("caption",{desktop:"desktop"===n?e:o,tablet:"tablet"===n?e:{top:"",right:"",bottom:"",left:""},mobile:"mobile"===n?e:{top:"",
482 -right:"",bottom:"",left:""}},"padding")}}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typo,onChange:e=>t("caption",e,"typo"),defaults:{fontSize:{desktop:15}}})]}):null},pE=({attributes:e,updateObj:t,device:n="desktop"})=>{const{item:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Item","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Hover Effect","b-blocks"),labelPosition:"edge",value:o.hoverEffect||"none",options:AP,onChange:e=>t("item",e,"hoverEffect")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("item",e,n,"radius")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Overlay","b-blocks"),value:o.overlayColor,onChange:e=>t("item",e,"overlayColor")}),(0,l.jsx)("small",{children:(0,x.__)("A tint drawn over the photo while the pointer is on it.","b-blocks")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("item",e,"border")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:o.shadow,onChange:e=>t("item",e,"shadow")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Media Icon Color","b-blocks"),value:o.iconColor,onChange:e=>t("item",e,"iconColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Media Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.iconSize??("desktop"===n&&o.iconSize||""),onChange:e=>t("item",e,n,"iconSize"),units:[Pe(),Ae(),Be()]})]})]})},hE=({attributes:e,updateObj:t})=>{const{elements:n={},lightbox:o={}}=e;return n.lightbox?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lightbox","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Backdrop","b-blocks"),value:o.backdrop,onChange:e=>t("lightbox",e,"backdrop")}),(0,l.jsx)("small",{children:(0,x.__)("A translucent colour keeps the page visible behind the post.","b-blocks")}),(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Close Button","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:EP,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:RP(e.name,(0,x.__)("Icon Color","b-blocks")),value:"normal"===e.name?o.closeColor:o.closeHoverColor,onChange:n=>t("lightbox",n,"normal"===e.name?"closeColor":"closeHoverColor")}),(0,l.jsx)(Ue,{className:"mt10",label:RP(e.name,(0,x.__)("Background Color","b-blocks")),value:"normal"===e.name?o.closeBg:o.closeHoverBg,onChange:n=>t("lightbox",n,"normal"===e.name?"closeBg":"closeHoverBg")})]})}),(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Navigation Buttons (Prev / Next)","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:EP,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:RP(e.name,(0,x.__)("Icon Color","b-blocks")),value:"normal"===e.name?o.navColor:o.navHoverColor,onChange:n=>t("lightbox",n,"normal"===e.name?"navColor":"navHoverColor")}),(0,l.jsx)(Ue,{className:"mt10",label:RP(e.name,(0,x.__)("Background Color","b-blocks")),value:"normal"===e.name?o.navBg:o.navHoverBg,onChange:n=>t("lightbox",n,"normal"===e.name?"navBg":"navHoverBg")})]})})]}):null},gE=({attributes:e,updateObj:t,device:n="desktop"})=>{const{elements:o={},profile:i={}}=e;return o.profile?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Profile","b-blocks"),initialOpen:!1,children:[o.profilePhoto&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Photo Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",isUnitSelectTabbable:!0,value:i?.[n]?.photoSize??("desktop"===n&&i.photoSize||""),onChange:e=>t("profile",e,n,"photoSize"),units:[Pe(),Ae(),Be()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Header Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",isUnitSelectTabbable:!0,value:i?.[n]?.gap??("desktop"===n&&i.gap||""),onChange:e=>t("profile",e,n,"gap"),units:[Pe(),Ee(),Ae(),Be()]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Username Color","b-blocks"),value:i.usernameColor,onChange:e=>t("profile",e,"usernameColor")}),o.profileName&&(0,l.jsx)(Ue,{label:(0,x.__)("Name Color","b-blocks"),value:i.nameColor,onChange:e=>t("profile",e,"nameColor")}),o.profileBio&&(0,l.jsx)(Ue,{label:(0,x.__)("Biography Color","b-blocks"),value:i.bioColor,onChange:e=>t("profile",e,"bioColor")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Username Typography","b-blocks"),value:i.usernameTypo,onChange:e=>t("profile",e,"usernameTypo"),defaults:{fontSize:{desktop:18}}}),(o.profileName||o.profileBio)&&(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Name & Bio Typography","b-blocks"),value:i.metaTypo,onChange:e=>t("profile",e,"metaTypo"),defaults:{fontSize:{desktop:14}}})]}):null},mE=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pE,{...e}),(0,l.jsx)(uE,{...e}),(0,l.jsx)(gE,{...e}),e.attributes?.elements?.followButton&&(0,l.jsx)(dE,{...e,group:"followBtn",title:(0,x.__)("Follow Button","b-blocks"),size:13}),e.attributes?.elements?.loadMore&&(0,l.jsx)(dE,{...e,group:"loadMoreBtn",title:(0,x.__)("Load More Button","b-blocks"),size:14}),(0,l.jsx)(hE,{...e})]}),bE=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:PP,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iE,{...e}),(0,l.jsx)(rE,{...e}),(0,l.jsx)(cE,{...e}),(0,l.jsx)(sE,{...e}),(0,l.jsx)(aE,{...e}),(0,l.jsx)(lE,{...e})]}),"style"===t.name&&(0,l.jsx)(mE,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},fE=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i}=t,a="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,s=fe(t,n),r=window.bBlocksCursorDataConfig?.nonce,{data:c,isLoading:d}=Cd("bblocks_api_keys",{_wpnonce:r},!0),[u,p]=(0,m.useState)("");(0,m.useEffect)((()=>{p(c?.instagram?.key||"")}),[c,d]);const g=o.slice(0,12);(0,m.useEffect)((()=>{i!==g&&n({blockId:g})}),[g]);const b=`block-${o}`,f=(0,h.useBlockProps)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(bE,{...e,updateObj:s,isPremium:a,instagramKey:u}),(0,l.jsxs)("div",{...f,children:[(0,l.jsx)(oE,{attributes:t,id:b,isBackend:!0}),!d&&!u&&(0,l.jsxs)(ja,{status:"warning",isIcon:!1,className:"mb10",children:[(0,x.__)("Add your Instagram Access Token in ","b-blocks"),(0,l.jsx)("a",{href:vn,target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("Dashboard → Settings → API Integrations","b-blocks")}),(0,x.__)(" to load your feed.","b-blocks")]}),(0,l.jsx)("div",{children:(0,l.jsx)(nE,{attributes:t,id:b,isBackend:!0})})]})]})}));(0,p.registerBlockType)(SP,{icon:ml,edit:fE,save:()=>null})
483 -;const xE=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/interactive-checklist","title":"Interactive Checklist","category":"bBlocks","description":"A titled checklist of tickable items that visitors can check off, with their progress remembered in the browser via localStorage, an optional live completion indicator, and a reset button. Works without JavaScript using native checkbox inputs.","keywords":["checklist","todo","to-do","task list","tick list","interactive checklist","progress checklist","setup checklist","steps","tasks"],"textdomain":"b-blocks","attributes":{"heading":{"type":"object","default":{"text":"Your Checklist","tag":"h3","color":"#1a1a1a","typography":{"fontSize":{"desktop":"20px","tablet":"","mobile":""},"fontWeight":700},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}}},"items":{"type":"array","default":[{"id":"item-1","label":"First item","checked":false},{"id":"item-2","label":"Second item","checked":false},{"id":"item-3","label":"Third item","checked":false}]},"checkbox":{"type":"object","default":{"style":"square","size":"20px","accent":"#4f46e5","checkColor":"#ffffff"}},"item":{"type":"object","default":{"color":"#1a1a1a","typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":400},"gap":"12px","strike":false}},"progress":{"type":"object","default":{"show":true,"typography":{"fontSize":{"desktop":"12px","tablet":"","mobile":""},"fontWeight":600},"height":"6px","trackBg":{"type":"solid","color":""},"fillBg":{"type":"solid","color":""}}},"reset":{"type":"object","default":{"show":true}},"persistKey":{"type":"string","default":""},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"24px","right":"28px","bottom":"24px","left":"28px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"12px","right":"12px","bottom":"12px","left":"12px"},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"color":"#e5e7eb","style":"solid","width":"1px"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),yE=({attributes:e,id:t,isBackend:n=!1})=>{const{heading:o={},checkbox:i={},item:a={},progress:s={},advanced:r}=e,c=i.accent||"#4f46e5",d=i.size||"20px",u=s.typography?.fontSize?.desktop||"12px",p=`#${t} .bBlocks-interactive-checklist-wrapper`,h=`${p} .bBlocks-interactive-checklist-heading`,g=`${p} .bBlocks-interactive-checklist-progress-text`,m=`${p} .bBlocks-interactive-checklist-progress-track`,b=`${p} .bBlocks-interactive-checklist-progress-fill`,f=`${p} .bBlocks-interactive-checklist-list`,x=`${p} .bBlocks-interactive-checklist-item`,y=`${p} .bBlocks-interactive-checklist-label`,v=`${p} .bBlocks-interactive-checklist-checkbox`,k=`${p} .bBlocks-interactive-checklist-box`,w=`${p} .bBlocks-interactive-checklist-reset`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",o.typography).googleFontLink}\n\t\t\t${ps("",a.typography).googleFontLink}\n\t\t\t${p}{\n\t\t\t\t${ns("color",a.color)}\n\t\t\t}\n\t\t\t${ps(h,o.typography).styles}\n\t\t\t${h}{\n\t\t\t\t${ns("color",o.color)}\n\t\t\t\t${os(o.bg)}\n\t\t\t\t${as(o.border)}\n\t\t\t\t${ns("border-radius",hs(o.borderRadius))}\n\t\t\t\t${ns("padding",hs(o.padding))}\n\t\t\t}\n\t\t\t${ps("",s.typography).googleFontLink}\n\t\t\t${ps(g,s.typography).styles}\n\t\t\t${m}{\n\t\t\t\t${ns("height",s.height)}\n\t\t\t\t${os(s.trackBg)}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\t${s.fillBg?.color||s.fillBg?.gradient||s.fillBg?.image?.url?os(s.fillBg):`background: ${c};`}\n\t\t\t}\n\t\t\t${f}{ gap: ${a.gap||"12px"}; }\n\t\t\t${ps(y,a.typography).styles}\n\t\t\t${y}{\n\t\t\t\t${ns("color",a.color)}\n\t\t\t\tpadding-left: calc(${d} + 12px);\n\t\t\t}\n\t\t\t${v}{ width: ${d}; height: ${d}; }\n\t\t\t${k}{\n\t\t\t\twidth: ${d};\n\t\t\t\theight: ${d};\n\t\t\t\tborder-color: ${c};\n\t\t\t}\n\t\t\t${k}::after{\n\t\t\t\t${ns("background-color",i.checkColor)}\n\t\t\t}\n\t\t\t${v}:checked + .bBlocks-interactive-checklist-box,\n\t\t\t${x}.is-checked .bBlocks-interactive-checklist-box{\n\t\t\t\tbackground: ${c};\n\t\t\t\tborder-color: ${c};\n\t\t\t}\n\t\t\t${v}:focus-visible + .bBlocks-interactive-checklist-box{\n\t\t\t\toutline: 2px solid ${c};\n\t\t\t\toutline-offset: 2px;\n\t\t\t}\n\t\t\t${w}{\n\t\t\t\tcolor: ${c};\n\t\t\t\tfont-size: ${u};\n\t\t\t}\n\t\t\t${w}:focus-visible{ outline: 2px solid ${c}; }\n\t\t\t${_s(t,r,n,!1)}\n\t\t\t`}})},vE=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],kE=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],wE=[{label:(0,x.__)("H2","b-blocks"),value:"h2"},{label:(0,x.__)("H3","b-blocks"),value:"h3"},{label:(0,x.__)("H4","b-blocks"),value:"h4"}],_E=[{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Round","b-blocks"),value:"round"}],CE=((0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),e=>{const{attributes:t,updateObj:n,index:o}=e,i=t.items[o]||{};return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label","b-blocks"),value:i.label||"",onChange:e=>n("items",e,o,"label"),placeholder:(0,x.__)("Checklist item","b-blocks"),__nextHasNoMarginBottom:!0})})}),jE=({attributes:e,setAttributes:t,updateObj:n})=>{const{heading:o={},progress:i={},reset:a={},item:s={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Heading text","b-blocks"),value:o.text||"",onChange:e=>n("heading",e,"text"),placeholder:(0,x.__)("Your Checklist","b-blocks"),help:(0,x.__)("Leave empty to hide the heading.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{
484 -className:"flex2",children:(0,x.__)("Heading tag","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:o.tag||"h3",options:wE,onChange:e=>n("heading",e,"tag"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show progress line","b-blocks"),checked:!1!==i.show,onChange:e=>n("progress",e,"show"),help:(0,x.__)('Live "N of M complete" indicator and progress bar.',"b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show reset button","b-blocks"),checked:!1!==a.show,onChange:e=>n("reset",e,"show"),help:(0,x.__)("Lets visitors clear their saved progress.","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Checklist items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mb10",label:(0,x.__)("Strike checked items","b-blocks"),checked:!!s.strike,onChange:e=>n("item",e,"strike"),help:(0,x.__)("Line-through and dim items once checked.","b-blocks")}),(0,l.jsx)(_a,{attributes:e,setAttributes:t,updateObj:n,newItem:{id:`item-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,label:(0,x.__)("New item","b-blocks"),checked:!1},design:"sortable",itemLabel:"Item",arrKey:"items",title:"label",ItemSettings:CE})]})]})},$E={top:"",right:"",bottom:"",left:""},SE=({attributes:e,updateObj:t})=>{const{heading:n={},checkbox:o={},item:i={},progress:a={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Heading","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:n.color||"#1a1a1a",onChange:e=>t("heading",e,"color"),defaultColor:"#1a1a1a"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typography||{},onChange:e=>t("heading",e,"typography")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:n.bg,onChange:e=>t("heading",e,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:n.border,onChange:e=>t("heading",e||{},"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),units:vE,values:n.borderRadius,resetValues:$E,onChange:e=>t("heading",e,"borderRadius")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),units:vE,values:n.padding,resetValues:$E,onChange:e=>t("heading",e,"padding")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Checkbox","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:o.style||"square",options:_E,onChange:e=>t("checkbox",e,"style")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",units:vE,isUnitSelectTabbable:!0,value:o.size||"20px",onChange:e=>t("checkbox",e,"size")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Accent color:","b-blocks"),value:o.accent,onChange:e=>t("checkbox",e,"accent"),defaultColor:"#4f46e5"}),(0,l.jsx)(Ue,{label:(0,x.__)("Check mark color:","b-blocks"),value:o.checkColor,onChange:e=>t("checkbox",e,"checkColor"),defaultColor:"#ffffff"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text color:","b-blocks"),value:i.color||"#1a1a1a",onChange:e=>t("item",e,"color"),defaultColor:"#1a1a1a"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typography||{},onChange:e=>t("item",e,"typography")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Gap between items","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",units:vE,isUnitSelectTabbable:!0,value:i.gap,onChange:e=>t("item",e,"gap")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Progress","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:a.typography||{},defaults:{fontSize:{desktop:"12px"}},onChange:e=>t("progress",e,"typography")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Track Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",units:vE,isUnitSelectTabbable:!0,value:a.height||"6px",onChange:e=>t("progress",e,"height")})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Track Background","b-blocks"),value:a.trackBg,onChange:e=>t("progress",e,"trackBg")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Progress Fill Background","b-blocks"),value:a.fillBg,onChange:e=>t("progress",e,"fillBg")})]})]})},TE=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:kE,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(jE,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(SE,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},NE="bBlocks-interactive-checklist",ME=["h2","h3","h4"],LE=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{heading:a={},items:s=[],checkbox:r={},item:c={},progress:d={},reset:u={},persistKey:p}=t,g=bBlocksPremiumChecker,b=fe(t,n),[f,v]=(0,m.useState)({});(0,m.useEffect)((()=>{p||n({persistKey:`cl-${o.slice(0,8)}`})}),[p,o,n]);const k="round"===r.style?"round":"square",w=!0===c.strike,_=ME.includes(a.tag)?a.tag:"h3",C=s.length,j=s.filter((e=>e&&f[e.id])).length,$=C>0?Math.round(j/C*100):0,S=[`${NE}-wrapper`,`${NE}-checkbox-${k}`,w?`${NE}-has-strike`:""].filter(Boolean).join(" "),T=(e,t)=>{if(t<0||t>=s.length)return;const o=s.slice(),[i]=o.splice(e,1);o.splice(t,0,i),n({items:o})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(TE,{attributes:t,setAttributes:n,updateObj:b,isPremium:g,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(yE,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:S,children:[(0,l.jsx)(h.RichText,{tagName:_,className:`${NE}-heading`,value:a.text||"",onChange:e=>b("heading",e,"text"),placeholder:(0,x.__)("Your Checklist","b-blocks"),allowedFormats:["core/bold","core/italic"]}),!1!==d.show&&C>0&&(0,l.jsxs)("div",{className:`${NE}-progress`,children:[(0,l.jsx)("p",{className:`${NE}-progress-text`,children:(0,x.sprintf)(/* translators: 1: done, 2: total */ /* translators: 1: done, 2: total */(0,x.__)("%1$s of %2$s complete","b-blocks"),j,C)}),(0,l.jsx)("div",{className:`${NE}-progress-track`,"aria-hidden":"true",children:(0,l.jsx)("span",{className:`${NE}-progress-fill`,style:{width:`${$}%`}})})]}),0===C?(0,l.jsx)("p",{className:`${NE}-empty`,children:(0,x.__)("No checklist items yet. Add the first one from the sidebar.","b-blocks")}):(0,l.jsx)("ul",{className:`${NE}-list`,children:s.map(((e,t)=>{const o=!(!e||!f[e.id]);return(0,l.jsx)("li",{className:`${NE}-item ${o?"is-checked":""}`,children:(0,l.jsxs)("div",{className:`${NE}-label`,children:[(0,l.jsx)("input",{type:"checkbox",className:`${NE}-checkbox`,checked:o,onChange:()=>{},onClick:t=>{var n;t.stopPropagation(),n=e.id,v((e=>({...e,[n]:!e[n]})))}}),(0,l.jsx)("span",{className:`${NE}-box`,"aria-hidden":"true"}),(0,l.jsx)(h.RichText,{tagName:"span",className:`${NE}-text`,value:e&&e.label||"",onChange:e=>{return o=t,i="label",a=e,void n({items:s.map(((e,t)=>t===o?{...e||{},[i]:a}:e))});var o,i,a},placeholder:(0,x.__)("Checklist item","b-blocks"),allowedFormats:[]}),(0,l.jsxs)("div",{className:`${NE}-editor-item-actions`,children:[(0,l.jsx)(y.Button,{variant:"tertiary",
485 -size:"small",icon:"arrow-up-alt2",label:(0,x.__)("Move item up","b-blocks"),onClick:()=>T(t,t-1),disabled:0===t}),(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-down-alt2",label:(0,x.__)("Move item down","b-blocks"),onClick:()=>T(t,t+1),disabled:t===s.length-1}),(0,l.jsx)(y.Button,{variant:"tertiary",isDestructive:!0,size:"small",icon:"trash",label:(0,x.__)("Remove item","b-blocks"),onClick:()=>{return e=t,n({items:s.filter(((t,n)=>n!==e))});var e}})]})]})},e&&e.id||t)}))}),!1!==u.show&&C>0&&(0,l.jsx)("button",{type:"button",className:`${NE}-reset`,disabled:!0,children:(0,x.__)("Reset progress","b-blocks")})]})})]})]})}));Ll(xE.name)&&(0,p.registerBlockType)(xE,{icon:nl,edit:LE,save:()=>null});const PE=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/key-takeaways","title":"Key Takeaways","category":"bBlocks","description":"A titled summary card listing the most important points of an article as a checkmark, numbered, or bullet list. Built for the blog \\"Key Takeaways\\" / \\"TL;DR\\" pattern with heading, accent color, icon, and full typography controls.","keywords":["key takeaways","takeaways","summary","tldr","tl;dr","highlights","key points","summary box","styled box","notification box"],"textdomain":"b-blocks","attributes":{"heading":{"type":"object","default":{"text":"Key Takeaways","tag":"h3","color":"#F4F7FF","bg":{"type":"solid","color":"#0d6efd"},"typography":{"fontSize":{"desktop":"18px","tablet":"","mobile":""},"fontWeight":700},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"border":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}}}},"list":{"type":"object","default":{"style":"check","showIcon":true,"gap":"10px"}},"items":{"type":"array","default":[{"text":"Summarize your first key point here.","icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\\"/></svg>"},{"text":"Add the second takeaway readers should remember.","icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\\"/></svg>"},{"text":"Close with a final actionable insight.","icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\\"/></svg>"}]},"icon":{"type":"object","default":{"color":"#000000","size":"18px","border":{},"bg":{"type":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}}}},"item":{"type":"object","default":{"color":"#1e293b","bg":{"type":"solid","color":""},"typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":400},"border":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),EE=(e,t,n)=>{if(e){if(e[t]&&void 0!==e[t][n])return e[t][n];if("radius"===n){if(e[t]&&void 0!==e[t].borderRadius)return e[t].borderRadius;if(void 0!==e.radius)return e.radius;if(void 0!==e.borderRadius)return e.borderRadius}return void 0!==e[n]?e[n]:void 0}},AE=({attributes:e,id:o,isBackend:i=!1})=>{const{heading:a={},list:s={},icon:r={},item:c={},advanced:d}=e,u=r.color||"#ffffff",p=r.size||"18px",h=c.typography?.fontSize?.desktop||"16px",g=`#${o} .bBlocks-key-takeaways-wrapper`,m=`${g} .bBlocks-key-takeaways-heading`,b=`${g} .bBlocks-key-takeaways-list`,f=`${g} .bBlocks-key-takeaways-item`,x=`${g} .bBlocks-key-takeaways-icon`,y=`${g} .bBlocks-key-takeaways-num`,v=`${g} .bBlocks-key-takeaways-bullet`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
486 -__html:`\n\t\t\t${ps("",a.typography).googleFontLink}\n\t\t\t${ps("",c.typography).googleFontLink}\n\t\t\t${ps(m,a.typography).styles}\n\t\t\t${m}{\n\t\t\t\t${ns("color",a.color)}\n\t\t\t\t${os(a.bg)}\n\t\t\t\t${ns("padding",hs(EE(a,"desktop","padding")))}\n\t\t\t\t${ns("margin",hs(EE(a,"desktop","margin")))}\n\t\t\t\t${as(a.border)}\n\t\t\t\t${ns("border-radius",hs(EE(a,"desktop","radius")))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\t${ns("gap","number"==typeof s.gap?`${s.gap}px`:s.gap||"10px")}\n\t\t\t}\n\t\t\t${ps(f,c.typography).styles}\n\t\t\t${f}{\n\t\t\t\t${ns("color",c.color)}\n\t\t\t\t${os(c.bg)}\n\t\t\t\t${ns("padding",hs(EE(c,"desktop","padding")))}\n\t\t\t\t${ns("margin",hs(EE(c,"desktop","margin")))}\n\t\t\t\t${as(c.border)}\n\t\t\t\t${ns("border-radius",hs(EE(c,"desktop","radius")))}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\tcolor: ${u};\n\t\t\t\tfont-size: ${p};\n\t\t\t\tmin-height: calc(${h} * 1.5);\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${ns("padding",hs(EE(r,"desktop","padding")))}\n\t\t\t\t${ns("margin",hs(EE(r,"desktop","margin")))}\n\t\t\t\t${as(r.border)}\n\t\t\t\t${ns("border-radius",hs(EE(r,"desktop","radius")))}\n\t\t\t}\n\t\t\t${x}>svg{\n\t\t\t\t${ns("height",r.size)}\n\t\t\t\t${ns("width",r.size)}\n\t\t\t\t${ns("fill",u)}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\twidth: calc(${p} + 10px);\n\t\t\t\theight: calc(${p} + 10px);\n\t\t\t\tcolor: ${u};\n\t\t\t\tfont-size: calc(${p} * 0.8);\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${as(r.border)}\n\t\t\t\t${ns("border-radius",hs(EE(r,"desktop","radius")))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\twidth: calc(${p} * 0.45);\n\t\t\t\theight: calc(${p} * 0.45);\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${as(r.border)}\n\t\t\t\t${ns("border-radius",hs(EE(r,"desktop","radius")))}\n\t\t\t}\n\t\t\t${t}{\n\t\t\t\t${m}{\n\t\t\t\t\t${ns("padding",hs(EE(a,"tablet","padding")))}\n\t\t\t\t\t${ns("margin",hs(EE(a,"tablet","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(EE(a,"tablet","radius")))}\n\t\t\t\t}\n\t\t\t\t${f}{\n\t\t\t\t\t${ns("padding",hs(EE(c,"tablet","padding")))}\n\t\t\t\t\t${ns("margin",hs(EE(c,"tablet","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(EE(c,"tablet","radius")))}\n\t\t\t\t}\n\t\t\t\t${x}{\n\t\t\t\t\t${ns("padding",hs(EE(r,"tablet","padding")))}\n\t\t\t\t\t${ns("margin",hs(EE(r,"tablet","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(EE(r,"tablet","radius")))}\n\t\t\t\t}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${m}{\n\t\t\t\t\t${ns("padding",hs(EE(a,"mobile","padding")))}\n\t\t\t\t\t${ns("margin",hs(EE(a,"mobile","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(EE(a,"mobile","radius")))}\n\t\t\t\t}\n\t\t\t\t${f}{\n\t\t\t\t\t${ns("padding",hs(EE(c,"mobile","padding")))}\n\t\t\t\t\t${ns("margin",hs(EE(c,"mobile","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(EE(c,"mobile","radius")))}\n\t\t\t\t}\n\t\t\t\t${x}{\n\t\t\t\t\t${ns("padding",hs(EE(r,"mobile","padding")))}\n\t\t\t\t\t${ns("margin",hs(EE(r,"mobile","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(EE(r,"mobile","radius")))}\n\t\t\t\t}\n\t\t\t}\n\t\t\t${_s(o,d,i,!1)}\n\t\t\t`}})},BE=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],IE=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],OE=[{label:(0,x.__)("H2","b-blocks"),value:"h2"},{label:(0,x.__)("H3","b-blocks"),value:"h3"},{label:(0,x.__)("H4","b-blocks"),value:"h4"}],RE=[{label:(0,x.__)("Checkmark icons","b-blocks"),value:"check"},{label:(0,x.__)("Numbered (1 2 3 …)","b-blocks"),value:"numbered"},{label:(0,x.__)("Plain bullet","b-blocks"),value:"bullet"}],zE=((0,x.__)("Regular (400)","b-blocks"),(0,x.__)("Medium (500)","b-blocks"),(0,x.__)("Semibold (600)","b-blocks"),(0,x.__)("Bold (700)","b-blocks"),(0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),e=>{const{attributes:t,updateObj:n,index:o}=e,i=t.items[o]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Takeaway text","b-blocks"),value:i.text||"",onChange:e=>n("items",e,o,"text"),placeholder:(0,x.__)("Summarize a key point…","b-blocks"),rows:2,__nextHasNoMarginBottom:!0}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon","b-blocks"),value:i.icon,onChange:e=>n("items",e,o,"icon")})]})}),DE=({attributes:e,setAttributes:t,updateObj:n})=>{const{heading:o={},list:i={}}=e,a=i.style||"check",s=!1!==i.showIcon,r={text:(0,x.__)("New takeaway","b-blocks"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>'};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Heading text","b-blocks"),value:o.text||"",onChange:e=>n("heading",e,"text"),placeholder:(0,x.__)("Key Takeaways","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Heading tag","b-blocks"),value:o.tag||"h3",labelPosition:"edge",options:OE,onChange:e=>n("heading",e,"tag"),help:(0,x.__)("Pick a level that fits the surrounding document outline.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("List style","b-blocks"),value:a,options:RE,onChange:e=>n("list",e,"style"),help:(0,x.__)("Checkmark and bullet render a <ul>; numbered renders a semantic <ol>.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show icon / number prefix","b-blocks"),checked:s,onChange:e=>n("list",e,"showIcon")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Takeaway items","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,updateObj:n,newItem:r,design:"sortable",itemLabel:"Takeaway",arrKey:"items",title:"text",ItemSettings:zE})})]})},FE={top:"",right:"",bottom:"",left:""},HE=({attrKey:e,value:t={},updateObj:n,device:o})=>{const{bg:i={},border:a={}}=t,s=o||"desktop",r=t[s]?.padding||t.padding||{},c=t[s]?.margin||t.margin||{},d=t[s]?.radius||t[s]?.borderRadius||t.radius||t.borderRadius||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:i,onChange:t=>n(e,t,"bg")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),units:BE,values:r,resetValues:FE,onChange:t=>n(e,t,s,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),units:BE,values:c,resetValues:FE,onChange:t=>n(e,t,s,"margin")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:a,onChange:t=>n(e,t||{},"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),units:BE,values:d,resetValues:FE,onChange:t=>n(e,t,s,"radius")})]})},WE=({attributes:e,updateObj:t,device:n})=>{const{heading:o={},list:i={},icon:a={},item:s={}}=e,r=!1!==i.showIcon;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Heading","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text color:","b-blocks"),value:o.color||"#1e293b",onChange:e=>t("heading",e,"color"),defaultColor:"#1e293b"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("heading",e,"typography")}),(0,l.jsx)(HE,{attrKey:"heading",value:o,updateObj:t,device:n})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Takeaway Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text color:","b-blocks"),value:s.color||"#1e293b",onChange:e=>t("item",e,"color"),defaultColor:"#1e293b"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),
487 -value:s.typography,onChange:e=>t("item",e,"typography")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Items Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:BE,isUnitSelectTabbable:!0,value:"number"==typeof i.gap?`${i.gap}px`:i.gap||"10px",onChange:e=>t("list",e,"gap")})]}),(0,l.jsx)(HE,{attrKey:"item",value:s,updateObj:t,device:n})]}),r&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / number color:","b-blocks"),value:a.color||"#ffffff",onChange:e=>t("icon",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Icon / number size","b-blocks"),labelPosition:"edge",units:BE,isUnitSelectTabbable:!0,value:a.size||"18px",onChange:e=>t("icon",e,"size")}),(0,l.jsx)(HE,{attrKey:"icon",value:a,updateObj:t,device:n})]})]})},UE=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:IE,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(DE,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(WE,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},GE=["h2","h3","h4"],VE=["check","numbered","bullet"],qE=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{heading:a={},list:s={},items:r=[]}=t,c=bBlocksPremiumChecker,d=fe(t,n),u=VE.includes(s.style)?s.style:"check",p=GE.includes(a.tag)?a.tag:"h3",g="numbered"===u?"ol":"ul",m=!1!==s.showIcon,b=["bBlocks-key-takeaways-wrapper",`bBlocks-key-takeaways-style-${u}`].filter(Boolean).join(" "),f=(e,t)=>{if(t<0||t>=r.length)return;const o=r.slice(),[i]=o.splice(e,1);o.splice(t,0,i),n({items:o})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(UE,{attributes:t,setAttributes:n,updateObj:d,isPremium:c,device:i}),(0,l.jsx)("div",{...(0,h.useBlockProps)(),children:(0,l.jsxs)("div",{children:[(0,l.jsx)(AE,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsxs)("div",{className:b,role:"region",children:[(0,l.jsx)(h.RichText,{tagName:p,className:"bBlocks-key-takeaways-heading",value:a.text||"",onChange:e=>d("heading",e,"text"),placeholder:(0,x.__)("Key Takeaways","b-blocks"),allowedFormats:["core/bold","core/italic"]}),(0,l.jsx)("div",{className:"bBlocks-key-takeaways-body",children:0===r.length?(0,l.jsx)("p",{className:"bBlocks-key-takeaways-empty",children:(0,x.__)("No takeaways yet. Add the first one from the sidebar.","b-blocks")}):(0,l.jsx)(g,{className:"bBlocks-key-takeaways-list",role:"list",children:r.map(((e,t)=>(0,l.jsxs)("li",{className:"bBlocks-key-takeaways-item",children:[m&&"check"===u&&(0,l.jsx)("span",{className:"bBlocks-key-takeaways-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:e&&e.icon||""}}),m&&"numbered"===u&&(0,l.jsx)("span",{className:"bBlocks-key-takeaways-num","aria-hidden":"true"}),m&&"bullet"===u&&(0,l.jsx)("span",{className:"bBlocks-key-takeaways-bullet","aria-hidden":"true"}),(0,l.jsx)(h.RichText,{tagName:"span",className:"bBlocks-key-takeaways-text",value:e&&e.text||"",onChange:e=>{return o=t,i="text",a=e,void n({items:r.map(((e,t)=>t===o?{...e||{},[i]:a}:e))});var o,i,a},placeholder:(0,x.__)("Takeaway text","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]}),(0,l.jsxs)("div",{className:"bBlocks-key-takeaways-editor-item-actions",children:[(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-up-alt2",label:(0,x.__)("Move item up","b-blocks"),onClick:()=>f(t,t-1),disabled:0===t}),(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-down-alt2",label:(0,x.__)("Move item down","b-blocks"),onClick:()=>f(t,t+1),disabled:t===r.length-1}),(0,l.jsx)(y.Button,{variant:"tertiary",isDestructive:!0,size:"small",icon:"trash",label:(0,x.__)("Remove item","b-blocks"),onClick:()=>{return e=t,n({items:r.filter(((t,n)=>n!==e))});var e}})]})]},e&&e._key||t)))})})]})]})})]})}));Ll(PE.name)&&(0,p.registerBlockType)(PE,{icon:tl,edit:qE,save:()=>null});const YE=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/logo-slider","version":"1.0.0","title":"Logo Slider","category":"bBlocks","description":"Logo sliders are often used on websites and blogs to showcase a company\'s clients, partners, or sponsors.","keywords":["slider","logo","carousel","logo slider"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"options":{"type":"object","default":{"autoplay":true,"direction":"rightToLeft","speed":1000,"delay":1000,"loop":true,"logoView":{"desktop":4,"tablet":3,"mobile":2},"space":{"desktop":30,"tablet":25,"mobile":15},"navigation":true,"pagination":true,"dynamicPagination":false,"isCaptionVisible":false,"easing":"","isPauseOnHover":false}},"sliderStyles":{"type":"object","default":{"logo":{"hover":"none","border":{"color":"#000","width":"0px","style":"none"},"radius":{},"height":"130px","width":"100%","logoFitOption":"cover","padding":{"top":"","right":"","bottom":"","left":""}},"caption":{"hover":"visible","color":{"text":"#fff","bg":"#000"}}}},"logo":{"type":"array","default":[]},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"25px","right":"30px","bottom":"25px","left":"30px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),KE=({attributes:e,id:t,isBackend:n=!1})=>{
488 -const{sliderStyles:o,advanced:i}=e,{caption:a}=o,s=`#${t} .b-blocks-logo-slider-main-wrapper .b-blocks-logo-slider-wrapper`,r=`${s} .b-blocks-losl-logo`,c=`${s} .b-blocks-logo-slider-block-caption`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n ${s}{\n ${ns("height",o.logo.height)}\n ${ns("width",o.logo.width)}\n ${as(o.logo.border)}\n ${ns("padding",hs(o?.logo?.padding))}\n ${ns("border-radius",hs(o.logo.radius))}\n }\n ${r}{\n ${ns("object-fit",o.logo.logoFitOption)}\n ${ns("border-radius",hs(o.logo.radius))}\n }\n ${c}{\n ${ns("color",a.color.text)}\n ${ns("background-color",a.color.bg)}\n }\n ${_s(`${t}>div`,i,n)}\n `}})},QE=function({setAttributes:e,attributes:t,activeIndex:n,setActiveIndex:o}){const{logo:i}=t;return(0,l.jsxs)(h.BlockControls,{children:[i.length>0&&(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{onSelect:t=>e({logo:t}),allowedTypes:["image/*"],value:i?.map((e=>e?.id)),render:({open:e})=>(0,l.jsx)("button",{onClick:e,children:"Add new logo"}),gallery:!0,multiple:!0})}),i?.length>0&&(0,l.jsxs)(y.ToolbarGroup,{children:[(0,l.jsx)(y.ToolbarItem,{disabled:0===n,icon:"arrow-left-alt2",onClick:()=>{const t=[...i],a=t.splice(n,1);t.splice(Number(n)-1,0,a[0]),e({logo:t}),o((e=>--e))},as:y.Button}),(0,l.jsx)(y.ToolbarItem,{disabled:n===i.length-1,icon:"arrow-right-alt2",onClick:()=>{const t=[...i],a=t.splice(n,1);t.splice(Number(n)+1,0,a[0]),e({logo:t}),o((e=>++e))},as:y.Button})]})]})},ZE=[{label:"Default",value:""},{label:"Contain",value:"contain"},{label:"Cover",value:"cover"},{label:"Fill",value:"fill"},{label:"Scale Down",value:"scale-down"},{label:"Initial",value:"initial"},{label:"Inherit",value:"inherit"}],XE=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],JE=[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Step Start","b-blocks"),value:"step-start"},{label:(0,x.__)("Step End","b-blocks"),value:"step-end"}],eA=({attributes:e,setAttributes:t,index:n})=>{const{logo:o}=e,i=o[n],a=(n,o,...i)=>{t({[n]:be(e[n],o,...i)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(we,{width:"100%",height:"100%",label:(0,x.__)("Choose Logo","b-blocks"),value:i?.url?i:{url:kn},onChange:e=>a("logo",e,n)}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Alt","b-blocks"),value:i?.alt,onChange:e=>a("logo",e,n,"alt")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Caption","b-blocks"),value:i?.caption,onChange:e=>a("logo",e,n,"caption")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link","b-blocks"),type:"url",value:i?.anchor,onChange:e=>a("logo",e,n,"anchor")})]})},tA=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o})=>(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Logo","b-blocks"),initialOpen:!0,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,newItem:{url:"",caption:"",alt:""},design:"sortable",itemLabel:"Logo",arrKey:"logo",ItemSettings:eA})}),nA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{options:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Autoplay","b-blocks"),checked:o.autoplay,value:o.autoplay,onChange:e=>t("options",e,"autoplay")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Slide Direction","b-blocks"),labelPosition:"edge",value:o.direction,options:[{value:"rightToLeft",label:"Right to Left"},{value:"leftToRight",label:"Left to Right"}],onChange:e=>t("options",e,"direction")}),o.autoplay&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pause On Hover","b-blocks"),checked:o?.isPauseOnHover,value:o?.isPauseOnHover,onChange:e=>t("options",e,"isPauseOnHover")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:o.easing,options:JE,onChange:e=>t("options",e,"easing")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Show Navigation","b-blocks"),checked:o.navigation,onChange:e=>t("options",e,"navigation")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Show Pagination","b-blocks"),checked:o.pagination,onChange:e=>t("options",e,"pagination")}),o.pagination&&(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Dynamic Pagination","b-blocks"),checked:o.dynamicPagination,onChange:e=>t("options",e,"dynamicPagination")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Infinite Loop","b-blocks"),checked:o.loop,onChange:e=>t("options",e,"loop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Show Logo Caption","b-blocks"),checked:o.isCaptionVisible,onChange:e=>t("options",e,"isCaptionVisible")}),(0,l.jsx)(y.RangeControl,{className:"mt10 mb10",label:(0,x.__)("Slider Speed (ms)","b-blocks"),value:o.speed,step:.05,onChange:e=>t("options",e,"speed"),min:0,max:1e4}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Slider Delay Speed (ms)","b-blocks"),value:o.delay,step:.05,onChange:e=>t("options",e,"delay"),min:0,max:1e4}),(0,l.jsx)(y.RangeControl,{className:"mt10 mb10",label:(0,l.jsxs)(y.Flex,{children:["Logos Per View ",(0,l.jsx)(_,{})]}),value:o.logoView[n],onChange:e=>t("options",e,"logoView",n),step:1,min:1,max:20})]})})),oA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(tA,{...e}),(0,l.jsx)(nA,{...e})]}),iA=function({attributes:e,updateObj:t}){const{sliderStyles:n}=e,{caption:o}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Logo Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Caption Visibility","b-blocks"),value:o.hover,options:[{value:"visible",label:"Always Visible"},{value:"hover",label:"Visible on Hover"}],onChange:e=>t("sliderStyles",e,"caption","hover")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color.text,onChange:e=>t("sliderStyles",e,"caption","color","text")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:o.color.bg,onChange:e=>t("sliderStyles",e,"caption","color","bg")})]})},aA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((function({attributes:e,setAttributes:t,updateObj:n,device:o}){const{sliderStyles:i,options:a}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Logo Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Height","b-blocks"),value:i.logo.height,onChange:e=>n("sliderStyles",e,"logo","height"),max:i.logo.height.includes("%")?100:1e3,min:0}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Width","b-blocks"),value:i.logo.width,onChange:e=>n("sliderStyles",e,"logo","width"),max:i.logo.width.includes("%")?100:1e3,min:0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:["Column Gap ",(0,l.jsx)(_,{})]}),value:a.space[o],onChange:e=>n("options",e,"space",o),step:1,min:1,max:200}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i?.logo?.padding,onChange:e=>n("sliderStyles",e,"logo","padding")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Logo Fit Options","b-blocks"),value:i.logo.logoFitOption,options:ZE,
489 -onChange:e=>n("sliderStyles",e,"logo","logoFitOption")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Logo Hover Style","b-blocks"),value:i.logo.hover,options:[{value:"",label:"None"},{value:"logo-grayScale",label:"GrayScale"},{value:"zoomIn",label:"Zoom In"},{value:"zoomOut",label:"Zoom Out"}],onChange:e=>n("sliderStyles",e,"logo","hover")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i.logo.border,onChange:e=>n("sliderStyles",e,"logo","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i.logo.radius,onChange:e=>n("sliderStyles",e,"logo","radius")})]}),a.isCaptionVisible&&(0,l.jsx)(iA,{attributes:e,setAttributes:t,updateObj:n})]})})),sA=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(aA,{...e})}),rA=e=>{const{attributes:t,setAttributes:n,updateObj:o,activeIndex:i,setActiveIndex:a,isPremium:s}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:XE,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(oA,{attributes:t,setAttributes:n,updateObj:o,activeIndex:i,setActiveIndex:a})}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(sA,{attributes:t,setAttributes:n,updateObj:o})}),"advanced"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:t.advanced,onChange:e=>n({advanced:e}),isPremium:s})})]})})]})})};function lA(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 20 20",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})})}function cA(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 448 512",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"})})}const dA=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o})=>{const{options:i,logo:a,sliderStyles:s}=e,{caption:r}=s,c={...i.pagination&&{"--b-blocks-logo-slider-slide-margin":"20px"},"--swiper-wrapper-transition-timing-function":i?.easing};return(0,l.jsx)("div",{className:"b-blocks-logo-slider-main-wrapper",style:c,children:(0,l.jsx)(Wx,{effect:i.effect,modules:[Bf,If,Lf,Ef,Af],spaceBetween:50,slidesPerView:3,autoplay:!!i.autoplay&&{delay:i.delay,reverseDirection:"rightToLeft"!==i.direction,pauseOnMouseEnter:i?.isPauseOnHover},navigation:!!i.navigation&&{clickable:!0},draggable:!1,loop:Boolean(i.loop),speed:i.speed,autoHeight:!0,pagination:!!i.pagination&&{clickable:!0,dynamicBullets:i.dynamicPagination},breakpoints:{1024:{slidesPerView:i.logoView.desktop,spaceBetween:i.space.desktop},640:{slidesPerView:i.logoView.tablet,spaceBetween:i.space.tablet},0:{slidesPerView:i.logoView.mobile,spaceBetween:i.space.mobile}},children:a&&a.map(((e,c)=>(0,l.jsx)(Ux,{children:(0,l.jsx)("div",{style:{border:n===c?"2px solid #007CBA":"none",borderRadius:n===c?"4px":"none"},children:(0,l.jsx)("div",{className:"b-blocks-logo-slider-wrapper",children:(0,l.jsxs)("div",{className:"b-blocks-slider-logo-wrapper",onClick:()=>o(c),children:[(0,l.jsx)(cA,{onClick:()=>t({logo:a.filter(((e,t)=>t!==c))}),className:"b-blocks-logo-slider-block-delete-btn"}),(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image/*"],value:a[c]?.id?[a[c]?.id]:[],onSelect:e=>t(a.splice(c,1,e)),render:({open:e})=>(0,l.jsx)("div",{onClick:e,className:"b-blocks-b-blocks-losl-replace-plus-icon",children:(0,l.jsx)(lA,{className:"b-blocks-losl-replace-plus-icon"})}),multiple:!1})}),(0,l.jsx)("img",{className:`b-blocks-losl-logo ${s.logo.hover} `,src:e?.url||kn,alt:e?.alt}),e?.url&&(0,l.jsx)("div",{className:`b-blocks-logo-slider-block-caption ${"hover"===r.hover?"b-blocks-caption-hover":""} ${i.isCaptionVisible?"":"hidden"}`,children:(0,l.jsx)(h.RichText,{tagName:"span",value:e?.caption,allowedFormats:["core/bold","core/italic","core/link"],placeholder:"Write caption...",onChange:e=>t({logo:a?.map(((t,n)=>n===c?{...t,caption:e}:t))})})})]})})})},c)))})})},uA=(0,w.compose)((0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}})),(0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}}))))((e=>{const{attributes:t,setAttributes:n,clientId:o,selectBlock:i,device:a}=e,{logo:s,options:r}=t,[c,d]=(0,m.useState)(0),u=fe(t,n),p=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(rA,{attributes:t,setAttributes:n,updateObj:u,activeIndex:c,setActiveIndex:d,isPremium:p}),(0,l.jsx)(QE,{setAttributes:n,attributes:t,activeIndex:c,setActiveIndex:d,updateObj:u}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),onClick:()=>i(o),children:[(0,l.jsx)(KE,{attributes:t,id:`block-${o}`,isBackend:!0}),s.length>0?(0,l.jsx)("div",{children:(0,l.jsx)(dA,{attributes:t,setAttributes:n,activeIndex:c,setActiveIndex:d},`${a}-${JSON.stringify(s?.length)}-${JSON.stringify(r)}-${JSON.stringify(r?.logoView)}`)}):(0,l.jsx)("div",{className:"b-blocks-logo-slider-media-upload-placeholder",children:(0,l.jsxs)(h.MediaUploadCheck,{children:[(0,l.jsx)("h4",{className:"b-blocks-logo-slider-media-upload-title",children:"Upload Logo(s)"}),(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],multiple:!0,gallery:!0,value:s.map((e=>e.id)),onSelect:e=>n({logo:e}),render:({open:e})=>(0,l.jsx)(Bn,{onClick:e,variant:"primary",children:"Media Library"})})]})})]})]})}));Ll(YE.name)&&(0,p.registerBlockType)(YE,{icon:Nr,edit:uA})
490 -;const pA=JSON.parse('{"apiVersion":3,"name":"b-blocks/lottie-player","title":"Lottie Player","description":"Lottie player for display lottie files.","category":"bBlocks","keywords":["lottie player","json player","lottie animation"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"playerAlign":{"type":"string","default":"center"},"file":{"type":"string","default":"https://assets4.lottiefiles.com/datafiles/zc3XRzudyWE36ZBJr7PIkkqq0PFIrIBgp4ojqShI/newAnimation.json"},"isControls":{"type":"boolean","default":true},"isAutoplay":{"type":"boolean","default":true},"isLoop":{"type":"boolean","default":true},"isHover":{"type":"boolean","default":false},"mode":{"type":"string","default":"normal"},"direction":{"type":"number","default":1},"count":{"type":"number","default":0},"speed":{"type":"number","default":1},"intermission":{"type":"number","default":0},"link":{"type":"string","default":""},"isLinkInNewTab":{"type":"boolean","default":false},"interactivity":{"type":"string","default":"noInteractivity"},"interactivityMode":{"type":"string","default":""},"interactivityContainer":{"type":"string","default":".wp-block-b-blocks-lottie-player"},"interactivityActions":{"type":"array","default":[]},"width":{"type":"string","default":""},"background":{"type":"string","default":"#0000"},"controlsHeight":{"type":"string","default":"35px"},"controlsBG":{"type":"string","default":"#0000"},"controlsIconColor":{"type":"string","default":"#146EF5"},"controlsIconHoverColor":{"type":"string","default":"#FF7A00"},"controlsIconActiveColor":{"type":"string","default":"#FF7A00"},"controlsTrackColor":{"type":"string","default":"#FF7A00"},"controlsThumbColor":{"type":"string","default":"#146EF5"},"isCap":{"type":"boolean","default":false},"caption":{"type":"string","default":"","selector":".bBlocksLottiePlayer .caption"},"capAlign":{"type":"string","default":"center"},"capColors":{"type":"object","default":{"color":"#333"}},"capTypo":{"type":"object","default":{"fontSize":{"desktop":{"desktop":"14px"}}}},"capPadding":{"type":"object","default":{"vertical":"5px","horizontal":"10px"}},"capMargin":{"type":"object","default":{"side":4,"top":"5px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","dotLottiePlayer","lottieInteractivity"]}'),hA=[{label:(0,x.__)("Normal","b-blocks"),value:"normal",icon:(0,x.__)("Normal","b-blocks")},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce",icon:(0,x.__)("Bounce","b-blocks")}],gA=[{label:(0,x.__)("Forward","b-blocks"),value:1,icon:(0,x.__)("Forward","b-blocks")},{label:(0,x.__)("Backward","b-blocks"),value:-1,icon:(0,x.__)("Backward","b-blocks")}],mA=[{label:(0,x.__)("No Interactivity","b-blocks"),value:"noInteractivity"},{label:(0,x.__)("Sync with scroll","b-blocks"),value:"syncWithScroll"},{label:(0,x.__)("Scroll relative to container","b-blocks"),value:"scrollRelativeToContainer"},{label:(0,x.__)("Scroll with offset","b-blocks"),value:"scrollWithOffset"},{label:(0,x.__)("Sync animation with cursor position","b-blocks"),value:"syncAnimationWithCursorPosition"},{label:(0,x.__)("Sync animation with cursor horizontal movement","b-blocks"),value:"syncAnimationWithCursorHorizontalMovement"},{label:(0,x.__)("Play animation on click","b-blocks"),value:"playAnimationOnClick"},{label:(0,x.__)("Play animation when visible","b-blocks"),value:"playAnimationWhenVisible"}],bA=((0,x.__)("Scroll","b-blocks"),(0,x.__)("Cursor","b-blocks"),(0,x.__)("Chain","b-blocks"),(0,x.__)("Seek","b-blocks"),(0,x.__)("Play","b-blocks"),(0,x.__)("Stop","b-blocks"),(0,x.__)("Loop","b-blocks"),(e,t,n,o)=>{t&&e?.setAttribute(n,o),!t&&e?.removeAttribute(n,o)}),fA=(e,t)=>({noInteractivity:[],syncWithScroll:[{visibility:[0,1],type:"seek",frames:[0,t]}],scrollRelativeToContainer:[{visibility:[0,1],type:"seek",frames:[0,t]}],scrollWithOffset:[{visibility:[0,.3],type:"stop",frames:[0]},{visibility:[.3,1],type:"seek",frames:[0,t]}],syncAnimationWithCursorPosition:[{position:{x:[0,1],y:[0,1]},type:"seek",frames:[0,t]}],syncAnimationWithCursorHorizontalMovement:[{position:{x:[0,1],y:[-1,2]},type:"seek",frames:[0,t]}],playAnimationOnClick:[{type:"click",forceFlag:!1}],toggleAnimation:[{type:"toggle"}],playAnimationWhenVisible:[{visibility:[.5,1],type:"play"}]}[e]),xA=({attributes:e,setAttributes:t,fileFrameSize:n,isPremium:i})=>{const{playerAlign:s,file:r,isControls:c,isAutoplay:d,isLoop:u,isHover:p,mode:g,direction:b=1,count:f,speed:k,intermission:w,link:_,isLinkInNewTab:C=!1,interactivity:j="noInteractivity",interactivityContainer:$=".wp-block-b-blocks-lottie-player",interactivityActions:S=[],width:T,background:N,controlsHeight:M,controlsBG:L,controlsIconColor:P,controlsIconHoverColor:E,controlsIconActiveColor:A,controlsTrackColor:B,controlsThumbColor:I,isCap:O=!1,caption:R="",capAlign:z="center",capTypo:D={},capColors:F={color:"#333"},capPadding:H={},capMargin:W={}}=e,[U,G]=(0,m.useState)(!1),V={isPremium:i,setIsProModalOpen:G},q={className:"bPlPanelBody",initialOpen:!1};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/lottie-player"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Player","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Lottie file url:","b-blocks")}),i?(0,l.jsx)(ve,{value:r,types:["application/json"],onChange:e=>t({file:e}),placeholder:(0,x.__)("Enter lottie file url","b-blocks")}):(0,l.jsx)(y.TextControl,{value:r,onChange:e=>t({file:e})}),(0,l.jsx)("small",{children:(0,x.__)("Support only .json or .lottie file!","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Controls","b-blocks"),checked:c,onChange:e=>t({isControls:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Autoplay","b-blocks"),checked:d,onChange:e=>t({isAutoplay:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Loop","b-blocks"),checked:u,onChange:e=>t({isLoop:e})}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Enable Hover","b-blocks"),checked:p,onChange:e=>t({isHover:e}),...V,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Mode:","b-blocks"),value:g,onChange:e=>t({mode:e}),options:hA,...V,Component:Tn}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Direction:","b-blocks"),value:b,onChange:e=>t({direction:parseInt(e)}),options:gA,...V,Component:Tn}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Count (Set 0 to infinite):","b-blocks"),value:f,onChange:e=>t({count:e}),min:0,max:50,step:1,...V,Component:y.RangeControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Speed:","b-blocks"),value:k,onChange:e=>t({speed:e}),min:.01,max:20,step:.01,...V,Component:y.RangeControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Interval (s):","b-blocks"),value:w,onChange:e=>t({intermission:e}),min:0,max:20,step:.01,...V,Component:y.RangeControl}),(0,l.jsx)(v,{children:(0,x.__)("Link the player:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:_,onChange:e=>t({link:e})}),(0,l.jsx)("small",{children:(0,x.__)("If you want to link the player, enter the link here. Otherwise, leave as blank.","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Open link in a new tab","b-blocks"),checked:C,onChange:e=>t({isLinkInNewTab:e}),...V,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Interactivity","b-blocks"),...q,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Interactivity:","b-blocks"),value:j,onChange:e=>t({interactivity:e,
491 -interactivityMode:["syncWithScroll","scrollRelativeToContainer","scrollWithOffset","playAnimationWhenVisible"].includes(e)?"scroll":["syncAnimationWithCursorPosition","syncAnimationWithCursorHorizontalMovement","playAnimationOnClick","toggleAnimation"].includes(e)?"cursor":"",interactivityContainer:"scrollRelativeToContainer"===e?".wp-block-lpb-lottie-player":$,interactivityActions:fA(e,n)}),options:mA,...V,Component:y.SelectControl}),(0,l.jsx)("small",{children:(0,x.__)("Upload file first then change interactivity option.","b-blocks")}),(0,l.jsx)("br",{}),(0,l.jsx)("small",{children:(0,x.__)("Interactivity will not working in backend(editor).","b-blocks")}),"scrollRelativeToContainer"===j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Container Selector","b-blocks")}),(0,l.jsx)(y.TextControl,{value:$,onChange:e=>t({interactivityContainer:e})}),(0,l.jsx)("small",{children:(0,x.__)("Enter container selector. Ex: if id enter '#id', if class '.class' or if tag 'tag name'","b-blocks")})]}),"scrollWithOffset"===j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt20",label:(0,x.__)("Offset (%)","b-blocks"),labelPosition:"left",value:100*S?.[0]?.visibility?.[1],onChange:e=>t({interactivityActions:Rb(S,(t=>{t[0].visibility[1]=parseFloat(e)/100,t[1].visibility[0]=parseFloat(e)/100}))})}),(0,l.jsx)("small",{children:(0,x.__)(`Scroll animation when lottie player reached at ${100*S?.[0]?.visibility?.[1]} % of viewport`,"b-blocks")})]}),"playAnimationWhenVisible"===j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt20",label:(0,x.__)("Offset (%)","b-blocks"),labelPosition:"left",value:100*S?.[0]?.visibility?.[0],onChange:e=>((e,n,o,i=null)=>{const a=Rb(S,(t=>{null!==i?t[e][n][i]=o:t[e][n]=o}));t({interactivityActions:a})})(0,"visibility",parseFloat(e)/100,0)}),(0,l.jsx)("small",{children:(0,x.__)(`Play animation when lottie player reached at ${100*S?.[0]?.visibility?.[0]} % of viewport`,"b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Caption","b-blocks"),...q,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Show Caption","b-blocks"),checked:O,onChange:e=>t({isCap:e}),...V,Component:y.ToggleControl}),O&&(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Text:","b-blocks"),value:R,onChange:e=>t({caption:e}),...V,Component:y.TextControl})]})]}),"style"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Player","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:T,onChange:e=>t({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:N,onChange:e=>t({background:e}),defaultColor:"#0000"})]}),c&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Controls","b-blocks"),...q,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:M,onChange:e=>t({controlsHeight:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:L,onChange:e=>t({controlsBG:e}),defaultColor:"#0000"}),(0,l.jsx)(Ue,{label:(0,x.__)("Icons Color:","b-blocks"),value:P,onChange:e=>t({controlsIconColor:e}),defaultColor:o}),(0,l.jsx)(Ue,{label:(0,x.__)("Icons Hover Color:","b-blocks"),value:E,onChange:e=>t({controlsIconHoverColor:e}),defaultColor:a}),(0,l.jsx)(Ue,{label:(0,x.__)("Icons Active Color:","b-blocks"),value:A,onChange:e=>t({controlsIconActiveColor:e}),defaultColor:a}),(0,l.jsx)(Ue,{label:(0,x.__)("Track Color:","b-blocks"),value:B,onChange:e=>t({controlsTrackColor:e}),defaultColor:a}),(0,l.jsx)(Ue,{label:(0,x.__)("Thumb Color:","b-blocks"),value:I,onChange:e=>t({controlsThumbColor:e}),defaultColor:o})]}),O&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Caption","b-blocks"),...q,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Text Align:","b-blocks"),value:z,onChange:e=>t({capAlign:e}),options:Jt,isIcon:!0,size:i?"medium":"small",...V,Component:Tn}),(0,l.jsx)(Ya,{label:(0,x.__)("Typography:","b-blocks"),value:D,onChange:e=>t({capTypo:e}),defaults:{fontSize:{desktop:14,tablet:14,mobile:14}},...V,Component:Oa}),(0,l.jsx)(Ya,{label:(0,x.__)("Colors:","b-blocks"),value:F,onChange:e=>t({capColors:e}),...V,Component:On}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:H,onChange:e=>t({capPadding:e}),defaults:{vertical:"10px",horizontal:"10px"},...V,Component:id}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:W,onChange:e=>t({capMargin:e}),defaults:{side:4,top:"5px"},...V,Component:id})]})]})]})})}),(0,l.jsxs)(jn,{isProModalOpen:U,setIsProModalOpen:G,block:"Lottie Player",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Upload File ","b-blocks")}),(0,x.__)("Upload Lottie JSON files from the media library.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Hover ","b-blocks")}),(0,x.__)("Play the Lottie animation on mouseover.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Mode ","b-blocks")}),(0,x.__)("Choose between normal and bounce modes.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Direction ","b-blocks")}),(0,x.__)("Set the animation direction to forward or backward.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Count ","b-blocks")}),(0,x.__)("Specify how many times the animation will play.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Speed ","b-blocks")}),(0,x.__)("Adjust the player speed.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Interval ","b-blocks")}),(0,x.__)("Set the autoplay interval.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Link Tab ","b-blocks")}),(0,x.__)("Option to open the link in a new tab.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Interactivity ","b-blocks")}),(0,x.__)("Define interactivity options to determine when and where the animation will play.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Caption ","b-blocks")}),(0,x.__)("Add a caption for the Lottie player.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Caption Style ","b-blocks")}),(0,x.__)("Style the caption, including text alignment, typography, text and background colors, padding, and margin.","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:s,onChange:e=>t({playerAlign:e}),describedBy:(0,x.__)("Player Alignment"),alignmentControls:[{title:(0,x.__)("Player in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Player in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Player in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},yA="bBlocksLottiePlayer",vA=({attributes:e,id:t})=>{const{playerAlign:n,link:o,width:i,controlsHeight:a,controlsBG:s,controlsIconColor:r,controlsIconHoverColor:c,controlsIconActiveColor:d,controlsTrackColor:u,controlsThumbColor:p,capAlign:h="center",capTypo:g={},capColors:m={color:"#333"},capPadding:b={},capMargin:f={}}=e,x=`#${t} .${yA}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
492 -__html:`\n\t\t${ps("",g)?.googleFontLink}\n\t\t${ps(`${x} .caption`,g)?.styles}\n\n\t\t${x}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${x} dotlottie-player{\n\t\t\twidth: ${i};\n\t\t\tcursor: ${o?"pointer":"auto"};\n\t\t\t--lottie-player-toolbar-height: ${a};\n\t\t\t--lottie-player-toolbar-background-color: ${s};\n\t\t\t--lottie-player-toolbar-icon-color: ${r};\n\t\t\t--lottie-player-toolbar-icon-hover-color: ${c};\n\t\t\t--lottie-player-toolbar-icon-active-color: ${d};\n\t\t\t--lottie-player-seeker-track-color: ${u};\n\t\t\t--lottie-player-seeker-thumb-color: ${p};\n\t\t}\n\t\t${x} .caption{\n\t\t\twidth: ${i};\n\t\t\ttext-align: ${h};\n\t\t\t${ss(m)};\n\t\t\tpadding: ${us(b)};\n\t\t\tmargin: ${us(f)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},kA=(0,m.forwardRef)((({attributes:e},t)=>{const{file:n,isControls:o,isAutoplay:i,isLoop:a,isHover:s,mode:r,direction:c=1,count:d,speed:u,intermission:p,background:h}=e;return(0,m.useEffect)((()=>{if(t?.current){const e=!!a&&(!(0<d)||d);bA(t?.current,o,"controls",""),bA(t?.current,i,"autoplay",""),bA(t?.current,a,"loop",e),bA(t?.current,s,"hover","")}}),[t]),(0,l.jsx)("dotlottie-player",{ref:t,src:n,autoplay:!0,loop:!0,mode:r,speed:u,direction:c,intermission:1e3*p,background:h,debug:!0})}));Ll(pA.name)&&(0,p.registerBlockType)(pA,{icon:Mr,transforms:{from:[{type:"block",blocks:["lpb/lottie-player"],transform:e=>(0,p.createBlock)("b-blocks/lottie-player",e)},{type:"prefix",prefix:"lottie",transform:()=>(0,p.createBlock)("b-blocks/lottie-player")}],to:[{type:"block",blocks:["lpb/lottie-player"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("lpb/lottie-player",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{file:i,isControls:a,isAutoplay:s,isLoop:r,isHover:c,mode:d,direction:u=1,count:p,speed:g,intermission:b,background:f,isCap:x=!1,caption:y=""}=t,v=bBlocksPremiumChecker,k=(0,m.useRef)(null),[w,_]=(0,m.useState)(0),C=e=>{e.addEventListener("ready",(()=>{const{animationData:t}=e.getLottie()||{};_(Math.round(t?.op||100))}))},j=`block-${o}`,$=document.querySelector(`#${j} .${yA} .lottieHolder`);return(0,m.useEffect)((()=>{$&&($.innerHTML="");const e=!!r&&(!(0<p)||p),t=document.createElement("dotlottie-player");bA(t,i,"src",i),bA(t,a,"controls",""),bA(t,s,"autoplay",""),bA(t,r,"loop",e),bA(t,c,"hover",""),bA(t,d,"mode",d),bA(t,g,"speed",g),bA(t,!0,"direction",u),bA(t,b,"intermission",1e3*b),bA(t,f,"background",f),bA(t,!0,"debug"),$&&$.appendChild(t),C(t)}),[i,a,s,r,c,d,u,p,g,b,f]),(0,m.useEffect)((()=>{const e=k?.current;C(e)}),[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(xA,{attributes:t,setAttributes:n,fileFrameSize:w,isPremium:v}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(vA,{attributes:t,id:j}),(0,l.jsxs)("div",{className:yA,children:[(0,l.jsx)("span",{className:"lottieHolder",children:(0,l.jsx)(kA,{ref:k,attributes:t})}),x&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)("span",{className:"caption",children:y})]})]})]})]})},save:()=>null});const wA=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/list","version":"1.0.0","title":"List","category":"bBlocks","description":"A customizable list block with support for icons, custom markers, and flexible layouts.","keywords":["list","list block"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"desktop":{"type":"vertical","verticalAlign":"flex-start","horizontalAlign":"flex-start"},"tablet":{"type":"","verticalAlign":"","horizontalAlign":""},"mobile":{"type":"","verticalAlign":"","horizontalAlign":""}}},"items":{"type":"array","default":[{"text":"List Item","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z\'/></svg>","link":"","newWindow":false,"textColor":"","markerColor":""}]},"marker":{"type":"object","default":{"markerType":"","position":"","align":"","icon":"","emoji":"👉"}},"styles":{"type":"object","default":{"lists":{"color":"","bg":"","typography":{"fontSize":{"desktop":"20px","tablet":"","mobile":""}},"desktop":{"gap":{"horizontal":"","vertical":""}},"tablet":{"gap":{"horizontal":"","vertical":""}},"mobile":{"gap":{"horizontal":"","vertical":""}}},"divider":{"style":"solid","weight":"5px","width":"100px","color":"#000","isEnabled":false},"marker":{"color":"","size":"","iconSize":"","bg":"","gap":"10px","desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"border":{}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),_A=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],CA=[{label:"None",value:""},{label:"Icon",value:"icon"},{label:"Disc",value:"disc"},{label:"Square",value:"square"},{label:"Emoji",value:"emoji"}],jA=[{label:"None",value:""},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Dashed",value:"dashed"},{label:"Dotted",value:"dotted"}],$A=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),SA=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),TA=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{
493 -d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),NA=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32L32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32z"})}),MA=e=>{const{attributes:t,updateObj:n,index:o}=e,{items:i}=t,a=i[o];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Text","b-blocks"),value:a.text,onChange:e=>n("items",e,o,"text")}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon","b-blocks"),value:a.icon,onChange:e=>n("items",e,o,"icon")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link","b-blocks"),value:a.link,onChange:e=>n("items",e,o,"link")}),(0,l.jsx)(y.CheckboxControl,{label:(0,x.__)("Open in new window","b-blocks"),checked:a.newWindow,onChange:e=>n("items",e,o,"newWindow")})]})},LA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,setAttributes:n,device:o})=>{const{layout:i,items:a}=e,s={text:`List Item ${a.length+1}`,icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z'/></svg>",link:"",newWindow:!1,textColor:"",markerColor:""};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lists Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(v,{className:"mb0",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Layout","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i[o].type,onChange:e=>{t("layout",e,o,"type")},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"vertical"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"horizontal"})]}),"vertical"===i[o].type&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",gap:5,children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i[o].verticalAlign,onChange:e=>t("layout",e,o,"verticalAlign"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:$A}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:SA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:" flex-end",icon:TA})]})]}),"horizontal"===i[o].type&&(0,l.jsxs)("div",{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt5",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i[o].horizontalAlign,onChange:e=>t("layout",e,o,"horizontalAlign"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:$A}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:SA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:TA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Justify",value:"space-between",icon:NA})]})]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lists","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:n,newItem:s,design:"sortable",itemLabel:"List",arrKey:"items",title:"text",ItemSettings:MA,updateObj:t})})]})})),PA=e=>{const{attributes:t,updateObj:n}=e,{marker:o}=t,{markerType:i}=o,a=e=>(0,x.__)(e,"b-blocks");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Marker","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1 mt0",children:a("Marker Type")}),(0,l.jsx)(y.SelectControl,{className:"flex1",options:CA,value:i,onChange:e=>n("marker",e,"markerType")})]}),"emoji"===i&&(0,l.jsx)(y.TextControl,{label:a("Emoji"),value:o.emoji,onChange:e=>n("marker",e,"emoji")})]})},EA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(LA,{...e}),(0,l.jsx)(PA,{...e})]}),AA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n}=e,{styles:o,layout:i}=t,{divider:a}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Divider","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Divider","b-blocks"),checked:a.isEnabled,onChange:e=>n("styles",e,"divider","isEnabled")}),a.isEnabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Style","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:a.style,options:jA,onChange:e=>n("styles",e,"divider","style")})]}),(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Weight","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.weight,labelPosition:"edge",onChange:e=>n("styles",e,"divider","weight")})]}),"vertical"===i?.desktop.type&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.width,labelPosition:"edge",onChange:e=>n("styles",e,"divider","width")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color,onChange:e=>n("styles",e,"divider","color")})]})]})})),BA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{lists:a}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lists Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color,onChange:e=>n("styles",e,"lists","color")}),(0,l.jsx)(Oa,{value:a.typography,onChange:e=>n("styles",e,"lists","typography")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Space Between","b-blocks")," ",(0,l.jsx)(_,{})]}),
494 -labelPosition:"edge",value:a[o].gap.horizontal,onChange:e=>n("styles",e,"lists",o,"gap","horizontal")})]})})),IA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,marker:a}=t,{markerType:s}=a,{marker:r}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Marker Style","b-blocks"),initialOpen:!1,children:["emoji"!==s&&(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r.color,onChange:e=>n("styles",e,"marker","color")}),"icon"!==s&&"emoji"!==s&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Marker Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.size,onChange:e=>n("styles",e,"marker","size")})]}),("icon"===s||"emoji"===s)&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Icon/Emoji Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.iconSize,onChange:e=>n("styles",e,"marker","iconSize")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.gap,onChange:e=>n("styles",e,"marker","gap")})]}),"icon"===s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:r.bg,onChange:e=>n("styles",e,"marker","bg"),isImage:!1}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o].padding,onChange:e=>n("styles",e,"marker",o,"padding")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>n("styles",e,"marker","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o].radius,onChange:e=>n("styles",e,"marker",o,"radius")})]})]})})),OA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(BA,{...e}),(0,l.jsx)(AA,{...e}),(0,l.jsx)(IA,{...e})]}),RA=e=>{const{attributes:t,setAttributes:n}=e,{items:o}=t,i={text:`List Item ${o.length+1}`,icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z'/></svg>",link:"",newWindow:!1,textColor:"",markerColor:""};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",initialTabName:"general",activeClass:"activeTab",tabs:_A,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(EA,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(OA,{...e})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New List","b-blocks"),onClick:()=>n({items:[...o,i]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})})})]})},zA=({attributes:e,id:o})=>{const{layout:i,styles:a}=e,{lists:s,divider:r,marker:c}=a,d=`#${o} .bBlocksListMainWrapper .bBlocksListContainer`,u=`${d} .bBlocksListItem`,p=`${u} .bBlocksListItemText`,h=`${d} .bBlocksListItemDivider`,g=`${u} .bBlocksListMarkerIcon`,m=`${u} .bBlocksListMarkerEmoji`,b=`${u} .bBlocksListMarker`,f=e=>"vertical"===i[e].type?"flex-direction:column;":"horizontal"===i[e].type?"flex-direction:row;":"",x=e=>("vertical"===i[e].type?ns("align-items",i[e].verticalAlign):"")+("horizontal"===i[e].type?ns("justify-content",i[e].horizontalAlign):""),y=e=>("horizontal"===i[e].type?`${ns("border-right-style",r.style)}\n\t\t\t${ns("border-right-width",r.weight)}\n\t\t\t${ns("border-right-color",r.color)}`:"")+("vertical"===i[e].type?`${ns("border-bottom-style",r.style)}\n\t\t\t${ns("border-bottom-width",r.weight)}\n\t\t\t${ns("border-bottom-color",r.color)} \n\t\t\t${ns("width",r.width)}`:"");return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${ps("",s.typography).googleFontLink}\n\t\t${ps(p,s.typography).styles}\n\n\t\t${d}{\n\t\t\t${f("desktop")}\n\t\t\t${x("desktop")}\n\t\t\t${ns("gap",s.desktop.gap.horizontal)}\n\t\t}\n\t\t${u}{\n\t\t\t${ns("gap",c.gap)}\n\t\t}\n\t\t${p}{\n\t\t\t${ns("color",s.color)}\n\t\t}\n\t\t${h}{\n\t\t\t${y("desktop")}\n\t\t}\n\t\t\n\t\t${g}{\n\t\t\t${os(c.bg)}\n\t\t\t${ns("padding",hs(c.desktop.padding))}\n\t\t\t${ns("border-radius",hs(c.desktop.radius))}\n\t\t\t${as(c.border)}\n\t\t}\n\n\t\t${g}>svg{\n\t\t\t${ns("fill",c.color)}\n\t\t\t${ns("width",c.iconSize)}\n\t\t\t${ns("height",c.iconSize)}\n\t\t}\n\n\t\t${m}{\n\t\t\t${ns("font-size",c.iconSize)}\n\t\t}\n\n\t\t${b}{\n\t\t\t${ns("background",c.color)}\n\t\t\t${ns("height",c.size)}\n\t\t\t${ns("width",c.size)}\n\t\t}\n\n\t\t${t}{\n\t\t\t${d}{\n\t\t\t\t${f("tablet")}\n\t\t\t\t${x("tablet")}\n\t\t\t\t${ns("gap",s.tablet.gap.horizontal)}\n\t\t\t}\n\n\t\t\t${h}{\n\t\t\t\t${y("tablet")}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${ns("padding",hs(c.tablet.padding))}\n\t\t\t\t${ns("border-radius",hs(c.tablet.radius))}\n\t\t\t}\n\n\t\t}\n\n\t\t${n}{\n\t\t\t${d}{\n\t\t\t\t${f("mobile")}\n\t\t\t\t${x("mobile")}\n\t\t\t\t${ns("gap",s.mobile.gap.horizontal)}\n\t\t\t}\n\n\t\t\t${h}{\n\t\t\t\t${y("mobile")}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${ns("padding",hs(c.mobile.padding))}\n\t\t\t\t${ns("border-radius",hs(c.mobile.radius))}\n\t\t\t}\n\n\t\t}\n\n\t`}})},DA=({attributes:e,updateObj:t})=>{const{items:n=[],marker:o,styles:i}=e,{divider:a}=i,{markerType:s}=o,r=e=>{switch(s){case"emoji":return(0,l.jsx)("span",{className:"bBlocksListMarkerEmoji",children:o.emoji});case"icon":return e?(0,l.jsx)("span",{className:"bBlocksListMarkerIcon",dangerouslySetInnerHTML:{__html:e}}):null;case"disc":return(0,l.jsx)("span",{className:"bBlocksListMarkerDisc bBlocksListMarker"});case"square":return(0,l.jsx)("span",{className:"bBlocksListMarkerSquare bBlocksListMarker"});default:return null}};return(0,l.jsx)("div",{className:"bBlocksListMainWrapper",children:(0,l.jsx)("div",{className:"bBlocksListContainer",children:n.length>0&&n.map(((e,o)=>(0,l.jsxs)(m.Fragment,{children:[(0,l.jsxs)("a",{className:"bBlocksListItem",rel:"noopener noreferrer",children:[r(e.icon),(0,l.jsx)(h.RichText,{className:"bBlocksListItemText",tagName:"span",placeholder:"Write your list text",value:e.text,onChange:e=>t("items",e,o,"text")})," "]}),o<n.length-1&&a.isEnabled&&(0,l.jsx)("div",{className:"bBlocksListItemDivider"})]},o)))})})};Ll(wA.name)&&(0,p.registerBlockType)(wA,{icon:el,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(RA,{attributes:t,setAttributes:n,updateObj:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(zA,{attributes:t,id:`block-${o}`}),(0,l.jsx)(DA,{attributes:t,updateObj:i})]})]})}})
495 -;const FA=JSON.parse('{"apiVersion":3,"name":"b-blocks/mailto","title":"Mail To","description":"Mail with a single click.","category":"bBlocks","keywords":["Send mail","Mail us","Email sending"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"mailtoAlign":{"type":"string","default":"center"},"receiverMail":{"type":"string","default":""},"style":{"type":"string","default":"default"},"btn":{"type":"string","selector":"a.mailtoButton span","default":"Send E-mail"},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"},"fontWeight":600}},"btnColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"btnHovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"btnPadding":{"type":"object","default":{"vertical":"18px","horizontal":"45px"}},"btnBorder":{"type":"object","default":{"radius":"50px"}},"icon":{"type":"object","default":{"class":"fa fa-paper-plane"}},"iconPosition":{"type":"string","default":"left"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":["file:./view.js","mailtoui"]}'),HA=[{label:"Default",value:"default"},{label:"Style 1",value:"style1"},{label:"Style 2",value:"style2"},{label:"Style 3",value:"style3"}],WA=({settings:e})=>{const{attributes:{mailtoAlign:t,receiverMail:n,style:i,btnTypo:s,btnColors:r,btnHovColors:c,btnPadding:d,btnBorder:u,icon:p,iconPosition:g},setAttributes:m}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:pn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Mail Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("E-mail Address:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:n,onChange:e=>m({receiverMail:e}),placeholder:(0,x.__)("Email Address","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,onChange:e=>{m({style:e}),"default"===e&&m({btnColors:{color:"#fff",bg:o,styles:`color: #fff; background: ${o};`},btnHovColors:{color:"#fff",bg:a,styles:`color: #fff; background: ${a};`},iconPosition:"left"}),"style1"===e&&m({btnColors:{color:"#fff",bg:o,styles:`color: #fff; background: ${o};`},btnHovColors:{color:"#fff",bg:a,styles:`color: #fff; background: ${a};`},iconPosition:"right"}),"style2"===e&&m({btnColors:{color:"#fff",bg:"#57d0ff",styles:"color: #fff; background: #57d0ff;"},btnHovColors:{color:"#fff",bg:"#50e38b",styles:"color: #fff; background: #50e38b;"},iconPosition:"left"}),"style3"===e&&m({btnColors:{color:"#fff",bg:"#57d0ff",styles:"color: #fff; background: #57d0ff;"},btnHovColors:{color:"#fff",bg:"#50e38b",styles:"color: #fff; background: #50e38b;"},iconPosition:"right"})},options:HA})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:s,onChange:e=>m({btnTypo:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18},fontWeight:600}}),(0,l.jsx)(On,{value:r,onChange:e=>m({btnColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:c,onChange:e=>m({btnHovColors:e}),defaults:{color:"#fff",bg:a}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:d,onChange:e=>m({btnPadding:e}),defaults:{vertical:"18px",horizontal:"45px"}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:u,onChange:e=>m({btnBorder:e}),defaults:{radius:"50px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Un,{value:p,onChange:e=>m({icon:e}),defaults:{class:"fa fa-paper-plane"},isSize:!1,isColor:!1}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Position:","b-blocks")}),(0,l.jsx)(Tn,{value:g,onChange:e=>m({iconPosition:e}),options:[{label:"Left",value:"left",icon:"LEFT"},{label:"Right",value:"right",icon:"RIGHT"}]})]})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:t,onChange:e=>m({mailtoAlign:e}),describedBy:(0,x.__)("Mail Button Alignment"),alignmentControls:[{title:(0,x.__)("Mail Button in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Mail Button in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Mail Button in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},UA="bBlocksMailto";Ll(FA.name)&&(0,p.registerBlockType)(FA,{icon:Lr,edit:e=>{const{attributes:{mailtoAlign:t,btn:n,btnTypo:o,btnColors:i,btnHovColors:a,btnPadding:s,btnBorder:r,icon:c,iconPosition:d},setAttributes:u,clientId:p}=e,g=`#block-${p} .${UA}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(WA,{settings:e}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${ps("",o)?.googleFontLink}\n\t\t\t\t${ps(`${g} a.mailtoButton`,o)?.styles}\n\n\t\t\t\t${g}{\n\t\t\t\t\ttext-align: ${t};\n\t\t\t\t}\n\t\t\t\t${g} a.mailtoButton{\n\t\t\t\t\t${ss(i)}\n\t\t\t\t\tpadding: ${us(s)};\n\t\t\t\t\t${is(r)}\n\t\t\t\t\tbox-shadow: 0px 5px 20px 0px ${i?.bg};\n\t\t\t\t}\n\t\t\t\t${g} a.mailtoButton:hover{\n\t\t\t\t\t${ss(a)}\n\t\t\t\t\tbox-shadow: 0px 5px 20px 0px ${a?.bg};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsx)("div",{className:UA,children:(0,l.jsxs)("a",{href:"#",className:"mailtoui mailtoButton",children:["left"===d&&c?.class&&(0,l.jsx)("i",{className:c?.class}),(0,l.jsx)(h.RichText,{tagName:"span",value:n,onChange:e=>u({btn:e}),placeholder:(0,x.__)("Send E-mail","b-blocks"),inlineToolbar:!0}),"right"===d&&c?.class&&(0,l.jsx)("i",{className:c?.class})]})})]})]})},save:()=>null})
496 -;const GA=JSON.parse('{"apiVersion":3,"name":"b-blocks/media-text-section","title":"Media & Text Section","description":"A two-panel image/video beside rich content section with sticky media, image effects, per-panel styling, and responsive stacking.","category":"bBlocks","keywords":["media text","image text","split content","feature section","two column"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"full"},"layout":{"type":"object","default":{"desktop":{"direction":"row","alignItems":"center"},"tablet":{"direction":"","alignItems":""},"mobile":{"direction":"","alignItems":""}}},"styles":{"type":"object","default":{"layout":{"desktop":{"ratio":{"media":"50%","content":"50%","splitRatio":"50-50"},"gap":"20px"},"tablet":{"ratio":{"media":"","content":"","splitRatio":""},"gap":""},"mobile":{"ratio":{"media":"","content":"","splitRatio":""},"gap":""}},"media":{"image":{"objFit":"contain"},"video":{"objFit":"contain"},"shadow":{},"overlay":{"bg":{},"opacity":0.5,"isOverlay":false},"bg":{},"border":{},"radius":{"left":"","right":"","top":"","bottom":""},"desktop":{"padding":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"left":"","right":"","top":"","bottom":""}}},"content":{"bg":{},"desktop":{"padding":{"left":"","right":"","top":"","bottom":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"left":"","right":"","top":"","bottom":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"left":"","right":"","top":"","bottom":""},"radius":{"left":"","right":"","top":"","bottom":""}},"border":{},"shadow":{}}}},"media":{"type":"object","default":{"mediaType":"image","image":{},"video":{"url":"","poster":{},"autoplay":false,"loop":true,"muted":true,"controls":true,"allowDownload":false,"allowFullscreen":true,"allowPip":true,"controlsOnHover":false},"stickyMedia":false}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":""},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":""},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":""}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true,"customClassName":true},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),VA=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),qA=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),YA=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),KA=[{label:"30 / 70",value:"30-70"},{label:"40 / 60",value:"40-60"},{label:"50 / 50",value:"50-50"},{label:"60 / 40",value:"60-40"},{label:"70 / 30",value:"70-30"},{label:"Custom",value:"custom"}],QA=e=>{const{attributes:t,updateObj:n,device:o}=e,{layout:i,styles:a,media:s}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Direction","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.direction,onChange:e=>n("layout",e,o,"direction"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row",value:"row",icon:(0,l.jsx)(y.Dashicon,{icon:"align-pull-left"})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row Reverse",value:"row-reverse",icon:(0,l.jsx)(y.Dashicon,{icon:"align-pull-right"})})]})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.alignItems,onChange:e=>n("layout",e,o,"alignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"flex-start",icon:(0,l.jsx)(VA,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(qA,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"flex-end",icon:(0,l.jsx)(YA,{})})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.layout[o]?.gap,onChange:e=>n("styles",e,"layout",o,"gap")})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Split Ratio","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",help:(0,x.__)("Media / content column widths.","b-blocks"),value:a.layout[o]?.ratio?.splitRatio,options:KA,onChange:e=>{n("styles","30-70"===e?{media:"30%",content:"70%",splitRatio:e}:"40-60"===e?{media:"40%",content:"60%",splitRatio:e}:"50-50"===e?{media:"50%",content:"50%",splitRatio:e}:"60-40"===e?{media:"60%",content:"40%",splitRatio:e}:"70-30"===e?{media:"70%",content:"30%",splitRatio:e}:{...a.layout[o]?.ratio,splitRatio:e
497 -},"layout",o,"ratio")},__nextHasNoMarginBottom:!0}),"custom"===a.layout[o]?.ratio?.splitRatio&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Media Width","b-blocks"),className:"flex1",value:a.layout[o]?.ratio.media,onChange:e=>n("styles",e,"layout",o,"ratio","media")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Content Width","b-blocks"),className:"flex1",value:a.layout[o]?.ratio.content,onChange:e=>n("styles",e,"layout",o,"ratio","content")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Media","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Media Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s.mediaType,onChange:e=>n("media",e,"mediaType"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Image",value:"image"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Video",value:"video"})]})]}),(0,l.jsx)("br",{}),"image"===s.mediaType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(we,{height:"100%",width:"100%",value:s.image,onChange:e=>n("media",e,"image")}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"flex1 mt10",children:(0,x.__)("Object Fit","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a.media.image.objFit,onChange:e=>n("styles",e,"media","image","objFit"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Cover",value:"cover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Contain",value:"contain"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Fill",value:"fill"})]})]})]}),"video"===s.mediaType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ve,{placeholder:(0,x.__)("Enter Video URL","b-blocks"),value:s.video?.url,onChange:e=>n("media",e,"video","url"),types:["video/*"]}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Video Poster","b-blocks")}),(0,l.jsx)(we,{height:"100%",width:"100%",value:s.video?.poster,onChange:e=>n("media",e,"video","poster")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Autoplay","b-blocks"),checked:!!s.video?.autoplay,onChange:e=>n("media",e,"video","autoplay")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Loop","b-blocks"),checked:!1!==s.video?.loop,onChange:e=>n("media",e,"video","loop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Muted","b-blocks"),checked:!1!==s.video?.muted,onChange:e=>n("media",e,"video","muted")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Controls Bar","b-blocks"),checked:!1!==s.video?.controls,onChange:e=>n("media",e,"video","controls")}),!1!==s.video?.controls&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show controls on hover","b-blocks"),checked:!!s.video?.controlsOnHover,onChange:e=>n("media",e,"video","controlsOnHover")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Allow Download","b-blocks"),checked:!!s.video?.allowDownload,onChange:e=>n("media",e,"video","allowDownload")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Allow Fullscreen","b-blocks"),checked:!1!==s.video?.allowFullscreen,onChange:e=>n("media",e,"video","allowFullscreen")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Allow Picture-in-Picture","b-blocks"),checked:!1!==s.video?.allowPip,onChange:e=>n("media",e,"video","allowPip")}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"flex1 mt10",children:(0,x.__)("Object Fit","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a.media.video?.objFit,onChange:e=>n("styles",e,"media","video","objFit"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Cover",value:"cover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Contain",value:"contain"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Fill",value:"fill"})]})]})]})]})]})},ZA=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{content:a}=i;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})," "]}),values:a[o].padding,onChange:e=>n("styles",e,"content",o,"padding")}),(0,l.jsx)(An,{value:a.bg,onChange:e=>n("styles",e,"content","bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>n("styles",e,"content","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})," "]}),values:a[o].radius,onChange:e=>n("styles",e,"content",o,"radius")}),(0,l.jsx)(yt,{value:a.shadow,onChange:e=>n("styles",e,"content","shadow")})]})})},XA=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{media:a}=i;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Media","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:a[o].padding,onChange:e=>n("styles",e,"media",o,"padding")}),(0,l.jsx)(An,{value:a.bg,onChange:e=>n("styles",e,"media","bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>n("styles",e,"media","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:a.radius,onChange:e=>n("styles",e,"media","radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:a.shadow,onChange:e=>n("styles",e,"media","shadow")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Overlay","b-blocks"),checked:a.overlay.isOverlay,onChange:e=>n("styles",e,"media","overlay","isOverlay")}),a.overlay.isOverlay&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Overlay Color","b-blocks"),value:a.overlay.bg,onChange:e=>n("styles",e,"media","overlay","bg")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Opacity","b-blocks"),value:"number"==typeof a.overlay.opacity?a.overlay.opacity:parseFloat(a.overlay.opacity)||.5,onChange:e=>n("styles",e,"media","overlay","opacity"),min:0,max:1,step:.1})]})]})})},JA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(XA,{...e}),(0,l.jsx)(ZA,{...e})]}),eB=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:XE,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(QA,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(JA,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e})})})]})})})})},tB=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:a,styles:s,media:r,advanced:c}=e,d=`#${o} .b-blocks-media-text-section-wrapper`,u=`${d} .b-blocks-media-text-section-media`,p=`${d} .b-blocks-media-text-section-content`,h=`${u} .b-blocks-media-text-section-media-el`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
498 -__html:`\n ${d}{\n ${ns("flex-direction",a.desktop.direction)}\n ${ns("align-items",a.desktop.alignItems)}\n ${ns("gap",s.layout.desktop.gap)}\n }\n\n ${u}{\n position:relative;\n ${ns("width",s.layout.desktop.ratio.media)}\n ${ns("padding",hs(s.media.desktop.padding))}\n ${as(s.media.border)}\n ${ns("border-radius",hs(s.media.radius))}\n ${os(s.media.bg)}\n ${ns("box-shadow",ls(s.media.shadow))}\n }\n\n ${s.media.overlay.isOverlay?`${u}::before{\n content:'';\n position:absolute;\n inset:0;\n pointer-events:none;\n z-index:2;\n ${os(s.media.overlay.bg)}\n ${ns("opacity",s.media.overlay.opacity)}\n }`:""}\n\n ${p}{\n ${ns("width",s.layout.desktop.ratio.content)}\n ${ns("padding",hs(s.content.desktop.padding))}\n ${os(s.content.bg)}\n ${as(s.content.border)}\n ${ns("border-radius",hs(s.content.desktop.radius))}\n ${ns("box-shadow",ls(s.content.shadow))}\n }\n\n ${h}{\n position:relative;\n z-index:3;\n pointer-events:auto;\n ${ns("object-fit","image"===r?.mediaType?s.media.image?.objFit:s.media.video?.objFit)}\n }\n\n ${u}.has-controls-on-hover video::-webkit-media-controls-panel {\n opacity: 0;\n transition: opacity 0.25s ease-in-out;\n }\n ${u}.has-controls-on-hover:hover video::-webkit-media-controls-panel,\n ${u}.has-controls-on-hover:focus-within video::-webkit-media-controls-panel,\n ${u}.has-controls-on-hover video:focus::-webkit-media-controls-panel,\n ${u}.has-controls-on-hover video:active::-webkit-media-controls-panel {\n opacity: 1 !important;\n }\n\n ${t}{\n ${d}{\n ${ns("flex-direction",a.tablet.direction)}\n ${ns("align-items",a.tablet.alignItems)}\n ${ns("gap",s.layout.tablet.gap)}\n }\n\n ${u}{\n ${ns("width",s.layout.tablet.ratio.media)}\n ${ns("padding",hs(s.media.tablet.padding))}\n }\n\n ${p}{\n ${ns("width",s.layout.tablet.ratio.content)}\n ${ns("padding",hs(s.content.tablet.padding))}\n }\n }\n\n ${n}{\n ${d}{\n ${ns("flex-direction",a.mobile.direction)}\n ${ns("align-items",a.mobile.alignItems)}\n ${ns("gap",s.layout.mobile.gap)}\n }\n\n ${u}{\n ${ns("width",s.layout.mobile.ratio.media)}\n ${ns("padding",hs(s.media.mobile.padding))}\n }\n\n ${p}{\n ${ns("width",s.layout.mobile.ratio.content)}\n ${ns("padding",hs(s.content.mobile.padding))}\n ${ns("border-radius",hs(s.content.mobile.radius))}\n }\n }\n\n ${_s(o,c,i)}\n\n `}})},nB=(e={})=>{const t=[];return e.allowDownload||t.push("nodownload"),!1===e.allowFullscreen&&t.push("nofullscreen"),!1===e.allowPip&&t.push("noremoteplayback"),t.length?t.join(" "):void 0},oB=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{media:a}=t,s=(0,f.useSelect)((e=>e("core/block-editor").getBlocks(o).length>0),[o]),r=fe(t,n),c=(0,Qa.useRef)(null),d="video"===a?.mediaType,u=d?!!a?.video?.url:!!a?.image?.url;return(0,Qa.useEffect)((()=>{if(d&&c.current){const e=c.current;e.muted=!1!==a?.video?.muted,a?.video?.autoplay?e.play().catch((()=>{})):e.pause();const t=e=>{e.stopPropagation()};return e.addEventListener("pointerdown",t,!0),e.addEventListener("mousedown",t,!0),e.addEventListener("touchstart",t,!0),()=>{e.removeEventListener("pointerdown",t,!0),e.removeEventListener("mousedown",t,!0),e.removeEventListener("touchstart",t,!0)}}}),[d,a?.video?.url,a?.video?.autoplay,a?.video?.muted]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eB,{setAttributes:n,attributes:t,updateObj:r,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(tB,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"b-blocks-media-text-section-wrapper",children:[(0,l.jsx)("div",{className:"b-blocks-media-text-section-media "+(a?.video?.controlsOnHover?"has-controls-on-hover":""),children:u?"video"===a?.mediaType?(0,l.jsx)("video",{ref:c,className:"b-blocks-media-text-section-media-el",src:a?.video?.url,poster:a?.video?.poster?.url||"",autoPlay:!!a?.video?.autoplay,loop:!1!==a?.video?.loop,muted:!1!==a?.video?.muted,controls:!1!==a?.video?.controls,controlsList:nB(a?.video),disablePictureInPicture:!1===a?.video?.allowPip,playsInline:!0,onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation()}):(0,l.jsx)("img",{className:"b-blocks-media-text-section-media-el",src:a?.image?.url,alt:a?.image?.alt||""}):(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{onSelect:e=>{d?r("media",{...a?.video,id:e.id,url:e.url},"video"):r("media",{...a?.image,id:e.id,url:e.url,alt:e.alt||""},"image")},allowedTypes:d?["video"]:["image"],value:d?a?.video?.id:a?.image?.id,render:({open:e})=>(0,l.jsxs)("div",{className:"b-blocks-media-text-section-media-el--placeholder",onClick:e,children:[(0,l.jsx)(y.Dashicon,{icon:d?"format-video":"format-image",style:{fontSize:36,width:36,height:36,marginBottom:8}}),(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:d?(0,x.__)("Select or Upload Video","b-blocks"):(0,x.__)("Select or Upload Image","b-blocks")})}),(0,l.jsx)("span",{style:{fontSize:12,opacity:.8,marginTop:4},children:(0,x.__)("Click to open Media Library","b-blocks")})]})})})}),(0,l.jsx)("div",{className:"b-blocks-media-text-section-content",children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:void 0,template:[["core/heading",{level:2,placeholder:(0,x.__)("Section heading…","b-blocks")}],["core/paragraph",{placeholder:(0,x.__)("Add your content here…","b-blocks")}]],templateLock:!1,renderAppender:s?void 0:h.InnerBlocks.ButtonBlockAppender})})]})})]})]})}));Ll(GA.name)&&(0,p.registerBlockType)(GA,{icon:wl,edit:oB,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})})
499 -;const iB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/navigation","version":"1.0.0","title":"bBlocks Navigation","category":"bBlocks","description":"Display navigation in your website with stunning & organized appearance.","keywords":["navbar","navigation","menu","menubar"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"orientation":"is-horizontal","preset":"preset-1","alignment":"left","verticalAlignment":"left","isWrapMultipleLine":true,"isOpenOnClick":true,"isMenuIcon":true}},"hamburger":{"type":"object","default":{"buttonType":"icon","displayMenu":"mobile","button":{"size":{"desktop":30,"tablet":"","mobile":""},"color":"","padding":{"desktop":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"tablet":{},"mobile":{}}},"container":{"background":{"color":"#fff"},"padding":{"desktop":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"tablet":{},"mobile":{}}},"items":{"typo":{"fontWeight":600,"fontVariant":"600"},"padding":{"desktop":{"top":"15px","right":"15px","bottom":"15px","left":"15px"},"tablet":{},"mobile":{}},"border":{},"borderRadius":{},"colors":{"normal":{"text":"","bg":""},"hover":{"text":"","bg":""}}},"closeButton":{"color":"","alignment":"right"}}},"styles":{"type":"object","default":{"typo":{"fontWeight":600},"padding":{"desktop":{"top":"20px","right":"20px","bottom":"20px","left":"20px"},"tablet":{},"mobile":{}},"margin":{"desktop":{},"tablet":{},"mobile":{}},"colors":{"normal":{"normal":"#52555d","hover":""},"active":{"normal":"","hover":""}}}},"dropdownStyles":{"type":"object","default":{"container":{"width":{"desktop":200,"tablet":"","mobile":""},"background":{},"padding":{"desktop":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"tablet":{},"mobile":{}},"border":{},"borderRadius":{},"shadow":{}},"menuItems":{"typo":{"fontWeight":600},"padding":{"desktop":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"tablet":{},"mobile":{}},"colors":{"transition":"","normal":{"normal":"","hover":""},"active":{"normal":"","hover":""}}}}},"caret":{"type":"object","default":{"size":{"desktop":15,"tablet":"","mobile":""},"color":{"normal":"#475467","hover":"#101828"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"18px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","lodash","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom","lodash"]}'),aB=[{label:"Horizontal",value:"is-horizontal"},{label:"Vertical",value:"is-vertical"}],sB=[{label:"Left",value:"left",icon:zb},{label:"Center",value:"center",icon:Db},{label:"Right",value:"right",icon:Fb},{label:"Justify",value:"justify",icon:Hb}],rB=[{label:"Left",value:"left",icon:zb},{label:"Center",value:"center",icon:Db},{label:"Right",value:"right",icon:Fb}],lB=[{label:"Text",value:"text",icon:"Text"},{label:"Icon",value:"icon",icon:"Icon"}],cB=[{value:"never",label:"OFF",icon:"OFF"},{value:"mobile",label:"MOBILE",icon:"MOBILE"},{value:"always",label:"ALWAYS",icon:"ALWAYS"}],dB=e=>{const{attributes:t,updateObj:n}=e,{layout:o,hamburger:i}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Orientation","b-blocks"),labelPosition:"left",value:o.orientation,onChange:e=>n("layout",e,"orientation"),options:aB}),"is-horizontal"===o.orientation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Allow wrap to multiple lines","b-blocks"),checked:o.isWrapMultipleLine,onChange:e=>n("layout",e,"isWrapMultipleLine")}),(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),value:o.alignment,onChange:e=>n("layout",e,"alignment"),options:sB,isIcon:!0,size:"small"})]}),"is-vertical"===o.orientation&&(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),value:o.verticalAlignment,onChange:e=>n("layout",e,"verticalAlignment"),options:rB,isIcon:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Dropdown / Sub Menus","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open on Click","b-blocks"),checked:o.isOpenOnClick,onChange:e=>n("layout",e,"isOpenOnClick")}),!o.isOpenOnClick&&(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show arrow(caret icon)","b-blocks"),checked:o.isMenuIcon,onChange:e=>n("layout",e,"isMenuIcon")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hamburger Menu","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Tn,{label:(0,x.__)("Button Type","b-blocks"),value:i.buttonType,onChange:e=>n("hamburger",e,"buttonType"),options:lB,isTextIcon:!0}),(0,l.jsx)(v,{children:(0,x.__)("Display Hamburger Menu","b-blocks")}),(0,l.jsx)(Tn,{value:i.displayMenu,onChange:e=>n("hamburger",e,"displayMenu"),isTextIcon:!0,options:cB})]})]})},uB=({attributes:e,updateObj:t,device:n})=>{const{dropdownStyles:o}=e,{container:i,menuItems:a}=o,{width:s,background:r,padding:c,border:d,borderRadius:u,shadow:p}=i||{},{padding:h,typo:g,colors:m}=a;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Dropdown / Sub Menus","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:[{title:"Container",name:"container"},{title:"Items",name:"items"}],children:e=>(0,l.jsxs)(l.Fragment,{children:["container"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.PanelRow,{children:[(0,x.__)("Min Width (PX)","b-blocks"),(0,l.jsx)(_,{})]}),value:s[n],onChange:e=>t("dropdownStyles",e,"container","width",n),min:100,max:600}),(0,l.jsx)(An,{className:"mt20 mb20",isImage:!1,value:r,onChange:e=>t("dropdownStyles",e,"container","background")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:c[n],onChange:e=>t("dropdownStyles",e,"container","padding",n)}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt20 mb20",label:(0,x.__)("Border","b-blocks"),value:d,onChange:e=>t("dropdownStyles",e,"container","border")}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:u,onChange:e=>t("dropdownStyles",e,"container","borderRadius")}),(0,l.jsx)(yt,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:p,onChange:e=>t("dropdownStyles",e,"container","shadow")})]}),"items"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:h[n],
500 -onChange:e=>t("dropdownStyles",e,"menuItems","padding",n)}),(0,l.jsx)(Oa,{className:"mt20",value:g,onChange:e=>t("dropdownStyles",e,"menuItems","typo")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Active",name:"active"}],children:({name:e})=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:n})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text","b-blocks"),value:m[e][n],onChange:o=>t("dropdownStyles",o,"menuItems","colors",e,n)}),"normal"===e&&"hover"===n&&(0,l.jsx)(y.RangeControl,{className:"mt20",label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.1})]})})})})]})]})})})},pB=({attributes:e,updateObj:t,device:n})=>{const{hamburger:o}=e,{button:i,container:a,items:s,closeButton:r}=o;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hamburger Menu","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:[{title:"Button",name:"button"},{title:"Container",name:"container"},{title:"Items",name:"items"},{title:"Close Icon",name:"close"}],children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:["button"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt10 mb20",label:(0,l.jsxs)(y.PanelRow,{children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),value:i.size[n],onChange:e=>t("hamburger",e,"button","size",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:i.padding[n],onChange:e=>t("hamburger",e,"button","padding",n)}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color","b-blocks"),value:i.color,onChange:e=>t("hamburger",e,"button","color")})]}),"container"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:a.padding[n],onChange:e=>t("hamburger",e,"container","padding",n)}),(0,l.jsx)(An,{className:"mt20",value:a.background,onChange:e=>t("hamburger",e,"container","background")})]}),"items"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:s.padding[n],onChange:e=>t("hamburger",e,"items","padding",n)}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt20 mb20",label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("hamburger",e,"items","border")}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:s.borderRadius,resetValues:{left:"0px",right:"0px",top:"0px",bottom:"0px"},onChange:e=>t("hamburger",e,"items","borderRadius")}),(0,l.jsx)(Oa,{className:"mt20",value:s.typo,onChange:e=>t("hamburger",e,"items","typo")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color","b-blocks"),value:s.colors[e].text,onChange:n=>t("hamburger",n,"items","colors",e,"text")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Background Color","b-blocks"),value:s.colors[e].bg,onChange:n=>t("hamburger",n,"items","colors",e,"bg")})]})})]}),"close"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:r.color,onChange:e=>t("hamburger",e,"closeButton","color")}),(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),options:[{label:"Left",value:"left",icon:zb},{label:"Center",value:"center",icon:Db},{label:"Right",value:"right",icon:Fb}],value:r.alignment,onChange:e=>t("hamburger",e,"closeButton","alignment"),isIcon:!0})]})]})})})},hB=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,device:n,updateObj:o}=e,{styles:i,caret:a}=t,{padding:s,margin:r,typo:c,colors:d}=i;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation Link/Item","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:s[n],onChange:e=>o("styles",e,"padding",n)}),(0,l.jsx)("br",{}),(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:r[n],onChange:e=>o("styles",e,"margin",n)}),(0,l.jsx)(Oa,{className:"mt20",value:c,onChange:e=>o("styles",e,"typo")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Active",name:"active"}],children:({name:e})=>(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:t})=>(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text","b-blocks"),value:d[e][t],onChange:n=>o("styles",n,"colors",e,t)})})})]}),(0,l.jsx)(uB,{...e}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caret","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.RangeControl,{label:(0,l.jsxs)(y.PanelRow,{children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),value:a.size[n],onChange:e=>o("caret",e,"size",n),min:0,max:100}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:e})=>(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:a.color[e],onChange:t=>o("caret",t,"color",e)})})]}),(0,l.jsx)(pB,{...e})]})})),gB=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,[a,s]=(0,m.useState)(!1),r={isPremium:o,setIsProModalOpen:s},c=(e,o,...i)=>{n({[e]:be(t[e],o,...i)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Xt,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(dB,{...e,premiumProps:r,updateObj:c}),"style"===t.name&&(0,l.jsx)(hB,{...e,updateObj:c}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,isPremium:o,onChange:e=>n({advanced:e}),enabled:{dimension:["padding","margin"],background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],visibility:["zIndex","overflow"],responsive:!0,css:!0}})]})})}),(0,l.jsx)(qa,{isProModalOpen:a,setIsProModalOpen:s,link:yn,children:(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Feature: ","b-blocks")}),(0,x.__)("Feature details.","b-blocks")]})})]})},mB="bBlocksNavigation",bB=(e,t,n=!1)=>{const{styles:o,dropdownStyles:i,caret:a,hamburger:s,advanced:r}=e,{padding:l,margin:c,typo:d,colors:u}=o,{container:p,menuItems:h}=i,g=`#${t} .${mB} .wp-block-navigation`,m=` ${g} .wp-block-navigation__container .wp-block-navigation-item`,b=`${m} .wp-block-navigation__submenu-container`,f=`${b} .wp-block-navigation-item`,x=`${m} .wp-block-navigation__submenu-icon`,y=`${g} .wp-block-navigation__responsive-container-open`,v=`${g} .is-menu-open`,k=`${v} .wp-block-navigation__container .wp-block-navigation-item .wp-block-navigation-item__content`,w=`${v} .components-button.wp-block-navigation__responsive-container-close`,_=`${m}.current-menu-item`,C=`${f} a[aria-current='page']`
501 -;return`\n\t\t${Cs(t,r,n)}\n\t\t${ps("",d)?.googleFontLink}\n\t\t${ps("",h.typo)?.googleFontLink}\n\t\t${ps("",s.items.typo)?.googleFontLink}\n\n\t\t${ps(m,d)?.styles}\n\t\t${m}{\n\t\t\tpadding:${hs(l?.desktop)};\n\t\t\tmargin:${hs(c?.desktop)};\n\t\t\tcolor:${u.normal.normal};\n\t\t\ttransition:all 0.3s ease-in-out;\n\t\t}\n\t\t${m}:hover{\n\t\t\tcolor: ${u.normal.hover};\n\t\t}\n\t\t${b}{\n\t\t\t${ns("min-width",jt(p.width.desktop)?`${p.width.desktop}px !important`:"")}\n\t\t\t${os(p.background)}\n\t\t\tpadding:${hs(p.padding.desktop)};\n\t\t\t${as(p.border)}\n\t\t\tborder-radius:${hs(p.borderRadius)};\n\t\t\tbox-shadow:${ls(p.shadow)};\n\t\t}\n\t\t${ps(f,h.typo).styles}\n\t\t${f}{\n\t\t\t${ns("padding",hs(h.padding.desktop))}\n\t\t\t${ns("color",h.colors.normal.normal)}\n\t\t\ttransition:all ${h.colors.transition||.3}s;\n\t\t}\n\t\t${f}:hover{\n\t\t\t${ns("color",h.colors.normal.hover)}\n\t\t}\n\t\t${x}{\n\t\t\t${ns("width",jt(a.size.desktop)?a.size.desktop+"px !important":"")}\n\t\t\t${ns("height",jt(a.size.desktop)?a.size.desktop+"px !important":"")}\n\t\t\t${ns("color",a.color.normal)}\n\t\t\ttransition: all ${h.colors.transition||.3}s ease-in-out;\n\t\t}\n\t\t${m}:hover .wp-block-navigation__submenu-icon{\n\t\t\tcolor: ${a.color.hover} !important;\n\t\t}\n\t\t${_}{\n\t\t\t${ns("color",u.active.normal)}\n\t\t\ttransition:all 0.2s ease-in-out;\n\t\t}\n\t\t${_}:hover{\n\t\t\t${ns("color",u.active.hover)}\n\t\t}\n\t\t${C}{\n\t\t\t${ns("color",h.colors.active.normal)}\n\t\t\ttransition:all ${h.colors.transition||.2}s ease-in-out;\n\t\t}\n\t\t${C}:hover{\n\t\t\t${ns("color",h.colors.active.hover)}\n\t\t}\n\t\t${y} svg{\n\t\t\theight: ${s.button.size.desktop}px;\n\t\t\twidth: ${s.button.size.desktop}px;\n\t\t\tfill: ${s.button.color};\n\t\t}\n\t\t${y}{\n\t\t\t${ns("padding",hs(s.button.padding.desktop))}\n\t\t}\n\t\t${v}{\n\t\t\t${ns("padding",hs(s.container.padding.desktop))}\n\t\t\t${os(s.container.background)}\n\t\t}\n\n\t\t${ps(k,s.items.typo).styles}\n\t\t${k}{\n\t\t\t${ns("background",s.items.colors.normal.bg)}\n\t\t\t${ns("color",s.items.colors.normal.text)}\n\t\t\t${ns("padding",hs(s.items.padding.desktop))}\n\t\t\t${as(s.items.border)}\n\t\t\t${ns("border-radius",hs(s.items.borderRadius))}\n\t\t\ttransition: all 0.3s ease-in-out;\n\t\t}\n\t\t${k}:hover{\n\t\t\tbackground:${s.items.colors.hover.bg} !important;\n\t\t\tcolor:${s.items.colors.hover.text} !important;\n\t\t}\n\t\t${w}{\n\t\t\tcolor:${s.closeButton?.color};\n\t\t\t${"right"===s.closeButton.alignment?"right:0;":"left"===s.closeButton.alignment?"left:0px;":"left:50%;"}\n\t\t}\n\t\t@media only screen and (min-width:641px) and (max-width: 1024px){\n\t\t\t${m}{\n\t\t\t\t${ns("padding",hs(l?.tablet))}\n\t\t\t\t${ns("margin",hs(c?.tablet))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\tmin-width:${p.width.tablet}px !important;\n\t\t\t\t${ns("padding",hs(p.padding.tablet))}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${ns("padding",hs(h.padding.tablet))}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${ns("width",jt(a.size.tablet)?a.size.tablet+"px !important":"")}\n\t\t\t\t${ns("height",jt(a.size.tablet)?a.size.tablet+"px !important":"")}\n\t\t\t}\n\t\t\t${y} svg{\n\t\t\t\theight:${s.button.size.tablet}px;\n\t\t\t\twidth:${s.button.size.tablet}px;\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${ns("padding",hs(s.button.padding.tablet))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\t${ns("padding",hs(s.container.padding.tablet))}\n\t\t\t}\n\t\t\t${k}{\n\t\t\t\t${ns("padding",hs(s.items.padding.tablet))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px){\n\t\t\t${m}{\n\t\t\t\t${ns("padding",hs(l?.mobile))}\n\t\t\t\t${ns("margin",hs(c?.mobile))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\tmin-width:${p.width.mobile}px !important;\n\t\t\t\t${ns("padding",hs(p.padding.mobile))}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${ns("padding",hs(h.padding.mobile))}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${ns("width",jt(a.size.mobile)?a.size.mobile+"px !important":"")}\n\t\t\t\t${ns("height",jt(a.size.mobile)?a.size.mobile+"px !important":"")}\n\t\t\t}\n\t\t\t${y} svg{\n\t\t\t\theight:${s.button.size.mobile}px;\n\t\t\t\twidth:${s.button.size.mobile}px;\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${ns("padding",hs(s.button.padding.mobile))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\t${ns("padding",hs(s.container.padding.mobile))}\n\t\t\t}\n\t\t\t${k}{\n\t\t\t\t${ns("padding",hs(s.items.padding.mobile))}\n\t\t\t}\n\t\t}\n\t`},fB=(0,w.createHigherOrderComponent)((e=>t=>{const{name:n,clientId:o,isSelected:i}=t;if(n&&"core/navigation"!=n)return(0,l.jsx)(e,{...t});const a=(0,f.select)("core/block-editor").getBlockParents(o);let s,r=!1;return a.map((e=>{const t=(0,f.select)("core/block-editor").getBlock(e);t&&"b-blocks/navigation"==t.name&&(r=!0)})),r&&i?(setTimeout((()=>{if(s=document.querySelector(".block-editor-block-inspector"),s){let e=s.querySelector(".block-editor-block-inspector__tabs");if(e){let t=e.querySelectorAll("[aria-label='Settings'], [aria-label='Styles']");t&&t.forEach((e=>{e.style.display="none"}))}}}),200),s?(setTimeout((()=>{let e=s.children;s.querySelector(".block-editor-block-inspector__tabs").querySelectorAll("[aria-label='Settings'], [aria-label='Styles']").forEach((e=>{e.style.display="none"}));for(let t=0;t<=e.length-1;t++){let n=e[t].classList.contains("block-editor-block-card"),o=e[t].classList.contains("block-editor-block-inspector__tabs"),i=e[t].children;if(!n&&!o)for(let e=0;e<=i.length-1;e++)i[e].querySelector(".wp-block-navigation__navigation-selector")||(i[e].style.display="none")}}),200),(0,l.jsx)(e,{...t})):(0,l.jsx)(e,{...t})):(s=document.querySelector(".block-editor-block-inspector"),s&&setTimeout((()=>{const e=s.querySelector(".block-editor-block-card");e&&(e.style.display="block");let t=s.children;for(let e=0;e<=t.length-1;e++){let n=t[e].children;for(let e=0;e<=n.length-1;e++)n[e].style.display="block"}}),200),(0,l.jsx)(e,{...t}))}),"withInspectorControl");wp.hooks.addFilter("editor.BlockEdit","b-blocks/navigation",fB);const xB=({attributes:e,clientId:t})=>{const{layout:n,hamburger:o}=e,{orientation:i,isWrapMultipleLine:a}=n,{displayMenu:s}=o,r=(0,m.useRef)(),c=(0,f.select)("core/block-editor").getBlocksByClientId(t)[0],{updateBlockAttributes:d}=(0,f.dispatch)("core/block-editor");(0,m.useEffect)((()=>{c?.innerBlocks&&c?.innerBlocks.forEach((e=>{d(e.clientId,{openSubmenusOnClick:n.isOpenOnClick,showSubmenuIcon:n.isMenuIcon,overlayMenu:o.displayMenu,hasIcon:"icon"===o.buttonType,icon:"icon"===o.buttonType?"handle":"text"})}))}),[n.isOpenOnClick,n.isMenuIcon,o.displayMenu,o.buttonType,c]);const u=`${i} ${s} ${a?"":"no-wrap"} ${"is-vertical"===n.orientation?"vertical-align-"+n.verticalAlignment:"horizontal-align-"+n.alignment}`;return(0,l.jsx)("div",{className:`${mB} ${u}`,children:(0,l.jsx)(h.InnerBlocks,{templateLock:!1,ref:r,template:[["core/navigation",{className:"bPl-navigation"}]],allowedBlocks:["core/navigation"],renderAppender:(0,f.select)("core/block-editor").getBlock(t)?.innerBlocks.length<1&&h.InnerBlocks.ButtonBlockAppender})})};Ll(iB.name)&&(0,p.registerBlockType)(iB,{icon:Er,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,a]=(0,m.useState)(0),s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(gB,{attributes:t,setAttributes:n,isPremium:s,activeIndex:i,setActiveIndex:a,clientId:o}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{children:bB(t,`block-${o}`,!0)}),(0,l.jsx)("div",{children:(0,l.jsx)(xB,{...e})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})})
502 -;const yB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/news-ticker","version":"0.1.0","title":"News Ticker","category":"bBlocks","textdomain":"b-blocks","description":"Display a scrolling news ticker with posts from any post type","example":{},"attributes":{"postType":{"type":"string","default":"post"},"selectedCategories":{"type":"array","default":[]},"selectedPosts":{"type":"array","default":[]},"selectAllCategories":{"type":"boolean","default":false},"speed":{"type":"number","default":50},"enableClick":{"type":"boolean","default":true},"textColor":{"type":"string","default":"#ffffff"},"backgroundColor":{"type":"string","default":"#667eea"},"fontSize":{"type":"number","default":15},"fontWeight":{"type":"string","default":"400"},"fontFamily":{"type":"string","default":""},"headingText":{"type":"string","default":"News:"}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}');Ll(yB.name)&&(0,p.registerBlockType)(yB,{icon:Kr,edit:function({attributes:e,setAttributes:t}){const{postType:n,selectedCategories:o,selectedPosts:i,selectAllCategories:a,speed:s,enableClick:r,textColor:c,backgroundColor:d,fontSize:u,fontWeight:p,fontFamily:g,headingText:m}=e,[b,v]=(0,Qa.useState)([]),[k,w]=(0,Qa.useState)(!1),_=(0,f.useSelect)((e=>{const{getPostTypes:t}=e(wp.coreData.store),n=t({per_page:-1});return n?.filter((e=>e.viewable))||[]}),[]),C=(0,f.useSelect)((e=>{if(!n)return[];const{getTaxonomies:t}=e(wp.coreData.store);return(t({per_page:-1})||[]).filter((e=>e.types.includes(n)&&e.visibility.publicly_queryable))}),[n]),j=(0,f.useSelect)((e=>{if(!n||0===C.length)return[];const{getEntityRecords:t}=e(wp.coreData.store);return t("taxonomy",C[0].slug,{per_page:-1})||[]}),[n,C]),{posts:$,isResolving:S}=(0,f.useSelect)((e=>{if(!n)return{posts:[],isResolving:!1};const{getEntityRecords:t,isResolving:i}=e(wp.coreData.store),a={per_page:-1,status:"publish",orderby:"date",order:"desc"};return o.length>0&&C.length>0&&(a[C[0].rest_base]=o),{posts:t("postType",n,a)||[],isResolving:i("getEntityRecords",["postType",n,a])}}),[n,o,C]);(0,Qa.useEffect)((()=>{S?w(!0):(v($),w(!1))}),[$,S]);const T=a&&o.length>0?b:b.filter((e=>i.includes(e.id))),N=_.map((e=>({label:e.name,value:e.slug}))),M=[{name:(0,x.__)("Small","b-blocks"),size:12,slug:"small"},{name:(0,x.__)("Normal","b-blocks"),size:15,slug:"normal"},{name:(0,x.__)("Medium","b-blocks"),size:18,slug:"medium"},{name:(0,x.__)("Large","b-blocks"),size:22,slug:"large"},{name:(0,x.__)("Extra Large","b-blocks"),size:28,slug:"extra-large"}],L={backgroundColor:d,color:c,fontSize:u+"px",fontWeight:p,fontFamily:g||void 0},P="page"===n,E=j.length>0&&!P;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Ticker Settings","b-blocks"),children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Ticker Heading Text","b-blocks"),value:m,onChange:e=>t({headingText:e}),help:(0,x.__)("Customize the heading text that appears on the ticker label","b-blocks"),placeholder:(0,x.__)("News:","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Post Type","b-blocks"),value:n,options:N,onChange:e=>{t({postType:e,selectedCategories:[],selectedPosts:[],selectAllCategories:!1})}}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Scrolling Speed","b-blocks"),value:s,onChange:e=>t({speed:e}),min:10,max:100,help:(0,x.__)("Lower values are slower, higher values are faster","b-blocks")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Click to Post","b-blocks"),checked:r,onChange:e=>t({enableClick:e}),help:(0,x.__)("Allow users to click on ticker items to visit the post","b-blocks")})]}),(0,l.jsx)(h.PanelColorSettings,{title:(0,x.__)("Color Settings","b-blocks"),colorSettings:[{value:c,onChange:e=>t({textColor:e||"#ffffff"}),label:(0,x.__)("Text Color","b-blocks")},{value:d,onChange:e=>t({backgroundColor:e||"#667eea"}),label:(0,x.__)("Background Color","b-blocks")}]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Typography","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.FontSizePicker,{fontSizes:M,value:u,onChange:e=>t({fontSize:e||15})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Font Weight","b-blocks"),value:p,options:[{label:(0,x.__)("Thin (100)","b-blocks"),value:"100"},{label:(0,x.__)("Extra Light (200)","b-blocks"),value:"200"},{label:(0,x.__)("Light (300)","b-blocks"),value:"300"},{label:(0,x.__)("Normal (400)","b-blocks"),value:"400"},{label:(0,x.__)("Medium (500)","b-blocks"),value:"500"},{label:(0,x.__)("Semi Bold (600)","b-blocks"),value:"600"},{label:(0,x.__)("Bold (700)","b-blocks"),value:"700"},{label:(0,x.__)("Extra Bold (800)","b-blocks"),value:"800"},{label:(0,x.__)("Black (900)","b-blocks"),value:"900"}],onChange:e=>t({fontWeight:e})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Font Family","b-blocks"),value:g,options:[{label:(0,x.__)("Default","b-blocks"),value:""},{label:"Arial",value:"Arial, sans-serif"},{label:"Helvetica",value:"Helvetica, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Times New Roman",value:'"Times New Roman", serif'},{label:"Courier New",value:'"Courier New", monospace'},{label:"Verdana",value:"Verdana, sans-serif"},{label:"Trebuchet MS",value:'"Trebuchet MS", sans-serif'}],onChange:e=>t({fontFamily:e})})]}),E&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Filter by Category","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Select all entry of the following Category","b-blocks"),checked:a,onChange:e=>{t({selectAllCategories:e,selectedPosts:e?[]:i})},help:a?(0,x.__)("All posts from selected categories will be shown. Individual post selection is disabled.","b-blocks"):(0,x.__)("Select categories to filter posts, then choose individual posts below.","b-blocks")}),(0,l.jsx)("div",{style:{maxHeight:"200px",overflowY:"auto",marginTop:"16px",paddingTop:"8px",borderTop:"1px solid #ddd"},children:j.map((e=>(0,l.jsx)(y.CheckboxControl,{label:e.name,checked:o.includes(e.id),onChange:()=>(e=>{const n=o.includes(e)?o.filter((t=>t!==e)):[...o,e];t({selectedCategories:n,selectedPosts:a?[]:i})})(e.id)},e.id)))})]}),!a&&(0,l.jsx)(y.PanelBody,{title:P?(0,x.__)("Select Pages","b-blocks"):(0,x.__)("Select Posts","b-blocks"),initialOpen:!0,children:k?(0,l.jsx)(y.Spinner,{}):0===b.length?(0,l.jsx)("p",{children:P?(0,x.__)("No pages found.","b-blocks"):(0,x.__)("No posts found for this post type and category selection.","b-blocks")}):(0,l.jsx)("div",{style:{maxHeight:"400px",overflowY:"auto"},children:b.map((e=>(0,l.jsx)(y.CheckboxControl,{label:e.title.rendered||(0,x.__)("(no title)","b-blocks"),checked:i.includes(e.id),onChange:()=>(e=>{const n=i.includes(e)?i.filter((t=>t!==e)):[...i,e];t({selectedPosts:n})})(e.id)},e.id)))})}),a&&o.length>0&&(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Preview","b-blocks"),initialOpen:!1,children:(0,l.jsxs)("p",{className:"components-base-control__help",children:[(0,x.__)("All posts from the selected categories will be displayed in the ticker.","b-blocks")," ",b.length>0&&(0,l.jsxs)("strong",{children:[b.length," ",1===b.length?(0,x.__)("post found","b-blocks"):(0,x.__)("posts found","b-blocks")]})]})})]}),(0,l.jsx)("div",{...(0,h.useBlockProps)({style:L}),children:0===T.length?(0,l.jsx)(y.Placeholder,{icon:"slides",label:(0,x.__)("News Ticker","b-blocks"),instructions:P?(0,x.__)("Select pages from the sidebar to display in the ticker.","b-blocks"):a?(0,x.__)("Select categories from the sidebar to display all posts in the ticker.","b-blocks"):(0,x.__)("Select posts from the sidebar to display in the ticker.","b-blocks")}):(0,l.jsxs)("div",{className:"news-ticker-wrapper",children:[(0,l.jsx)("div",{className:"news-ticker-label",style:{backgroundColor:"rgba(0, 0, 0, 0.2)",color:c},children:m||(0,x.__)("News:","b-blocks")}),(0,l.jsx)("div",{className:"news-ticker-content",children:(0,l.jsx)("div",{className:"news-ticker-items",children:T.map((e=>(0,
503 -l.jsx)("span",{className:"news-ticker-item",style:{color:c,fontSize:u+"px",fontWeight:p,fontFamily:g||void 0},children:e.title.rendered||(0,x.__)("(no title)","b-blocks")},e.id)))})})]})})]})}});const vB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/off-canvas","title":"Off-Canvas Drawer","description":"A slide-in drawer panel triggered by a button. Compose any blocks inside. Accessible focus trap, Escape to close, backdrop dismissal, and reduced-motion aware.","category":"bBlocks","keywords":["off-canvas","drawer","side panel","mobile menu","slide-in"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"trigger":{"type":"object","default":{"label":"Open Menu","showIcon":true,"iconPosition":"left","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\'><path fill=\'currentColor\' d=\'M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z\' /></svg>","iconStyle":{"color":"","size":{"desktop":"18px","tablet":"","mobile":""},"gap":"8px"},"align":"left","typo":{"fontSize":{"desktop":"15px","tablet":null,"mobile":null}},"transition":200,"normal":{"bg":{"type":"solid","color":"#1e1e1e"},"color":"#ffffff","border":{},"padding":{"desktop":{"top":"10px","right":"18px","bottom":"10px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{},"color":"","border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}}},"drawer":{"type":"object","default":{"side":"left","width":{"desktop":"320px","tablet":"","mobile":"85vw"},"height":{"desktop":"","tablet":"","mobile":""},"bg":{"type":"solid","color":"#ffffff"},"padding":{"desktop":{"top":"24px","right":"24px","bottom":"24px","left":"24px"},"tablet":{},"mobile":{}},"border":{},"borderRadius":{"desktop":{},"tablet":{},"mobile":{}}}},"overlay":{"type":"object","default":{"show":true,"color":"rgba(0,0,0,0.5)"}},"options":{"type":"object","default":{"closeLabel":"Close","triggerEvent":"click"}},"transition":{"type":"object","default":{"type":"default","duration":400,"easing":"ease"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),kB=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,wB=({attributes:e,id:o,isBackend:i=!1})=>{const{trigger:a={},drawer:s={},overlay:r={},transition:c={}}=e,d=`#${o}`,u=`${d} .b-blocks-off-canvas-trigger`,p=`${d} .b-blocks-off-canvas-icon`,h=`${d} .b-blocks-off-canvas-panel, ${d} .b-blocks-off-canvas-editor-preview`,g=`${d} .b-blocks-off-canvas-overlay`,m=a.iconStyle||{},b=(e,t,n)=>ns(e,hs(t?.[n])),f=!1===r.show?"transparent":r.color||"rgba(0,0,0,0.5)",x=e=>`\n\t\t${d}{\n\t\t\t${ns("text-align",a.align)}\n\t\t\t--b-blocks-off-canvas-duration: ${parseInt(c.duration,10)||0}ms;\n\t\t\t--b-blocks-off-canvas-easing: ${c.easing||"ease"};\n\t\t\t${ns("--b-blocks-off-canvas-width",kB(s.width,e))}\n\t\t}\n\t\t${u}{\n\t\t\t${b("padding",a.normal?.padding,e)}\n\t\t\t${b("border-radius",a.normal?.borderRadius,e)}\n\t\t}\n\t\t${u}:hover{\n\t\t\t${b("padding",a.hover?.padding,e)}\n\t\t\t${b("border-radius",a.hover?.borderRadius,e)}\n\t\t}\n\t\t${p}{\n\t\t\t${ns("width",kB(m.size,e))}\n\t\t\t${ns("height",kB(m.size,e))}\n\t\t}\n\t\t${h}{\n\t\t\t${b("padding",s.padding,e)}\n\t\t\t${b("border-radius",s.borderRadius,e)}\n\t\t\t${kB(s.height,e)?`${ns("height",kB(s.height,e))} bottom: auto;`:""}\n\t\t}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",a.typo).googleFontLink}\n\n\t\t\t${d}{\n\t\t\t\t--b-blocks-off-canvas-overlay: ${f};\n\t\t\t}\n\n\t\t\t${p}{\n\t\t\t\t${ns("color",m.color)}\n\t\t\t}\n\t\t\t${p} svg{\n\t\t\t\t${ns("fill",m.color)}\n\t\t\t}\n\n\t\t\t${u}{\n\t\t\t\t${ns("gap",m.gap)}\n\t\t\t\t${os(a.normal?.bg)}\n\t\t\t\t${ns("color",a.normal?.color)}\n\t\t\t\t${is(a.normal?.border)}\n\t\t\t\ttransition: all ${parseInt(a.transition,10)||0}ms ease;\n\t\t\t}\n\t\t\t${u}:hover{\n\t\t\t\t${os(a.hover?.bg)}\n\t\t\t\t${ns("color",a.hover?.color)}\n\t\t\t\t${is(a.hover?.border)}\n\t\t\t}\n\t\t\t${ps(u,a.typo).styles}\n\n\t\t\t${h}{\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${is(s.border)}\n\t\t\t}\n\n\t\t\t${g}.is-open{\n\t\t\t\t${ns("background-color",f)}\n\t\t\t}\n\n\t\t\t${i?`${d} .b-blocks-off-canvas-editor-preview{ ${ns("width",kB(s.width,"desktop"))} max-width: 100%; }`:""}\n\n\t\t\t${x("desktop")}\n\t\t\t${t}{ ${x("tablet")} }\n\t\t\t${n}{ ${x("mobile")} }\n\n\t\t\t@media (prefers-reduced-motion: reduce){ ${d}{ --b-blocks-off-canvas-duration: 0ms; } }\n\t\t\t`}})},_B=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"},{label:"vw",value:"vw"}],CB={top:"",right:"",bottom:"",left:""},jB=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],$B=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],SB=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],TB=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Slide","b-blocks"),value:"slide"},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Push","b-blocks"),value:"push"},{label:(0,x.__)("Reveal","b-blocks"),value:"reveal"},{label:(0,x.__)("Zoom","b-blocks"),value:"zoom"},{label:(0,x.__)("Flip","b-blocks"),value:"flip"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"}],NB=[{label:(0,x.__)("Click","b-blocks"),value:"click"},{label:(0,x.__)("Hover","b-blocks"),value:"hover"},{label:(0,x.__)("Page Load","b-blocks"),value:"load"}],MB=[{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Linear","b-blocks"),value:"linear"}],LB=({drawer:e={},overlay:t={},updateObj:n,device:o="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Drawer","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Drawer Side","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:e.side||"left",onChange:e=>n("drawer",e,"side"),children:$B.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Drawer Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.width?.[o],units:_B,onChange:e=>n("drawer",e,"width",o),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Drawer Height","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.height?.[o],units:_B,onChange:e=>n("drawer",e,"height",o),placeholder:(0,x.__)("Full","b-blocks"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Overlay","b-blocks"),checked:!1!==t.show,
504 -onChange:e=>n("overlay",!!e,"show")})]}),PB=({trigger:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Trigger Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Trigger Label","b-blocks"),value:e.label||"",onChange:e=>t("trigger",e,"label"),placeholder:(0,x.__)("Open Menu","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Trigger Icon","b-blocks"),checked:e.showIcon,onChange:e=>t("trigger",e,"showIcon")}),!1!==e.showIcon&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:e.icon,onChange:e=>t("trigger",e,"icon")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:e.iconPosition,onChange:e=>t("trigger",e,"iconPosition"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Left","b-blocks"),value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Right","b-blocks"),value:"right"})]})]})]}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Trigger Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:e.align,onChange:e=>t("trigger",e,"align"),children:SB.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),EB=({transition:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Transition","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Transition Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:e.type||"default",options:TB,onChange:e=>t("transition",e,"type"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),value:e.duration,onChange:e=>t("transition",e,"duration"),min:0,max:2e3,step:50,__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Easing:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:e.easing||"ease",options:MB,onChange:e=>t("transition",e,"easing"),__nextHasNoMarginBottom:!0})]})]}),AB=({options:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,x.__)("Trigger Event","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:e.triggerEvent||"click",onChange:e=>t("options",e||"click","triggerEvent"),children:NB.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Close Button Label","b-blocks"),help:(0,x.__)("Used as the close button’s screen-reader label.","b-blocks"),value:e.closeLabel||"",onChange:e=>t("options",e,"closeLabel"),placeholder:(0,x.__)("Close","b-blocks"),__nextHasNoMarginBottom:!0})]}),BB=({attributes:e,updateObj:t,device:n="desktop"})=>{const{trigger:o={},drawer:i={},overlay:a={},options:s={},transition:r={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(LB,{drawer:i,overlay:a,updateObj:t,device:n}),(0,l.jsx)(PB,{trigger:o,updateObj:t}),(0,l.jsx)(EB,{transition:r,updateObj:t}),(0,l.jsx)(AB,{options:s,updateObj:t})]})},IB=({trigger:e={},updateObj:t,device:n="desktop"})=>{const[o,i]=(0,m.useState)("normal"),a="hover"===o,s=e[o]||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Trigger Button","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("trigger",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:s.bg,onChange:e=>t("trigger",e,o,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text / Icon Color:","b-blocks"),value:s.color,onChange:e=>t("trigger",e,o,"color"),defaultColor:a?"":"#ffffff"}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("trigger",e,o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:_B,values:s.padding?.[n],resetValues:CB,onChange:e=>t("trigger",e,o,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:_B,values:s.borderRadius?.[n],resetValues:CB,onChange:e=>t("trigger",e,o,"borderRadius",n)}),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (ms)","b-blocks"),value:e.transition,onChange:e=>t("trigger",e,"transition"),min:0,max:2e3,step:50,help:(0,x.__)("Hover animation speed.","b-blocks"),__nextHasNoMarginBottom:!0})]})},OB=({trigger:e={},updateObj:t,device:n="desktop"})=>{const o=e.iconStyle||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Trigger Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:o.color,onChange:e=>t("trigger",e,"iconStyle","color")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o.size?.[n],units:_B,onChange:e=>t("trigger",e,"iconStyle","size",n),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon / Label Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o.gap,units:_B,onChange:e=>t("trigger",e,"iconStyle","gap"),__next40pxDefaultSize:!0})]})]})},RB=({drawer:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Drawer Panel","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:e.bg,onChange:e=>t("drawer",e,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:_B,values:e.padding?.[n],resetValues:CB,onChange:e=>t("drawer",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("drawer",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:_B,values:e.borderRadius?.[n],resetValues:CB,onChange:e=>t("drawer",e,"borderRadius",n)})]}),zB=({overlay:e={},updateObj:t})=>!1===e.show?null:(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Overlay","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Ue,{label:(0,x.__)("Overlay Color:","b-blocks"),value:e.color,onChange:e=>t("overlay",e,"color"),defaultColor:"rgba(0,0,0,0.5)"})}),DB=({attributes:e,updateObj:t,device:n="desktop"})=>{const{trigger:o={},drawer:i={},overlay:a={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(IB,{trigger:o,updateObj:t,device:n}),!1!==o.showIcon&&(0,l.jsx)(OB,{trigger:o,updateObj:t,device:n}),(0,l.jsx)(RB,{drawer:i,updateObj:t,device:n}),(0,
505 -l.jsx)(zB,{overlay:a,updateObj:t})]})},FB=e=>(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:jB,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(BB,{...e}),"style"===t.name&&(0,l.jsx)(DB,{...e})]})})]}),HB=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{device:n()?.toLowerCase(),innerBlocks:o(t)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,innerBlocks:i}=e,{trigger:a={},drawer:s={},options:r={}}=t,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,d=fe(t,n),u=(0,h.useBlockProps)({id:`block-${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(FB,{...e,updateObj:d,isPremium:c}),(0,l.jsxs)("div",{...u,children:[(0,l.jsx)(wB,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsxs)("button",{type:"button",className:"b-blocks-off-canvas-trigger","aria-disabled":"true",tabIndex:-1,children:[!1!==a.showIcon&&a.icon&&"right"!==a.iconPosition&&(0,l.jsx)("span",{className:"b-blocks-off-canvas-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:a.icon}}),a.label&&(0,l.jsx)("span",{className:"b-blocks-off-canvas-trigger-label",children:a.label}),!1!==a.showIcon&&a.icon&&"right"===a.iconPosition&&(0,l.jsx)("span",{className:"b-blocks-off-canvas-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:a.icon}})]}),(0,l.jsxs)("div",{className:"b-blocks-off-canvas-editor-preview-wrap","data-side":s.side,children:[(0,l.jsxs)("div",{className:"b-blocks-off-canvas-editor-preview-header",children:[(0,l.jsx)("span",{className:"b-blocks-off-canvas-editor-preview-label",children:(0,x.__)("Drawer content (editor preview)","b-blocks")}),(0,l.jsx)("span",{className:"b-blocks-off-canvas-editor-preview-hint",children:(0,x.__)("Hidden until the trigger is clicked on the frontend.","b-blocks")})]}),(0,l.jsxs)("div",{className:"b-blocks-off-canvas-editor-preview",children:[(0,l.jsx)("button",{type:"button",className:"b-blocks-off-canvas-editor-close","aria-label":r.closeLabel,tabIndex:-1,children:(0,l.jsx)("span",{"aria-hidden":"true",children:"×"})}),(0,l.jsx)("div",{className:"b-blocks-off-canvas-editor-content bBlocksOffCanvasInnerBlocksContent",children:(0,l.jsx)(h.InnerBlocks,{renderAppender:()=>i?.length?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{})})})]})]})]})]})}));Ll(vB.name)&&(0,p.registerBlockType)(vB,{icon:dl,edit:HB,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})})
506 -;const WB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/one-page-navigation","title":"One Page Navigation","category":"bBlocks","description":"A floating scroll-spy navigation for one-page sites: links to on-page sections, highlights the one in view and smooth-scrolls to it.","keywords":["navigation","scroll spy","one page","anchor","menu"],"textdomain":"b-blocks","supports":{"html":false,"align":false,"multiple":true},"attributes":{"blockId":{"type":"string","default":""},"layout":{"type":"object","default":{"preset":"glassBullseye","desktop":{"position":"right","verticalAlign":"center","offsetX":"","offsetY":""},"tablet":{"position":"","verticalAlign":"","offsetX":"","offsetY":""},"mobile":{"position":"","verticalAlign":"","offsetX":"","offsetY":""}}},"items":{"type":"array","default":[{"id":"opn-overview","label":"Overview","sectionId":"overview","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 576 512\'><path d=\'M575 236.9 308.5 26.6a33 33 0 0 0-41 0L1 236.9a12 12 0 0 0-2 16.9l21 26.6a12 12 0 0 0 16.9 2L64 260.5V464a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V352h64v112a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V260.5l27.1 21.9a12 12 0 0 0 16.9-2l21-26.6a12 12 0 0 0-2-16.9z\'/></svg>","img":{"url":"","id":""},"svg":""}},{"id":"opn-features","label":"Features","sectionId":"features","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M264.5 5.2a24 24 0 0 0-17 0L28.7 84.5a16 16 0 0 0 0 30l218.8 79.3a24 24 0 0 0 17 0l218.8-79.3a16 16 0 0 0 0-30zm219 175.1-58.3-21.1-140.4 50.9a56 56 0 0 1-39.6 0L104.8 159.2l-58.3 21.1a16 16 0 0 0 0 30l218.8 79.3a24 24 0 0 0 17 0l218.8-79.3a16 16 0 0 0 0-30zm0 116.6-58.1-21-140.6 51a56 56 0 0 1-39.6 0l-140.6-51-58.1 21a16 16 0 0 0 0 30l218.8 79.3a24 24 0 0 0 17 0l218.8-79.3a16 16 0 0 0 0-30z\'/></svg>","img":{"url":"","id":""},"svg":""}},{"id":"opn-pricing","label":"Pricing","sectionId":"pricing","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M0 80v149.5a48 48 0 0 0 14 33.9l195 195a48 48 0 0 0 67.9 0l131-131a48 48 0 0 0 0-67.9l-195-195A48 48 0 0 0 179.5 32H48A48 48 0 0 0 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 0 1 0-64z\'/></svg>","img":{"url":"","id":""},"svg":""}},{"id":"opn-faq","label":"FAQ","sectionId":"faq","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 8a248 248 0 1 0 0 496 248 248 0 0 0 0-496zm0 400a32 32 0 1 1 0-64 32 32 0 0 1 0 64zm53.9-197.2-29.9 19v18.2a16 16 0 0 1-16 16h-16a16 16 0 0 1-16-16v-27.3a16 16 0 0 1 7.4-13.5l40.9-26c5.6-3.5 8.9-9.5 8.9-16 0-10.5-8.5-19-19-19h-35.6c-7.4 0-14.2 4.2-17.5 10.9l-3.5 7a16 16 0 0 1-21.5 7.2l-14.3-7.2a16 16 0 0 1-7.2-21.5l3.5-7A83 83 0 0 1 234.6 96h35.6c37.1 0 67.3 30.2 67.3 67.3 0 23-11.7 44.1-31.1 56.5z\'/></svg>","img":{"url":"","id":""},"svg":""}}]},"behavior":{"type":"object","default":{"scrollSpy":true,"smoothScroll":true,"hideMissingSections":true,"scrollSpeed":600,"desktop":{"scrollOffset":"80px"},"tablet":{"scrollOffset":""},"mobile":{"scrollOffset":""}}},"item":{"type":"object","default":{"normal":{"color":"","background":{},"markerColor":"","ringColor":"","border":{},"shadow":[]},"hover":{"color":"","background":{},"markerColor":"","ringColor":"","border":{},"shadow":[]},"active":{"color":"","background":{},"markerColor":"","ringColor":"","border":{},"shadow":[]},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"","ringSize":"","spacing":"18px"},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"","ringSize":"","spacing":""},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"","ringSize":"","spacing":""}}},"marker":{"type":"object","default":{"desktop":{"size":""},"tablet":{"size":""},"mobile":{"size":""}}},"media":{"type":"object","default":{"showIcon":false,"color":"","hoverColor":"","activeColor":"","desktop":{"size":"","width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""},"objectFit":"cover"},"tablet":{"size":"","width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""},"objectFit":""},"mobile":{"size":"","width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""},"objectFit":""}}},"label":{"type":"object","default":{"tooltipBackground":{},"tooltipText":"","border":{},"typo":{"fontSize":{"desktop":13,"tablet":"","mobile":""}},"desktop":{"gap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"gap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"gap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}}},"line":{"type":"object","default":{"color":"","progressColor":"","desktop":{"thickness":""},"tablet":{"thickness":""},"mobile":{"thickness":""}}},"number":{"type":"object","default":{"normal":{"color":""},"hover":{"color":""},"active":{"color":""},"typo":{"fontSize":{"desktop":15,"tablet":"","mobile":""}}}},"bubble":{"type":"object","default":{"desktop":{"iconPosition":"auto","x":"32px","y":"0px"},"tablet":{"iconPosition":"","x":"","y":""},"mobile":{"iconPosition":"","x":"","y":""}}},"animation":{"type":"object","default":{"pulse":false,"style":"pulseRing","speed":""}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"position":{}}}},"example":{"attributes":{"layout":{"preset":"glassBullseye","desktop":{"position":"right","verticalAlign":"center"}}}},"editorScript":"file:../index.js","viewScript":"file:./view.js","render":"file:./render.php","style":"file:./view.css","version":"1.0.41"}'),UB="b-blocks-one-page-navigation",GB=()=>`opn-${Math.random().toString(36).slice(2,9)}`,VB=[{name:"general",title:"General"},{name:"style",title:"Style"},{name:"advanced",title:"Advanced"}],qB=[{label:"Glass Bullseye",value:"glassBullseye"},{label:"Magnetic Bubble",value:"magneticBubble"},{label:"Numbered Steps",value:"numberedSteps"},{label:"Expandable Pills",value:"expandablePills"},{label:"Stacked Cards",value:"stackedCards"},{label:"Side Rail",value:"sideRail"}],YB=[{label:"Left",value:"left"},{label:"Right",value:"right"}],KB=[{label:"Top",value:"top"},{label:"Center",value:"center"},{label:"Bottom",value:"bottom"}],QB=[{label:"Pulse Ring",value:"pulseRing"},{label:"Radar",value:"radar"},{label:"Breathing Glow",value:"breathingGlow"},{label:"Heartbeat",value:"heartbeat"}],ZB=[{label:"None",value:"none"},{label:"Library",
507 -value:"icon"},{label:"Image",value:"image"},{label:"SVG",value:"svg"}],XB=["image"],JB=["image/svg+xml"],eI=[{label:"Contain",value:"contain"},{label:"Cover",value:"cover"},{label:"Fill",value:"fill"},{label:"None",value:"none"}],tI=[{label:"Auto",value:"auto"},{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],nI=(e={},t="desktop")=>{const n=e?.bubble||{},o=pI(n,t,"iconPosition",n.iconPosition||"auto");if("inside"===o||"center"===o)return"center";const i="outside"===o?n.side||"auto":o;return"left"===i||"right"===i?i:"left"===mI(e.layout||{},t,"position","right")?"right":"left"},oI={glassBullseye:["marker","item","media","animation","label","line"],magneticBubble:["marker","item","media","animation","label","line","bubble"],numberedSteps:["marker","item","number","media","line","label"],expandablePills:["marker","item","media","label"],stackedCards:["marker","item","media","label","line"],sideRail:["marker","item","media","label","line"]},iI=["magneticBubble","expandablePills","stackedCards"],aI=e=>!iI.includes(e),sI=["expandablePills","stackedCards"],rI=e=>!sI.includes(e),lI=(e={})=>"numberedSteps"===(e?.layout?.preset||"glassBullseye")&&!e?.media?.showIcon,cI=["sideRail"],dI=(e={})=>!aI(e?.layout?.preset||"glassBullseye")||!!e?.media?.showIcon,uI=(e,t)=>(oI[e]||oI.glassBullseye).includes(t),pI=(e={},t,n,o="")=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},a=i("desktop")??o;if("desktop"===t)return a;const s=i("tablet")??a;return"tablet"===t?s:i("mobile")??s},hI=(e="")=>String(e||"").trim().replace(/^#+/,""),gI=e=>String(e+1).padStart(2,"0"),mI=(e={},t,n,o)=>pI(e,t,n,e[n]||o),bI=e=>{const{layout:t={}}=e;return`${UB}-pos-${mI(t,"desktop","position","right")} ${UB}-align-${mI(t,"desktop","verticalAlign","center")}`},fI=e=>{const{layout:t={},animation:n={}}=e,o=t.preset||"glassBullseye",i=n.pulse&&uI(o,"animation"),a=aI(o)&&e?.media?.showIcon;return[UB,`${UB}-preset-${o}`,i?`${UB}-pulse-${n.style||"pulseRing"}`:"","magneticBubble"===o&&"center"!==nI(e)?`${UB}-bubble-outside ${UB}-bubble-${nI(e)}`:"",a?"is-icon-visible":""].filter(Boolean).join(" ")},xI={expandablePills:"link",stackedCards:"link"},yI=e=>"link"===xI[e],vI=e=>yI(e),kI=["magneticBubble","numberedSteps","stackedCards"],wI=e=>kI.includes(e),_I=e=>"glassBullseye"===(e||"glassBullseye"),CI={glassBullseye:{normal:{color:"#9aa0ae"},hover:{color:"#4b33f5"},active:{color:"#4b33f5"}},magneticBubble:{normal:{color:"#9aa0ae",background:"#ffffff",border:{width:"2px",style:"solid",color:"#e3e6ef"}},hover:{color:"#4b33f5",background:"#4b33f51a",markerColor:"#ffffff"},active:{color:"#4b33f5",background:"#4b33f5",markerColor:"#ffffff"}},numberedSteps:{normal:{color:"#9aa0ae",background:"#ffffff",border:{width:"2px",style:"solid",color:"#e3e6ef"}},hover:{color:"#4b33f5",background:"#4b33f51a",border:{width:"2px",style:"solid",color:"#4b33f5"}},active:{color:"#4b33f5",background:"#4b33f5",markerColor:"#ffffff",border:{width:"2px",style:"solid",color:"#4b33f5"}}},expandablePills:{normal:{color:"#1e2230"},hover:{color:"#4b33f5",background:"#4b33f51a"},active:{color:"#ffffff",background:"#4b33f5"}},stackedCards:{normal:{color:"#1e2230",background:"#ffffff",border:{width:"1px",style:"solid",color:"#e3e6ef"}},hover:{color:"#4b33f5",background:"#f4f5fa"},active:{color:"#ffffff",background:"#4b33f5",border:{width:"1px",style:"solid",color:"#4b33f5"}}},sideRail:{normal:{color:"#9aa0ae",background:"#9aa0ae"},hover:{background:"#4b33f5"},active:{background:"#4b33f5"}}},jI=(e={},t,n=!1)=>{const{item:o={},line:i={},layout:a={}}=e,s=a.preset||"glassBullseye",r=o?.[t]||{},l=n&&(CI[s]||{})[t]||{},c=e=>e&&("object"!=typeof e||Object.keys(e).length),d=(e,t)=>c(r[e])?r[e]:(n?l[e]:null)||t;return{color:d("color",""),background:d("background",{}),markerColor:d("markerColor",""),border:(()=>{if(c(r.border))return r.border;const e=i.color||i?.desktop?.thickness;return n&&e?{width:i?.desktop?.thickness||l.border?.width||"",style:"solid",color:i.color||l.border?.color||""}:(n?l.border:null)||{}})()}},$I=(e={},t)=>e?.[t]?.color||"",SI=(e={},t,n)=>{const o=t=>{const o=e?.[t]?.[n];return"string"==typeof o?o?{top:o,right:o,bottom:o,left:o}:void 0:o&&Object.values(o).some((e=>""!==e&&null!=e))?o:void 0},i=o("desktop")??{};if("desktop"===t)return i;const a=o("tablet")??i;return"tablet"===t?a:o("mobile")??a},TI=e=>"string"==typeof e?{type:"solid",color:e}:e||{},NI=(e="")=>String(e).replace(/<[^>]*>/g," ").replace(/&nbsp;|&#160;/g," ").replace(/&amp;/g,"&").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),MI='h1, h2, h3, h4, h5, h6, .sectionHeadingTitle, [role="heading"]',LI=e=>{const t=new Map;return e?(e.querySelectorAll(MI).forEach((e=>{const n=NI(e.textContent);n&&!t.has(n)&&t.set(n,(e=>{const t=e.closest('section, article, .wp-block-group, .wp-block-cover, [id^="bBlocks"], [data-block]');return t&&1===t.querySelectorAll(MI).length?t:e})(e))})),t):t},PI=(e,t,n)=>{const o=hI(t);if(!e||!o)return null;const i=e.getElementById(o);if(i)return i;const a=NI(o);return a&&(n||LI(e)).get(a)||null};class EI{constructor(e,{updateHash:t=!0,manageFocus:n=!0,preview:o=!1}={}){this.nav=e,this.doc=e.ownerDocument,this.win=this.doc.defaultView||window,this.updateHash=t,this.manageFocus=n,this.preview=o,this.items=Array.from(e.querySelectorAll(`.${UB}-item`)),this.bubble=e.querySelector(`.${UB}-bubble`),this.offset=parseInt(e.dataset.offset,10)||0,this.speed=parseInt(e.dataset.speed,10)||0,this.smooth="1"===e.dataset.smooth,this.spy="1"===e.dataset.spy,this.hideMissing="1"===e.dataset.hideMissing,this.scroller=null,this.active=-1,this.raf=0,this.scrollRaf=0,this.resizeRaf=0,this.listeners=[],this.targets=new Map,this.headings=new Map,this.sync(),this.bindClicks(),this.observe(),this.watchDOM(),this.onScroll()}findScroller(){const e=this.items.map((e=>this.target(e))).find(Boolean)||this.nav;let t=e?.parentElement,n=null;for(;t&&t!==this.doc.body&&t!==this.doc.documentElement;){const e=this.win.getComputedStyle(t);/(auto|scroll|overlay)/.test(e.overflowY)&&t.scrollHeight>t.clientHeight+1&&(n=t),t=t.parentElement}return n}view(){const e=this.scroller;return e?{top:e.scrollTop,height:e.clientHeight,edge:e.getBoundingClientRect().top,extent:e.scrollHeight}:{top:this.win.scrollY,height:this.win.innerHeight,edge:0,extent:Math.max(this.doc.documentElement?.scrollHeight||0,this.doc.body?.scrollHeight||0)}}topOf(e){return e.getBoundingClientRect().top-this.view().edge}scrollToY(e){this.scroller?this.scroller.scrollTop=e:this.win.scrollTo(this.win.scrollX,e)}currentOffset(){const e=this.win.innerWidth||0,t=e=>{const t=parseFloat(this.nav.dataset[e]);return isNaN(t)?null:t},n=640>=e?t("offsetMobile"):null,o=1024>=e?t("offsetTablet"):null;return n??o??this.offset}target(e){if(this.targets.has(e))return this.targets.get(e);const t=PI(this.doc,e.dataset.target,this.headings);return this.targets.set(e,t),t}sync(){this.targets=new Map,this.headings=LI(this.doc),this.scroller=this.findScroller();const e=this.items.filter((e=>!this.target(e))),t=e.length===this.items.length,n=this.hideMissing&&!t;this.items.forEach((t=>{const o=n&&e.includes(t);t.hidden=o;const i=t.querySelector(`.${UB}-link`);i&&(i.tabIndex=o?-1:0)})),t&&e.length&&!this.warned&&(this.warned=!0)}bindClicks(){this.items.forEach(((e,t)=>{const n=e.querySelector(`.${UB}-link`);if(!n)return;const o=n=>{this.boxOf(e)&&(n.preventDefault(),this.scrollTo(this.target(e),t))};n.addEventListener("click",o),this.listeners.push((()=>n.removeEventListener("click",o)))}))}scrollTo(e,t){const n=this.currentOffset(),o=Math.max(0,this.view().top+this.topOf(e)-n),i=()=>{if(!this.manageFocus)return;const t=e.hasAttribute("tabindex"),n=e.style.outline;t||(e.setAttribute("tabindex","-1"),e.style.outline="none"),e.focus({preventScroll:!0}),t||e.addEventListener("blur",(()=>{e.removeAttribute("tabindex"),e.style.outline=n}),{once:!0})};if(this.setActive(t),
508 -this.updateHash&&e.id&&this.win.history?.replaceState&&this.win.history.replaceState(null,"",`#${e.id}`),!this.smooth||(a=this.win,a.matchMedia?.("(prefers-reduced-motion: reduce)").matches)||!this.speed)return this.scrollToY(o),void i();var a;this.win.cancelAnimationFrame(this.raf);const s=this.view().top,r=this.win.performance.now(),l=e=>{const t=Math.min(1,(e-r)/this.speed);var n;this.scrollToY(s+(o-s)*(.5>(n=t)?4*n*n*n:1-Math.pow(-2*n+2,3)/2)),1>t?this.raf=this.win.requestAnimationFrame(l):i()};this.raf=this.win.requestAnimationFrame(l)}setActive(e){e!==this.active&&(this.active=e,this.paint(),this.items.forEach(((t,n)=>{const o=t.querySelector(`.${UB}-link`);t.classList.toggle("is-active",n===e),o&&(n===e?o.setAttribute("aria-current","true"):o.removeAttribute("aria-current"))})),this.moveBubble())}moveBubble(){if(!this.bubble)return;const e=this.items[this.active];if(!e||e.hidden)return void(this.bubble.style.opacity="0");this.bubble.style.opacity="0.2";const t=this.nav.querySelector(`.${UB}-list`),n=t&&"row"===this.win.getComputedStyle(t).flexDirection;this.bubble.style.transform=n?`translateX(${e.offsetLeft+e.offsetWidth/2}px)`:`translateY(${e.offsetTop+e.offsetHeight/2}px)`}rootMargin(){const e=this.currentOffset();return`-${e}px 0px -${Math.max(0,this.view().height-e-1)}px 0px`}boxOf(e){if(e.hidden)return null;const t=this.target(e);return t&&t.getClientRects().length?{top:this.topOf(t)}:null}currentIndex(){const e=this.currentOffset();let t=-1,n=-1/0;if(this.items.forEach(((o,i)=>{const a=this.boxOf(o);a&&a.top<=e&&a.top>n&&(n=a.top,t=i)})),-1===t){const e=this.view().height/2;return this.items.some(((n,o)=>{const i=this.boxOf(n);return!(!i||i.top>=e||(t=o,0))})),-1===t?this.firstIndex():t}if(!this.atEnd())return t;let o=t;return this.items.forEach(((e,n)=>{if(n<=t)return;const i=this.boxOf(e);i&&i.top<this.view().height&&(o=n)})),o}firstIndex(){if(!this.preview)return-1;const e=this.items.findIndex((e=>!e.hidden));return 0>e?-1:e}atEnd(){const{top:e,height:t,extent:n}=this.view();return n>t+1&&e+t>=n-2}observe(){this.spy&&this.win.IntersectionObserver&&(this.margin=this.rootMargin(),this.observer=new this.win.IntersectionObserver((()=>this.setActive(this.currentIndex())),{root:this.scroller,rootMargin:this.margin,threshold:0}),this.items.forEach((e=>{const t=this.target(e);t&&this.observer.observe(t)})))}paint(){const e=this.currentOffset();this.items.forEach(((t,n)=>{const o=-1!==this.active&&n<this.active;t.classList.toggle("is-passed",o);const i=t.querySelector(`.${UB}-ring-bar`);if(!i)return;if(n!==this.active)return i.style.strokeDashoffset=o?"0":"100",void(i.style.opacity=o?"1":"0");const a=this.target(t);if(!a)return;const s=e-this.topOf(a),r=Math.min(1,Math.max(0,s/(a.offsetHeight||1)));i.style.strokeDashoffset=String(100-100*r),i.style.opacity=0<r?"1":"0"}))}onScroll(){const e=()=>{this.scrollRaf=0,this.spy&&this.setActive(this.currentIndex()),this.paint()},t=()=>{this.scrollRaf||(this.scrollRaf=this.win.requestAnimationFrame(e))},n=()=>{this.resizeRaf||(this.resizeRaf=this.win.requestAnimationFrame((()=>{this.resizeRaf=0,this.relayout()})))},o=this.scroller||this.win;o.addEventListener("scroll",t,{passive:!0}),this.win.addEventListener("resize",n,{passive:!0}),this.listeners.push((()=>{o.removeEventListener("scroll",t),this.win.removeEventListener("resize",n)})),e()}relayout(){this.observer&&this.margin!==this.rootMargin()&&(this.observer.disconnect(),this.observe()),this.moveBubble(),this.paint()}watchDOM(){if(!this.win.MutationObserver)return;let e=0;this.mutation=new this.win.MutationObserver((()=>{this.win.cancelAnimationFrame(e),e=this.win.requestAnimationFrame((()=>{this.sync(),this.observer?.disconnect(),this.observe(),this.moveBubble()}))})),this.mutation.observe(this.doc.body,{childList:!0,subtree:!0,characterData:!0})}destroy(){this.win.cancelAnimationFrame(this.raf),this.win.cancelAnimationFrame(this.scrollRaf),this.win.cancelAnimationFrame(this.resizeRaf),this.observer?.disconnect(),this.mutation?.disconnect(),this.listeners.forEach((e=>e())),this.listeners=[]}}const AI=({icon:e={},label:t})=>{const{type:n="icon",icon:o="",img:i={},url:a="",alt:s="",svg:r=""}=e;if("none"===n)return null;if("image"===n){const e="string"==typeof i?{url:i}:i||{},n=e.url||a;return n?(0,l.jsx)("span",{className:`${UB}-icon is-image`,children:(0,l.jsx)("img",{src:n,alt:e.alt||s||t||""})}):null}const c="svg"===n?r:o;return c?(0,l.jsx)("span",{className:`${UB}-icon is-${"svg"===n?"svg":"icon"}`,dangerouslySetInnerHTML:{__html:c}}):null},BI=()=>(0,l.jsxs)("svg",{className:`${UB}-ring`,viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,l.jsx)("circle",{className:`${UB}-ring-track`,cx:"12",cy:"12",r:"9"}),(0,l.jsx)("circle",{className:`${UB}-ring-bar`,cx:"12",cy:"12",r:"9",pathLength:"100"})]}),II=(0,m.forwardRef)((({attributes:e,isBackend:t=!1},n=null)=>{const{items:o=[],layout:i={},behavior:a={},media:s={}}=e,r=i.preset||"glassBullseye",c=!rI(r),d="numberedSteps"===r&&!s.showIcon;return(0,l.jsxs)("div",{ref:n,className:fI(e),role:"navigation","aria-label":"Page sections","data-preset":r,"data-spy":a.scrollSpy?"1":"0","data-smooth":a.smoothScroll?"1":"0","data-hide-missing":a.hideMissingSections?"1":"0","data-speed":parseInt(a.scrollSpeed,10)||0,"data-offset":parseInt(a?.desktop?.scrollOffset,10)||0,"data-offset-tablet":a?.tablet?.scrollOffset??"","data-offset-mobile":a?.mobile?.scrollOffset??"",children:["magneticBubble"===r&&(0,l.jsx)("span",{className:`${UB}-bubble`,"aria-hidden":"true"}),(0,l.jsx)("ul",{className:`${UB}-list`,children:o.map(((e,n)=>{const o=hI(e.sectionId),i=o?`#${o}`:void 0,a=t?"button":"a";return(0,l.jsxs)("li",{className:`${UB}-item${o?"":" is-unlinked"}`,"data-target":o,children:[(0,l.jsxs)(a,{className:`${UB}-link`,...t?{type:"button"}:{href:i},"aria-label":e.label||void 0,children:[(0,l.jsxs)("span",{className:`${UB}-marker`,children:[d&&(0,l.jsx)("span",{className:`${UB}-number`,children:gI(n)}),!d&&(0,l.jsx)(AI,{icon:e.icon,label:e.label}),"glassBullseye"===r&&(0,l.jsx)(BI,{})]}),(0,l.jsx)("span",{className:c?`${UB}-label`:`${UB}-label ${UB}-tooltip`,children:e.label})]}),t&&!o&&(0,l.jsx)("span",{className:`${UB}-warning`,children:"No section chosen — this item is hidden on the front end."})]},e.id||n)}))})]})}));II.displayName="OnePageNavigation";const OI=II,RI=(e,t)=>e?`calc(${e} * ${t})`:"",zI=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:a={},layout:s={},marker:r={},item:c={},media:d={},label:u={},line:p={},bubble:h={},number:g={},animation:m={}}=e,b=s.preset||"glassBullseye",f=`#${o}`,x=`${f} .${UB}`,y=`${x} .${UB}-list`,v=`${x} .${UB}-link`,k=`${x} .is-active .${UB}-link`,w=`${x} .${UB}-marker`,_=`${x} .is-active .${UB}-marker`,C=`${v}:hover .${UB}-marker`,j=`${x} .${UB}-label`,$=`${x} .${UB}-tooltip`,S=`${x} .${UB}-number`,T=`${x} .${UB}-icon`,N=aI(b)&&d.showIcon?"::before":"",M=`${T}.is-icon, ${T}.is-svg`,L=`${T}.is-image`,P=`${x} .${UB}-bubble`,E=`${x} .${UB}-ring circle`,A=`${x} .${UB}-ring-track`,B=(e,t)=>t.replace(/\s+/g," ").trim()?`${e}{ ${t} }`:"",I=yI(b),O=I?v:w,R=I?`${v}:hover`:C,z=I?k:`${_}${"magneticBubble"===b?"::before":""}`,D={item:c,line:p,layout:s},F={normal:jI(D,"normal"),hover:jI(D,"hover"),active:jI(D,"active")},H=e=>!!(e?.width||e?.top||e?.right||e?.bottom||e?.left),W=e=>wI(b)&&H(e)?as(e):"",U=e=>Array.isArray(e)&&e.length?e.map((e=>ds(e))).join(", "):"",G=e=>e?.color||("string"==typeof e?e:""),V=e=>os(TI(e)).trim(),q={glassBullseye:`\n\t\t\t${B(`${x} .${UB}-ring-bar`,ns("stroke",p.progressColor))}\n\t\t\t${B(`${x} .is-passed .${UB}-link`,ns("color",F.active.color))}\n\t\t`,magneticBubble:`\n\t\t\t${B(`${y}::before`,ns("background",p.color))}\n\t\t\t${B(w,ns("border-color",p.color))}\n\t\t\t${B(_,"background: none; border-color: transparent;")}\n\t\t\t${B(P,ns("background",G(F.active.background)))}\n\t\t`,
509 -numberedSteps:`\n\t\t\t${B(`${y}::before`,ns("background",p.color))}\n\t\t\t${B(w,ns("border-color",p.color))}\n\t\t\t${B(C,ns("border-color",F.hover.color))}\n\t\t\t${B(_,ns("border-color",G(F.active.background)))}\n\t\t`,expandablePills:"",stackedCards:`\n\t\t\t${B(v,ns("border-color",p.color))}\n\t\t\t${B(k,ns("border-color",G(F.active.background)))}\n\t\t`,sideRail:`\n\t\t\t${B(`${y}::before`,ns("background",p.color))}\n\t\t`},Y=I?"":N,K=`\n\t\t${B(v,ns("color",F.normal.color))}\n\t\t${B(`${O}${Y}`,V(F.normal.background))}\n\t\t${B(w,ns("color",F.normal.markerColor))}\n\n\t\t${B(`${v}:hover`,ns("color",F.hover.color))}\n\t\t${B(`${R}${Y}`,V(F.hover.background))}\n\t\t${B(C,ns("color",F.hover.markerColor))}\n\n\t\t${B(k,ns("color",F.active.color))}\n\t\t${B(`${z}${Y}`,V(F.active.background))}\n\t\t${B(_,ns("color",F.active.markerColor))}\n\t\t${B(`${x} .is-active .${UB}-number, ${x} .is-active .${UB}-icon`,ns("color",F.active.markerColor))}\n\n\t\t${_I(b)?`\n\t\t\t${B(A,ns("stroke",c?.normal?.ringColor))}\n\t\t\t${B(`${v}:hover .${UB}-ring-track`,ns("stroke",c?.hover?.ringColor))}\n\t\t\t${B(`${x} .is-active .${UB}-ring-track`,ns("stroke",c?.active?.ringColor))}\n\t\t`:""}\n\n\t\t${B(`${O}${Y}`,ns("box-shadow",U(c?.normal?.shadow)))}\n\t\t${B(`${R}${Y}`,ns("box-shadow",U(c?.hover?.shadow)))}\n\t\t${B(`${z}${Y}`,ns("box-shadow",U(c?.active?.shadow)))}\n\t`,Q=G(F.active.background)||F.active.color,Z={pulseRing:B(`${_}::after`,ns("border-color",Q)),radar:B(`${_}::after`,ns("background",Q)),breathingGlow:B(`${_}::after`,ns("color",Q)),heartbeat:""},X=e=>{const t="mobile"===e?"12px":"24px",n=pI(s,e,"offsetX","")||t,o=pI(s,e,"offsetY","")||t,i=mI(s,e,"position","right"),a=mI(s,e,"verticalAlign","center"),r="left"===i?"left: calc(100% + 12px); right: auto;":"right: calc(100% + 12px); left: auto;";return`\n\t\t\t${B(f,`${"left"===i?`left: ${n}; right: auto;`:`right: ${n}; left: auto;`} ${"top"===a?`top: ${o}; bottom: auto; transform: none;`:"bottom"===a?`bottom: ${o}; top: auto; transform: none;`:"top: 50%; bottom: auto; transform: translateY(-50%);"}`)}\n\t\t\t${B($,r)}\n\t\t`},J=t=>{const n=r?.[t]?.size,o=p?.[t]?.thickness,i=c?.[t]?.spacing,a=c?.[t]?.width||n,s={glassBullseye:`\n\t\t\t\t${B(w,`\n\t\t\t\t\t${ns("width",n)}\n\t\t\t\t\t${ns("height",n)}\n\t\t\t\t`)}\n\t\t\t`,magneticBubble:`\n\t\t\t\t${B(`${y}::before`,`\n\t\t\t\t\t${ns("left",RI(a,.5))}\n\t\t\t\t\t${ns("width",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(w,`\n\t\t\t\t\t${ns("width",n)}\n\t\t\t\t\t${ns("height",n)}\n\t\t\t\t\t${ns("border-width",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(`${_}::before`,ns("inset",RI(n,-.285)))}\n\t\t\t\t${B(P,`\n\t\t\t\t\t${ns("left",RI(a,.5))}\n\t\t\t\t\t${ns("width",RI(n,2))}\n\t\t\t\t\t${ns("height",RI(n,2))}\n\t\t\t\t\t${n?`margin: ${RI(n,-1)} 0 0 ${RI(n,-1)};`:""}\n\t\t\t\t`)}\n\t\t\t\t${(()=>{const n=h?.[t]||{};if("desktop"!==t&&!n.iconPosition&&!n.x&&!n.y)return"";const o=nI(e,t),i=pI(h,t,"x","0px"),a=pI(h,t,"y","0px");return`\n\t\t\t\t${B(`${x} .${UB}-icon`,"center"===o?"transform: none;":`transform: translate(${"left"===o?`calc(${i} * -1)`:i}, ${a});`)}\n\t\t\t\t${B(`${x} .is-active .${UB}-icon`,ns("color","center"===o?F.active.markerColor:F.active.color))}\n\t\t\t`})()}\n\t\t\t`,numberedSteps:`\n\t\t\t\t${B(`${y}::before`,`\n\t\t\t\t\t${ns("left",RI(a,.5))}\n\t\t\t\t\t${ns("width",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(w,`\n\t\t\t\t\t${ns("width",n)}\n\t\t\t\t\t${ns("border-width",o)}\n\t\t\t\t`)}\n\t\t\t`,expandablePills:B(w,`\n\t\t\t\t${ns("width",n)}\n\t\t\t\t${ns("height",n)}\n\t\t\t`),stackedCards:`\n\t\t\t\t${B(w,`\n\t\t\t\t\t${ns("width",n)}\n\t\t\t\t\t${ns("height",n)}\n\t\t\t\t`)}\n\t\t\t\t${B(v,ns("border-width",o))}\n\t\t\t`,sideRail:`\n\t\t\t\t${B(`${y}::before`,ns("width",o))}\n\t\t\t\t${B(`${w}${N}`,`\n\t\t\t\t\t${ns("width",n)}\n\t\t\t\t\t${ns("height",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(`${C}${N}`,ns("width",RI(n,1.25)))}\n\t\t\t\t${B(`${_}${N}`,ns("width",RI(n,1.5)))}\n\t\t\t`};return`\n\t\t\t${B(y,ns("gap",i))}\n\t\t\t${B(v,rI(b)?"":ns("gap",u?.[t]?.gap))}\n\t\t\t${B($,rI(b)?ns("border-radius",hs(u?.[t]?.radius)):"")}\n\t\t\t${B(j,ns("padding",hs(u?.[t]?.padding)))}\n\t\t\t${s[b]||""}\n\t\t`},ee=`\n\t\t${B(M,ns("color",d.color))}\n\t\t${B(`${M} svg, ${M} svg path`,ns("fill",d.color))}\n\t\t${B(`${v}:hover .${UB}-icon.is-icon, ${v}:hover .${UB}-icon.is-svg`,ns("color",d.hoverColor))}\n\t\t${B(`${v}:hover .${UB}-icon.is-icon svg path, ${v}:hover .${UB}-icon.is-svg svg path`,ns("fill",d.hoverColor))}\n\t\t${B(`${x} .is-active .${UB}-icon.is-icon, ${x} .is-active .${UB}-icon.is-svg`,ns("color",d.activeColor))}\n\t\t${B(`${x} .is-active .${UB}-icon.is-icon svg path, ${x} .is-active .${UB}-icon.is-svg svg path`,ns("fill",d.activeColor))}\n\t`,te=e=>{const t=c?.[e]||{},n=t.width;return`\n\t\t\t${B(O,`\n\t\t\t\t${vI(b)?ns("padding",hs(t.padding)):""}\n\t\t\t\t${ns("border-radius",hs(t.radius))}\n\t\t\t\t${ns("width",n)}\n\t\t\t\t${ns("min-width",n)}\n\t\t\t\t${ns("height",t.height)}\n\t\t\t`)}\n\t\t\t${_I(b)?B(E,ns("stroke-width",t.ringSize)):""}\n\t\t`},ne=e=>{const t=d?.[e]?.size,n=d?.[e]?.width,o=d?.[e]?.height,i=hs(d?.[e]?.radius),a=d?.[e]?.objectFit||("desktop"===e?d.objectFit:"");return`\n\t\t\t${B(M,`\n\t\t\t\t${ns("width",t)}\n\t\t\t\t${ns("height",t)}\n\t\t\t`)}\n\t\t\t${B(L,`\n\t\t\t\t${ns("width",n)}\n\t\t\t\t${ns("height",o)}\n\t\t\t\t${ns("border-radius",i)}\n\t\t\t`)}\n\t\t\t${B(`${L} img`,(e=>"contain"===e?"width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;":e?`width: 100%; height: 100%; ${ns("object-fit",e)}`:"")(a))}\n\t\t`},oe=m.pulse&&uI(b,"animation"),ie=oe?B(`${_}::after`,ns("animation-duration",m.speed)):"",ae=`\n\t\t${ps("",u.typo)?.googleFontLink}\n\t\t${ps("",g.typo)?.googleFontLink}\n\t\t${ps(j,u.typo)?.styles}\n\t\t${ps(S,g.typo)?.styles}\n\n\t\t${B($,`\n\t\t\t${V(u.tooltipBackground)}\n\t\t\t${ns("color",u.tooltipText)}\n\t\t\t${se=u.border,rI(b)&&H(se)?as(se):""}\n\t\t`)}\n\t\t${q[b]||""}\n\t\t${K}\n\t\t${lI(e)?`\n\t\t${B(S,ns("color",$I(g,"normal")))}\n\t\t${B(`${v}:hover .${UB}-number`,ns("color",$I(g,"hover")))}\n\t\t${B(`${x} .is-active .${UB}-number`,ns("color",$I(g,"active")))}\n\t`:""}\n\t\t${dI(e)?ee:""}\n\t\t${oe?Z[m.style]??Z.pulseRing:""}\n\t\t${ie}\n\n\t\t${X("desktop")}\n\t\t${J("desktop")}\n\t\t${te("desktop")}\n\t\t${dI(e)?ne("desktop"):""}\n\n\t\t${t}{\n\t\t\t${X("tablet")}\n\t\t\t${J("tablet")}\n\t\t\t${te("tablet")}\n\t\t\t\t${dI(e)?ne("tablet"):""}\n\t\t}\n\n\t\t${n}{\n\t\t\t${X("mobile")}\n\t\t\t${J("mobile")}\n\t\t\t${te("mobile")}\n\t\t\t\t${dI(e)?ne("mobile"):""}\n\t\t}\n\n\t\t${B(O,W(F.normal.border))}\n\t\t${B(R,W(F.hover.border))}\n\t\t${B(z,W(F.active.border))}\n\n\t\t${_s(o,a,i,!1)}\n\n\t\t`;var se,re;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:(re=ae,re.replace(/[^{}]+\{\s*\}/g,"").replace(/[^{}]+\{\s*\}/g,""))}})},DI=({attributes:e,updateObj:t})=>{const{animation:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Active Pulse","b-blocks"),checked:n.pulse,onChange:e=>t("animation",e,"pulse")}),n.pulse&&(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Pulse Style","b-blocks"),value:n.style||"pulseRing",options:QB,onChange:e=>t("animation",e,"style"),__nextHasNoMarginBottom:!0}),n.pulse&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0 mt10",children:(0,x.__)("Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{value:n.speed,onChange:e=>t("animation",void 0===e?"":e,"speed"),units:[{label:"s",value:"s"},{label:"ms",value:"ms"}],__next40pxDefaultSize:!0})]})]})},FI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{layout:o={},behavior:i={}}=e,a=mI(o,n,"verticalAlign","center"),s=(e,i)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt10",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:pI(o,n,i,""),onChange:e=>t("layout",void 0===e?"":e,n,i),__next40pxDefaultSize:!0})]});return(0,
510 -l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Scroll Spy","b-blocks"),checked:i.scrollSpy,onChange:e=>t("behavior",e,"scrollSpy"),help:(0,x.__)("Highlights the item whose section is currently in view.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Smooth Scroll","b-blocks"),checked:i.smoothScroll,onChange:e=>t("behavior",e,"smoothScroll"),help:(0,x.__)("Off, a click jumps straight to the section.","b-blocks")}),(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:mI(o,n,"position","right"),onChange:e=>t("layout",e,n,"position"),children:YB.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Vertical Align","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:mI(o,n,"verticalAlign","center"),onChange:e=>t("layout",e,n,"verticalAlign"),children:KB.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),s((0,x.__)("Horizontal Offset","b-blocks"),"offsetX"),"center"!==a&&s((0,x.__)("Vertical Offset","b-blocks"),"offsetY"),((e,o,{units:a,help:s}={})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt10",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:pI(i,n,o,""),onChange:e=>t("behavior",void 0===e?"":e,n,o),units:a,help:s,__next40pxDefaultSize:!0})]}))((0,x.__)("Scroll Offset","b-blocks"),"scrollOffset",{units:[{label:"px",value:"px"}],help:(0,x.__)("Keeps the target clear of a sticky header.","b-blocks")}),(0,l.jsx)(v,{className:"mb0 mt10",children:(0,x.__)("Scroll Speed","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:parseInt(i.scrollSpeed,10)||0,onChange:e=>t("behavior",void 0===e?600:e,"scrollSpeed"),min:0,max:2e3,step:50,allowReset:!0,resetFallbackValue:600,help:(0,x.__)("How long the scroll takes. Higher = slower.","b-blocks"),__nextHasNoMarginBottom:!0})]})},HI=({attributes:e,setAttributes:t,index:n})=>{const{items:o=[]}=e,i=o[n]||{},a=i.icon||{},{data:s}=jd("bBlocksUtils"),{refetch:r}=Cd("b-blocks-enable-svg-mime-type",{_wpnonce:s?.nonce},!1),c=new Tt,d=(e,...i)=>t({items:be(o,e,n,...i)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0",children:(0,x.__)("Icon Type","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a.type||"icon",onChange:e=>d(e,"icon","type"),children:ZB.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),"icon"===(a.type||"icon")&&(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon Library","b-blocks"),value:a.icon,onChange:e=>d(e,"icon","icon")}),"image"===a.type&&(0,l.jsx)(we,{height:"90%",width:"90%",className:"mt10",label:(0,x.__)("Upload Image","b-blocks"),types:XB,value:a.img,onChange:e=>d(e||{},"icon","img")}),"image"===a.type&&(0,l.jsx)("small",{children:(0,x.__)("Recommended: PNG, JPEG, WebP, GIF or AVIF.","b-blocks")}),"svg"===a.type&&(0,l.jsx)(we,{className:"mt10",label:(0,x.__)("Upload SVG","b-blocks"),types:JB,onClick:async()=>($d(),r()),value:{url:a.svg},onChange:async e=>d(e?.url?await c.sanitizeFile(e.url):"","icon","svg"),isSvgEnabled:!0}),"svg"===a.type&&(0,l.jsx)("small",{children:(0,x.__)("Recommended: image/svg+xml. The file is sanitised on upload.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Label","b-blocks"),value:i.label||"",onChange:e=>d(e,"label"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Section ID","b-blocks"),value:i.sectionId||"",onChange:e=>d(hI(e),"sectionId"),help:(0,x.__)("The section's ID, or the heading of the section to scroll to. Without the # symbol.","b-blocks"),__nextHasNoMarginBottom:!0})]})},WI=e=>{const{attributes:t,setAttributes:n,updateObj:o}=e,{behavior:i={},items:a=[]}=t,[s,r]=(0,m.useState)(0),c=(0,m.useCallback)((e=>{const t=a[e]||{};n({items:[...a.slice(0,e+1),{...t,id:GB()},...a.slice(e+1)]}),r(e+1)}),[JSON.stringify(a)]),d={id:GB(),label:(0,x.__)("New Section","b-blocks"),sectionId:"",icon:{type:"icon",icon:"",img:{url:"",id:""},svg:""}};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(_a,{attributes:t,setAttributes:n,activeIndex:s,setActiveIndex:r,arrKey:"items",minItem:1,ItemSettings:HI,itemLabel:(0,x.__)("Item","b-blocks"),newItem:d,handleCopy:c,title:"label",design:"sortable"}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Hide items with missing sections","b-blocks"),checked:i.hideMissingSections,onChange:e=>o("behavior",e,"hideMissingSections"),help:(0,x.__)("Auto-hide items whose section is not on the page.","b-blocks")})]})},UI=({attributes:e,setAttributes:t})=>{const{layout:n={},animation:o={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Choose A Style","b-blocks"),value:n.preset||"glassBullseye",options:qB,onChange:e=>t({layout:{...n,preset:e},animation:{...o,pulse:"magneticBubble"===e}}),help:(0,x.__)("Pick how the navigation menu looks on your page.","b-blocks"),__nextHasNoMarginBottom:!0})})},GI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{bubble:o={}}=e,i="center"!==nI(e,n),a=(e,i)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt10",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:pI(o,n,i,""),onChange:e=>t("bubble",void 0===e?"":e,n,i),__next40pxDefaultSize:!0})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Bubble","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(v,{className:"mb0",children:[(0,x.__)("Icon Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:pI(o,n,"iconPosition",o.iconPosition||"auto"),onChange:e=>t("bubble",e,n,"iconPosition"),children:tI.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)("small",{children:(0,x.__)("Center keeps the icon in the node. Auto lifts it out away from the edge the block sits on.","b-blocks")}),i&&(0,l.jsxs)(l.Fragment,{children:[a((0,x.__)("Icon Horizontal Offset","b-blocks"),"x"),a((0,x.__)("Icon Vertical Offset","b-blocks"),"y")]})]})},VI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{item:o={},number:i={},layout:a={}}=e,[s,r]=(0,m.useState)("normal"),c=jI(e,s,!0),d=wI(a.preset||"glassBullseye"),u=((e={})=>!lI(e)&&(!cI.includes(e?.layout?.preset||"glassBullseye")||dI(e)))(e),p=_I(a.preset),h=vI(a.preset||"glassBullseye"),g=lI(e),b=(e,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:pI(o,n,i,""),onChange:e=>t("item",void 0===e?"":e,n,i),__next40pxDefaultSize:!0})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Item","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>r(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Active","b-blocks"),value:"active"})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:c.color,onChange:e=>t("item",e,s,"color")
511 -}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:TI(c.background),onChange:e=>t("item",e,s,"background")}),u&&(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Marker Color","b-blocks"),value:c.markerColor,onChange:e=>t("item",e,s,"markerColor"),help:(0,x.__)("The icon or number inside the marker. Icon / Image sets a drawn icon on its own.","b-blocks")}),g&&(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Number Color","b-blocks"),value:$I(i,s),onChange:e=>t("number",e,s,"color")}),p&&(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Ring Color","b-blocks"),value:o?.[s]?.ringColor,onChange:e=>t("item",e,s,"ringColor"),help:(0,x.__)("The circle around the marker. Its filled part is Line / Track ▸ Progress Color.","b-blocks")}),d&&(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt20",label:(0,x.__)("Border","b-blocks"),value:c.border,onChange:e=>t("item",e,s,"border"),__next40pxDefaultSize:!0}),(0,l.jsx)(yt,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:o?.[s]?.shadow,onChange:e=>t("item",e,s,"shadow")}),h&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:SI(o,n,"padding"),onChange:e=>t("item",e,n,"padding")})]}),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:SI(o,n,"radius"),onChange:e=>t("item",e,n,"radius")}),p&&b((0,x.__)("Ring Size","b-blocks"),"ringSize"),b((0,x.__)("Spacing","b-blocks"),"spacing"),b((0,x.__)("Width","b-blocks"),"width"),b((0,x.__)("Height","b-blocks"),"height")]})},qI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{label:o={},layout:i={}}=e,a=rI(i.preset||"glassBullseye");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:a?(0,x.__)("Label / Tooltip","b-blocks"):(0,x.__)("Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:o.typo,onChange:e=>t("label",e,"typo"),defaults:{fontSize:{desktop:13}}}),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:SI(o,n,"padding"),onChange:e=>t("label",e,n,"padding")}),!a&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:pI(o,n,"gap",""),onChange:e=>t("label",void 0===e?"":e,n,"gap"),__next40pxDefaultSize:!0})]}),a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Tooltip Background","b-blocks"),value:TI(o.tooltipBackground),onChange:e=>t("label",e,"tooltipBackground")}),(0,l.jsx)(Ue,{label:(0,x.__)("Tooltip Text","b-blocks"),value:o.tooltipText,onChange:e=>t("label",e,"tooltipText")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("label",e,"border"),__next40pxDefaultSize:!0}),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:SI(o,n,"radius"),onChange:e=>t("label",e,n,"radius")})]})]})},YI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{line:o={},layout:i={}}=e,a=_I(i.preset);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line / Track","b-blocks"),initialOpen:!1,children:[!a&&(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color,onChange:e=>t("line",e,"color")}),a&&(0,l.jsx)(Ue,{label:(0,x.__)("Progress Color","b-blocks"),value:o.progressColor,onChange:e=>t("line",e,"progressColor")}),!a&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Thickness","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:pI(o,n,"thickness",""),onChange:e=>t("line",void 0===e?"":e,n,"thickness"),__next40pxDefaultSize:!0})]})]})},KI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{marker:o={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Marker","b-blocks"),initialOpen:!1,children:(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:pI(o,n,"size",""),onChange:e=>t("marker",void 0===e?"":e,n,"size"),__next40pxDefaultSize:!0})]})})},QI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{media:o={},layout:i={},items:a=[]}=e,s=aI(i.preset||"glassBullseye"),r=dI(e),c=((e=[])=>e.some((e=>"image"===e?.icon?.type)))(a),d=(e,i,{help:a}={})=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:pI(o,n,i,""),onChange:e=>t("media",void 0===e?"":e,n,i),help:a,__next40pxDefaultSize:!0})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon / Image","b-blocks"),initialOpen:!1,children:[s&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:!!o.showIcon,onChange:e=>t("media",e,"showIcon")}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0",children:(0,x.__)("Icon","b-blocks")}),d((0,x.__)("Size","b-blocks"),"size"),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:o.color,onChange:e=>t("media",e,"color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color","b-blocks"),value:o.hoverColor,onChange:e=>t("media",e,"hoverColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Active Color","b-blocks"),value:o.activeColor,onChange:e=>t("media",e,"activeColor")})]}),c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Image","b-blocks")}),d((0,x.__)("Width","b-blocks"),"width"),d((0,x.__)("Height","b-blocks"),"height"),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:SI(o,n,"radius"),onChange:e=>t("media",e,n,"radius")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2",children:[(0,x.__)("Object Fit","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:pI(o,n,"objectFit","contain"),options:eI,onChange:e=>t("media",e,n,"objectFit"),__nextHasNoMarginBottom:!0})]})]})]})},ZI=({attributes:e,updateObj:t})=>{const{number:n={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Number","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("number",e,"typo"),defaults:{fontSize:{desktop:15}}})})},XI=e=>{const t=e.attributes?.layout?.preset||"glassBullseye",n=e=>uI(t,e);return(0,l.jsxs)(l.Fragment,{children:[n("marker")&&(0,l.jsx)(KI,{...e}),n("item")&&(0,l.jsx)(VI,{...e}),(0,l.jsx)(QI,{...e}),n("number")&&lI(e.attributes)&&(0,l.jsx)(ZI,{...e}),n("label")&&(0,l.jsx)(qI,{...e}),n("line")&&(0,l.jsx)(YI,{...e}),n("bubble")&&(0,l.jsx)(GI,{...e})]})},JI=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i,layout:a={}}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:VB,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(UI,{...e}),(0,l.jsx)(WI,{...e}),(0,l.jsx)(FI,{...e}),uI(a.preset||"glassBullseye","animation")&&(0,l.jsx)(DI,{...e})]}),"style"===t.name&&(0,l.jsx)(XI,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},eO=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i,layout:a={},items:s=[]}=t,r="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,c=fe(t,n),d=(0,m.useRef)(null),u=((e=[],t)=>{const[n,o]=(0,m.useState)(""),i=e.map((e=>hI(e.sectionId))).join("|");return(0,m.useEffect)((()=>{
512 -const e=t?.current?.ownerDocument;if(!e)return;const n=e.defaultView||window;let a=0;const s=()=>{const t=LI(e),n=i.split("|").reduce(((n,o,i)=>(o&&!PI(e,o,t)&&n.push(i),n)),[]).join(",");o((e=>e===n?e:n))};s();const r=new n.MutationObserver((()=>{a||(a=setTimeout((()=>{a=0,s()}),500))}));return r.observe(e.body,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["id"]}),()=>{clearTimeout(a),r.disconnect()}}),[i,t]),(0,m.useMemo)((()=>n?n.split(",").map(Number):[]),[n])})(s,d),p=o.slice(0,12);var g,b;(0,m.useEffect)((()=>{i!==p&&n({blockId:p})}),[p]),g=d,b=JSON.stringify([s.map((e=>e.sectionId)),a.preset,a.desktop,t.behavior]),(0,m.useEffect)((()=>{const e=g?.current;if(!e)return;const t=new EI(e,{updateHash:!1,manageFocus:!1,preview:!0});return()=>t.destroy()}),[g,b]);const f=`block-${o}`,x=(0,h.useBlockProps)({className:bI(t)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(JI,{...e,updateObj:c,isPremium:r,unresolved:u}),(0,l.jsxs)("div",{...x,children:[(0,l.jsx)(zI,{attributes:t,id:f,isBackend:!0}),(0,l.jsx)(OI,{ref:d,attributes:t,isBackend:!0})]})]})}));Ll(WB.name)&&(0,p.registerBlockType)(WB,{icon:Pr,edit:eO,save:()=>null});const tO=JSON.parse('{"apiVersion":3,"name":"b-blocks/posts","title":"Posts","description":"Display blog posts.","category":"bBlocks","keywords":["Show Posts","Blog Posts","Category Posts"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"layout":{"type":"string","default":"grid"},"subLayout":{"type":"string","default":"default"},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"number","default":15},"rowGap":{"type":"number","default":15},"isContentEqualHight":{"type":"boolean","default":true},"sliderHeight":{"type":"string","default":"350px"},"content":{"type":"object","default":{"height":"auto"}},"postType":{"type":"string","default":"post"},"selectedTaxonomies":{"type":"object","default":{}},"selectedCategories":{"type":"array","default":[]},"selectedTags":{"type":"array","default":[]},"isPostsPerPageAll":{"type":"boolean","default":false},"postsPerPage":{"type":"number","default":12},"postsOrderBy":{"type":"string","default":"date"},"postsOrder":{"type":"string","default":"desc"},"postsOffset":{"type":"number","default":0},"postsInclude":{"type":"array","default":[]},"postsExclude":{"type":"array","default":[]},"isExcludeCurrent":{"type":"boolean","default":false},"isPagination":{"type":"boolean","default":false},"paginationCurrentPage":{"type":"number","default":1},"paginationPrevLabel":{"type":"string","default":"Prev"},"paginationNextLabel":{"type":"string","default":"Next"},"paginationColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"paginationHovColors":{"type":"object","default":{"color":"#fff","bg":"#070127"}},"paginationPadding":{"type":"object","default":{"vertical":"8px","horizontal":"15px"}},"paginationSpacing":{"type":"string","default":"15px"},"contentAlign":{"type":"string","default":"left"},"contentBG":{"type":"object","default":{"color":""}},"contentPadding":{"type":"object","default":{"vertical":"20px","horizontal":"25px"}},"border":{"type":"object","default":{"width":"1px","color":"#0c0d3c1a","radius":"5px"}},"sliderIsLoop":{"type":"boolean","default":true},"sliderIsTouchMove":{"type":"boolean","default":false},"sliderIsAutoplay":{"type":"boolean","default":true},"sliderAutoplayOptions":{"type":"object","default":{"delay":1.5}},"sliderSpeed":{"type":"number","default":1.5},"sliderEffect":{"type":"string","default":"slide"},"sliderIsPage":{"type":"boolean","default":true},"sliderIsPageClickable":{"type":"boolean","default":true},"sliderIsPageDynamic":{"type":"boolean","default":true},"sliderPageColor":{"type":"string","default":"#146EF5"},"sliderPageWidth":{"type":"string","default":"15px"},"sliderPageHeight":{"type":"string","default":"15px"},"sliderPageBorder":{"type":"object","default":{"radius":"50%"}},"sliderIsPrevNext":{"type":"boolean","default":true},"sliderPrevNextColor":{"type":"string","default":"#146EF5"},"tickerDirection":{"type":"string","default":"up"},"tickerSpeed":{"type":"string","default":"slow"},"tickerInterval":{"type":"number","default":2000},"tickerHeight":{"type":"string","default":"0px"},"tickerVisible":{"type":"number","default":3},"tickerIsMousePause":{"type":"boolean","default":true},"elementsSort":{"type":"array","default":["title","meta"]},"isFImg":{"type":"boolean","default":true},"fImgSize":{"type":"string","default":"full"},"fImgFitting":{"type":"string","default":"cover"},"isFImgLink":{"type":"boolean","default":false},"isTitle":{"type":"boolean","default":true},"isTitleLink":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontFamily":"Roboto","fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"},"googleFontLink":"https://fonts.googleapis.com/css2?family=Roboto&display=swap"}},"titleColor":{"type":"string","default":""},"titleMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isMeta":{"type":"boolean","default":true},"isMetaAuthor":{"type":"boolean","default":true},"isMetaAuthorLink":{"type":"boolean","default":true},"metaAuthorIcon":{"type":"string","default":""},"isMetaDate":{"type":"boolean","default":true},"metaDateFormat":{"type":"string","default":"M j, Y"},"metaDateIcon":{"type":"string","default":""},"isMetaCategory":{"type":"boolean","default":true},"metaCategoryIn":{"type":"string","default":"content"},"metaCategoryIcon":{"type":"string","default":""},"metaTaxonomies":{"type":"object","default":{"selected":[]}},"isMetaReadTime":{"type":"boolean","default":false},"metaReadTimeIcon":{"type":"string","default":""},"isMetaReadTimeSec":{"type":"boolean","default":false},"metaReadTimeLabel":{"type":"string","default":"Min read"},"isMetaComment":{"type":"boolean","default":false},"metaCommentIcon":{"type":"string","default":""},"metaTypo":{"type":"object","default":{"fontSize":{"desktop":"13px"},"textTransform":"uppercase"}},"metaTextColor":{"type":"string","default":""},"metaLinkColor":{"type":"string","default":"#146EF5"},"metaIconColor":{"type":"string","default":""},"metaColorsOnImage":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"metaMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isExcerpt":{"type":"boolean","default":true},"isExcerptFromContent":{"type":"boolean","default":false},"isEllipsisOnExcerpt":{"type":"boolean","default":false},"excerptLength":{"type":"number","default":25},"excerptAlign":{"type":"string","default":"justify"},"excerptTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"excerptColor":{"type":"string","default":""},"excerptMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isReadMore":{"type":"boolean","default":true},"readMorePosition":{"type":"string","default":"auto"},"readMoreLabel":{"type":"string","default":"Read More"},"isLinkNewTab":{"type":"boolean","default":false},"readMoreAlign":{"type":"string","default":"left"},"readMoreTypo":{"type":"object","default":{"fontSize":{"desktop":"14px"},"textTransform":"uppercase","fontWeight":600}},"readMoreColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"readMoreHovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"readMorePadding":{"type":"object","default":{"vertical":"12px","horizontal":"35px"}},"readMoreBorder":{"type":"object","default":{"radius":"3px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","dashicons"],"render":"file:./render.php","viewScript":["file:./view.js","wp-util"]}'),nO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 271.673 271.673",children:[(0,l.jsx)("path",{
513 -d:"M114.939,0H10.449C4.678,0,0,4.678,0,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449V10.449C125.388,4.678,120.71,0,114.939,0z"}),(0,l.jsx)("path",{d:"M261.224,0h-104.49c-5.771,0-10.449,4.678-10.449,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449V10.449C271.673,4.678,266.995,0,261.224,0z"}),(0,l.jsx)("path",{d:"M114.939,146.286H10.449C4.678,146.286,0,150.964,0,156.735v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449v-104.49C125.388,150.964,120.71,146.286,114.939,146.286z"}),(0,l.jsx)("path",{d:"M261.224,146.286h-104.49c-5.771,0-10.449,4.678-10.449,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449v-104.49C271.673,150.964,266.995,146.286,261.224,146.286z"})]}),oO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 500 500",children:[(0,l.jsx)("path",{d:"M0 0L220 0L220 500L0 500L0 0Z"}),(0,l.jsx)("path",{d:"M280 280L500 280L500 500L280 500L280 280Z"}),(0,l.jsx)("path",{d:"M280 0L370 0L370 220L280 220L280 0Z"}),(0,l.jsx)("path",{d:"M410 0L500 0L500 220L410 220L410 0Z"})]}),iO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 48 48",children:[(0,l.jsx)("rect",{height:"29.498",width:"21.07",y:"-0.033"}),(0,l.jsx)("rect",{height:"29.498",width:"21.07",x:"26.93",y:"18.535"}),(0,l.jsx)("rect",{height:"13.695",width:"21.07",x:"26.93",y:"-0.033"}),(0,l.jsx)("rect",{height:"13.695",width:"21.07",y:"34.338"})]}),aO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{cx:"7",cy:"18",r:"1"}),(0,l.jsx)("path",{d:"m7.707 12.293c.391.391.391 1.023 0 1.414-.195.195-.451.293-.707.293s-.512-.098-.707-.293l-3-3c-.391-.391-.391-1.023 0-1.414l3-3c.391-.391 1.023-.391 1.414 0s.391 1.023 0 1.414l-2.293 2.293z"}),(0,l.jsx)("circle",{cx:"12",cy:"18",r:"1"}),(0,l.jsx)("circle",{cx:"17",cy:"18",r:"1"}),(0,l.jsx)("path",{d:"m20.707 10.707-3 3c-.195.195-.451.293-.707.293s-.512-.098-.707-.293c-.391-.391-.391-1.023 0-1.414l2.293-2.293-2.293-2.293c-.391-.391-.391-1.023 0-1.414s1.023-.391 1.414 0l3 3c.391.391.391 1.023 0 1.414z"}),(0,l.jsx)("path",{d:"m21 24h-18c-1.654 0-3-1.346-3-3v-18c0-1.654 1.346-3 3-3h18c1.654 0 3 1.346 3 3v18c0 1.654-1.346 3-3 3zm-18-22c-.552 0-1 .449-1 1v18c0 .551.448 1 1 1h18c.552 0 1-.449 1-1v-18c0-.551-.448-1-1-1z"})]}),sO=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 512 512",style:{transform:"rotate(90deg)"},children:(0,l.jsx)("path",{d:"M0,45.3v421.4h512V45.3H0z M482.1,436.8H29.9V76h452.1V436.8z M140.2,327.3l-70.9-70.9l70.9-70.9l21.3,21.3 l-49.6,49.6l49.6,49.6L140.2,327.3z M350.5,306l49.6-49.6l-49.6-49.6l21.3-21.3l70.9,70.9l-70.9,70.9L350.5,306z"})}),rO=[{label:(0,x.__)("Grid","b-blocks"),value:"grid",icon:nO},{label:(0,x.__)("Grid 1","b-blocks"),value:"grid1",icon:oO},{label:(0,x.__)("Masonry","b-blocks"),value:"masonry",icon:iO},{label:(0,x.__)("Slider","b-blocks"),value:"slider",icon:aO},{label:(0,x.__)("Ticker","b-blocks"),value:"ticker",icon:sO}],lO=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Title Meta","b-blocks"),value:"title-meta"},{label:(0,x.__)("Left Image","b-blocks"),value:"left-image"},{label:(0,x.__)("Right Image","b-blocks"),value:"right-image"},{label:(0,x.__)("Overlay Content","b-blocks"),value:"overlay-content"},{label:(0,x.__)("Overlay Content Hover","b-blocks"),value:"overlay-content-hover"},{label:(0,x.__)("Overlay Box","b-blocks"),value:"overlay-box"},{label:(0,x.__)("Overlay Content Box","b-blocks"),value:"overlay-content-box"},{label:(0,x.__)("Overlay Half Content","b-blocks"),value:"overlay-half-content"}],cO=[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Fill Available Space","b-blocks"),value:"fill"}],dO=[{label:(0,x.__)("Content","b-blocks"),value:"content"},{label:(0,x.__)("Image","b-blocks"),value:"image"}],uO=[{label:(0,x.__)("Slide","b-blocks"),value:"slide"},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Creative","b-blocks"),value:"creative"}],pO=[{label:(0,x.__)("Up","b-blocks"),value:"up"},{label:(0,x.__)("Down","b-blocks"),value:"down"}],hO=[{label:(0,x.__)("Author","b-blocks"),value:"author"},{label:(0,x.__)("Title","b-blocks"),value:"title"},{label:(0,x.__)("Date","b-blocks"),value:"date"},{label:(0,x.__)("Last Modified","b-blocks"),value:"modified"}],gO=[{label:(0,x.__)("Ascending","b-blocks"),value:"asc"},{label:(0,x.__)("Descending","b-blocks"),value:"desc"}],mO=[{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"}],bO=((0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),(0,x.__)("Justify","b-blocks"),[{label:(0,x.__)("01/15/2022","b-blocks"),value:"m/d/Y"},{label:(0,x.__)("15/01/2022","b-blocks"),value:"d/m/Y"},{label:(0,x.__)("January 15, 2022","b-blocks"),value:"F d, Y"},{label:(0,x.__)("Jan 15, 2022","b-blocks"),value:"M d, Y"},{label:(0,x.__)("15th Jan, 2022","b-blocks"),value:"dS M, Y"},{label:(0,x.__)("15th January, 2022","b-blocks"),value:"dS F, Y"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}]),fO=[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],xO=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"elements",title:(0,x.__)("Elements","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],yO=e=>e?.trim().split(",").map((e=>e?parseInt(e):e)),vO=e=>e?.filter((e=>e&&!isNaN(e))),kO=e=>e?(e?.replace(/(<([^>]+)>)/gi,"").split(/\s+/)||[]).length:0,wO=e=>(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:e}}),_O=({[t]:__,...e},t)=>e,CO=(e,t)=>e?.map((e=>e.id))?.filter((e=>-1!==t.indexOf(e))),jO=(...e)=>e.reduce(((e,t)=>("string"==typeof t?e.push(t):"object"==typeof t&&Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e)),[]).join(" "),$O=(e=[],t)=>{switch(t){case"true":return e?.filter((e=>e.password));case"false":return e?.filter((e=>!e.password));default:return e}},SO=({attributes:e,setAttributes:t,premiumProps:n})=>{const{tickerDirection:o,tickerSpeed:i,tickerInterval:a,tickerHeight:s,tickerVisible:r,tickerIsMousePause:c}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Ticker Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Direction:","b-blocks"),value:o,onChange:e=>t({tickerDirection:e}),options:pO,...n,Component:Tn}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Speed:","b-blocks"),value:i,onChange:e=>t({tickerSpeed:e}),...n,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Values: slow, medium, fast or any value in milliseconds.","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Interval:","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({tickerInterval:parseInt(e)}),...n,Component:y.__experimentalNumberControl}),(0,l.jsx)("small",{children:(0,x.__)("Values: time in milliseconds.","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({tickerHeight:e}),units:[Pe(),Ae()],...n,Component:y.__experimentalUnitControl}),(0,l.jsx)("small",{children:(0,x.__)("Keep height 0, to auto height.","b-blocks")}),"0px"===s||"0em"===s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Post Visible:","b-blocks"),value:r,onChange:e=>t({tickerVisible:e}),min:0,max:12,step:1,beforeIcon:"visibility",...n,Component:y.RangeControl}),(0,l.jsx)("small",{children:(0,x.__)("0 to display all","b-blocks")})]}):"",(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Ticker Mouse Pause","b-blocks"),checked:c,onChange:e=>t({tickerIsMousePause:e}),...n,Component:y.ToggleControl})]})},TO=({attributes:e,setAttributes:t})=>{
514 -const{sliderIsLoop:n,sliderIsTouchMove:o,sliderIsAutoplay:i,sliderAutoplayOptions:a,sliderSpeed:s,sliderEffect:r,sliderIsPage:c,sliderIsPageClickable:d,sliderIsPageDynamic:u,sliderIsPrevNext:p}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Loop","b-blocks"),checked:n,onChange:e=>t({sliderIsLoop:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Touch Move","b-blocks"),checked:o,onChange:e=>t({sliderIsTouchMove:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Autoplay","b-blocks"),checked:i,onChange:e=>t({sliderIsAutoplay:e})}),i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Autoplay Delay (s):","content-slider-block")}),(0,l.jsx)(y.RangeControl,{value:a.delay,onChange:e=>t({sliderAutoplayOptions:{...a,delay:e}}),min:0,max:10,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Smaller delay value will be autoplay faster","content-slider-block")})]}),(0,l.jsx)(v,{children:(0,x.__)("Speed (s):","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:s,onChange:e=>t({sliderSpeed:e}),min:0,max:10,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Smaller speed & delay value will be slide faster","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Effect:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:r,onChange:e=>t({sliderEffect:e}),options:uO})]}),(0,l.jsx)("small",{children:(0,x.__)("To work fade & creative effects properly, set single column per view","b-blocks")}),(0,l.jsx)(v,{children:(0,l.jsx)("strong",{children:(0,x.__)("Pagination:","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Pagination","b-blocks"),checked:c,onChange:e=>t({sliderIsPage:e})}),c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Clickable","b-blocks"),checked:d,onChange:e=>t({sliderIsPageClickable:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Dynamic Bullets","b-blocks"),checked:u,onChange:e=>t({sliderIsPageDynamic:e})})]}),(0,l.jsx)(v,{children:(0,l.jsx)("strong",{children:(0,x.__)("Preview Next Button:","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Preview Next Button","b-blocks"),checked:p,onChange:e=>t({sliderIsPrevNext:e})})]})},NO=({attributes:e,setAttributes:t,premiumProps:n})=>{const{isPagination:i,paginationPrevLabel:a,paginationNextLabel:s,paginationColors:r,paginationHovColors:c,paginationPadding:d,paginationSpacing:u}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Show Pagination","b-blocks"),checked:i,onChange:e=>t({isPagination:e}),...n,Component:y.ToggleControl}),(0,l.jsx)("small",{children:(0,x.__)("Pagination will not work if, 'Show All Posts' is enable","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Previous Label:","b-blocks"),value:a,onChange:e=>t({paginationPrevLabel:e}),...n,Component:y.TextControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Next Label:","b-blocks"),value:s,onChange:e=>t({paginationNextLabel:e}),...n,Component:y.TextControl}),(0,l.jsx)(Ya,{label:(0,x.__)("Colors:","b-blocks"),value:r,onChange:e=>t({paginationColors:e}),defaults:{color:"#fff",bg:o},...n,Component:On}),(0,l.jsx)(Ya,{label:(0,x.__)("Active & Hover Colors:","b-blocks"),value:c,onChange:e=>t({paginationHovColors:e}),defaults:{color:"#fff",bg:"#070127"},...n,Component:On}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:d,onChange:e=>t({paginationPadding:e}),defaults:{vertical:"8px",horizontal:"15px"},...n,Component:id}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Space Between:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({paginationSpacing:e}),units:[Pe(),Ae()],...n,Component:y.__experimentalUnitControl})]})},MO=(0,f.withSelect)(((e,{attributes:t})=>{const{getPostTypes:n,getTaxonomies:o,getEntityRecords:i}=e("core"),{getDeviceType:a,getCurrentPostType:s,getCurrentPostId:r}=e("core/editor"),{postType:l}=t,c=o({per_page:-1});return{device:a()?.toLowerCase(),postTypes:n({per_page:-1})?.filter((e=>!["apb","attachment","nav_menu_item"].includes(e.slug)&&!e.slug.startsWith("wp_")))?.map((({name:e,slug:t})=>({label:e,value:t}))),currentPostType:s(),currentPostId:r(),allTaxonomies:"post"===l?c?.filter((e=>e.types.includes("post"))).filter((e=>"category"!==e.slug&&"post_tag"!==e.slug)):c?.filter((e=>e.types.includes(l))),getTaxonomy:e=>i("taxonomy",e,{per_page:-1})}}))((({attributes:e,setAttributes:t,premiumProps:n,postTypes:i,currentPostType:s,allTaxonomies:r,getTaxonomy:c,device:d})=>{const{layout:u,subLayout:p,columns:h,columnGap:g,rowGap:m,isContentEqualHight:b,sliderHeight:f,content:k,postType:w,selectedTaxonomies:C,selectedCategories:j,selectedTags:$,isPostsPerPageAll:S,postsPerPage:T,postsOrderBy:N,postsOrder:M,postsOffset:L,postsInclude:P,postsExclude:E,isExcludeCurrent:A}=e,B="grid"===u,I="grid1"===u,O="slider"===u,R="ticker"===u,z={attributes:e,setAttributes:t,premiumProps:n};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/advanced-post-block"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(Ka,{value:u,onChange:e=>{t({layout:e,subLayout:["slider","ticker"].includes(e)&&["default","title-meta"].includes(p)||"ticker"===e&&"overlay-half-content"===p?"left-image":p,columns:["slider","ticker"].includes(e)?{...h,desktop:2}:h})},options:rO,isTextIcon:!0,proValues:["grid1"],...n}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Sub Layout:","b-blocks")}),(0,l.jsx)(Za,{value:p,onChange:e=>{t({subLayout:e}),"default"===e||"title-meta"===e||"left-image"===e||"right-image"===e?t({contentBG:{color:""},titleColor:o,metaCategoryIn:"image",metaTextColor:"",metaLinkColor:a,metaIconColor:o,excerptColor:""}):"overlay-content"===e||"overlay-content-hover"===e||"overlay-box"===e||"overlay-content-box"===e?t({contentBG:{color:"#000000b3"},titleColor:"#e7f0fe",metaCategoryIn:"content",metaTextColor:"#fff",metaLinkColor:"#b6d2fc",metaIconColor:"#e7f0fe",excerptColor:"#fff"}):"overlay-half-content"===e&&t({contentBG:{type:"gradient",gradient:"linear-gradient(0deg, #000000bf 0%, #0000 100%)"},titleColor:"#fff",metaCategoryIn:"content",metaTextColor:"#fff",metaLinkColor:"#b6d2fc",metaIconColor:"#e7f0fe",excerptColor:"#fff"}),t("left-image"===e||"right-image"===e?{columns:{...h,desktop:2}}:{columns:{...h,desktop:3}}),t("overlay-box"===e||"overlay-content-box"===e?{contentAlign:"center"}:{contentAlign:"left"})},options:I?lO.filter((e=>!["left-image","right-image"].includes(e.value))):O?lO.filter((e=>!["default","title-meta"].includes(e.value))):R?lO.filter((e=>!["overlay-half-content"].includes(e.value))):lO,proValues:["overlay-content-box","overlay-half-content"],...n})]}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when sub layout will be changed.","b-blocks")}),!I&&!R&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:h[d],onChange:e=>{t({columns:{...h,[d]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"})]}),!R&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Column Gap:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:g,onChange:e=>t({columnGap:e}),min:0,max:100,step:1,beforeIcon:"arrow-right-alt"})]}),!O&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Row Gap:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:m,onChange:e=>t({rowGap:e}),min:0,max:150,step:1,beforeIcon:"arrow-down-alt"})]}),(B||I)&&(0,
515 -l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Post Equal Height","b-blocks"),checked:b,onChange:e=>t({isContentEqualHight:e})}),O&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Slider Min Height:","b-blocks"),labelPosition:"left",value:f,onChange:e=>t({sliderHeight:e}),units:[Pe(),Ae(),Oe()]}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Content/Texts Height:","b-blocks"),labelPosition:"left",value:k?.height,onChange:e=>t({content:{...k,height:e}}),options:cO,...n,Component:y.SelectControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Posts Query","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Post Type:","b-blocks")}),(0,l.jsx)(Za,{value:w,onChange:e=>t({postType:e,selectedTaxonomies:[]}),options:i,proValues:["page"],...n})]}),"post"===w&&c("category")?.length?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Select Categories:","b-blocks")}),(0,l.jsx)(Sa,{value:CO(c("category"),j).map((e=>e.toString())),onChange:e=>t({selectedCategories:e.map((e=>parseInt(e)))}),options:c("category").map((e=>({label:e.name,value:e.id.toString()})))})]}):null,"post"===w&&c("post_tag")?.length?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Select Tags:","b-blocks"),value:CO(c("post_tag"),$).map((e=>e.toString())),onChange:e=>t({selectedTags:e.map((e=>parseInt(e)))}),options:c("post_tag").map((e=>({label:e.name,value:e.id.toString()}))),...n,Component:Sa})}):null,r?.length?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Select Taxonomies for filter:","b-blocks")}),r.map((e=>{const o=Object.keys(C).includes(e.slug);return(0,l.jsx)(Ya,{label:e.name,checked:o,onChange:n=>t({selectedTaxonomies:n?{...C,[e.slug]:[]}:_O(C,e.slug)}),...n,Component:y.CheckboxControl},e.slug)}))]}):null,r?.length&&Object.keys(C)?.length?Object.keys(C).map((e=>c(e)?.length?(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)(`Select ${r?.find((t=>t.slug===e))?.name}:`,"b-blocks"),value:CO(c(e),C[e]).map((e=>e.toString())),onChange:n=>t({selectedTaxonomies:{...C,[e]:n.map((e=>parseInt(e)))}}),options:c(e).map((e=>({label:e.name,value:e.id.toString()}))),...n,Component:Sa},e):null)):null,(0,l.jsx)(v,{children:(0,x.__)("Post Per Page:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:T,onChange:e=>t({postsPerPage:e,isPostsPerPageAll:-1===e}),min:-1,max:36,step:1}),(0,l.jsx)("small",{children:(0,x.__)("To show all posts set -1","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Post Order By:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:N,onChange:e=>t({postsOrderBy:e}),options:hO})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Post Order:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:M,onChange:e=>t({postsOrder:e}),options:gO})]}),!S&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Post Offset:","b-blocks"),labelPosition:"left",value:L,onChange:e=>t({postsOffset:parseInt(e)}),min:0,...n,Component:y.__experimentalNumberControl}),(0,l.jsx)("small",{children:(0,x.__)("`Post Offset` will not work if `Post Per Page` is -1","b-blocks")})]}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Include Posts:","b-blocks"),value:P?.join(","),onChange:e=>t({postsInclude:yO(e)}),...n,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter the posts id by coma separated Ex: `23,45,16`","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Exclude Posts:","b-blocks"),value:E?.join(","),onChange:e=>t({postsExclude:yO(e)}),...n,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter the posts id by coma separated Ex: `23,45,16`","b-blocks")}),s===w&&(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Exclude Current Post","b-blocks"),checked:A,onChange:e=>t({isExcludeCurrent:e}),...n,Component:y.ToggleControl})]}),O||R||S?"":(0,l.jsx)(NO,{...z}),O&&(0,l.jsx)(TO,{...z}),R&&(0,l.jsx)(SO,{...z})]})})),LO=(0,f.withSelect)((e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes?.map((e=>({label:e.name,value:e.slug})))})))((({attributes:e,setAttributes:t,premiumProps:n,taxOfPostType:o,updateObj:i,imageSizes:a})=>{const{elementsSort:s,isFImg:r,fImgSize:c,fImgFitting:d,isFImgLink:u,isTitle:p,isTitleLink:h,isMeta:g,isMetaAuthor:b,isMetaAuthorLink:f,metaAuthorIcon:k,isMetaDate:w,metaDateFormat:_,metaDateIcon:C,isMetaCategory:j,metaCategoryIn:$,metaCategoryIcon:S,metaTaxonomies:T={},isMetaReadTime:N,metaReadTimeIcon:M,isMetaReadTimeSec:L,metaReadTimeLabel:P,isMetaComment:E,metaCommentIcon:A,isExcerpt:B,isExcerptFromContent:I,isEllipsisOnExcerpt:O,excerptLength:R,isReadMore:z,readMorePosition:D,readMoreLabel:F,isLinkNewTab:H}=e,[W,U]=(0,m.useState)(bO.find((e=>e.value===_))?.value||"custom");return(0,l.jsxs)(l.Fragment,{children:[p&&g&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),children:(0,l.jsx)(Ya,{label:(0,x.__)("Sort Element:"),value:s,onChange:e=>t({elementsSort:e}),...n,Component:Ma})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Feature Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Feature Image","b-blocks"),checked:r,onChange:e=>t({isFImg:e})}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Size:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({fImgSize:e}),options:a,...n,Component:y.SelectControl}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Fitting:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({fImgFitting:e}),options:mO}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Link","b-blocks"),checked:u,onChange:e=>t({isFImgLink:e})})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:p,onChange:e=>t({isTitle:e})}),p&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Title Link","b-blocks"),checked:h,onChange:e=>t({isTitleLink:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta Data","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Meta Data","b-blocks"),checked:g,onChange:e=>t({isMeta:e})}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Author","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Author","b-blocks"),checked:b,onChange:e=>t({isMetaAuthor:e})}),b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Author Link","b-blocks"),checked:f,onChange:e=>t({isMetaAuthorLink:e}),...n,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Author Icon:","b-blocks"),value:k,types:["image"],onChange:e=>t({metaAuthorIcon:e}),placeholder:(0,x.__)("Enter Author Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Date","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Date","b-blocks"),checked:w,onChange:e=>t({isMetaDate:e})}),w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Date Format:","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"gap15",children:[(0,l.jsx)(Ya,{value:W,onChange:e=>{U(e),t({metaDateFormat:"custom"==e?"Y-m-d":e})},options:bO,...n,Component:y.SelectControl}),"custom"===W&&(0,l.jsx)(Ya,{value:_,onChange:e=>t({metaDateFormat:e}),...n,Component:y.TextControl})]}),"custom"===W&&(0,l.jsxs)("small",{children:[(0,x.__)("Documentation on date formatting in ","b-blocks")," ",(0,l.jsx)("a",{href:"https://wordpress.org/support/article/formatting-date-and-time/",target:"_blank",rel:"noreferrer","aria-label":"Documentation on Date Formatting",children:"here"}),"."]
516 -}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Date Icon:","b-blocks"),value:C,types:["image"],onChange:e=>t({metaDateIcon:e}),placeholder:(0,x.__)("Enter Date Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Category","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Category","b-blocks"),checked:j,onChange:e=>t({isMetaCategory:e})}),j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Tn,{label:(0,x.__)("Category In:","b-blocks"),value:$,onChange:e=>t({metaCategoryIn:e}),options:dO}),"content"===$&&(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Category Icon:","b-blocks"),value:S,types:["image"],onChange:e=>t({metaCategoryIcon:e}),placeholder:(0,x.__)("Enter Category Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Taxonomies","b-blocks")})}),o?.map(((e,o)=>{const{selected:a=[]}=T,{name:s,slug:r}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:o?"mt20":"",label:(0,x.__)(`Show ${s} Taxonomy`,"b-blocks"),checked:a?.includes(r),onChange:e=>{const n={...T};e?n[r]={}:delete n[r],n.selected=e?[...a,r]:a?.filter((e=>e!==r)),t({metaTaxonomies:n})},...n,Component:y.ToggleControl},r),a?.includes(r)&&(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)(`${s} Icon:`,"b-blocks"),value:T?.[r]?.icon,types:["image"],onChange:e=>i("metaTaxonomies",r,e,"icon"),placeholder:(0,x.__)(`Enter ${s} Icon URL`,"b-blocks"),...n,Component:ve})]})})),(0,l.jsx)("hr",{}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Reading Time","b-blocks")})}),(0,l.jsx)(Ya,{label:(0,x.__)("Show Reading Time","b-blocks"),checked:N,onChange:e=>t({isMetaReadTime:e}),...n,Component:y.ToggleControl}),(N||!n?.isPremium)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("small",{children:(0,x.__)("Reading Time will be displayed if the post has content!","b-blocks")}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show Reading Time Seconds","b-blocks"),checked:L,onChange:e=>t({isMetaReadTimeSec:e}),...n,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Reading Time Label:","b-blocks"),value:P,onChange:e=>t({metaReadTimeLabel:e}),placeholder:(0,x.__)("Reading Time Label"),...n,Component:y.TextControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Reading Time Icon:","b-blocks"),value:M,types:["image"],onChange:e=>t({metaReadTimeIcon:e}),placeholder:(0,x.__)("Enter Reading Time Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Comment","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Comment","b-blocks"),checked:E,onChange:e=>t({isMetaComment:e})}),E&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("small",{children:(0,x.__)("Comment Count will be displayed if the comment status is open!","b-blocks")}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Comment Icon:","b-blocks"),value:A,types:["image"],onChange:e=>t({metaCommentIcon:e}),placeholder:(0,x.__)("Enter Comment Icon URL","b-blocks"),...n,Component:ve})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Excerpt","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Excerpt","b-blocks"),checked:B,onChange:e=>t({isExcerpt:e})}),B&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt15",label:(0,x.__)("Show Excerpt from Content","b-blocks"),checked:I,onChange:e=>t({isExcerptFromContent:e})}),(0,l.jsx)(Ya,{className:"mt15",label:(0,x.__)("Show Ellipsis","b-blocks"),checked:O,onChange:e=>t({isEllipsisOnExcerpt:e}),...n,Component:y.ToggleControl}),(0,l.jsx)(v,{className:"mt15",children:(0,x.__)("Excerpt Length:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:R,onChange:e=>t({excerptLength:e}),min:-1,max:120,step:1}),(0,l.jsx)("small",{children:(0,x.__)("Set -1 to show all the "+(I?"content":"excerpt"),"b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Read More","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Read More","b-blocks"),checked:z,onChange:e=>t({isReadMore:e})}),z&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Position:","b-blocks"),labelPosition:"left",value:D,onChange:e=>t({readMorePosition:e}),options:fO,...n,Component:y.SelectControl}),(0,l.jsx)("small",{children:(0,x.__)("For the bottom position, select 'Fill Available Space' option for the 'Content/Texts Height' from General->Layout","b-blocks")}),(0,l.jsx)(v,{children:(0,x.__)("Read More Label:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:F,onChange:e=>t({readMoreLabel:""===e?"Read More":e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open link in new tab","b-blocks"),checked:H,onChange:e=>t({isLinkNewTab:e})})]})]})]})})),PO=({attributes:e,setAttributes:t})=>{const{layout:n,contentAlign:i,contentBG:s,contentPadding:r,border:c,sliderIsPage:d,sliderPageColor:u,sliderPageWidth:p,sliderPageHeight:h,sliderPageBorder:g,sliderIsPrevNext:m,sliderPrevNextColor:b,isTitle:f,titleTypo:k,titleColor:w,titleMargin:_,isMeta:C,metaCategoryIn:j,metaTypo:$,metaTextColor:S,metaLinkColor:T,metaIconColor:N,metaColorsOnImage:M,metaMargin:L,isExcerpt:P,excerptAlign:E,excerptTypo:A,excerptColor:B,excerptMargin:I,isReadMore:O,readMoreAlign:R,readMoreTypo:z,readMoreColors:D,readMoreHovColors:F,readMorePadding:H,readMoreBorder:W}=e,U="slider"===n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:i,onChange:e=>t({contentAlign:e}),options:Jt,isIcon:!0})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:s,onChange:e=>t({contentBG:e}),defaults:{color:""}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:r,onChange:e=>t({contentPadding:e}),defaults:{vertical:"20px",horizontal:"25px"}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:c,onChange:e=>t({border:e}),defaults:{width:"1px",color:"#0c0d3c1a",radius:"5px"}})]}),U&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Options","b-blocks"),initialOpen:!1,children:[d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Pagination Bullets Color:","b-blocks"),value:u,onChange:e=>t({sliderPageColor:e}),defaultColor:o}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Width:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({sliderPageWidth:e}),units:[Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Height:","b-blocks"),labelPosition:"left",value:h,onChange:e=>t({sliderPageHeight:e}),units:[Pe(),Ae()]}),(0,l.jsx)(Jc,{label:(0,x.__)("Pagination Border:","b-blocks"),value:g,onChange:e=>t({sliderPageBorder:e}),defaults:{radius:"50%"}})]}),m&&(0,l.jsx)(Ue,{label:(0,x.__)("Preview Next Button Color:","b-blocks"),value:b,onChange:e=>t({sliderPrevNextColor:e}),defaultColor:o})]}),f&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:k,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:w,onChange:e=>t({titleColor:e}),defaultColor:o}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:_,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"15px"}})]}),C&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta Data","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:$,onChange:e=>t({metaTypo:e}),defaults:{fontSize:{desktop:13,tablet:13,mobile:13},textTransform:"uppercase"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),
517 -value:S,onChange:e=>t({metaTextColor:e}),defaultColor:""}),(0,l.jsx)(Ue,{label:(0,x.__)("Link Color:","b-blocks"),value:T,onChange:e=>t({metaLinkColor:e}),defaultColor:o}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:N,onChange:e=>t({metaIconColor:e}),defaultColor:""}),"image"===j&&(0,l.jsx)(On,{label:(0,x.__)("Category Colors On Image:","b-blocks"),value:M,onChange:e=>t({metaColorsOnImage:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:L,onChange:e=>t({metaMargin:e}),defaults:{side:4,bottom:"15px"}})]}),P&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Excerpt","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:E,onChange:e=>t({excerptAlign:e}),options:Jt,isIcon:!0})]}),(0,l.jsx)(Oa,{value:A,onChange:e=>t({excerptTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:B,onChange:e=>t({excerptColor:e}),defaultColor:""}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:I,onChange:e=>t({excerptMargin:e}),defaults:{side:4,bottom:"10px"}})]}),O&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Read More","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Align:","b-blocks")}),(0,l.jsx)(Tn,{value:R,onChange:e=>t({readMoreAlign:e}),options:Jt.filter((e=>"justify"!==e.value)),isIcon:!0})]}),(0,l.jsx)(Oa,{value:z,onChange:e=>t({readMoreTypo:e}),defaults:{fontSize:{desktop:14,tablet:14,mobile:14},textTransform:"uppercase",fontWeight:600}}),(0,l.jsx)(On,{value:D,onChange:e=>t({readMoreColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:F,onChange:e=>t({readMoreHovColors:e}),defaults:{color:"#fff",bg:a}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:H,onChange:e=>t({readMorePadding:e}),defaults:{vertical:"12px",horizontal:"35px"}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:W,onChange:e=>t({readMoreBorder:e}),defaults:{radius:"3px"}})]})]})},EO=({attributes:e,setAttributes:t,isPremium:n,posts:o,taxOfPostType:i})=>{const{contentAlign:a}=e,[s,r]=(0,m.useState)(!1),c=o?.length,d=(n,o,i,a)=>{const s=Rb(e[n],(e=>{a?e[o][a]=i:e[o]=i}));t({[n]:s})},u={attributes:e,setAttributes:t,premiumProps:{isPremium:n,setIsProModalOpen:r}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:xO,onSelect:()=>me(),children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsx)(MO,{...u}),"elements"===e.name&&(0,l.jsx)(LO,{...u,taxOfPostType:i,updateObj:d}),"style"===e.name&&c&&(0,l.jsx)(PO,{...u})]})})}),(0,l.jsxs)(jn,{isProModalOpen:s,setIsProModalOpen:r,block:"Posts",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Layouts: ","b-blocks")}),(0,x.__)("Checkout more layouts and sub layouts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Display Pages: ","b-blocks")}),(0,x.__)("Effortlessly showcase pages, just like you do with posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Tag Filter: ","b-blocks")}),(0,x.__)("Post filter by tags (only for default post).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Custom Taxonomy Filter: ","b-blocks")}),(0,x.__)("Custom Taxonomy filter for post and custom posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Post Offset: ","b-blocks")}),(0,x.__)("Offset to exclude first N posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Include or Exclude Posts: ","b-blocks")}),(0,x.__)("Include or Exclude the posts by ids.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Exclude Current Post: ","b-blocks")}),(0,x.__)("If you use this block in a post and that post type is selected post then you can exclude the post.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Pagination: ","b-blocks")}),(0,x.__)("Add custom pagination bottom of the posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Sort Elements: ","b-blocks")}),(0,x.__)("Sort the title and meta elements.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Meta Data Icon: ","b-blocks")}),(0,x.__)("Custom icon for meta data.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Meta Author Link Toggle: ","b-blocks")}),(0,x.__)("Show meta author with or without link.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Taxonomies in Meta: ","b-blocks")}),(0,x.__)("Display taxonomies within the meta data, including tags.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Reading Time: ","b-blocks")}),(0,x.__)("Show post reading time in meta area.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Excerpt from Content: ","b-blocks")}),(0,x.__)("Show excerpt from main content.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Ticker Layout Options: ","b-blocks")}),(0,x.__)("Options for ticker post layout.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Feature Image Size: ","b-blocks")}),(0,x.__)("Options to set feature image size.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Read More Position: ","b-blocks")}),(0,x.__)("Options to set the position fo Read More button.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Shortcode: ","b-blocks")}),(0,x.__)("Shortcode option to use anywhere.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Update Post Query: ","b-blocks")}),(0,x.__)("Update Post Query using b_blocks_posts_query filter.","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:a,onChange:e=>t({contentAlign:e})})})]})},AO="bBlocksPosts",BO=()=>(0,l.jsxs)("h3",{className:`${AO}Loading`,children:[(0,l.jsx)(y.Spinner,{})," ",(0,x.__)("Loading...","b-blocks")]}),IO=()=>(0,l.jsx)("h3",{className:`${AO}NotFound`,children:(0,x.__)("No posts found!! Please update the query or add some posts","b-blocks")}),OO=({attributes:e,id:t})=>{const{columnGap:n,rowGap:o,isContentEqualHight:i,sliderHeight:a,paginationColors:s,paginationHovColors:r,paginationPadding:c,paginationSpacing:d,fImgFitting:u="cover",contentAlign:p,contentBG:h,contentPadding:g,border:m,sliderPageColor:b,sliderPageWidth:f,sliderPageHeight:x,sliderPageBorder:y,sliderPrevNextColor:v,titleTypo:k,titleColor:w,titleMargin:_,metaTypo:C,metaTextColor:j,metaLinkColor:$,metaIconColor:S,metaColorsOnImage:T,metaMargin:N,excerptAlign:M,excerptTypo:L,excerptColor:P,excerptMargin:E,readMoreAlign:A,readMoreTypo:B,readMoreColors:I,readMoreHovColors:O,readMorePadding:R,readMoreBorder:z}=e,D=`#${t}`,F=`${D} .${AO}Article`,H=`${D} .${AO}LayoutSlider`,W=`${F} .${AO}ElReadMore`,U=`${F} .${AO}ElTitle`,G=`${F} .${AO}ElMeta`,V=`${D} .${AO}Pagination`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
518 -__html:`\n\t\t${ps("",k)?.googleFontLink}\n\t\t${ps("",C)?.googleFontLink}\n\t\t${ps("",L)?.googleFontLink}\n\t\t${ps("",B)?.googleFontLink}\n\t\t${ps(`${U}, ${U} a`,k)?.styles}\n\t\t${ps(`${G}, ${G} *, ${F} .${AO}ElThumbCats`,C)?.styles}\n\t\t${ps(`${F} .${AO}ElExcerpt`,L)?.styles}\n\t\t${ps(`${W} a`,B)?.styles}\n\n\t\t${V} .${AO}PagePrev,\n\t\t${V} .${AO}PageNumber,\n\t\t${V} .${AO}PageNext{\n\t\t\tfont-size: 15px;\n\t\t\t${ss(s)}\n\t\t\tpadding: ${us(c)};\n\t\t\tmargin: 0 calc( ${d} / 2 );\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${V} .${AO}PagePrev,\n\t\t\t${V} .${AO}PageNumber,\n\t\t\t${V} .${AO}PageNext{\n\t\t\t\tfont-size: 12px;\n\t\t\t\tpadding: ${us(c)?.split(" ").map((e=>`calc( ${e} / 2 )`)).join(" ")};\n\t\t\t\tmargin: 0 calc( ${d} / 4 );\n\t\t\t}\n\t\t}\n\t\t${V} .${AO}PagePrev:hover,\n\t\t${V} .${AO}PageNumber:hover,\n\t\t${V} .${AO}PageNext:hover,\n\t\t${V} .${AO}PageActive{\n\t\t\t${ss(r)}\n\t\t}\n\n\t\t${F}{\n\t\t\t${is(m)}\n\t\t}\n\t\t${D} .${AO}SLDefault,\n\t\t${D} .${AO}SLSideImage{\n\t\t\ttext-align: ${p};\n\t\t\t${os(h)}\n\t\t}\n\n\t\t${F} .${AO}ElTexts{\n\t\t\tpadding: ${us(g)};\n\t\t}\n\t\t${D} .${AO}SLOverlay .${AO}ElTexts{\n\t\t\t${os(h)}\n\t\t\talign-items: ${"left"===p?"flex-start":"right"===p?"flex-end":"center"===p?"center":""}\n\t\t}\n\n\t\t${U}, ${U} a{\n\t\t\ttext-align: ${p};\n\t\t\tcolor: ${w};\n\t\t}\n\t\t${U}{\n\t\t\tmargin: ${us(_)};\n\t\t}\n\t\t${G}{\n\t\t\tjustify-content: ${"left"===p?"flex-start":"right"===p?"flex-end":"center"};\n\t\t\tcolor: ${j};\n\t\t\tmargin: ${us(N)};\n\t\t}\n\t\t${G} a{\n\t\t\tcolor: ${$};\n\t\t}\n\t\t${G} .dashicons{\n\t\t\tcolor: ${S};\n\t\t}\n\t\t${F} .${AO}ElThumb img, ${F}.${AO}SLOverlay img{\n\t\t\tobject-fit: ${u};\n\t\t}\n\t\t${F} .${AO}ElThumbCats a{\n\t\t\t${ss(T)}\n\t\t}\n\t\t${F} .${AO}ElExcerpt{\n\t\t\ttext-align: ${M};\n\t\t\tcolor: ${P};\n\t\t\tmargin: ${us(E)};\n\t\t}\n\t\t${W}{\n\t\t\ttext-align: ${A};\n\t\t}\n\t\t${W} a{\n\t\t\t${ss(I)}\n\t\t\tpadding: ${us(R)};\n\t\t\t${is(z)}\n\t\t}\n\t\t${W} a:hover{\n\t\t\t${ss(O)}\n\t\t}\n\n\t\t${D} .${AO}LayoutGrid,\n\t\t${D} .${AO}LayoutGrid1{\n\t\t\tgrid-gap: ${o}px ${n}px;\n\t\t\talign-items: ${!1===i?"start":"initial"};\n\t\t}\n\n\t\t${H},\n\t\t${H} .swiper-slide article{\n\t\t\tmin-height: ${a};\n\t\t}\n\t\t${H} .swiper-pagination .swiper-pagination-bullet{\n\t\t\tbackground: ${b};\n\t\t\twidth: ${f};\n\t\t\theight: ${x};\n\t\t\t${is(y)}\n\t\t}\n\t\t${H} .swiper-button-prev,\n\t\t${H} .swiper-button-next{\n\t\t\tcolor: ${v};\n\t\t}\n\t`.replace(/\s+/g," ")}})},RO=({post:e,attributes:t})=>{const{link:n,thumbnail:{url:o,alt:i},categories:a}=e,{isFImg:s,isFImgLink:r,isMeta:c,isMetaCategory:d,metaCategoryIn:u,isLinkNewTab:p}=t;return s&&o?(0,l.jsxs)("figure",{className:`${AO}ElThumb`,children:[r?(0,l.jsx)("a",{href:n,target:p?"_blank":"_self",rel:"noreferrer","aria-label":i,children:(0,l.jsx)("img",{src:o,alt:i})}):(0,l.jsx)("img",{src:o,alt:i}),c&&d&&"image"===u&&a.space&&(0,l.jsx)("div",{className:`${AO}ElThumbCats`,dangerouslySetInnerHTML:{__html:a.space}})]}):null},zO=({post:e,attributes:t})=>{const{author:n}=e,{name:o,link:i}=n||{},{isMetaAuthor:a,isMetaAuthorLink:s=!0,metaAuthorIcon:r}=t;return a&&o?(0,l.jsxs)("span",{children:[r?(0,l.jsx)("img",{src:r,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-admin-users"}),s?(0,l.jsx)("a",{href:i,target:"_blank",rel:"noreferrer","aria-label":o,children:o}):(0,l.jsx)("span",{children:o})]}):null},DO=({post:e,attributes:t})=>{const{date:n}=e,{isMetaDate:o,metaDateIcon:i}=t;return o&&n?(0,l.jsxs)("span",{children:[i?(0,l.jsx)("img",{src:i,alt:"Date"}):(0,l.jsx)("span",{className:"dashicons dashicons-calendar-alt"}),(0,l.jsx)("span",{children:n})]}):null},FO=({post:e,attributes:t})=>{const{categories:n}=e,{isMetaCategory:o,metaCategoryIn:i,metaCategoryIcon:a}=t;return o&&"content"===i&&n.coma?(0,l.jsxs)("span",{children:[a?(0,l.jsx)("img",{src:a,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-category"}),wO(n.coma)]}):null},HO=({post:e,attributes:t})=>{const{taxonomies:n={}}=e,{metaTaxonomies:o={}}=t,{selected:i=[]}=o;return i.map((e=>{const t=n[e],i=o[e]?.icon,a=i?(0,l.jsx)("img",{src:i,alt:e}):(0,l.jsx)("span",{className:"dashicons "+("post_tag"===e?"dashicons-tag":"dashicons-category")});return t?(0,l.jsxs)("span",{children:[a,wO(t?.split("a><a")?.join("a>, <a"))]},e):null}))},WO=({post:e,attributes:t})=>{const{readTime:n,content:o}=e,{isMetaReadTime:i,metaReadTimeIcon:a,isMetaReadTimeSec:s,metaReadTimeLabel:r}=t,c=s?`${n?.min}:${n?.sec}`:n?.min;return i&&o?(0,l.jsxs)("span",{children:[a?(0,l.jsx)("img",{src:a,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-clock"}),(0,l.jsxs)("span",{children:[c," ",r]})]}):null},UO=({post:e,attributes:t})=>{const{link:n,title:o,commentCount:i,commentStatus:a}=e,{isMetaComment:s,metaCommentIcon:r}=t;return s&&"open"===a?(0,l.jsxs)("span",{children:[r?(0,l.jsx)("img",{src:r,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-admin-comments"}),(0,l.jsx)("a",{href:`${n}/#comments`,target:"_blank",rel:"noreferrer","aria-label":`Comments of ${o}`,children:i})]}):null},GO=({post:e,attributes:t})=>{const{isMeta:n}=t;return n&&(0,l.jsxs)("div",{className:`${AO}ElMeta`,children:[(0,l.jsx)(zO,{post:e,attributes:t}),(0,l.jsx)(DO,{post:e,attributes:t}),(0,l.jsx)(FO,{post:e,attributes:t}),(0,l.jsx)(HO,{post:e,attributes:t}),(0,l.jsx)(WO,{post:e,attributes:t}),(0,l.jsx)(UO,{post:e,attributes:t})]})},VO=({post:e,attributes:t})=>{const{link:n,title:o}=e,{isTitle:i,isTitleLink:a,isLinkNewTab:s}=t;return i?(0,l.jsx)(l.Fragment,{children:a?(0,l.jsx)("h3",{className:`${AO}ElTitle`,children:(0,l.jsx)("a",{href:n,target:s?"_blank":"_self",rel:"noreferrer",dangerouslySetInnerHTML:{__html:o},"aria-label":o})}):(0,l.jsx)("h3",{className:`${AO}ElTitle`,dangerouslySetInnerHTML:{__html:o}})}):null},qO=({post:e,attributes:t})=>{const{elementsSort:n=["title","meta"]}=t;return n.map(((n,o)=>"title"===n?(0,l.jsx)(VO,{post:e,attributes:t},o):(0,l.jsx)(GO,{post:e,attributes:t},o)))},YO=({post:e,attributes:t})=>{const{excerpt:n,content:o}=e,{isExcerpt:i,isExcerptFromContent:a,isEllipsisOnExcerpt:s,excerptLength:r}=t,c=!a&&n?n:o,d=s&&((u=c)?u.split(" ").length:0)>r?"...":"";var u;const p=-1===r?c:`${((e,t)=>e?e.split(/\s+/).slice(0,t).join(" "):"")(c,r)}${d}`;return i&&c?(0,l.jsx)("div",{className:`${AO}ElExcerpt ${AO}InnerContent`,dangerouslySetInnerHTML:{__html:p}}):null},KO=({post:e,attributes:t})=>{const{link:n}=e,{isReadMore:o,readMorePosition:i="auto",readMoreLabel:a,isLinkNewTab:s}=t;return o?(0,l.jsx)("div",{className:`${AO}ElReadMore ${i}`,children:(0,l.jsx)("a",{href:n,target:s?"_blank":"_self",rel:"noreferrer",dangerouslySetInnerHTML:{__html:St(a)},"aria-label":a})}):null},QO=({post:e,attributes:t,postClass:n})=>{const{subLayout:o}=t,i=jO(n,`${AO}SLDefault`);return(0,l.jsxs)("article",{className:i,children:[(0,l.jsx)(RO,{post:e,attributes:t}),(0,l.jsxs)("div",{className:`${AO}ElTexts`,children:[(0,l.jsx)(qO,{post:e,attributes:t}),"title-meta"!==o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(YO,{post:e,attributes:t}),(0,l.jsx)(KO,{post:e,attributes:t})]})]})]})},ZO=({post:e,attributes:t,postClass:n})=>{const{thumbnail:o}=e,{subLayout:i,isFImg:a}=t,s="left-image"===i,r="right-image"===i,c=jO(n,`${AO}SLSideImage`,{grid:a&&o.url,leftImage:s,rightImage:r});return(0,l.jsxs)("article",{className:c,children:[s&&(0,l.jsx)(RO,{post:e,attributes:t}),(0,l.jsxs)("div",{className:`${AO}ElTexts`,children:[(0,l.jsx)(qO,{post:e,attributes:t}),(0,l.jsx)(YO,{post:e,attributes:t}),(0,l.jsx)(KO,{post:e,attributes:t})]}),r&&(0,l.jsx)(RO,{post:e,attributes:t})]})},XO=({post:e,attributes:t,postClass:n})=>{const{title:o,thumbnail:{url:i}}=e,{subLayout:a}=t,s=jO(n,`${AO}SLOverlay`,{[`${AO}SLOverlayHover`]:"overlay-content-hover"===a&&i,[`${AO}SLOverlayBox`]:"overlay-box"===a||"overlay-content-box"===a,[`${AO}SLOverlayHalfContent`]:"overlay-half-content"===a});return(0,l.jsxs)("article",{className:s,children:[i&&(0,
519 -l.jsx)("img",{src:i,alt:o}),(0,l.jsxs)("div",{className:`${AO}ElTexts`,children:[(0,l.jsx)(qO,{post:e,attributes:t}),"overlay-box"!==a&&"overlay-half-content"!==a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(YO,{post:e,attributes:t}),(0,l.jsx)(KO,{post:e,attributes:t})]})]})]})},JO=({post:e,attributes:t})=>{const{subLayout:n,content:o={height:"auto"}}=t,{id:i,thumbnail:a}=e,s=jO(`${AO}Article`,`${AO}Article-${i}`,`${o?.height}ContentHeight`,{hasThumbnail:a.url});switch(n){case"default":case"title-meta":return(0,l.jsx)(QO,{post:e,attributes:t,postClass:s});case"left-image":case"right-image":return(0,l.jsx)(ZO,{post:e,attributes:t,postClass:s});case"overlay-content":case"overlay-content-hover":case"overlay-box":case"overlay-content-box":case"overlay-half-content":return(0,l.jsx)(XO,{post:e,attributes:t,postClass:s});default:return null}};function eR(){return eR=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},eR.apply(this,arguments)}function tR(e,t){return tR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},tR(e,t)}var nR=function(e){var t,n;function o(){var t;return(t=e.call(this)||this).state={columns:[],childRefs:[],hasDistributed:!1},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,tR(t,n);var i=o.prototype;return i.componentDidUpdate=function(){this.state.hasDistributed||this.props.sequential||this.distributeChildren()},o.getDerivedStateFromProps=function(e,t){var n=e.children,i=e.columnsCount,a=i!==t.columns.length;return t&&n===t.children&&!a?null:eR({},o.getEqualCountColumns(n,i),{children:n,hasDistributed:!1})},i.shouldComponentUpdate=function(e){return e.children!==this.state.children||e.columnsCount!==this.props.columnsCount},i.distributeChildren=function(){var e=this,t=this.props,n=t.children,o=t.columnsCount,i=Array(o).fill(0);if(this.state.childRefs.every((function(e){return e.current.getBoundingClientRect().height}))){var a=Array.from({length:o},(function(){return[]})),s=0;b().Children.forEach(n,(function(t){if(t&&b().isValidElement(t)){var n=e.state.childRefs[s].current.getBoundingClientRect().height,o=i.indexOf(Math.min.apply(Math,i));i[o]+=n,a[o].push(t),s++}})),this.setState((function(e){return eR({},e,{columns:a,hasDistributed:!0})}))}},o.getEqualCountColumns=function(e,t){var n=Array.from({length:t},(function(){return[]})),o=0,i=[];return b().Children.forEach(e,(function(e){if(e&&b().isValidElement(e)){var a=b().createRef();i.push(a),n[o%t].push(b().createElement("div",{style:{display:"flex",justifyContent:"stretch"},key:o,ref:a},e)),o++}})),{columns:n,childRefs:i}},i.renderColumns=function(){var e=this.props,t=e.gutter,n=e.itemTag,o=e.itemStyle;return this.state.columns.map((function(e,i){return b().createElement(n,{key:i,style:eR({display:"flex",flexDirection:"column",justifyContent:"flex-start",alignContent:"stretch",flex:1,width:0,gap:t},o)},e.map((function(e){return e})))}))},i.render=function(){var e=this.props,t=e.gutter,n=e.className,o=e.style,i=e.containerTag;return b().createElement(i,{style:eR({display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"stretch",boxSizing:"border-box",width:"100%",gap:t},o),className:n},this.renderColumns())},o}(b().Component);nR.propTypes={},nR.defaultProps={columnsCount:3,gutter:"0",className:null,style:{},containerTag:"div",itemTag:"div",itemStyle:{},sequential:!1};const oR=nR;var iR="undefined"!=typeof window?m.useLayoutEffect:m.useEffect,aR=function(e){var t,n,o,i,a,s=e.columnsCountBreakPoints,r=void 0===s?{350:1,750:2,900:3}:s,l=e.gutterBreakPoints,c=void 0===l?{}:l,d=e.children,u=e.className,p=void 0===u?null:u,h=e.style,g=void 0===h?null:h,f=(t=function(){var e=(0,m.useState)(!1),t=e[0],n=e[1];return iR((function(){n(!0)}),[]),t}(),n=(0,m.useState)("undefined"!=typeof window?window.innerWidth:0),o=n[0],i=n[1],a=(0,m.useCallback)((function(){t&&i(window.innerWidth)}),[t]),iR((function(){if(t)return window.addEventListener("resize",a),a(),function(){return window.removeEventListener("resize",a)}}),[t,a]),o),x=(0,m.useCallback)((function(e,t){var n=Object.keys(e).sort((function(e,t){return e-t})),o=n.length>0?e[n[0]]:t;return n.forEach((function(t){t<f&&(o=e[t])})),o}),[f]),y=(0,m.useMemo)((function(){return x(r,1)}),[x,r]),v=(0,m.useMemo)((function(){return x(c,"10px")}),[x,c]);return b().createElement("div",{className:p,style:g},b().Children.map(d,(function(e,t){return b().cloneElement(e,{key:t,columnsCount:y,gutter:v})})))};aR.propTypes={};const sR=aR,rR=oR,lR=({posts:e,attributes:t})=>{const{columns:n,columnGap:o,rowGap:i}=t,{desktop:a=3,tablet:s=2,mobile:r=1}=n;return(0,l.jsx)(sR,{className:`${AO}LayoutMasonry`,columnsCountBreakPoints:{0:r,576:s,768:a},children:(0,l.jsx)(rR,{gutter:`${i}px ${o}px`,children:e.map((e=>(0,l.jsx)(JO,{post:e,attributes:t},e.id)))})})},cR=({posts:e,attributes:t,id:n,Slider:o,Ticker:i})=>{const{layout:a,columns:s}=t,{desktop:r=3,tablet:c=2,mobile:d=1}=s,u=()=>e.map((e=>(0,l.jsx)(JO,{post:e,attributes:t},e.id)));switch(a){case"grid":return(0,l.jsx)("div",{className:`${AO}LayoutGrid columns-${r} columns-tablet-${c} columns-mobile-${d}`,children:(0,l.jsx)(u,{})});case"grid1":return(0,l.jsx)("div",{className:`${AO}LayoutGrid1`,children:(0,l.jsx)(u,{})});case"masonry":return(0,l.jsx)(lR,{posts:e,attributes:t});case"slider":return(0,l.jsx)(o,{posts:e,attributes:t,id:n});case"ticker":return(0,l.jsx)(i,{posts:e,attributes:t,id:n});default:return null}},dR="&#183;",uR=(e,t)=>{let n=t-e+1;return Array.from({length:n},((t,n)=>n+e))},pR=({attributes:e,totalCount:t,onChange:n})=>{const{layout:o,isPostsPerPageAll:i,postsPerPage:a,isPagination:s,paginationPrevLabel:r,paginationNextLabel:c}=e,[d,u]=(0,m.useState)(1),p=(({currentPage:e,totalCount:t,pageSize:n,siblingCount:o=1})=>(0,m.useMemo)((()=>{const i=Math.ceil(t/n);if(o+5>=i)return uR(1,i);const a=Math.max(e-o,1),s=Math.min(e+o,i),r=a>2,l=s<i-2,c=i;if(!r&&l)return[...uR(1,3+2*o),dR,i];if(r&&!l){let e=uR(i-(3+2*o)+1,i);return[1,dR,...e]}if(r&&l){let e=uR(a,s);return[1,dR,...e,dR,c]}}),[e,t,n,o]))({currentPage:d,totalCount:t,pageSize:a,siblingCount:1});if(0===d||p.length<2)return null;let h=p[p.length-1];const g=e=>{n(e),u(e)};return s&&!i&&"slider"!==o&&"ticker"!==o?(0,l.jsxs)("ul",{className:`${AO}Pagination`,children:[(0,l.jsx)("li",{className:`${AO}PageNumber ${1===d?"disabled":""}`,onClick:()=>g(d-1),children:r}),p.map(((e,t)=>e===dR?(0,l.jsx)("li",{className:"dots",children:"·····"},t):(0,l.jsxs)("li",{className:`${AO}PageNumber ${e===d?`${AO}PageActive`:""}`,onClick:()=>g(e),children:[" ",e]},t))),(0,l.jsx)("li",{className:`${AO}PageNumber ${d===h?"disabled":""}`,onClick:()=>g(d+1),children:c})]}):null},hR=({posts:e,attributes:t,id:n})=>{const{columns:o,columnGap:i,sliderIsLoop:a,sliderIsTouchMove:s,sliderIsAutoplay:r,sliderAutoplayOptions:c={delay:1.5},sliderSpeed:d,sliderEffect:u,sliderIsPage:p,sliderIsPageClickable:h,sliderIsPageDynamic:g,sliderIsPrevNext:b}=t;return(0,m.useEffect)((()=>{(e=>{const t=[],n=document.querySelectorAll(`#${e} .swiper .swiper-slide`),o=document.querySelectorAll(`#${e} .swiper .swiper-slide .${AO}ElTexts`);o?.forEach((e=>{t.push(e?.clientHeight)})),n?.length&&n.forEach((e=>{e.querySelector("article").style.height=`${Math.max(...t)}px`}))})(n)}),[e?.length]),(0,l.jsx)(Wx,{className:`${AO}LayoutSlider`,spaceBetween:i,slidesPerView:o.mobile,breakpoints:{576:{slidesPerView:o.tablet},768:{slidesPerView:o.desktop}},modules:[If,Df,Gf,Lf,Ef],loop:a,allowTouchMove:s,grabCursor:s,autoplay:!!r&&{delay:1e3*c?.delay},speed:1e3*d,effect:u,fadeEffect:{crossFade:!0},creativeEffect:{prev:{shadow:!0,translate:["-120%",0,-500]},next:{shadow:!0,translate:["120%",0,-500]}},pagination:!!p&&{clickable:h,dynamicBullets:g},navigation:b,allowSlideNext:!0,allowSlidePrev:!0,autoHeight:!1,children:e.map((e=>(0,l.jsx)(Ux,{children:(0,l.jsx)(JO,{post:e,attributes:t})},e.id)))})},gR=({posts:e,attributes:t,id:n})=>{
520 -const{columns:o,columnGap:i,sliderIsLoop:a,sliderIsTouchMove:s,sliderIsAutoplay:r,sliderAutoplayOptions:c={delay:1.5},sliderSpeed:d,sliderEffect:u,sliderIsPage:p,sliderIsPageClickable:h,sliderIsPageDynamic:g,sliderIsPrevNext:b}=t,[f,x]=(0,m.useState)(!0),y=()=>(0,l.jsx)(hR,{posts:e,attributes:t,id:n});return(0,m.useEffect)((()=>{x(!f)}),[o,i,a,s,r,c,d,u,p,h,g,b]),(0,l.jsx)(y,{})},mR=jQuery,bR=({posts:e,attributes:t,id:n})=>{const{rowGap:o,tickerDirection:i,tickerSpeed:a,tickerInterval:s,tickerHeight:r,tickerVisible:c,tickerIsMousePause:d}=t,u=(0,m.useRef)(null),p=(0,m.useRef)(null),h=`#${n}`;return(0,m.useEffect)((()=>{const e=p.current;e&&(e.innerHTML="",e.innerHTML=u.current.outerHTML,mR(`${h} .${AO}LayoutTickerWrapper .${AO}LayoutTicker`).easyTicker((e=>{const{rowGap:t,tickerDirection:n="up",tickerSpeed:o="slow",tickerInterval:i=2e3,tickerHeight:a="0px",tickerVisible:s=3,tickerIsMousePause:r=!0}=e;return{direction:n,easing:"swing",speed:isNaN(o)?o:parseInt(o),interval:i,height:"0px"===a||"0em"===a?"auto":a,gap:t,visible:s,mousePause:r}})(t)))}),[o,i,a,s,r,c,d]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:`${AO}LayoutTickerWrapper`,ref:p}),(0,l.jsx)("div",{className:`${AO}LayoutTicker`,ref:u,children:(0,l.jsx)("div",{children:e.map((e=>(0,l.jsx)(JO,{post:e,attributes:t},e.id)))})})]})},fR=({posts:e,totalPosts:t,attributes:n,setAttributes:o,id:i,isPremium:a})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(OO,{attributes:n,id:i}),(0,l.jsx)(cR,{posts:e,attributes:n,id:i,Slider:gR,Ticker:bR}),a&&(0,l.jsx)(pR,{attributes:n,totalCount:t,onChange:e=>o({paginationCurrentPage:e})})]}),{dateI18n:xR}=wp.date,yR=(0,f.withSelect)(((e,{attributes:t})=>{const{getUsers:n,getEntityRecords:o,getTaxonomies:i,getMedia:a,getComments:s}=e("core"),{postType:r,selectedTaxonomies:l={},selectedCategories:c=[],selectedTags:d=[],isPostsPerPageAll:u,postsPerPage:p,postsOrderBy:h,postsOrder:g,postsOffset:m=0,postsInclude:b=[],postsExclude:f=[],isExcludeCurrent:x,isPagination:y,paginationCurrentPage:v,fImgSize:k="full",metaDateFormat:w="M j, Y"}=t,_="post"===r?{categories:c}:{},C="post"===r?{tags:d}:{},j=Object.assign({},l?.category?{categories:l.category}:{},l?.post_tag?{tags:l.post_tag}:{},(e=>Object.fromEntries(Object.entries(e).filter((([e,t])=>(e=>"category"!==e&&"post_tag"!==e)(e)))))(l)),$={...j,..._,...C,per_page:u?-1:p,orderby:h,order:g,offset:u?0:m,...vO(b)?.length?{include:vO(b)}:{},exclude:x?[e("core/editor").getCurrentPostId(),...vO(f)]:vO(f),status:"publish"},S=$O(o("postType",r,{...$,per_page:-1}),"false"),T=p*(v-1),N=T+p,M=S?.slice(T,N),L=e=>o("taxonomy",e,{per_page:-1}),P=e=>s({per_page:-1})?.filter((({post:t})=>e===t)),E=i({per_page:-1})?.filter((e=>e.types.includes(r)&&"category"!==e.slug))?.map((({name:e,slug:t,rest_base:n})=>({name:e,slug:t,rest_base:n}))),A=y&&!u?M:$O(o("postType",r,$),"false");return{totalPosts:S?.length,posts:(e=>e?.map((e=>{const{id:t,link:o,slug:i,featured_media:s,title:r,excerpt:l,author:c,categories:d,content:u,date:p,date_gmt:h,modified:g,modified_gmt:m,comment_status:b,status:f}=e,x=((e,t)=>{const n=a(e),o=n?.media_details?.sizes?.[t]?.source_url||n?.source_url;return{url:o?.replace(/<[^>]+>/g,""),alt:n?.alt_text}})(s,k),y={};E?.map((t=>{const n=L(t.slug)?.filter((n=>e[t.rest_base]?.includes(n.id)))?.map((e=>`<a href='${e.link}' rel='${t.slug}'>${e.name}</a>`));y[t.slug]=n?.join("")}));const v=u?.raw?.replace(/(<([^>]+)>)/gi,""),_=d?.length?L("category")?.filter((e=>d?.includes(e.id)))?.map((e=>`<a href='${e.link}' rel='category tag'>${e.name}</a>`)):[],C=n({who:"authors"})?.map((({id:e,name:t,link:n})=>({id:e,name:t,link:n})))?.find((e=>e.id===c));return{id:t,link:o,name:i,thumbnail:x,title:r?.rendered,excerpt:l?.raw?.replace(/(<([^>]+)>)/gi,"")?.trim(),content:v,author:C,date:xR(w,new Date(p)),dateGMT:h,modifiedDate:g,modifiedDateGMT:m,commentCount:P(t)?.length,commentStatus:b,categories:{coma:_?.join(", "),space:_?.join(" ")},taxonomies:y,readTime:{min:Math.floor(kO(v)/200),sec:Math.floor(kO(v)%200/(200/60))},status:f}})))(A),taxOfPostType:E,media:e=>a(e)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,totalPosts:a,posts:s,taxOfPostType:r}=e,c=(0,h.useBlockProps)(),d=bBlocksPremiumChecker;(0,m.useEffect)((()=>me()),[i]),(0,m.useEffect)((()=>n({paginationCurrentPage:1})),[]);const u=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(EO,{attributes:t,setAttributes:n,isPremium:d,posts:s,taxOfPostType:r}),s?s?.length?(0,l.jsx)("div",{...c,children:(0,l.jsx)(fR,{posts:s,totalPosts:a,attributes:t,setAttributes:n,id:u,isPremium:d})}):(0,l.jsx)(IO,{}):(0,l.jsx)(BO,{})]})}));Ll(tO.name)&&(0,p.registerBlockType)(tO,{icon:Ar,transforms:{from:[{type:"block",blocks:["ap-block/posts"],transform:e=>(0,p.createBlock)("b-blocks/posts",e)},{type:"prefix",prefix:"apb",transform:()=>(0,p.createBlock)("b-blocks/posts")},{type:"prefix",prefix:"posts",transform:()=>(0,p.createBlock)("b-blocks/posts")}],to:[{type:"block",blocks:["ap-block/posts"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("ap-block/posts",e)}]},edit:yR,save:()=>null});const vR=JSON.parse('{"apiVersion":3,"name":"b-blocks/price-lists","title":"Price Lists","description":"Display Price lists section.","category":"bBlocks","keywords":["price","lists","price lists section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"products":{"type":"array","default":[{"background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{},"name":"Product 1 Name","nameColor":"#333","desc":"This content area describes product 1 descriptions or details.","descColor":"#333","price":"$99.99","priceColor":"#146EF5","separator":{"width":"40%","height":"1px","color":"#bbb"}},{"background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{},"name":"Product 2 Name","nameColor":"#333","desc":"This content area describes product 2 descriptions or details.","descColor":"#333","price":"$99.99","priceColor":"#146EF5","separator":{"width":"40%","height":"1px","color":"#bbb"}},{"background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{},"name":"Product 3 Name","nameColor":"#333","desc":"This content area describes product 3 descriptions or details.","descColor":"#333","price":"$99.99","priceColor":"#146EF5","separator":{"width":"40%","height":"1px","color":"#bbb"}}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"40px"},"rowGap":{"type":"string","default":"30px"},"layout":{"type":"string","default":"vertical"},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"20px"}},"imgMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"nameTypo":{"type":"object","default":{"fontSize":{"desktop":"18px","tablet":"17px","mobile":"16px"},"fontWeight":600}},"nameMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"},"fontStyle":"italic"}},"descMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"priceTypo":{"type":"object","default":{"fontSize":{"desktop":"24px","tablet":"22px","mobile":"20px"},"fontStyle":"italic"}},"isSep":{"type":"boolean","default":true}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),kR=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateProduct:n,activeIndex:i,setActiveIndex:a,device:s})=>{const{products:r=[],columns:c,columnGap:p,rowGap:g,layout:m,textAlign:b,padding:f,imgMargin:k,nameTypo:w,nameMargin:C,isDesc:j,descTypo:$,descMargin:S,priceTypo:T,isSep:N}=e,M=()=>{t({
521 -products:[...r,{background:{color:"#0000"},img:{id:null,url:"",alt:"",title:""},imgBorder:{},name:`Product ${r.length+1} Name`,nameColor:"#333",desc:`This content area describes product ${r.length+1} descriptions or details.`,descColor:"#333",price:"$99.99",priceColor:o,separator:{width:"40%",height:"1px",color:"#bbb"}}]}),a(r.length)},{background:L={},img:P={},imgBorder:E={},nameColor:A="",descColor:B="",priceColor:I="",separator:O={}}=r[i]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Product","b-blocks"),children:[null!==i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Product No ${i+1}:`,"b-blocks")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:L,onChange:e=>n("background",e)}),(0,l.jsx)(v,{children:(0,x.__)("Image:","b-blocks")}),(0,l.jsx)(ke,{value:P,onChange:e=>n("img",e),placeholder:(0,x.__)("Enter Image URL","b-blocks")}),(0,l.jsx)(td,{className:"mt20",value:P,onChange:e=>n("img",e)}),(0,l.jsx)(Jc,{label:(0,x.__)("Image Border:","b-blocks"),value:E,onChange:e=>n("imgBorder",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Name Color:","b-blocks"),value:A,onChange:e=>n("nameColor",e),defaultColor:"#333"}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:B,onChange:e=>n("descColor",e),defaultColor:"#333"}),(0,l.jsx)(Ue,{label:(0,x.__)("Price Color:","b-blocks"),value:I,onChange:e=>n("priceColor",e),defaultColor:o}),(0,l.jsx)(Ta,{value:O,onChange:e=>n("separator",e),defaults:{width:"40%",height:"1px",color:"#bbb"}}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<r?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{e.preventDefault(),t({products:[...r.slice(0,i),...r.slice(i+1)]}),a(0===i?0:i-1)},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{e.preventDefault(),t({products:[...r.slice(0,i),{...r[i]},...r.slice(i)]}),a(i+1)},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Product","b-blocks"),onClick:M,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Product","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsxs)(y.ButtonGroup,{className:"bPlBtnGroup",children:[(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Vertical","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(y.Button,{icon:d,isPrimary:"vertical"===m,"aria-pressed":"vertical"===m,onClick:()=>{t({layout:"vertical",columns:{...c,desktop:3},textAlign:"center",padding:{...f,vertical:"50px",horizontal:"20px",styles:"50px 20px"},imgMargin:{...k,right:"0px",bottom:"20px",styles:"0px 0px 20px 0px"}})}})}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Horizontal","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(y.Button,{icon:u,isPrimary:"horizontal"===m,"aria-pressed":"horizontal"===m,onClick:()=>{t({layout:"horizontal",columns:{...c,desktop:2},textAlign:"left",padding:{...f,vertical:"20px",horizontal:"20px",styles:"20px 20px"},imgMargin:{...k,right:"20px",bottom:"0px",styles:"0px 20px 0px 0px"}})}})})]})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:c[s],onChange:e=>{t({columns:{...c,[s]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(id,{label:(0,x.__)("Padding:","b-blocks"),value:f,onChange:e=>t({padding:e}),defaults:{vertical:"50px",horizontal:"20px"}})}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(id,{label:(0,x.__)("Margin:","b-blocks"),value:k,onChange:e=>t({imgMargin:e}),defaults:{side:4,bottom:"20px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Name Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:w,onChange:e=>t({nameTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16},fontWeight:600}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>t({nameMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:j,onChange:e=>t({isDesc:e})}),(0,l.jsx)(Oa,{value:$,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15},fontStyle:"italic"}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:S,onChange:e=>t({descMargin:e}),defaults:{side:4,bottom:"15px"}})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Price Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Oa,{value:T,onChange:e=>t({priceTypo:e}),defaults:{fontSize:{desktop:24,tablet:22,mobile:20},fontStyle:"italic"}})}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:N,onChange:e=>t({isSep:e})})})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Product","b-blocks"),onClick:M,children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:b,onChange:e=>t({textAlign:e})})]})]})})),wR="bBlocksPriceLists";Ll(vR.name)&&(0,p.registerBlockType)(vR,{icon:Br,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{products:i=[],columns:a,columnGap:s,rowGap:r,layout:c,textAlign:d,padding:u,imgMargin:p,nameTypo:g,nameMargin:b,isDesc:f,descTypo:v,descMargin:k,priceTypo:w,isSep:_}=t,[C,j]=(0,m.useState)(0),$=(e,t)=>{const o=Rb(i,(n=>{n[C][e]=t}));n({products:o})},S=`#block-${o}`,T=`${S} .${wR}`,N=`${T} .priceItem`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(kR,{attributes:t,setAttributes:n,updateProduct:$,activeIndex:C,setActiveIndex:j}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${ps("",g)?.googleFontLink}\n\t\t\t\t${ps("",v)?.googleFontLink}\n\t\t\t\t${ps("",w)?.googleFontLink}\n\t\t\t\t${ps(`${N} .productName`,g)?.styles}\n\t\t\t\t${ps(`${N} .productDescription`,v)?.styles}\n\t\t\t\t${ps(`${N} .productPrice`,w)?.styles}\n\n\t\t\t\t${T}{\n\t\t\t\t\tgrid-gap: ${r} ${s};\n\t\t\t\t}\n\t\t\t\t${N}{\n\t\t\t\t\ttext-align: ${d};\n\t\t\t\t\tpadding: ${us(u)};\n\t\t\t\t}\n\t\t\t\t${N} .productImage{\n\t\t\t\t\tmargin: ${us(p)};\n\t\t\t\t}\n\t\t\t\t${N} .productName{\n\t\t\t\t\tmargin: ${us(b)};\n\t\t\t\t}\n\t\t\t\t${N} .productDescription{\n\t\t\t\t\tmargin: ${us(k)};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsx)("div",{className:`${wR} ${c||"vertical"} columns-${a?.desktop} columns-tablet-${a?.tablet} columns-mobile-${a?.mobile}`,children:i?.map(((e,t)=>{const{background:n,img:o,imgBorder:i,name:a,nameColor:s,desc:r,descColor:c,price:d,priceColor:u,separator:p}=e,g=`${S} #priceItem-${t}`;return(0,l.jsxs)("div",{onClick:()=>j(t),
522 -className:"priceItem "+(t===C?"bPlNowEditing":""),id:`priceItem-${t}`,children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t\t\t\t${g}{\n\t\t\t\t\t\t\t\t${os(n)}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productImage{\n\t\t\t\t\t\t\t\t${is(i)}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productName{\n\t\t\t\t\t\t\t\tcolor: ${s};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productDescription{\n\t\t\t\t\t\t\t\tcolor: ${c};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productPrice{\n\t\t\t\t\t\t\t\tcolor: ${u};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productSeparator{\n\t\t\t\t\t\t\t\t${cs(p)}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t`}}),o?.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{className:`productImage ${o?.id?`wp-image-${o?.id}`:null}`,src:o?.url,alt:o?.alt}),(0,ed.isBlobURL)(o?.url)&&(0,l.jsx)(y.Spinner,{})]}):(0,l.jsx)(nd,{label:(0,x.__)(" Product Image:","b-blocks"),value:o,onChange:e=>$("img",e)}),(0,l.jsxs)("div",{className:"productDetails",children:[(0,l.jsx)(h.RichText,{className:"productName",tagName:"h4",value:a,onChange:e=>$("name",e),placeholder:(0,x.__)("Product name","b-blocks"),inlineToolbar:!0}),f&&(0,l.jsx)(h.RichText,{className:"productDescription",tagName:"p",value:r,onChange:e=>$("desc",e),placeholder:(0,x.__)("Description of the product","b-blocks"),inlineToolbar:!0}),(0,l.jsx)(h.RichText,{className:"productPrice",tagName:"span",value:d,onChange:e=>$("price",e),placeholder:(0,x.__)("$99.99","b-blocks"),inlineToolbar:!0})]}),_&&(0,l.jsx)("span",{className:"productSeparator"})]},t)}))})]})]})},save:()=>null});const _R=JSON.parse('{"apiVersion":3,"name":"b-blocks/pricing-table","title":"Pricing Table","description":"Display product prices as a table.","category":"bBlocks","keywords":["pricing","price list","table"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"pricingTables":{"type":"array","default":[{"name":"Basic","price":2.99,"priceCurrency":"$","period":"Month","link":"#","linkLabel":"Enroll Now","color":"#f00025","features":[{"isEnable":true,"label":"25GB Disk Space"},{"isEnable":true,"label":"25 Email Accounts"},{"isEnable":true,"label":"50GB Bandwidth"},{"isEnable":true,"label":"25 Subdomains"},{"isEnable":false,"label":"Maintenance"}]},{"name":"Standard","price":5.99,"priceCurrency":"$","period":"Month","link":"#","linkLabel":"Enroll Now","color":"#001645","features":[{"isEnable":true,"label":"50GB Disk Space"},{"isEnable":true,"label":"50 Email Accounts"},{"isEnable":true,"label":"100GB Bandwidth"},{"isEnable":true,"label":"50 Subdomains"},{"isEnable":false,"label":"Maintenance"}]},{"name":"Premium","price":9.99,"priceCurrency":"$","period":"Month","link":"#","linkLabel":"Enroll Now","color":"#01944e","features":[{"isEnable":true,"label":"100GB Disk Space"},{"isEnable":true,"label":"100 Email Accounts"},{"isEnable":true,"label":"Unlimited Bandwidth"},{"isEnable":true,"label":"100 Subdomains"},{"isEnable":true,"label":"Maintenance"}]}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"20px"},"rowGap":{"type":"string","default":"30px"},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"35px","horizontal":"25px"}},"shadow":{"type":"object","default":{"blur":"30px","color":"#6e8faf4d"}}},"supports":{"align":["wide","full"],"html":false},"styles":[{"name":"basic","label":"Basic","isDefault":true},{"name":"standard","label":"Standard"},{"name":"ultimate","label":"Ultimate"}],"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),CR=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updatePriceTable:n,activeIndex:i,setActiveIndex:a,device:s})=>{const{pricingTables:r,columns:c,columnGap:d,rowGap:u,textAlign:p,padding:g,shadow:m}=e,b=()=>{t({pricingTables:[...r,{name:"Ultimate",price:14.99,priceCurrency:"$",period:"Month",link:"#",linkLabel:"Enroll Now",color:o,features:[{isEnable:!0,label:"Unlimited Disk Space"},{isEnable:!0,label:"Unlimited Website"},{isEnable:!0,label:"Unlimited Email Accounts"},{isEnable:!0,label:"Unlimited Bandwidth"},{isEnable:!0,label:"Unlimited Subdomains"},{isEnable:!0,label:"Maintenance"}]}]}),a(n.length)},f=e=>{e.preventDefault(),t({pricingTables:[...r.slice(0,i),{...r[i]},...r.slice(i)]}),a(i+1)},k=e=>{e.preventDefault(),t({pricingTables:[...r.slice(0,i),...r.slice(i+1)]}),a(0===i?0:i-1)},{name:w="",price:C=0,priceCurrency:j="",period:$="",features:S=[],linkLabel:T="",link:N="",color:M=""}=r[i]||{},L=e=>{e.preventDefault(),n("features",[...S,{isEnable:"#",label:"New Feature of Price"}])};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:hn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Prices","b-blocks"),children:[null!==i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Price No ${i+1}:`,"b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Plan Name:","b-blocks"),value:w,onChange:e=>n("name",e)}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Price:","b-blocks"),labelPosition:"left",value:C,onChange:e=>n("price",parseFloat(e))}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Currency:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:j,onChange:e=>n("priceCurrency",e)})]}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Period:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:$,onChange:e=>n("period",e)})]}),(0,l.jsx)(v,{children:(0,x.__)("Features:","b-blocks")}),S?.map(((e,t)=>{const{isEnable:o,label:i}=e;return(0,l.jsxs)(y.PanelRow,{className:"editPriceFeature",children:[(0,l.jsx)(y.CheckboxControl,{className:"priceFeatureIsEnable",checked:o,onChange:e=>n("features",e,t,"isEnable")}),(0,l.jsx)(y.TextControl,{value:i,onChange:e=>n("features",e,t,"label")}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Remove the feature","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)("a",{className:"removeItem",onClick:e=>{e.preventDefault(),n("features",[...S.slice(0,t),...S.slice(t+1)])},children:(0,l.jsx)(y.Dashicon,{icon:"no"})})})]},t)})),(0,l.jsx)("div",{className:"addItem addFeature mt5",children:(0,l.jsxs)(y.Button,{className:"addItem",label:(0,x.__)("Add New Feature","b-blocks"),onClick:L,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Feature","b-blocks")]})}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Label:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:T,onChange:e=>n("linkLabel",e)})]}),(0,l.jsx)(v,{children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:N,onChange:e=>n("link",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:M,onChange:e=>n("color",e),defaultColor:o}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<r?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:k,children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:f,children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Price","b-blocks"),onClick:b,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Price","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,
523 -l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:c[s],onChange:e=>{t({columns:{...c,[s]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]})]}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pricing Table","b-blocks"),children:[(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:g,onChange:e=>t({padding:e}),defaults:{vertical:"35px",horizontal:"25px"}}),(0,l.jsx)(od,{className:"mt20",label:(0,x.__)("Shadow:","b-blocks"),value:m,onChange:e=>t({shadow:e}),defaults:{blur:"30px",color:"#6e8faf4d"}})]})})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Price","b-blocks"),onClick:b,children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:p,onChange:e=>t({textAlign:e})})]})]})})),jR="bBlocksPricingTable",$R=({attributes:e,id:t,isStandard:n})=>{const{pricingTables:o,columnGap:i,rowGap:a,textAlign:s,padding:r,shadow:c}=e,d=`#${t}`,u=`${d} .${jR}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${u}{\n\t\t\tgrid-gap: ${a} ${i};\n\t\t\ttext-align: ${s};\n\t\t\tpadding: ${n?"30px 0":"0"}\n\t\t}\n\t\t${u} .priceItem{\n\t\t\tpadding: ${us(r)};\n\t\t\tbox-shadow: ${ds(c)};\n\t\t}\n\n\t\t${o?.map(((e,t)=>{const{color:n}=e,o=`${u} #priceItem-${t} .priceItem`,i=e=>`${d}.is-style-${e} .${jR} #priceItem-${t} .priceItem`;return`\n\t\t\t\t${o} .priceName,\n\t\t\t\t${i("basic")} .priceAmountWrap,\n\t\t\t\t${i("standard")} .priceAmountWrap{\n\t\t\t\t\tcolor: ${n};\n\t\t\t\t}\n\t\t\t\t${o} .priceLink,\n\t\t\t\t${i("basic")} .priceName,\n\t\t\t\t${i("standard")}::before,\n\t\t\t\t${i("ultimate")} .priceAmountWrap{\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tbackground-color: ${n};\n\t\t\t\t}\n\t\t\t\t${i("basic")} .priceName::before{\n\t\t\t\t\tborder-top-color: ${n};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},SR=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureEnabled",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"#01944e",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})}),TR=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureDisabled",viewBox:"0 0 352 512",children:(0,l.jsx)("path",{fill:"#f00025",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})}),NR=({features:e})=>(0,l.jsx)("div",{className:"priceFeatures",children:e?.map(((e,t)=>{const{isEnable:n,label:o}=e;return(0,l.jsxs)("div",{className:"priceFeature",children:[n?SR:TR,(0,l.jsx)("span",{className:"priceFeatureLabel",dangerouslySetInnerHTML:{__html:St(o)}})]},t)}))}),MR=({priceTable:e,index:t,className:n,activeIndex:o,setActiveIndex:i,updatePriceTable:a})=>{const{name:s,price:r,priceCurrency:c,period:d,link:u,linkLabel:p,features:g}=e,b=n.includes("basic"),f=n.includes("standard"),y=n.includes("ultimate"),v=(0,m.useRef)(null),k=(0,m.useRef)(null);(0,m.useEffect)((()=>{if(y){const e=v?.current?.clientHeight/100*82;k.current.style.width=`${e}px`,k.current.style.top=e/2+"px",k.current.style.left=-e/2+60+"px"}}),[n,v,k]);const w=(0,l.jsxs)("span",{className:"priceAmount",children:[c,r]}),_=(0,l.jsx)(h.RichText,{className:"pricePeriod",tagName:"span",value:d,onChange:e=>a("period",e),placeholder:(0,x.__)("Period","b-blocks"),inlineToolbar:!0});return(0,l.jsx)("div",{onClick:()=>i(t),className:t===o?"bPlNowEditing":"",id:`priceItem-${t}`,children:(0,l.jsxs)("div",{className:"priceItem",ref:v,children:[(0,l.jsx)(h.RichText,{className:"priceName",tagName:"h3",value:s,onChange:e=>a("name",e),placeholder:(0,x.__)("Plan Name","b-blocks"),inlineToolbar:!0}),f||y?(0,l.jsxs)("div",{className:"priceAmountWrap",ref:k,children:[w,d?" / ":"",_]}):"",(0,l.jsx)(NR,{features:g}),f||y?"":(0,l.jsx)("div",{className:"priceAmountWrap",children:w}),!b&&(0,l.jsx)("br",{}),p&&(0,l.jsx)(h.RichText,{className:"priceLink",tagName:"a",value:p,href:$t(u),onChange:e=>a("linkLabel",e),placeholder:(0,x.__)("Link Label","b-blocks"),inlineToolbar:!0})]})},t)};Ll(_R.name)&&(0,p.registerBlockType)(_R,{icon:Ir,transforms:{from:[{type:"block",blocks:["bptb/pricing-table"],transform:e=>(0,p.createBlock)("b-blocks/pricing-table",e)},{type:"prefix",prefix:"count",transform:()=>(0,p.createBlock)("b-blocks/pricing-table")}],to:[{type:"block",blocks:["bptb/pricing-table"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("bptb/pricing-table",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{pricingTables:i,columns:a}=t,s=(0,h.useBlockProps)(),{className:r}=s,[c,d]=(0,m.useState)(0),u=(e,t,o=!1,a=!1)=>{const s=Rb(i,(n=>{!1!==o&&a?n[c][e][o][a]=t:n[c][e]=t}));n({pricingTables:s})},p=r.includes("standard"),g=r.includes("ultimate");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(CR,{attributes:t,setAttributes:n,updatePriceTable:u,activeIndex:c,setActiveIndex:d}),(0,l.jsxs)("div",{...s,className:`${r} ${p||g?"":"is-style-basic"}`,children:[(0,l.jsx)($R,{attributes:t,id:`block-${o}`,isStandard:p}),(0,l.jsx)("div",{className:`${jR} columns-${a.desktop} columns-tablet-${a.tablet} columns-mobile-${a.mobile}`,children:i?.map(((e,t)=>(0,l.jsx)(MR,{priceTable:e,index:t,className:r,activeIndex:c,setActiveIndex:d,updatePriceTable:u},t)))})]})]})},save:()=>null})
524 -;const LR=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/process-steps","title":"Process Steps","category":"bBlocks","description":"Build a numbered \\"How it works\\" section. Drop in 3–6 steps with title, description, icon or number badge, and a connector line. Horizontal or vertical layout, fully responsive, accessible <ol> semantics.","keywords":["process","steps","how it works","how we work","numbered","timeline","workflow"],"textdomain":"b-blocks","attributes":{"layout":{"type":"object","default":{"type":"horizontal","theme":"classic","alignment":"center","columnCount":{"desktop":3,"tablet":2,"mobile":1},"gap":{"desktop":"32px","tablet":"24px","mobile":"16px"}}},"steps":{"type":"array","default":[{"_key":"ps-default-1","title":"Discovery","description":"We learn about your goals and challenges.","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2v82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9V380.8c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168a40 40 0 1 0 0-80 40 40 0 1 0 0 80z\'/></svg>"},{"_key":"ps-default-2","title":"Strategy","description":"We craft a tailored plan to meet your needs.","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 384 512\'><path d=\'M272 384c9.6-31.9 29.5-59.1 49.2-86.2l0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4l0 0c19.8 27.1 39.7 54.4 49.2 86.2H272zM192 512c44.2 0 80-35.8 80-80V416H112v16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z\'/></svg>"},{"_key":"ps-default-3","title":"Delivery","description":"We execute and iterate until you are thrilled.","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z\'/></svg>"}]},"connector":{"type":"object","default":{"show":true,"color":"#CBD5E1","width":"2px","style":"solid"}},"badge":{"type":"object","default":{"type":"number","size":"56px","bg":{"color":"#2563EB"},"color":"#FFFFFF","typo":{"fontSize":{"desktop":"20px","tablet":null,"mobile":null}},"border":{},"borderRadius":{"top":"50%","bottom":"50%","left":"50%","right":"50%"},"shadow":[]}},"content":{"type":"object","default":{"titleTag":"h3","titleColor":"","typo":{"fontSize":{"desktop":"18px","tablet":null,"mobile":null}},"descColor":"","descTypo":{"fontSize":{"desktop":"15px","tablet":null,"mobile":null}}}},"card":{"type":"object","default":{"bg":{"color":""},"padding":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"border":{},"borderRadius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),PR=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],ER=["h2","h3","h4","p"],AR=[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:(0,x.__)("Paragraph","b-blocks"),value:"p"}],BR=[{label:(0,x.__)("Classic — clean cards, blue accent","b-blocks"),value:"classic"},{label:(0,x.__)("Modern — gradient badges, soft shadow","b-blocks"),value:"modern"},{label:(0,x.__)("Minimal — borderless, dotted connectors","b-blocks"),value:"minimal"},{label:(0,x.__)("Bold — high-contrast dark badges","b-blocks"),value:"bold"}],IR=e=>({top:e,right:e,bottom:e,left:e}),OR={classic:{badge:{bg:{type:"solid",color:"#2563EB"},color:"#FFFFFF",border:{},borderRadius:IR("50%"),shadow:[],typo:{fontWeight:"700"}},card:{bg:{type:"solid",color:""},border:{},borderRadius:IR("8px"),shadow:[]},content:{titleColor:"",descColor:"",typo:{fontWeight:"600",textTransform:"",letterSpace:""}},connector:{style:"solid",color:"#CBD5E1",width:"2px"}},modern:{badge:{bg:{type:"gradient",gradient:"linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%)"},color:"#FFFFFF",border:{},borderRadius:IR("50%"),shadow:[{hOffset:"0px",vOffset:"8px",blur:"20px",spreed:"-6px",color:"rgba(236, 72, 153, 0.45)",isInset:!1}],typo:{fontWeight:"700"}},card:{bg:{type:"gradient",gradient:"linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)"},border:{},borderRadius:IR("16px"),shadow:[{hOffset:"0px",vOffset:"14px",blur:"32px",spreed:"-16px",color:"rgba(15, 23, 42, 0.18)",isInset:!1},{hOffset:"0px",vOffset:"2px",blur:"6px",spreed:"-2px",color:"rgba(15, 23, 42, 0.06)",isInset:!1}]},content:{titleColor:"#0f172a",descColor:"#475569",typo:{fontWeight:"700",textTransform:"",letterSpace:""}},connector:{style:"solid",color:"#C4B5FD",width:"2px"}},minimal:{badge:{bg:{type:"solid",color:""},color:"#475569",border:{width:"1px",style:"solid",color:"#475569"},borderRadius:IR("50%"),shadow:[],typo:{fontWeight:"500"}},card:{bg:{type:"solid",color:""},border:{},borderRadius:IR("8px"),shadow:[]},content:{titleColor:"",descColor:"#64748B",typo:{fontWeight:"500",textTransform:"",letterSpace:"-0.01em"}},connector:{style:"dotted",color:"#CBD5E1",width:"2px"}},bold:{badge:{bg:{type:"solid",color:"#0F172A"},color:"#FACC15",border:{},borderRadius:IR("0px"),shadow:[{hOffset:"3px",vOffset:"3px",blur:"0px",spreed:"0px",
525 -color:"#FACC15",isInset:!1}],typo:{fontWeight:"800"}},card:{bg:{type:"solid",color:"#FFFFFF"},border:{width:"2px",style:"solid",color:"#0F172A"},borderRadius:IR("0px"),shadow:[{hOffset:"6px",vOffset:"6px",blur:"0px",spreed:"0px",color:"#0F172A",isInset:!1}]},content:{titleColor:"#0f172a",descColor:"#1e293b",typo:{fontWeight:"800",textTransform:"uppercase",letterSpace:"0.02em"}},connector:{style:"solid",color:"#0F172A",width:"3px"}}},RR=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],zR=[{label:(0,x.__)("Number","b-blocks"),value:"number"},{label:(0,x.__)("Icon","b-blocks"),value:"icon"}],DR=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"}],FR=(e,t)=>(e??"").toString().trim()||t,HR=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",WR=e=>{const{layout:t={},badge:n={},connector:o={}}=e,{type:i,alignment:a}=t,s="vertical"===i?"vertical":"horizontal",r=["left","center","right"].includes(a)?a:"center",l="icon"===n.type?"icon":"number",c=o.show;return["bBlocksProcessSteps",`bBlocksProcessStepsLayout${HR(s)}`,`bBlocksProcessStepsAlign${HR(r)}`,`bBlocksProcessStepsBadge${HR(l)}`,c?"has-connector":"no-connector"].join(" ")},UR=(e,t)=>parseInt(e,10)||t,GR=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:a={},connector:s={},badge:r={},content:c={},card:d={},advanced:u={}}=e,p=`#${o} .bBlocksProcessSteps`,h=`${p} .bBlocksProcessStepsList`,g=`${p}.bBlocksProcessStepsLayoutHorizontal .bBlocksProcessStepsList`,m=`${h} .bBlocksProcessStepsItem`,b=`${m} .bBlocksProcessStepsBadge`,f=`${m} .bBlocksProcessStepsTitle`,x=`${p} .bBlocksProcessStepsDescription`,y=`${p}.bBlocksProcessStepsLayoutVertical.has-connector .bBlocksProcessStepsItem:not(:last-child)::before`,v=`${p}.bBlocksProcessStepsLayoutHorizontal.has-connector .bBlocksProcessStepsItem:not(:first-child)::before`,k=FR(r.size,"56px"),w=.42*(e=>{const t=(e??"").toString().trim();if(!t)return 56;const n=t.match(/^(-?\d+(?:\.\d+)?)/);return n?parseFloat(n[1]):56})(k)+"px",_=s.color||"#CBD5E1",C=FR(s.width,"2px"),j=(e=>["solid","dashed","dotted"].includes(e)?e:"solid")(s.style),$=!!s.show,S=FR(d?.padding?.top,"0px"),T=FR(d?.padding?.left,"0px"),{gap:N={},columnCount:M={}}=a,L=FR(N?.desktop,"32px"),P=FR(N?.tablet,L),E=FR(N?.mobile,P),A=UR(M?.desktop,3),B=UR(M?.tablet,2),I=UR(M?.mobile,1),O=e=>`${y}{\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: calc(${S} + ${k} + 8px);\n\t\tleft: calc(${T} + ${k} / 2);\n\t\twidth: 0;\n\t\theight: calc(100% + ${e} - ${k} - 8px);\n\t\tborder-left: ${C} ${j} ${_};\n\t\ttransform: translateX(calc(${C} / -2));\n\t\tpointer-events: none;\n\t\tz-index: 0;\n\t}`,R=e=>`${v}{\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: calc(${S} + (${k} / 2));\n\t\tright: calc(100% - ${e} / 2 - 1px);\n\t\twidth: ${e};\n\t\theight: 0;\n\t\tborder-top: ${C} ${j} ${_};\n\t\tpointer-events: none;\n\t\tz-index: 0;\n\t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t\t${ps("",r.typo).googleFontLink}\n\t\t\t${ps(b,r.typo).styles}\n\n\t\t\t${ps("",c.typo).googleFontLink}\n\t\t\t${ps(f,c.typo).styles}\n\n\t\t\t${ps("",c.descTypo).googleFontLink}\n\t\t\t${ps(x,c.descTypo).styles}\n\n\t\t\t${h}{\n\t\t\t\tgap: ${L};\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\tgrid-template-columns: repeat(${A}, minmax(0, 1fr));\n\t\t\t}\n\t\t\t${m}{\n\t\t\t\t${ns("padding",hs(d.padding))}\n\t\t\t\t${os(d.bg)}\n\t\t\t\t${ns("border-radius",hs(d?.borderRadius))}\n\t\t\t\t${as(d.border)}\n\t\t\t\t${ns("box-shadow",ls(d?.shadow))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\twidth: ${k};\n\t\t\t\theight: ${k};\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${ns("color",r.color)}\n\t\t\t\t${ns("border-radius",hs(r?.borderRadius))}\n\t\t\t\t${as(r.border)}\n\t\t\t\t${ns("box-shadow",ls(r?.shadow))}\n\t\t\t}\n\t\t\t${b} .bBlocksProcessStepsIcon>svg{\n\t\t\t\twidth: ${w};\n\t\t\t\theight: ${w};\n\t\t\t\tfill: ${r.color};\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${ns("color",c.titleColor)}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${ns("color",c.descColor)}\n\t\t\t}\n\t\t\t${$?O(L):""}\n\t\t\t${$?R(L):""}\n\n\t\t\t${t}{\n\t\t\t\t${h}{\n\t\t\t\t\tgap: ${P};\n\t\t\t\t}\n\t\t\t\t${g}{\n\t\t\t\t\tgrid-template-columns: repeat(${B}, minmax(0, 1fr));\n\t\t\t\t}\n\t\t\t\t${$?O(P):""}\n\t\t\t\t${$?R(P):""}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t${h}{\n\t\t\t\t\tgap: ${E};\n\t\t\t\t}\n\t\t\t\t${g}{\n\t\t\t\t\tgrid-template-columns: repeat(${I}, minmax(0, 1fr));\n\t\t\t\t}\n\t\t\t\t${$?O(E):""}\n\t\t\t\t${$?`${v}{ display: none; }`:""}\n\t\t\t}\n\n\t\t\t${_s(o,u,i,!1)}\n\t\t\t`}})},VR=({attributes:e,updateObj:t})=>{const{connector:n={}}=e,{show:o,color:i,width:a,style:s}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Connector","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show connector line","b-blocks"),checked:!!o,onChange:e=>t("connector",e,"show")}),o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Connector color","b-blocks"),value:i,onChange:e=>t("connector",e,"color"),defaultColor:"#CBD5E1"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Connector width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:a,onChange:e=>t("connector",e,"width"),min:1,max:8})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Connector style","b-blocks"),labelPosition:"edge",value:s,options:DR,onChange:e=>t("connector",e,"style"),__nextHasNoMarginBottom:!0})]})]})},qR={desktop:3,tablet:2,mobile:1},YR=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={}}=e,{type:a,theme:s,alignment:r,columnCount:c={},gap:d={}}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>n("layout",e,"type"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"horizontal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"vertical"})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Theme","b-blocks"),value:s||"classic",options:BR,onChange:n=>t(((e,t)=>{const n=OR[t]||OR.classic,{layout:o={},badge:i={},card:a={},content:s={},connector:r={}}=e;return{layout:{...o,theme:t},badge:{...i,...n.badge,typo:{...i.typo||{},...n.badge.typo||{}}},card:{...a,...n.card},content:{...s,...n.content,typo:{...s.typo||{},...n.content.typo||{}}},connector:{...r,...n.connector}}})(e,n)),help:(0,x.__)("Applies a preset color & feel to the badge, card, connector and text. You can still fine-tune each in the Style tab afterwards.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Text alignment","b-blocks"),value:r||"center",options:RR,labelPosition:"edge",onChange:e=>n("layout",e,"alignment"),__nextHasNoMarginBottom:!0}),"vertical"!==a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.RangeControl,{value:parseInt(c?.[o],10)||qR[o],onChange:e=>n("layout",parseInt(e,10)||1,"columnCount",o),min:1,max:6,step:1,__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:d?.[o]||"",onChange:e=>n("layout",e,"gap",o)})]})]})},KR=({attributes:e,setAttributes:t,index:n})=>{const{steps:o=[],badge:i={}}=e,a=o[n]||{},s=(e,i)=>t({steps:be(o,i,n,e)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Title","b-blocks"),value:a.title||"",
526 -onChange:e=>s("title",e),placeholder:(0,x.__)("Short title for this step","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Description","b-blocks"),value:a.description||"",onChange:e=>s("description",e),placeholder:(0,x.__)("Explain what happens in this step","b-blocks"),rows:3,__nextHasNoMarginBottom:!0}),"icon"===i?.type&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),className:"mt10",icon:a.icon||"",onChange:e=>s("icon",e)})})]})},QR=({attributes:e,setAttributes:t})=>{const n={_key:`ps-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,title:"",description:"",icon:""};return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Steps","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,newItem:n,design:"sortable",itemLabel:"Step",arrKey:"steps",title:"title",ItemSettings:KR,minItem:0})})},ZR=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(YR,{...e}),(0,l.jsx)(QR,{...e}),(0,l.jsx)(VR,{...e})]}),XR=({attributes:e,updateObj:t})=>{const{badge:n={}}=e,{type:o,size:i,bg:a,color:s}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Badge type","b-blocks"),labelPosition:"edge",value:o,options:zR,onChange:e=>t("badge",e,"type"),help:"icon"===o?(0,x.__)("Add a Font Awesome class on each step in the Steps panel.","b-blocks"):(0,x.__)("Numbers are auto-incremented starting at 1.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Badge size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",isUnitSelectTabbable:!0,value:i,onChange:e=>t("badge",e,"size")})]}),(0,l.jsx)(An,{label:(0,x.__)("Badge background","b-blocks"),value:a,onChange:e=>t("badge",e,"bg"),defaults:{color:"#2563EB"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Badge text/icon color","b-blocks"),value:s,onChange:e=>t("badge",e,"color"),defaultColor:"#FFFFFF"}),"icon"!==o&&(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("badge",e,"typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:n.border,onChange:e=>t("badge",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:n.borderRadius,onChange:e=>t("badge",e,"borderRadius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:n.shadow,onChange:e=>t("badge",e,"shadow")})]})},JR=({attributes:e,updateObj:t})=>{const{card:n={}}=e,{bg:o,padding:i={},borderRadius:a={},border:s={}}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card Style","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:o,onChange:e=>t("card",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i,onChange:e=>t("card",e,"padding")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:s,onChange:e=>t("card",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:a,onChange:e=>t("card",e,"borderRadius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:n.shadow,onChange:e=>t("card",e,"shadow")})]})},ez=({attributes:e,updateObj:t})=>{const{content:n={}}=e,{titleTag:o,titleColor:i,descColor:a}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title & Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Heading tag","b-blocks"),value:o||"h3",options:AR,onChange:e=>t("content",e,"titleTag"),help:(0,x.__)("Use H3 for pages that already have an H2 section heading.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Title color","b-blocks"),value:i||"",onChange:e=>t("content",e||"","titleColor"),defaultColor:""}),(0,l.jsx)(Oa,{label:(0,x.__)("Title Typography","b-blocks"),value:n.typo,onChange:e=>t("content",e,"typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color","b-blocks"),value:a||"",onChange:e=>t("content",e||"","descColor"),defaultColor:""}),(0,l.jsx)(Oa,{label:(0,x.__)("Description Typography","b-blocks"),value:n.descTypo,onChange:e=>t("content",e,"descTypo")})]})},tz=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(XR,{...e}),(0,l.jsx)(ez,{...e}),(0,l.jsx)(JR,{...e})]}),nz=e=>{const{attributes:t,setAttributes:n,updateObj:o,isPremium:i}=e,{layout:a={},advanced:s}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:a.alignment,onChange:e=>o("layout",e||"center","alignment")})}),(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:PR,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(ZR,{...e}),"style"===t.name&&(0,l.jsx)(tz,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:s,onChange:e=>n({advanced:e}),isPremium:i})]})})})]})},oz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{steps:a=[],badge:s={},content:r={}}=t,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,d=fe(t,n),u=ER.includes(r.titleTag)?r.titleTag:"h3",p="icon"===s.type?"icon":"number",g=(e,t,o)=>{n({steps:a.map(((n,i)=>i===e?{...n||{},[t]:o}:n))})},m=(e,t)=>{if(t<0||t>=a.length)return;const o=a.slice(),[i]=o.splice(e,1);o.splice(t,0,i),n({steps:o})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nz,{attributes:t,setAttributes:n,updateObj:d,isPremium:c,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(GR,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:WR(t),children:0===a.length?(0,l.jsx)("p",{className:"bBlocksProcessStepsEmpty",children:(0,x.__)("No steps yet. Add the first one from the sidebar.","b-blocks")}):(0,l.jsx)("ol",{className:"bBlocksProcessStepsList","aria-label":(0,x.__)("Process steps","b-blocks"),children:a.map(((e,t)=>{const o=u;return(0,l.jsxs)("li",{className:"bBlocksProcessStepsItem",children:[(0,l.jsx)("div",{className:"bBlocksProcessStepsBadge","aria-hidden":"true",children:"icon"===p&&e&&e.icon?(0,l.jsx)("span",{className:"bBlocksProcessStepsIcon",dangerouslySetInnerHTML:{__html:e.icon}}):(0,l.jsx)("span",{className:"bBlocksProcessStepsNumber",children:t+1})}),(0,l.jsxs)("div",{className:"bBlocksProcessStepsBody",children:[(0,l.jsx)(h.RichText,{tagName:o,className:"bBlocksProcessStepsTitle",value:e&&e.title||"",onChange:e=>g(t,"title",e),placeholder:(0,x.__)("Step title","b-blocks"),allowedFormats:[]}),(0,l.jsx)(h.RichText,{tagName:"div",className:"bBlocksProcessStepsDescription",value:e&&e.description||"",onChange:e=>g(t,"description",e),placeholder:(0,x.__)("Describe this step…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]}),(0,l.jsxs)("div",{className:"bBlocksProcessStepsEditorActions",style:{display:"flex",justifyContent:"center",gap:4,marginTop:8},children:[(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-up-alt2",label:(0,x.__)("Move step up","b-blocks"),onClick:()=>m(t,t-1),disabled:0===t}),(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-down-alt2",label:(0,x.__)("Move step down","b-blocks"),onClick:()=>m(t,t+1),disabled:t===a.length-1}),(0,l.jsx)(y.Button,{variant:"tertiary",isDestructive:!0,size:"small",icon:"trash",label:(0,x.__)("Remove step","b-blocks"),onClick:()=>{return e=t,void n({steps:a.filter(((t,n)=>n!==e))});var e}})]})]})]},e&&e._key||t)}))})})]})]})}));Ll(LR.name)&&(0,p.registerBlockType)(LR,{icon:ul,edit:oz})
527 -;const iz=JSON.parse('{"apiVersion":3,"name":"b-blocks/qr-code","title":"QR Code","description":"Show QR Code in posts and pages.","category":"bBlocks","keywords":["QR scanner","QR code","Code"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"qrAlign":{"type":"string","default":"center"},"url":{"type":"string","default":""},"dimension":{"type":"number","default":180},"color":{"type":"string","default":"#000"},"bgColor":{"type":"string","default":"#fff"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),az=({attributes:e,setAttributes:t})=>{const{qrAlign:n,url:o,dimension:i,color:a,bgColor:s}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:gn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("QR Code Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Website URL:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:o,onChange:e=>t({url:e}),placeholder:(0,x.__)("Website URL:","b-blocks")}),(0,l.jsx)(v,{children:(0,x.__)("Dimension:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:i,onChange:e=>t({dimension:e}),min:50,max:1e3,step:1}),(0,l.jsx)(Ge,{label:(0,x.__)("Color:","b-blocks"),value:a,onChange:e=>t({color:e}),defaultColor:"#000",disableAlpha:!0}),(0,l.jsx)(Ge,{label:(0,x.__)("Background Color:","b-blocks"),value:s,onChange:e=>t({bgColor:e}),defaultColor:"#fff",disableAlpha:!0})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>t({qrAlign:e}),describedBy:(0,x.__)("QR Code Alignment"),alignmentControls:[{title:(0,x.__)("QR Code in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("QR Code in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("QR Code in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},sz="bBlocksQRCode";Ll(iz.name)&&(0,p.registerBlockType)(iz,{icon:Or,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{qrAlign:i,url:a,dimension:s,color:r,bgColor:c}=t,d=`https://api.qrserver.com/v1/create-qr-code/?size=${s}x${s}&color=${r.replace("#","")}&bgcolor=${c.replace("#","")}&ecc=L&qzone=1&data=${a||"http://bplugins.com"}`,u=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(az,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t#${u} .${sz}{\n\t\t\t\t\ttext-align: ${i};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsx)("div",{className:sz,children:(0,l.jsx)("img",{src:d,alt:a})})]})]})},save:()=>null});const rz=JSON.parse('{"apiVersion":3,"name":"b-blocks/section-heading","title":"Section Heading","description":"Display heading before section.","category":"bBlocks","keywords":["headline","section headline","heading description"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"textAlign":{"type":"string","default":"left"},"title":{"type":"string","default":"Section Heading"},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"},"fontWeight":600}},"titleColor":{"type":"string","default":""},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isSep":{"type":"boolean","default":true},"separator":{"type":"object","default":{"width":"150px","height":"3px","color":"#0c0d3c1a"}},"sepMargin":{"type":"object","default":{"side":4,"bottom":"5px"}},"isDesc":{"type":"boolean","default":true},"desc":{"type":"string","default":"This content area describes section heading descriptions or details."},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"descColor":{"type":"string","default":""},"descMargin":{"type":"object","default":{"side":4,"bottom":"15px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":["file:./view.js","mailtoui"]}'),lz=({attributes:e,setAttributes:t})=>{const{textAlign:n,titleTypo:i,titleColor:s,titleMargin:r,isSep:c,separator:d,sepMargin:u,isDesc:p,descTypo:g,descColor:m,descMargin:b}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title Settings","b-blocks"),children:[(0,l.jsx)(Oa,{value:i,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20},fontWeight:600}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:s,onChange:e=>t({titleColor:e}),defaultColor:o}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:r,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:c,onChange:e=>t({isSep:e})}),(0,l.jsx)(Ta,{value:d,onChange:e=>t({separator:e}),defaults:{width:"150px",height:"3px",color:a}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:u,onChange:e=>t({sepMargin:e}),defaults:{side:4,bottom:"5px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:p,onChange:e=>t({isDesc:e})}),(0,l.jsx)(Oa,{value:g,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:m,onChange:e=>t({descColor:e}),defaultColor:"#333"}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:b,onChange:e=>t({descMargin:e}),defaults:{side:4,bottom:"15px"}})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>t({textAlign:e})})})]})},cz="bBlocksSectionHeading";Ll(rz.name)&&(0,p.registerBlockType)(rz,{icon:Rr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{textAlign:i,title:a,titleTypo:s,titleColor:r,titleMargin:c,isSep:d,separator:u,sepMargin:p,isDesc:g,desc:m,descTypo:b,descColor:f,descMargin:y}=t,v=`#block-${o} .${cz}`,k=`${v} .sectionHeadingTitle`,w=`${v} .sectionHeadingDescription`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(lz,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${ps("",s)?.googleFontLink}\n\t\t\t\t${ps("",b)?.googleFontLink}\n\t\t\t\t${ps(k,s)?.styles}\n\t\t\t\t${ps(w,b)?.styles}\n\n\t\t\t\t${v}{\n\t\t\t\t\t${ns("text-align",i)}\n\t\t\t\t}\n\t\t\t\t${k}{\n\t\t\t\t\t${ns("color",r)}\n\t\t\t\t\tmargin: ${us(c)};\n\t\t\t\t}\n\t\t\t\t${v} .sectionHeadingSeparator{\n\t\t\t\t\t${cs(u)}\n\t\t\t\t\tmargin: ${us(p)};\n\t\t\t\t}\n\t\t\t\t${w}{\n\t\t\t\t\t${ns("color",f)}\n\t\t\t\t\tmargin: ${us(y)};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsxs)("div",{className:cz,children:[(0,l.jsx)(h.RichText,{className:"sectionHeadingTitle",tagName:"h2",value:a,onChange:e=>n({title:e}),placeholder:(0,x.__)("Section heading title","b-blocks")}),d&&(0,l.jsx)("span",{className:"sectionHeadingSeparator"}),g&&(0,l.jsx)(h.RichText,{className:"sectionHeadingDescription",tagName:"p",value:m,onChange:e=>n({desc:e}),placeholder:(0,x.__)("Section heading description","b-blocks")})]})]})]})},save:()=>null});var dz=(0,l.jsx)(Xk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Xk.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})})
528 -;const uz=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/skill-bar","version":"0.1.0","title":"Skill Bar","category":"bBlocks","icon":"chart-bar","textdomain":"b-blocks","description":"Display skills with customizable progress bars, multiple themes and templates.","attributes":{"skills":{"type":"array","default":[{"title":"JavaScript","percentage":90,"color":"#f7df1e"},{"title":"React","percentage":85,"color":"#61dafb"},{"title":"WordPress","percentage":95,"color":"#21759b"}]},"theme":{"type":"string","default":"modern"},"template":{"type":"string","default":"standard"},"columns":{"type":"number","default":2},"customBackgroundColor":{"type":"string","default":""},"customTitleColor":{"type":"string","default":""},"customPercentageColor":{"type":"string","default":""},"customBarBackgroundColor":{"type":"string","default":""},"customBarProgressColor":{"type":"string","default":""},"customBarRemainingColor":{"type":"string","default":""}},"supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}');Ll(uz.name)&&(0,p.registerBlockType)(uz,{icon:Zr,edit:function({attributes:e,setAttributes:t}){const{skills:n,theme:o,template:i,columns:a,customBackgroundColor:s,customTitleColor:r,customPercentageColor:c,customBarProgressColor:d,customBarRemainingColor:u}=e,[p,g]=(0,Qa.useState)(0),m="customizable"===o,b={};m&&s&&(b.background=s);const f={};m&&r&&(f.color=r);const v={};m&&c&&(v.color=c);const k=(0,h.useBlockProps)({className:`skill-bar-block theme-${o} template-${i} columns-${a}`}),w=()=>{const e=[...n,{title:"New Skill",percentage:50,color:"#0073aa"}];t({skills:e}),g(e.length-1)},_=(e,o,i)=>{const a=[...n];a[e]={...a[e],[o]:i},t({skills:a})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(y.ToolbarButton,{icon:dz,label:(0,x.__)("Add Skill","b-blocks"),onClick:w})})}),(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Theme & Layout","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Theme","b-blocks"),value:o,options:[{label:(0,x.__)("Modern","b-blocks"),value:"modern"},{label:(0,x.__)("Classic","b-blocks"),value:"classic"},{label:(0,x.__)("Gradient","b-blocks"),value:"gradient"},{label:(0,x.__)("Customizable","b-blocks"),value:"customizable"}],onChange:e=>t({theme:e})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Template","b-blocks"),value:i,options:[{label:(0,x.__)("Standard","b-blocks"),value:"standard"},{label:(0,x.__)("Circular","b-blocks"),value:"circular"},{label:(0,x.__)("Striped","b-blocks"),value:"striped"}],onChange:e=>t({template:e})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Columns","b-blocks"),value:a,onChange:e=>t({columns:e}),min:1,max:4})]}),m&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Customizable Theme Colors","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("p",{style:{marginBottom:"20px",color:"#757575",fontSize:"13px",lineHeight:"1.5"},children:(0,x.__)('Customize all color aspects of your skill bars. These settings only apply when "Customizable" theme is selected.',"b-blocks")}),(0,l.jsx)("h3",{style:{margin:"20px 0 12px",fontSize:"13px",fontWeight:600,textTransform:"uppercase",color:"#1e1e1e"},children:(0,x.__)("Card Styling","b-blocks")}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Background Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:s||"#ffffff",onChange:e=>t({customBackgroundColor:e}),enableAlpha:!0}),s&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customBackgroundColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsx)("h3",{style:{margin:"24px 0 12px",fontSize:"13px",fontWeight:600,textTransform:"uppercase",color:"#1e1e1e"},children:(0,x.__)("Text Colors","b-blocks")}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Skill Title Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:r||"#333333",onChange:e=>t({customTitleColor:e}),enableAlpha:!0}),r&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customTitleColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Percentage Number Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:c||"#666666",onChange:e=>t({customPercentageColor:e}),enableAlpha:!0}),c&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customPercentageColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsx)("h3",{style:{margin:"24px 0 12px",fontSize:"13px",fontWeight:600,textTransform:"uppercase",color:"#1e1e1e"},children:(0,x.__)("Progress Bar Colors","b-blocks")}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Bar Progress Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:d||"#0073aa",onChange:e=>t({customBarProgressColor:e}),enableAlpha:!0}),d&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customBarProgressColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Bar Remaining/Background Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:u||"#f0f0f0",onChange:e=>t({customBarRemainingColor:e}),enableAlpha:!0}),u&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customBarRemainingColor:""}),children:(0,x.__)("Reset","b-blocks")})]})]}),n.length>0&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Individual Skill Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Select Skill","b-blocks"),value:p,options:n.map(((e,t)=>({label:e.title||`Skill ${t+1}`,value:t}))),onChange:e=>g(parseInt(e,10))}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Skill Title","b-blocks"),value:n[p].title,onChange:e=>_(p,"title",e)}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Percentage","b-blocks"),value:n[p].percentage,onChange:e=>_(p,"percentage",e),min:0,max:100}),!m&&(0,l.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Progress Bar Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:n[p].color,onChange:e=>_(p,"color",e),enableAlpha:!0})]}),m&&(0,l.jsx)("p",{style:{fontSize:"12px",color:"#757575",fontStyle:"italic"},children:(0,x.__)("Individual skill colors are overridden by the Customizable theme settings above.","b-blocks")}),n.length>1&&(0,l.jsx)(y.Button,{isDestructive:!0,variant:"secondary",onClick:()=>(e=>{const o=n.filter(((t,n)=>n!==e));t({skills:o}),p>=o.length&&g(Math.max(0,o.length-1))})(p),children:(0,x.__)("Remove This Skill","b-blocks")})]})]}),(0,l.jsxs)("div",{...k,children:[(0,l.jsx)("div",{className:"b-blocks-skill-bar-skills-grid",children:n.map(((e,t)=>((e,t)=>{const n="b-blocks-skill-bar-skill-item",o=p===t?`${n} is-selected`:n,a={};m&&u&&(a.backgroundColor=u);const s={width:`${e.percentage}%`};s.background=m&&d?d:e.color;const r=m&&d?d:e.color,c=m&&u?u:"#e0e0e0";return(0,l.jsxs)("div",{className:o,style:b,onClick:()=>g(t),role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||g(t)},children:[(0,l.jsxs)("div",{className:"skill-header",children:[(0,l.jsx)("span",{className:"skill-title",style:f,children:e.title}),(0,l.jsxs)("span",{
529 -className:"skill-percentage",style:v,children:[e.percentage,"%"]})]}),"circular"===i?(0,l.jsxs)("div",{className:"skill-circular",children:[(0,l.jsxs)("svg",{viewBox:"0 0 100 100",children:[(0,l.jsx)("circle",{className:"skill-circular-bg",cx:"50",cy:"50",r:"45",fill:"none",stroke:c,strokeWidth:"10"}),(0,l.jsx)("circle",{className:"b-blocks-skill-bar-skill-circular-progress",cx:"50",cy:"50",r:"45",fill:"none",stroke:r,strokeWidth:"10",strokeDasharray:""+2*Math.PI*45,strokeDashoffset:""+2*Math.PI*45*(1-e.percentage/100),transform:"rotate(-90 50 50)"})]}),(0,l.jsxs)("div",{className:"b-blocks-skill-bar-skill-circular-text",style:v,children:[e.percentage,"%"]})]}):(0,l.jsx)("div",{className:"skill-bar-wrapper",children:(0,l.jsx)("div",{className:"skill-bar-bg",style:a,children:(0,l.jsx)("div",{className:"b-blocks-skill-bar-skill-bar-fill",style:s})})})]},t)})(e,t)))}),(0,l.jsx)("div",{className:"b-blocks-skill-bar-skill-bar-actions",children:(0,l.jsx)(y.Button,{variant:"secondary",onClick:w,icon:dz,children:(0,x.__)("Add Skill","b-blocks")})})]})]})},save:function({attributes:e}){const{skills:t,theme:n,template:o,columns:i,customBackgroundColor:a,customTitleColor:s,customPercentageColor:r,customBarProgressColor:c,customBarRemainingColor:d}=e,u="customizable"===n,p={};u&&a&&(p.backgroundColor=a);const g={};u&&s&&(g.color=s);const m={};u&&r&&(m.color=r);const b=h.useBlockProps.save({className:`skill-bar-block theme-${n} template-${o} columns-${i}`});return(0,l.jsx)("div",{...b,children:(0,l.jsx)("div",{className:"b-blocks-skill-bar-skills-grid",children:t.map(((e,t)=>{const n={};u&&d&&(n.backgroundColor=d);const i=u&&c?c:e.color,a=u&&c?c:e.color,s=u&&d?d:"#e0e0e0";return(0,l.jsxs)("div",{className:"b-blocks-skill-bar-skill-item","data-percentage":e.percentage,style:p,children:[(0,l.jsxs)("div",{className:"skill-header",children:[(0,l.jsx)("span",{className:"skill-title",style:g,children:e.title}),(0,l.jsxs)("span",{className:"skill-percentage",style:m,children:[e.percentage,"%"]})]}),"circular"===o?(0,l.jsxs)("div",{className:"skill-circular",children:[(0,l.jsxs)("svg",{viewBox:"0 0 100 100",children:[(0,l.jsx)("circle",{className:"skill-circular-bg",cx:"50",cy:"50",r:"45",fill:"none",stroke:s,strokeWidth:"10"}),(0,l.jsx)("circle",{className:"b-blocks-skill-bar-skill-circular-progress",cx:"50",cy:"50",r:"45",fill:"none",stroke:a,strokeWidth:"10",strokeDasharray:""+2*Math.PI*45,strokeDashoffset:""+2*Math.PI*45,transform:"rotate(-90 50 50)","data-color":a})]}),(0,l.jsxs)("div",{className:"b-blocks-skill-bar-skill-circular-text",style:m,children:[e.percentage,"%"]})]}):(0,l.jsx)("div",{className:"skill-bar-wrapper",children:(0,l.jsx)("div",{className:"skill-bar-bg",style:n,children:(0,l.jsx)("div",{className:"b-blocks-skill-bar-skill-bar-fill",style:{backgroundColor:i},"data-percentage":e.percentage,"data-color":i})})})]},t)}))})})}});const pz=JSON.parse('{"apiVersion":3,"name":"b-blocks/service","title":"Service","description":"Service item for services section.","parent":["b-blocks/services"],"category":"bBlocks","keywords":["our service","service item","service card"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"background":{"type":"object","default":{"color":"#0000"}},"hoverBG":{"type":"object","default":{"type":"image","image":{"url":"https://i.imgur.com/i6qCSdM.png"},"overlayColor":"#0000","position":"bottom left","repeat":"no-repeat","size":"auto"}},"isIcon":{"type":"boolean","default":true},"isUpIcon":{"type":"boolean","default":false},"icon":{"type":"object","default":{"class":"fa-brands fa-wordpress","fontSize":70}},"upIcon":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"iconWidth":{"type":"string","default":"70px"},"iconBorder":{"type":"object","default":{}},"isTitle":{"type":"boolean","default":true},"title":{"type":"string","selector":".bBlocksService h3.title","default":"Service title"},"titleColor":{"type":"string","default":"#222"},"isDesc":{"type":"boolean","default":true},"desc":{"type":"string","selector":".bBlocksService h3.description","default":"Lorem ipsum dolor sit, amet consectetur adipisicing elit. Accusamus, fuga."},"descColor":{"type":"string","default":"#333"},"isLink":{"type":"boolean","default":true},"link":{"type":"string","default":"#"},"linkIn":{"type":"string","default":"button"},"linkIconColor":{"type":"string","default":"#fff"},"linkBGColor":{"type":"string","default":"#d2d2d2"},"linkBGHovColor":{"type":"string","default":"#146EF5"}},"supports":{"align":false,"reusable":false,"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","render":"file:./render.php","viewScript":"file:./view.js"}'),hz=({attributes:e,setAttributes:t})=>{const{background:n,hoverBG:i,isIcon:a,isUpIcon:s,icon:r,upIcon:c,iconWidth:d,iconBorder:u,isTitle:p,titleColor:g,isDesc:m,descColor:b,isLink:f,link:k,linkIn:w,linkIconColor:_,linkBGColor:C,linkBGHovColor:j}=e;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:bn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Service Settings","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:i,onChange:e=>t({hoverBG:e}),defaults:{type:"image",image:{url:"https://i.imgur.com/i6qCSdM.png"},overlayColor:"#0000",position:"bottom left",size:"auto"}})]}),a&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:"Upload Icon?",checked:s,onChange:e=>t({isUpIcon:e})}),s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:c,onChange:e=>t({upIcon:e}),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({iconWidth:e}),units:[Pe(),Ee(),Ae()]})]}):(0,l.jsx)(Un,{value:r,onChange:e=>t({icon:e}),defaults:{class:"fa-brands fa-wordpress",fontSize:70}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:u,onChange:e=>t({iconBorder:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Colors Settings","b-blocks"),initialOpen:!1,children:[p&&(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:g,onChange:e=>t({titleColor:e}),defaultColor:"#222"}),m&&(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:b,onChange:e=>t({descColor:e}),defaultColor:"#333"})]}),f&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Link Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:k,onChange:e=>t({link:e})}),"button"===w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:_,onChange:e=>t({linkIconColor:e}),defaultColor:"#fff"}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:C,onChange:e=>t({linkBGColor:e}),defaultColor:"#d2d2d2"}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Hover Color:","b-blocks"),value:j,onChange:e=>t({linkBGHovColor:e}),defaultColor:o})]})]})]})},gz="bBlocksServices",mz="bBlocksService",bz=({attributes:e,id:t})=>{const{background:n,hoverBG:o,icon:i,iconWidth:a,iconBorder:s,titleColor:r,descColor:c,linkIconColor:d,linkBGColor:u,linkBGHovColor:p}=e,h=`#${t}`,g=`${h} .${mz}`,m=`${g} .icon`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
530 -__html:`\n\t\t${g}{\n\t\t\t${os(n)}\n\t\t}\n\t\t${g} .bgLayer{\n\t\t\t${os(o)}\n\t\t}\n\n\t\t${g} .title{\n\t\t\tcolor: ${r};\n\t\t}\n\t\t${m}{\n\t\t\t${is(s)}\n\t\t}\n\t\t${m} i{\n\t\t\t${rs(i)}\n\t\t}\n\t\t${m} img{\n\t\t\twidth: ${a};\n\t\t}\n\t\t${g} .description{\n\t\t\tcolor: ${c};\n\t\t}\n\t\t${g} .link a{\n\t\t\tbackground-color: ${u};\n\t\t}\n\t\t${h}:hover .ssbService .link a{\n\t\t\tbackground-color: ${p};\n\t\t}\n\t\t${g} .link a svg{\n\t\t\tfill: ${d};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},fz=(e="Service")=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 493.356 493.356",role:"img","aria-label":e.replace(/(<([^>]+)>)/gi,""),children:(0,l.jsx)("path",{d:"M490.498,239.278l-109.632-99.929c-3.046-2.474-6.376-2.95-9.993-1.427c-3.613,1.525-5.427,4.283-5.427,8.282v63.954H9.136 c-2.666,0-4.856,0.855-6.567,2.568C0.859,214.438,0,216.628,0,219.292v54.816c0,2.663,0.855,4.853,2.568,6.563 c1.715,1.712,3.905,2.567,6.567,2.567h356.313v63.953c0,3.812,1.817,6.57,5.428,8.278c3.62,1.529,6.95,0.951,9.996-1.708 l109.632-101.077c1.903-1.902,2.852-4.182,2.852-6.849C493.356,243.367,492.401,241.181,490.498,239.278z"})}),xz=({attributes:e,children:t})=>{const{title:n,isIcon:o,isUpIcon:i,icon:a,upIcon:s,isLink:r,link:c,linkIn:d}=e;return(0,l.jsxs)("div",{className:mz,children:["service"===d&&(0,l.jsx)("a",{className:"serviceLink",href:$t(c)}),(0,l.jsx)("div",{className:"bgLayer"}),o&&(0,l.jsx)("div",{className:"icon",children:i?(0,l.jsx)("img",{src:s?.url,alt:s?.alt}):a?.class&&(0,l.jsx)("i",{className:a?.class})}),t,r&&"button"===d&&(0,l.jsx)("div",{className:"link",children:c?(0,l.jsx)("a",{href:$t(c),children:fz(n)}):(0,l.jsx)("a",{children:fz(n)})})]})};Ll("b-blocks/services")&&(0,p.registerBlockType)(pz,{icon:zr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{isTitle:i,title:a,isDesc:s,desc:r}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hz,{attributes:e.attributes,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(bz,{attributes:t,id:`block-${o}`}),(0,l.jsxs)(xz,{attributes:t,isBackend:!0,custom:{setAttributes:n},children:[i&&(0,l.jsx)(h.RichText,{className:"title",tagName:"h3",value:a,onChange:e=>n({title:e}),placeholder:(0,x.__)("Service Title","b-blocks"),inlineToolbar:!0}),s&&(0,l.jsx)(h.RichText,{className:"description",tagName:"p",value:r,onChange:e=>n({desc:e}),placeholder:(0,x.__)("Service Description","b-blocks"),inlineToolbar:!0})]})]})]})},save:()=>null});const yz=JSON.parse('{"apiVersion":3,"name":"b-blocks/services","title":"Services","description":"Services section for web page.","category":"bBlocks","keywords":["our services","services template","services section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"cId":{"type":"string","default":""},"layout":{"type":"string","default":"default"},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"30px"},"rowGap":{"type":"string","default":"30px"},"background":{"type":"object","default":{"color":"#0000"}},"textAlign":{"type":"string","default":"left"},"itemHeight":{"type":"string","default":"375px"},"itemPadding":{"type":"object","default":{"side":4,"top":"50px","right":"30px","bottom":"50px","left":"50px"}},"itemBorder":{"type":"object","default":{"radius":"15px"}},"itemShadow":{"type":"object","default":{"blur":"20px","color":"#0000001a"}},"iconPadding":{"type":"object","default":{"side":4,"bottom":"10px"}},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"23px","tablet":"20px","mobile":"18px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"30px"}},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),vz=[{label:(0,x.__)("Default","services-section"),value:"default"},{label:(0,x.__)("Layout 1","services-section"),value:"layout1"}],kz=[{label:(0,x.__)("Service Element","services-section"),value:"service"},{label:(0,x.__)("Title","services-section"),value:"title"},{label:(0,x.__)("Button","services-section"),value:"button"}],wz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,clientId:n,device:o})=>{const{layout:i,columns:a,columnGap:s,rowGap:c,background:d,textAlign:u,itemHeight:p,itemPadding:g,itemBorder:b,itemShadow:k,iconPadding:w,iconMargin:C,titleTypo:j,titleMargin:$,descTypo:S}=e,T=(0,f.select)("core/block-editor").getBlocksByClientId(n)[0]?.innerBlocks,N=T&&T[0]?.attributes,[M,L]=(0,m.useState)(N?.isIcon),[P,E]=(0,m.useState)(N?.isTitle),[A,B]=(0,m.useState)(N?.isDesc),[I,O]=(0,m.useState)(N?.linkIn),R=e=>T.forEach((t=>{(0,f.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,e)}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:bn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,onChange:e=>{t({layout:e}),"default"===e&&t({background:{...d,type:"solid",color:"#0000"},itemShadow:{...k,blur:"20px",color:"#0000001a"}}),"layout1"===e&&t({background:{...d,type:"solid",color:"#121212"},itemShadow:{...k,blur:"0",color:"#0000"}}),T.forEach((t=>{const{hoverBG:n,icon:o,iconBorder:i}=t?.attributes;"default"===e&&(0,f.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{hoverBG:{...n,type:"image",image:{url:"https://i.imgur.com/i6qCSdM.png"},overlayColor:"#0000",position:"bottom left",size:"auto"},icon:{...o,colorType:"solid",gradient:r},iconBorder:{...i,width:"0px",color:"#0000",side:"all"},titleColor:"#222",descColor:"#333",linkIn:"button"}),"layout1"===e&&(0,f.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{hoverBG:{...n,type:"solid",color:"#0000"},icon:{...o,colorType:"gradient",gradient:"linear-gradient(135deg, #7f246b, #c70d2b)"},iconBorder:{...i,width:"1px",color:"#777",side:"bottom"},titleColor:"#fff",descColor:"#777",linkIn:"title"})}))},options:vz})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:a[o],onChange:e=>{t({columns:{...a,[o]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t({background:e}),defaults:{color:"#0000"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Item Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Min Height:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({itemHeight:e}),units:[Pe(),Ae()]}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:g,onChange:e=>t({itemPadding:e}),defaults:{side:4,top:"50px",right:"30px",bottom:"50px",left:"50px"}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border","b-blocks"),value:b,onChange:e=>t({itemBorder:e}),defaults:{radius:"15px"}}),(0,l.jsx)(od,{label:(0,x.__)("Shadow:","b-blocks"),value:k,onChange:e=>t({itemShadow:e}),defaults:{blur:"20px",color:"#0000001a"}}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,
531 -x.__)("Link In:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:I,onChange:e=>{R({linkIn:e}),O(e)},options:kz})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:M||N?.isIcon,onChange:e=>{R({isIcon:e}),L(e)}}),M||N?.isIcon?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Icon Padding:","b-blocks"),value:w,onChange:e=>t({iconPadding:e}),defaults:{side:4,bottom:"10px"}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Icon Margin:","b-blocks"),value:C,onChange:e=>t({iconMargin:e}),defaults:{side:4,bottom:"20px"}})]}):"",(0,l.jsx)(y.ToggleControl,{className:"mt35",label:(0,x.__)("Show Title","b-blocks"),checked:P||N?.isTitle,onChange:e=>{R({isTitle:e}),E(e)}}),P||N?.isTitle?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Oa,{label:(0,x.__)("Title Typography:","b-blocks"),value:j,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:23,tablet:20,mobile:18}}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Title Margin:","b-blocks"),value:$,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"30px"}})]}):"",(0,l.jsx)(y.ToggleControl,{className:"mt35",label:(0,x.__)("Show Description","b-blocks"),checked:A||N?.isDesc,onChange:e=>{R({isDesc:e}),B(e)}}),A||N?.isDesc?(0,l.jsx)(Oa,{label:(0,x.__)("Description Typography:","b-blocks"),value:S,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}):""]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:u,onChange:e=>t({textAlign:e})})})]})})),_z=({attributes:e,id:t,isBackend:n=!1})=>{const{columnGap:o,rowGap:i,background:a,textAlign:s,itemHeight:r,itemPadding:c,itemBorder:d,itemShadow:u,iconPadding:p,iconMargin:h,titleTypo:g,titleMargin:m,descTypo:b}=e,f=`#${t} .${gz}`,x=`${f} .${mz}`,y=n?`${f} .block-editor-inner-blocks .block-editor-block-list__layout{\n\t\tgrid-gap: ${i} ${o};\n\t}`:`${f}{\n\t\tgrid-gap: ${i} ${o};\n\t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",g)?.googleFontLink}\n\t\t${ps("",b)?.googleFontLink}\n\t\t${ps(`${x} .title`,g)?.styles}\n\t\t${ps(`${x} .description`,b)?.styles}\n\n\t\t${f}{\n\t\t\t${os(a)}\n\t\t}\n\t\t${y}\n\n\t\t${x}{\n\t\t\ttext-align: ${s};\n\t\t\tmin-height: ${r};\n\t\t\tpadding: ${us(c)};\n\t\t\t${is(d)||"border-radius: 15px;"}\n\t\t\tbox-shadow: ${ds(u)};\n\t\t}\n\t\t${x} .bgLayer{\n\t\t\tborder-radius: ${d?.radius||"15px"}\n\t\t}\n\t\t${x} .icon{\n\t\t\tpadding: ${us(p)};\n\t\t\tmargin: ${us(h)};\n\t\t}\n\t\t${x} .title{\n\t\t\tmargin: ${us(m)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})};Ll(yz.name)&&(0,p.registerBlockType)(yz,{icon:zr,transforms:{from:[{type:"block",blocks:["services-section/services"],transform:e=>(0,p.createBlock)("b-blocks/services",e)},{type:"prefix",prefix:"slider",transform:()=>(0,p.createBlock)("b-blocks/services")}],to:[{type:"block",blocks:["services-section/services"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("services-section/services",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{layout:i,columns:a}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wz,{attributes:t,setAttributes:n,clientId:o}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(_z,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:`${gz} ${i} columns-${a.desktop} columns-tablet-${a.tablet} columns-mobile-${a.mobile}`,children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:["b-blocks/service"],template:[["b-blocks/service"],["b-blocks/service"],["b-blocks/service"]]})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const Cz=JSON.parse('{"apiVersion":3,"name":"b-blocks/shape-divider","title":"Shape Divider","description":"Create unique and visually appealing dividers.","category":"bBlocks","keywords":["shape divider","svg shape","dynamic divider"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"full"},"background":{"type":"object","default":{"type":"gradient","gradient":"linear-gradient(135deg, #74E2D5, #7BCACF);"}},"padding":{"type":"object","default":{"top":"100px","right":"0px","bottom":"100px","left":"0px"}},"height":{"type":"object","default":{"desktop":"100vh","tablet":"100vh","mobile":"100vh"}},"shape":{"type":"string","default":"waves-opacity"},"shapePosition":{"type":"string","default":"bottom"},"isShapeSplite":{"type":"boolean","default":false},"shapeHeight":{"type":"object","default":{"desktop":"150px","tablet":"150px","mobile":"150px"}},"shapeWidth":{"type":"number","default":100},"shapeColor":{"type":"string","default":"#fff"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),jz=[{label:(0,x.__)("Curve","b-blocks"),value:"curve"},{label:(0,x.__)("Tilt","b-blocks"),value:"tilt"},{label:(0,x.__)("Curve Acymmetrical","b-blocks"),value:"curve-acymmetrical"},{label:(0,x.__)("Waves","b-blocks"),value:"waves"},{label:(0,x.__)("Waves Opacity","b-blocks"),value:"waves-opacity"}],$z=({attributes:e,setAttributes:t})=>{const{height:n,shape:o,shapePosition:i,isShapeSplite:a,shapeWidth:s,shapeHeight:r,shapeColor:c,background:d,padding:u}=e;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Section","b-blocks"),children:(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:n.desktop,onChange:e=>t({height:{desktop:e,tablet:e,mobile:e}}),units:[Pe(1080),Ae(67),Oe(100)],isResetValueOnUnitChange:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Shape","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:o,onChange:e=>t({shape:e}),options:jz})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Position:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,options:[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],onChange:e=>t({shapePosition:e})})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Shape Splite","b-blocks"),checked:a,value:a,onChange:e=>t({isShapeSplite:e})}),(0,l.jsx)(v,{children:(0,x.__)("Width:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:s,onChange:e=>t({shapeWidth:e}),min:100,max:300}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:r.desktop,onChange:e=>t({shapeHeight:{desktop:e,tablet:e,mobile:e}}),units:[Pe(150),Ae(10)],isResetValueOnUnitChange:!0})]})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Section","b-blocks"),children:[(0,l.jsx)(An,{className:"mb20",label:(0,x.__)("Background","b-blocks"),value:d,onChange:e=>t({background:e})}),(0,l.jsx)(y.__experimentalBoxControl,{label:(0,x.__)("Padding:","b-blocks"),values:u,resetValues:{top:"100px",right:"0px",bottom:"100px",left:"0px"},onChange:e=>t({padding:e})})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Shape","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:c,onChange:e=>t({shapeColor:e}),defaultColor:"#fff"})})]})]})})})},Sz=({attributes:e,id:t})=>{const{shapeColor:n,shapePosition:o,shapeWidth:i,shapeHeight:a,isShapeSplite:s,padding:r,background:c,height:d}=e,u=`#${t}`,p="top"===o?"rotate(0deg)":"rotate(180deg)",h=s?"scaleX(1)":"scaleX(-1)";return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
532 -__html:`\n\t\t${u}{\n\t\t\tmin-height: ${d.desktop};\n\t\t\t${os(c)}\n\t\t\tpadding: ${hs(r)};\n\t\t}\n\n\t\t${u} svg{\n\t\t\twidth: calc(${i}% + 1.3px);\n\t\t\theight: ${a.desktop};\n\t\t\tfill: ${n};\n\t\t\ttop: ${"top"===o?0:"auto"};\n\t\t\tbottom: ${"bottom"===o?0:"auto"};\n\t\t\ttransform: ${p+" "+h};\n\t\t}\n\t`}})},Tz=({attributes:e})=>{const{shape:t}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1200 120",preserveAspectRatio:"none",children:(0,l.jsx)(Nz,{shape:t})})},Nz=({shape:e})=>{switch(e){case"curve":default:return(0,l.jsx)("path",{d:"M0,0V7.23C0,65.52,268.63,112.77,600,112.77S1200,65.52,1200,7.23V0Z"});case"tilt":return(0,l.jsx)("path",{d:"M1200 120L0 16.48 0 0 1200 0 1200 120z"});case"curve-acymmetrical":return(0,l.jsx)("path",{d:"M0,0V6c0,21.6,291,111.46,741,110.26,445.39,3.6,459-88.3,459-110.26V0Z"});case"waves":return(0,l.jsx)("path",{d:"M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z"});case"waves-opacity":return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z",opacity:".25"}),(0,l.jsx)("path",{d:"M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z",opacity:".5"}),(0,l.jsx)("path",{d:"M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z"})]})}},Mz=[["core/heading",{content:"Creative Shape Divider",textAlign:"center",style:{typography:{fontSize:"52px"}},textColor:"white"}],["core/paragraph",{content:"The Gutenberg Shape Divider plugin is an innovative tool designed to enhance the visual appeal and creativity of websites built using the WordPress Gutenberg editor. With its intuitive interface and powerful features, this plugin empowers users to create unique and captivating designs by adding customizable shape dividers to their web pages.",align:"center",style:{typography:{fontSize:"18px"}},textColor:"white"}]];Ll(Cz.name)&&(0,p.registerBlockType)(Cz,{icon:Dr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)($z,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Sz,{attributes:t,id:`block-${o}`}),(0,l.jsx)(Tz,{attributes:t}),(0,l.jsx)("div",{className:"shapeContent",children:(0,l.jsx)(h.InnerBlocks,{template:Mz,renderAppender:()=>(0,l.jsx)(h.Inserter,{rootClientId:o,isAppender:!0,renderToggle:({onToggle:e,disabled:t})=>(0,l.jsx)(y.Button,{onClick:e,disabled:t,icon:"plus-alt",children:" "})})})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const Lz=JSON.parse('{"apiVersion":3,"name":"b-blocks/slider","title":"Slider","description":"Display image and content slider.","category":"bBlocks","keywords":["content slider","image slider","image carousel"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"slides":{"type":"array","default":[{"background":{"color":"#00000080"},"border":{},"position":"center center","childPositions":[{"top":36,"right":44.71,"bottom":44.5,"left":44.71},{"top":47.5,"right":34.67,"bottom":52.5,"left":34.67},{"top":55.5,"right":44.54,"bottom":67,"left":44.54}],"title":"Slide Title 1","titleColor":"#fff","description":"This content area describes slider 1 descriptions/details.","descColor":"#fff","btnText":"Button 1","btnLink":"#","btnColors":{"color":"#fff","bg":"#146EF5"},"btnHovColors":{"color":"#fff","bg":"#FF7A00"}},{"background":{"color":"#00000080"},"border":{},"position":"center center","childPositions":[{"top":36,"right":44.71,"bottom":44.5,"left":44.71},{"top":47.5,"right":34.67,"bottom":52.5,"left":34.67},{"top":55.5,"right":44.54,"bottom":67,"left":44.54}],"title":"Slide Title 2","titleColor":"#fff","description":"This content area describes slider 2 descriptions/details.","descColor":"#fff","btnText":"Button 2","btnLink":"#","btnColors":{"color":"#fff","bg":"#146EF5"},"btnHovColors":{"color":"#fff","bg":"#FF7A00"}}]},"columns":{"type":"object","default":{"desktop":1,"tablet":1,"mobile":1}},"columnGap":{"type":"number","default":15},"sliderWidth":{"type":"string","default":"100%"},"sliderHeight":{"type":"string","default":"400px"},"sliderAlign":{"type":"string","default":"center"},"isLoop":{"type":"boolean","default":true},"isTouchMove":{"type":"boolean","default":true},"speed":{"type":"number","default":1.5},"isAutoplay":{"type":"boolean","default":true},"autoplayOptions":{"type":"object","default":{"delay":1.5,"disableOnInteraction":false,"reverseDirection":false,"pauseOnMouseEnter":false,"stopOnLastSlide":false}},"freeModeOptions":{"type":"object","default":{"enabled":false,"sticky":false}},"effect":{"type":"string","default":"slide"},"keyboardOptions":{"type":"object","default":{"enabled":false}},"isMousewheel":{"type":"boolean","default":false},"isPage":{"type":"boolean","default":true},"pageOnDevice":{"type":"object","default":{"tablet":true,"mobile":true}},"isPageClickable":{"type":"boolean","default":true},"isPageDynamic":{"type":"boolean","default":true},"isPrevNext":{"type":"boolean","default":true},"prevNextOnDevice":{"type":"object","default":{"tablet":true,"mobile":true}},"sliderBG":{"type":"object","default":{"color":"#0000"}},"sliderPadding":{"type":"object","default":{"vertical":"0px","horizontal":"0px"}},"pageColor":{"type":"string","default":"#fff"},"pageWidth":{"type":"string","default":"15px"},"pageHeight":{"type":"string","default":"15px"},"pageBorder":{"type":"object","default":{"radius":"50%"}},"prevNextColor":{"type":"string","default":"#fff"},"isTitle":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"}}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"descColor":{"type":"string","default":""},"isBtn":{"type":"boolean","default":true},"linkTarget":{"type":"string","default":"_blank"},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"btnPadding":{"type":"object","default":{"vertical":"12px","horizontal":"35px"}},"btnBorder":{"type":"object","default":{"radius":"3px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","wp-util"]}'),Pz=[{label:(0,x.__)("Slide","content-slider-block"),value:"slide"},{label:(0,x.__)("Fade","content-slider-block"),value:"fade"},{label:(0,x.__)("Cube","content-slider-block"),value:"cube"},{label:(0,x.__)("Creative","content-slider-block"),value:"creative"},{label:(0,x.__)("Coverflow","content-slider-block"),value:"coverflow"},{label:(0,x.__)("Flip","content-slider-block"),value:"flip"},{label:(0,x.__)("Cards","content-slider-block"),value:"cards"}],Ez=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"options",title:(0,x.__)("Options","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Az=(e,t)=>100*parseFloat(e/t),Bz=e=>parseInt(e?.clientWidth),Iz=e=>parseInt(e?.clientHeight),Oz=({attributes:e,setAttributes:t,clientId:n,arrKey:i,index:s,setActiveIndex:r=!1,premiumProps:c})=>{
533 -const d=e[i],{background:u,border:p={},title:h,titleColor:g,description:m,descColor:b,btnText:f,btnLink:k,btnColors:w,btnHovColors:_}=d[s],C=(n,o,a)=>{const s=Rb(e[i],(e=>{e[n][o]=a}));t({[i]:s}),r&&r(n)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:u,onChange:e=>C(s,"background",e),defaults:{color:"#00000080"}}),(0,l.jsx)(Ya,{label:(0,x.__)("Border:","b-blocks"),value:p,onChange:e=>C(s,"border",e),...c,Component:Jc}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Content Position","b-blocks")}),(0,l.jsx)(y.__experimentalAlignmentMatrixControl,{onChange:e=>{t({slides:Rb(d,(t=>{t[s].position=e,t[s].childPositions=((e,t,n)=>{const o=document.querySelector(`#${e} .swiper-wrapper .slide-${t} .slideContent`),i=o?.children||[];if(i?.length){const e=i.length,t=[];for(let a=0;a<e;a++){const s=(e=a)=>Az(Iz(i[e]),Iz(o)),r=((e=a)=>Az(Bz(i[e]),Bz(o)))(a),l=s(a);if(0<r&&0<l&&isFinite(r)&&isFinite(l)){const o=e=>e>=0?s(e)+3:0,i=11,c=5.8;let d=0;for(let e=0;e<a;e++)d+=o(e);let u=0;for(let t=e-1;t>a;t--)u+=o(t);const p=i+d,h=100-(i+l+d),g=100-(i+l+u),m=i+u,b=100-(r+c),f=50-r/2,x=3===e?1===a?50-l/2:2===a?50+s(1)/2+3:50-s(1)/2-3-l:2===e?1===a?51.5:48.5-l:50-l/2,y=3===e?1===a?50+l/2:2===a?50+s(1)/2+3+l:50-s(1)/2-3:2===e?1===a?51.5+l:48.5:50+l/2,v={top:p,right:b,bottom:h,left:c},k={top:p,right:f,bottom:h,left:f},w={top:p,right:c,bottom:h,left:b},_={top:x,right:b,bottom:y,left:c},C={top:x,right:f,bottom:y,left:f},j={top:x,right:c,bottom:y,left:b},$={top:g,right:b,bottom:m,left:c},S={top:g,right:f,bottom:m,left:f},T={top:g,right:c,bottom:m,left:b};switch(n){case"top left":t.push(v);break;case"top center":t.push(k);break;case"top right":t.push(w);break;case"center left":t.push(_);break;case"center center":t.push(C);break;case"center right":t.push(j);break;case"bottom left":t.push($);break;case"bottom center":t.push(S);break;case"bottom right":t.push(T)}}}return t}})(`block-${n}`,s,e)}))})}})]}),(0,l.jsx)("small",{children:(0,x.__)("You can also change the content position by dragging element.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:h,onChange:e=>C(s,"title",e),placeholder:(0,x.__)("Slide title","b-blocks")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:g,onChange:e=>C(s,"titleColor",e),defaultColor:"#fff"}),(0,l.jsx)(v,{children:(0,x.__)("Description:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:m,onChange:e=>C(s,"description",e),placeholder:(0,x.__)("Description of the slider","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:b,onChange:e=>C(s,"descColor",e),defaultColor:"#fff"}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:f,onChange:e=>C(s,"btnText",e),placeholder:(0,x.__)("Button label","b-blocks")})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:k,onChange:e=>C(s,"btnLink",e),placeholder:(0,x.__)("Button link","b-blocks")})]}),(0,l.jsx)(On,{label:(0,x.__)("Button Colors:","b-blocks"),value:w,onChange:e=>C(s,"btnColors",e),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Button Hover Colors:","b-blocks"),value:_,onChange:e=>C(s,"btnHovColors",e),defaults:{color:"#fff",bg:a}})]})},Rz=[{top:36,right:44.71,bottom:44.5,left:44.71},{top:47.5,right:34.67,bottom:52.5,left:34.67},{top:55.5,right:44.54,bottom:67,left:44.54}],zz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,clientId:n,activeIndex:i,setActiveIndex:s,isPremium:r,device:c})=>{const{slides:d=[],columns:u,columnGap:p,sliderWidth:g,sliderHeight:b,isLoop:f,isTouchMove:k,speed:w,isAutoplay:C,autoplayOptions:j={},freeModeOptions:$={},effect:S,keyboardOptions:T={},isMousewheel:N=!1,isPage:M,pageOnDevice:L={},isPageClickable:P,isPageDynamic:E,isPrevNext:A,prevNextOnDevice:B={},sliderBG:I={},sliderPadding:O={},pageColor:R,pageWidth:z,pageHeight:D,pageBorder:F,prevNextColor:H,sliderAlign:W,isTitle:U,titleTypo:G,isDesc:V,descTypo:q,isBtn:Y,linkTarget:K,btnTypo:Q,btnPadding:Z,btnBorder:X}=e,[J,ee]=(0,m.useState)(!1),te={background:{color:"#00000080"},border:{},position:"center center",childPositions:Rz,title:`Slide Title ${d.length+1}`,titleColor:"#fff",description:`This content area describes slider ${d.length+1} descriptions/details.`,descColor:"#fff",btnText:`Button ${d.length+1}`,btnLink:"#",btnColors:{color:"#fff",bg:o},btnHovColors:{color:"#fff",bg:a}},ne={isPremium:r,setIsProModalOpen:ee},oe={className:"bPlPanelBody",initialOpen:!1},ie={attributes:e,setAttributes:t,clientId:n,arrKey:"slides",activeIndex:i,setActiveIndex:s,premiumProps:ne};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Ez,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slides","b-blocks"),children:(0,l.jsx)(_a,{...ie,newItem:te,ItemSettings:Oz,itemLabel:"Slide",design:r?"sortable":"all"})}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Layout Settings","b-blocks"),...oe,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:u[c],onChange:e=>t({columns:{...u,[c]:e}}),min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(v,{children:(0,x.__)("Column Gap:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:p,onChange:e=>t({columnGap:e}),min:0,max:250,step:1,beforeIcon:"arrow-right-alt"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({sliderWidth:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:b,onChange:e=>t({sliderHeight:e}),units:[Pe(),Ae(),Oe()]})]})]}),"options"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Basic Options","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Loop","b-blocks"),checked:f,onChange:e=>t({isLoop:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Touch Move","b-blocks"),checked:k,onChange:e=>t({isTouchMove:e})}),(0,l.jsx)("small",{children:(0,x.__)("Switch slide with grab in anywhere in slide","b-blocks")}),(0,l.jsx)("small",{children:(0,x.__)("Touch Move will not work in backend","b-blocks")}),(0,l.jsx)(v,{children:(0,x.__)("Speed (s):","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:w,onChange:e=>t({speed:e}),min:0,max:10,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Smaller speed value will be slide faster","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Autoplay","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Autoplay","b-blocks"),checked:C,onChange:e=>t({isAutoplay:e})}),(0,l.jsx)("small",{children:(0,x.__)("Autoplay will not work in backend","b-blocks")}),C&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Delay (s):","b-blocks"),value:j.delay,onChange:e=>t({autoplayOptions:{...j,delay:e}}),min:0,max:10,step:.05,beforeIcon:"visibility",...ne,Component:y.RangeControl}),(0,l.jsx)("small",{children:(0,x.__)("Smaller delay value will be autoplay faster","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Disable on Interaction","b-blocks"),checked:j.disableOnInteraction,onChange:e=>t({autoplayOptions:{...j,disableOnInteraction:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ya,{
534 -className:"mt10",label:(0,x.__)("Pause on Mouse Enter","b-blocks"),checked:j.pauseOnMouseEnter,onChange:e=>t({autoplayOptions:{...j,pauseOnMouseEnter:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)("small",{children:(0,x.__)("If 'Disable on Interaction' is also enabled, it will stop autoplay instead of pause","b-blocks")}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Reverse Direction","b-blocks"),checked:j.reverseDirection,onChange:e=>t({autoplayOptions:{...j,reverseDirection:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Stop on Last Slide","b-blocks"),checked:j.stopOnLastSlide,onChange:e=>t({autoplayOptions:{...j,stopOnLastSlide:e}}),...ne,Component:y.ToggleControl})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Free Mode","b-blocks"),...oe,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Enable Free Mode","b-blocks"),checked:$.enabled,onChange:e=>t({freeModeOptions:{...$,enabled:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)("small",{children:(0,x.__)("Smooth Scrolling with dragging the slide","b-blocks")}),(0,l.jsx)("br",{}),(0,l.jsx)("small",{children:(0,x.__)("Enable Touch Move to use Free Mode","b-blocks")}),$.enabled&&(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Sticky","b-blocks"),checked:$.sticky,onChange:e=>t({freeModeOptions:{...$,sticky:e}}),...ne,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Effects","b-blocks"),...oe,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Effect:","b-blocks")}),(0,l.jsx)(Za,{value:S,onChange:e=>{t({effect:e}),"slide"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"fade"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"cube"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"450px",sliderHeight:"500px",sliderPadding:{vertical:"50px",horizontal:"50px"}}),"creative"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"coverflow"===e&&t({columns:{desktop:3,tablet:2,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"flip"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"450px",sliderHeight:"500px",sliderPadding:{vertical:"50px",horizontal:"50px"}}),"cards"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"400px",sliderHeight:"500px",sliderPadding:{vertical:"50px",horizontal:"50px"}})},options:Pz,proValues:["cube","coverflow","flip","cards"],...ne})]}),(0,l.jsx)("small",{children:(0,x.__)("To work fade, cube, creative, flip & cards effects properly, set single column per view.","b-blocks")}),(0,l.jsx)("br",{}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when effect will be changed.","b-blocks")})]}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Keyboard Control","b-blocks"),...oe,children:(0,l.jsx)(Ya,{label:(0,x.__)("Enable Keyboard Control","b-blocks"),checked:T.enabled,onChange:e=>t({keyboardOptions:{...T,enabled:e}}),...ne,Component:y.ToggleControl})}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Mousewheel","b-blocks"),...oe,children:(0,l.jsx)(Ya,{label:(0,x.__)("Enable Slide on Mousewheel","b-blocks"),checked:N,onChange:e=>t({isMousewheel:e}),...ne,Component:y.ToggleControl})}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Pagination","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Pagination","b-blocks"),checked:M,onChange:e=>t({isPage:e})}),M&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show On Tablet","b-blocks"),checked:L?.tablet,onChange:e=>t({pageOnDevice:{...L,tablet:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show On Mobile","b-blocks"),checked:L?.mobile,onChange:e=>t({pageOnDevice:{...L,mobile:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Clickable","b-blocks"),checked:P,onChange:e=>t({isPageClickable:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Dynamic Bullets","b-blocks"),checked:E,onChange:e=>t({isPageDynamic:e})})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Navigation","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Preview Next Button","b-blocks"),checked:A,onChange:e=>t({isPrevNext:e})}),A&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show On Tablet","b-blocks"),checked:B?.tablet,onChange:e=>t({prevNextOnDevice:{...B,tablet:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show On Mobile","b-blocks"),checked:B?.mobile,onChange:e=>t({prevNextOnDevice:{...B,mobile:e}}),...ne,Component:y.ToggleControl})]})]})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider","b-blocks"),children:[(0,l.jsx)(Ya,{label:(0,x.__)("Background","b-blocks"),value:I,onChange:e=>t({sliderBG:e}),defaults:{color:"#0000"},...ne,Component:An}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:O,onChange:e=>t({sliderPadding:e}),defaults:{vertical:"0px",horizontal:"0px"},...ne,Component:id})]}),M||A?(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Options","b-blocks"),...oe,children:[M&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Pagination Bullets Color:","b-blocks"),value:R,onChange:e=>t({pageColor:e}),defaultColor:"#fff"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Width:","b-blocks"),labelPosition:"left",value:z,onChange:e=>t({pageWidth:e}),units:[Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Height:","b-blocks"),labelPosition:"left",value:D,onChange:e=>t({pageHeight:e}),units:[Pe(),Ae()]}),(0,l.jsx)(Jc,{label:(0,x.__)("Pagination Border:","b-blocks"),value:F,onChange:e=>t({pageBorder:e}),defaults:{radius:"50%"}})]}),A&&(0,l.jsx)(Ue,{label:(0,x.__)("Preview Next Button Color:","b-blocks"),value:H,onChange:e=>t({prevNextColor:e}),defaultColor:"#fff"})]}):"",(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Slide Title","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:U,onChange:e=>t({isTitle:e})}),U&&(0,l.jsx)(Oa,{value:G,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Slide Description","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:V,onChange:e=>t({isDesc:e})}),V&&(0,l.jsx)(Oa,{value:q,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Slide Button","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Button","b-blocks"),checked:Y,onChange:e=>t({isBtn:e})}),Y&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open link in new tab","b-blocks"),checked:"_blank"===K,onChange:e=>t({linkTarget:e?"_blank":""})}),(0,l.jsx)(Oa,{value:Q,onChange:e=>t({btnTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:Z,onChange:e=>t({btnPadding:e}),defaults:{vertical:"12px",horizontal:"35px"}}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:X,onChange:e=>t({btnBorder:e}),defaults:{radius:"3px"}})]})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Slide","b-blocks"),onClick:()=>{t({slides:[...d,te]}),s(d.length)},children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:W,onChange:e=>t({sliderAlign:e}),describedBy:(0,x.__)("Slider Alignment"),
535 -alignmentControls:[{title:(0,x.__)("Slider in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Slider in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Slider in right","b-blocks"),align:"right",icon:"align-right"}]})]}),(0,l.jsxs)(jn,{isProModalOpen:J,setIsProModalOpen:ee,block:"Slider",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Border: ","b-blocks")}),(0,x.__)("Border style options in every single slide.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Delay time: ","b-blocks")}),(0,x.__)("Delay time option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Disable on Interaction: ","b-blocks")}),(0,x.__)("Disable on Interaction option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Reverse Direction: ","b-blocks")}),(0,x.__)("Reverse Direction option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Pause on Mouse Enter: ","b-blocks")}),(0,x.__)("Pause on Mouse Enter option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Stop on Last Slide: ","b-blocks")}),(0,x.__)("Stop on Last Slide option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Free Mode: ","b-blocks")}),(0,x.__)("Free Mode option on drag slide.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Sticky: ","b-blocks")}),(0,x.__)("Sticky option in free mode.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Effects: ","b-blocks")}),(0,x.__)("Explore more effects such as Cube, Coverflow, Flip, and Cards.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Keyboard Control: ","b-blocks")}),(0,x.__)("Slide with Keyboard control.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Slide on Mousewheel: ","b-blocks")}),(0,x.__)("Slide on Mousewheel option.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Pagination Device: ","b-blocks")}),(0,x.__)("Show/Hide pagination in different devices(tablet and mobile).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Navigation Device: ","b-blocks")}),(0,x.__)("Show/Hide navigation in different devices(tablet and mobile).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Background: ","b-blocks")}),(0,x.__)("Background style option for slider wrapper.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Padding: ","b-blocks")}),(0,x.__)("Padding style option for slider wrapper.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Shortcode: ","b-blocks")}),(0,x.__)("Shortcode option to use anywhere.","b-blocks")]})]})]})})),Dz="bBlocksSlider",Fz=({attributes:e,initialSlide:t=0,isBackend:n=!1})=>{const{slides:o=[],columns:i,columnGap:a,isLoop:s,isTouchMove:r,speed:c,isAutoplay:d,autoplayOptions:u,freeModeOptions:p={},effect:h,keyboardOptions:g={},isMousewheel:m=!1,isPage:b,isPageClickable:f,isPageDynamic:x,isPrevNext:y,isTitle:v,isDesc:k,isBtn:w}=e;return(0,l.jsx)(Wx,{className:Dz,direction:"horizontal",initialSlide:t,slidesPerView:i.mobile,breakpoints:{576:{slidesPerView:i.tablet},768:{slidesPerView:i.desktop}},spaceBetween:a,modules:[If,Lf,Ef,Df,Ff,Gf,Uf,Wf,Vf],loop:s,allowTouchMove:r,grabCursor:r,speed:1e3*c,autoplay:!!d&&{...u,delay:1e3*u.delay},freeMode:p,effect:h,fadeEffect:{crossFade:!1},cubeEffect:{shadow:!1},creativeEffect:{prev:{shadow:!0,translate:["-120%",0,-500]},next:{shadow:!0,translate:["120%",0,-500]}},keyboard:g,mousewheel:m,pagination:!!b&&{clickable:f,dynamicBullets:x,forceClass:!0},navigation:y,allowSlidePrev:!0,allowSlideNext:!0,autoHeight:!1,children:o?.map(((e,t)=>{const{position:o,title:i,description:a,btnText:s,btnLink:r}=e;return(0,l.jsx)(Ux,{className:`slide-${t}`,children:(0,l.jsxs)("div",{className:`slideContent ${o?.split(" ")?.join("-")||"center-center"}`,children:[v&&i&&(0,l.jsx)("h2",{className:"slideTitle",dangerouslySetInnerHTML:{__html:St(i)}}),k&&a&&(0,l.jsx)("p",{className:"slideDesc",dangerouslySetInnerHTML:{__html:St(a)}}),w&&s&&(0,l.jsx)("a",{href:n?"#":$t(r),className:"slideBtn",dangerouslySetInnerHTML:{__html:St(s)}})]})},t)}))})},Hz=[{top:36,right:44.71,bottom:44.5,left:44.71},{top:47.5,right:34.67,bottom:52.5,left:34.67},{top:55.5,right:44.54,bottom:67,left:44.54}],Wz=({attributes:e,id:t})=>{const{slides:n=[],sliderWidth:i,sliderHeight:s,pageOnDevice:r={},prevNextOnDevice:c={},sliderBG:d={},sliderPadding:u={},pageColor:p,pageWidth:h,pageHeight:g,pageBorder:m,prevNextColor:b,sliderAlign:f,isTitle:x,titleTypo:y,isDesc:v,descTypo:k,isBtn:w,btnTypo:_,btnPadding:C,btnBorder:j}=e,$=`#${t}`,S=`${$} .${Dz}`,T=`${S} .swiper-slide`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",y)?.googleFontLink}\n\t\t${ps("",k)?.googleFontLink}\n\t\t${ps("",_)?.googleFontLink}\n\t\t${ps(`${T} .slideTitle`,y)?.styles}\n\t\t${ps(`${T} .slideDesc`,k)?.styles}\n\t\t${ps(`${T} .slideBtn`,_)?.styles}\n\n\t\t${$}{\n\t\t\ttext-align: ${f};\n\t\t\theight: ${s};\n\t\t}\n\t\t${S}{\n\t\t\twidth: ${i};\n\t\t\theight: ${s};\n\t\t\t${os(d)};\n\t\t\tpadding: ${us(u)};\n\t\t}\n\n\t\t${T} .slideBtn{\n\t\t\tpadding: ${us(C)};\n\t\t\t${is(j)}\n\t\t}\n\n\t\t${S} .swiper-pagination .swiper-pagination-bullet{\n\t\t\tbackground: ${p};\n\t\t\twidth: ${h};\n\t\t\theight: ${g};\n\t\t\t${is(m)}\n\t\t}\n\t\t\n\t\t${S} .swiper-button-prev, ${S} .swiper-button-next{\n\t\t\tcolor: ${b};\n\t\t}\n\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${S} .swiper-pagination{\n\t\t\t\tdisplay: ${r?.tablet?"block":"none"};\n\t\t\t}\n\t\t\t${S} .swiper-button-prev, ${S} .swiper-button-next{\n\t\t\t\tdisplay: ${c?.tablet?"flex":"none"};\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) { \n\t\t\t${S} .swiper-pagination{\n\t\t\t\tdisplay: ${r?.mobile?"block":"none"};\n\t\t\t}\n\t\t\t${S} .swiper-button-prev, ${S} .swiper-button-next{\n\t\t\t\tdisplay: ${c?.mobile?"flex":"none"};\n\t\t\t}\n\t\t}\n\n\t\t${n.map(((e,t)=>{const{background:n,border:i={},childPositions:s=Hz,title:r,titleColor:l,description:c,descColor:d,btnText:u,btnColors:p,btnHovColors:h}=e,g=(x&&r?1:0)+(v&&c?1:0)+(w&&u?1:0),m=`${$} .swiper-wrapper .slide-${t}`,b=`${m} .slideContent`;let f="";for(let e=0;e<g;e++){const{top:t,right:n,bottom:o,left:i}=s[e]||{};f+=`${b} > *:nth-child(${e+1}){${t>o?`bottom: ${o}%;`:`top: ${t}%;`}${i>n?`right: ${n}%;`:`left: ${i}%;`}}`}return`\n\t\t\t\t${m}{\n\t\t\t\t\t${os(n)}\n\t\t\t\t\t${is(i)||""}\n\t\t\t\t}\n\t\t\t\t${m} .slideTitle{\n\t\t\t\t\tcolor: ${l||"#fff"};\n\t\t\t\t}\n\t\t\t\t${m} .slideDesc{\n\t\t\t\t\tcolor: ${d||"#fff"};\n\t\t\t\t}\n\t\t\t\t${m} .slideBtn{\n\t\t\t\t\t${ss(p)||`color: #fff; background: ${o};`}\n\t\t\t\t}\n\t\t\t\t${m} .slideBtn:hover{\n\t\t\t\t\t${ss(h)||`color: #fff; background: ${a};`}\n\t\t\t\t}\n\t\t\t\t${f}\n\t\t\t`})).join("")}\n\t\t`.replace(/\s+/g," ")}})},Uz=jQuery,Gz=(0,f.withSelect)((e=>({isEditorSidebarOpened:!!e("core/edit-post")?.isEditorSidebarOpened()})))((e=>{const{attributes:t,setAttributes:n,clientId:o,isEditorSidebarOpened:i}=e,{slides:a=[],columns:s,columnGap:r,isLoop:c,speed:d,freeModeOptions:u,effect:p,keyboardOptions:g,isMousewheel:b,isPage:f,isPageClickable:x,isPageDynamic:y,isPrevNext:v,isTitle:k,isDesc:w,isBtn:_}=t,C=bBlocksPremiumChecker,[j,$]=(0,m.useState)(0),[S,T]=(0,m.useState)(!0),N=`block-${o}`;(0,m.useEffect)((()=>{T(!S)}),[a,s,r,c,u,d,p,g,b,f,x,y,v,k,w,_,i]);const M=(e,t,o,i=!1,s=!1)=>{const r=Rb(a,(n=>{!1!==i&&s?n[e][t][i][s]=o:!1!==i&&!1===s?n[e][t][i]=o:n[e][t]=o}));n({slides:r}),$(e)};Uz(document).ready((function(){a?.length&&a.map(((e,t)=>{
536 -const n=document.querySelector(`#${N} .${Dz} .slide-${t}:not(.swiper-slide-duplicate) .slideContent`),o=n?.children||[];for(let e=0;e<o?.length;e++)Uz(o[e]).draggable({containment:"parent",cursor:"dragging",stop(n,o){const{top:i,left:a}=o.position,{clientWidth:s,clientHeight:r}=n.target||{},{clientWidth:l,clientHeight:c}=n.target?.parentElement||{};M(t,"childPositions",{top:i/c*100,right:(l-(a+s))/l*100,bottom:(c-(i+r))/c*100,left:a/l*100},e)}})}))}));const L=()=>(0,l.jsx)(Fz,{attributes:t,initialSlide:j,isBackend:!0});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(zz,{attributes:t,setAttributes:n,clientId:o,activeIndex:j,isPremium:C,setActiveIndex:$}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Wz,{attributes:t,id:N}),(0,l.jsx)(L,{})]})]})}));Ll(Lz.name)&&(0,p.registerBlockType)(Lz,{icon:Fr,transforms:{from:[{type:"block",blocks:["csb/content-slider-block"],transform:e=>(0,p.createBlock)("b-blocks/slider",e)},{type:"prefix",prefix:"slider",transform:()=>(0,p.createBlock)("b-blocks/slider")}],to:[{type:"block",blocks:["csb/content-slider-block"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("csb/content-slider-block",e)}]},edit:Gz,save:()=>null});const Vz=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/scroll-to-top","version":"1.0.0","title":"Scroll To Top","category":"bBlocks","description":"Enhance user experience with a fully customizable Scroll To Top button for smooth navigation.","keywords":["scroll to top","scroll to top button","scroll to top widget"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"scroll":{"type":"object","default":{"scrollType":"progress","position":"","desktop":{"position":{"right":"10px","bottom":"10px","left":"10px"},"align":""},"tablet":{"position":{"right":"","bottom":"","left":""},"align":""},"mobile":{"position":{"right":"","bottom":"","left":""},"align":""}}},"icon":{"type":"object","default":{"svg":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 384 512\'><path d=\'M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z\'/></svg>","text":"Top"}},"styles":{"type":"object","default":{"icon":{"size":"40px","color":"#000","bg":{},"normal":{"rotate":0},"hover":{"rotate":0,"transition":0.3},"radius":{"top":"","left":"","bottom":"","right":""}},"progress":{"size":"60px","strokeSize":6,"color":"#ff0000","strokeBg":"#efefef","bg":"#fff"},"text":{"typography":{"fontSize":{"desktop":"24px"}},"normal":{"color":"","bg":{},"shadow":[],"padding":{"top":"","left":"","bottom":"","right":""},"border":{},"radius":{"top":"","left":"","bottom":"","right":""}},"hover":{"color":"","bg":{},"shadow":[],"padding":{"top":"","left":"","bottom":"","right":""},"border":{},"radius":{"top":"","left":"","bottom":"","right":""}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}},"margin":{"desktop":{"bottom":"0px","top":"0px","right":"0px","left":"0px"}}},"transform":{"normal":{"rotate":{"desktop":{"x":"","y":"","z":""},"tablet":{"x":"","y":"","z":""},"mobile":{"x":"","y":"","z":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}],"border":{"width":"0px","style":"none"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"mask":{"isMask":false,"shape":{"type":"circle"},"repeat":"no-repeat"},"animation":{"type":"","duration":1},"visibility":{"zIndex":{"desktop":""},"overflow":""},"responsive":{"desktop":false,"tablet":false,"mobile":false}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),qz=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Yz=[{label:(0,x.__)("Icon","b-blocks"),value:"icon"},{label:(0,x.__)("Text","b-blocks"),value:"text"},{label:(0,x.__)("Progress","b-blocks"),value:"progress"}],Kz=e=>{const{attributes:t,updateObj:n}=e,{icon:o,styles:i}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:o.svg,onChange:e=>n("icon",e,"svg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Icon Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i.icon.size,onChange:e=>n("styles",e,"icon","size")})]})]})},Qz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{scroll:i}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Position","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.position,onChange:e=>n("scroll",e,"position"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Bottom Left",value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Bottom Right",value:"right"})]}),"right"===i.position&&(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mt10",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Right","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10 flex1",value:i[o].position.right,onChange:e=>n("scroll",e,o,"position","right")})]}),"left"===i.position&&(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mt10",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Left","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10 flex1",value:i[o].position.left,onChange:e=>n("scroll",e,o,"position","left")})]}),("left"===i.position||"right"===i.position)&&(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mt10",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Bottom","b-blocks")," ",(0,
537 -l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10 flex1",value:i[o].position.bottom,onChange:e=>n("scroll",e,o,"position","bottom")})]})]})})),Zz=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Xz=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),Jz=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),eD=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{scroll:i,icon:a}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Scroll To Top","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o].align,onChange:e=>n("scroll",e,o,"align"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:Zz}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:Xz}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:Jz})]})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Scroll Type","b-blocks"),labelPosition:"edge",options:Yz,value:i.scrollType,onChange:e=>n("scroll",e,"scrollType")}),"text"===i.scrollType&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Scroll Text","b-blocks"),value:a.text,onChange:e=>n("icon",e,"text")})]})})),tD=e=>{const{attributes:t}=e,{scroll:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eD,{...e}),"text"!==n.scrollType&&(0,l.jsx)(Kz,{...e}),(0,l.jsx)(Qz,{...e})]})},nD=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{icon:i}=o,[a,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon Style","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:i.color,onChange:e=>n("styles",e,"icon","color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>n("styles",e,"icon","bg")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Rotate","b-blocks"),value:i[a].rotate,onChange:e=>n("styles",e,"icon",a,"rotate"),max:360}),"hover"===a&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:i.hover.transition,onChange:e=>n("styles",e,"icon","hover","transition"),step:.05,max:10})]})},oD=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{progress:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Progress Style","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Progress Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i.size,onChange:e=>n("styles",e,"progress","size")})]}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Stroke Size","b-blocks"),value:i.strokeSize,onChange:e=>n("styles",e,"progress","strokeSize")}),(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Color","b-blocks"),value:i.color,onChange:e=>n("styles",e,"progress","color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Background","b-blocks"),value:i.strokeBg,onChange:e=>n("styles",e,"progress","strokeBg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>n("styles",e,"progress","bg")})]})},iD=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{text:i}=o,[a,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Text Style","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:i.typography,onChange:e=>n("styles",e,"text","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i[a].color,onChange:e=>n("styles",e,"text",a,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[a].bg,onChange:e=>n("styles",e,"text",a,"bg"),isImage:!0}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i[a].padding,onChange:e=>n("styles",e,"text",a,"padding")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:i[a].shadow,onChange:e=>n("styles",e,"text",a,"shadow")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i[a].border,onChange:e=>n("styles",e,"text",a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i[a].radius,onChange:e=>n("styles",e,"text",a,"radius")})]})},aD=e=>{const{attributes:t}=e,{scroll:n}=t;return(0,l.jsxs)(l.Fragment,{children:["text"!==n.scrollType&&(0,l.jsx)(nD,{...e}),"text"===n.scrollType&&(0,l.jsx)(iD,{...e}),"progress"===n.scrollType&&(0,l.jsx)(oD,{...e})]})},sD={dimension:["padding","margin","width","height"],transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0},rD=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:qz,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(tD,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(aD,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e}),enabled:sD,isPremium:!0})})]})})})})},lD=({attributes:e,id:t})=>{
538 -const{scroll:n,styles:o,advanced:i}=e,{icon:a,text:s,progress:r}=o,c=`#${t}`,d=`${c} .b-blocks-scroll-to-top-wrapper`,u=`${d} .b-blocks-scroll-to-top-icon`,p=`${d} .b-blocks-scroll-to-top-text`,h={icon:`\n\t\t\t${os(a.bg)}\n\t\t`,text:`\n\t\t\t\t${os(s.normal.bg)}\n\t\t\t\t${ns("box-shadow",ls(s.normal.shadow))}\n\t\t\t\t${ns("padding",hs(s.normal.padding))}\n\t\t\t\t${as(s.normal.border)}\n\t\t\t\t${ns("border-radius",hs(s.normal.radius))}\n\t\t`,progress:` \n\t\t\t${ns("width",r.size)}\n\t\t\t${ns("height",r.size)}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${ps("",s.typography).googleFontLink}\n\t\t${ps(p,s.typography).styles}\n\n\t\t\t${c}{\n\t\t\t\t${ns("justify-content",n.desktop.align)}\n\t\t\t\t${g="desktop",n.position?`\n\t\t\tposition:fixed;\n\t\t\t${ns(n.position,n[g].position?.[n.position])}\n\t\t\t${ns("bottom",n[g].position.bottom)}\n\t`:""}\n\t\t\t}\n\n\t\t\t${d}{\n\t\t\t\t${h[n.scrollType]}\n\t\t\t}\n\n\t\t\t${d}:hover .b-blocks-scroll-to-top-icon>svg{\n\t\t\t\t${ns("rotate",a.hover.rotate>=0?a.hover.rotate+"deg":"")}\n\t\t\t}\n\n\t\t\t${p}{\n\t\t\t\t${ns("color",s.normal.color)}\n\t\t\t}\n\t\t\t\n\t\t\t${u}>svg{\n\t\t\t\t${ns("width",a.size)}\n\t\t\t\t${ns("height",a.size)}\n\t\t\t\t${ns("fill",a.color)}\n\t\t\t\t${ns("transition",a.hover.transition?`all ${a.hover.transition}s ease-in-out`:"")}\n\t\t\t\t${ns("rotate",a.normal.rotate>=0?a.normal.rotate+"deg":"")}\n\t\t\t}\n\n\t\t\t${_s(t,i,!0,!1)}\n\t`}});var g},cD=e=>{const{attributes:t,doc:n=document,win:o=window,isBackend:i=!1}=e,{scroll:a,icon:s,styles:r}=t,{scrollType:c}=a,{progress:d}=r,[u,p]=(0,m.useState)(0),[h,g]=(0,m.useState)(!1),b={strokeWidth:d.strokeSize,color:d.color,bgColor:d.strokeBg,bg:d.bg},f=(0,m.useMemo)((()=>50-b.strokeWidth/2),[b.strokeWidth]),x=(0,m.useMemo)((()=>2*Math.PI*f),[f]);(0,m.useEffect)((()=>{const e=()=>{const e=o?.pageYOffset||n?.documentElement?.scrollTop||n?.body?.scrollTop||0,t=n?.documentElement?.scrollHeight-n?.documentElement?.clientHeight,a=0===t?0:e/t*100;p(Math.min(100,Math.max(0,a))),g(!i&&e>80)};return o?.addEventListener("scroll",e,{passive:!0}),e(),()=>o?.removeEventListener("scroll",e)}),[n,o]);const y=x-u/100*x;return(0,l.jsx)("div",{className:"b-blocks-scroll-to-top-main-wrapper",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},style:{...i?{}:{opacity:h?1:0}},children:(0,l.jsxs)("div",{className:"b-blocks-scroll-to-top-wrapper "+("progress"===c?"b-blocks-scroll-to-top-progress-wrapper":""),children:[("icon"===c||"progress"===c)&&(0,l.jsx)("div",{className:"b-blocks-scroll-to-top-icon",dangerouslySetInnerHTML:{__html:s.svg}}),"progress"===c&&(0,l.jsxs)("svg",{viewBox:"0 0 100 100",children:[(0,l.jsx)("circle",{cx:"50",cy:"50",r:f,fill:b.bg,stroke:b.bgColor,strokeWidth:b.strokeWidth}),(0,l.jsx)("circle",{cx:"50",cy:"50",r:f,fill:"transparent",stroke:b.color,strokeWidth:b.strokeWidth,strokeDasharray:x,strokeDashoffset:y,strokeLinecap:"round",className:"b-blocks-scroll-to-top-progress-circle"})]}),"text"===c&&(0,l.jsx)("div",{className:"b-blocks-scroll-to-top-text",dangerouslySetInnerHTML:{__html:s.text}})]})})};Ll(Vz.name)&&(0,p.registerBlockType)(Vz,{icon:ol,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=fe(t,n),a=(0,m.useRef)(null),s=a.current?.ownerDocument,r=s?.defaultView;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(rD,{attributes:t,setAttributes:n,updateObj:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:a}),children:[(0,l.jsx)(lD,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{children:(0,l.jsx)(cD,{attributes:t,doc:s,win:r,isBackend:!0})})]})]})}});const dD=JSON.parse('{"apiVersion":3,"name":"b-blocks/social-share","title":"Social Share","description":"Share your website/website-page link.","category":"bBlocks","keywords":["share","social share","page share"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"socials":{"type":"array","default":[{"networkType":"socialNetworks","network":"facebook","isUpIcon":false,"icon":{"class":"fab fa-facebook-f","color":"#1877f2"},"upIcon":{"id":null,"url":"","alt":"","title":""}},{"networkType":"socialNetworks","network":"twitter","isUpIcon":false,"icon":{"class":"fab fa-twitter","color":"#1da1f2"},"upIcon":{"id":null,"url":"","alt":"","title":""}},{"networkType":"socialNetworks","network":"linkedin","isUpIcon":false,"icon":{"class":"fab fa-linkedin-in","color":"#0a66c2"},"upIcon":{"id":null,"url":"","alt":"","title":""}},{"networkType":"mobileMessenger","network":"whatsapp","isUpIcon":false,"icon":{"class":"fab fa-whatsapp","color":"#25d366"},"upIcon":{"id":null,"url":"","alt":"","title":""}}]},"alignment":{"type":"string","default":"left"},"theme":{"type":"string","default":"default"},"background":{"type":"object","default":{"color":"#0000"}},"size":{"type":"string","default":"28px"},"padding":{"type":"string","default":"10px"},"margin":{"type":"string","default":"10px"},"border":{"type":"object","default":{"radius":"50%"}},"shadow":{"type":"object","default":{}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":["file:./view.js","goodShare"]}'),uD=(e,t)=>{for(const n of t)if(e===n[0])return n[1]},pD=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Theme 1","b-blocks"),value:"theme1"},{label:(0,x.__)("Theme 2","b-blocks"),value:"theme2"}],hD=[{label:(0,x.__)("Social Networks","b-blocks"),value:"socialNetworks"},{label:(0,x.__)("Mobile Messenger","b-blocks"),value:"mobileMessenger"}],gD=[{label:(0,x.__)("Facebook","b-blocks"),value:"facebook"},{label:(0,x.__)("Twitter","b-blocks"),value:"twitter"},{label:(0,x.__)("LinkedIn","b-blocks"),value:"linkedin"},{label:(0,x.__)("Pinterest","b-blocks"),value:"pinterest"},{label:(0,x.__)("Blogger","b-blocks"),value:"blogger"},{label:(0,x.__)("WordPress","b-blocks"),value:"wordpress"},{label:(0,x.__)("Tumblr","b-blocks"),value:"tumblr"},{label:(0,x.__)("Reddit","b-blocks"),value:"reddit"},{label:(0,x.__)("Digg","b-blocks"),value:"digg"},{label:(0,x.__)("LiveJournal","b-blocks"),value:"livejournal"},{label:(0,x.__)("Evernote","b-blocks"),value:"evernote"},{label:(0,x.__)("Flipboard","b-blocks"),value:"flipboard"},{label:(0,x.__)("Mix","b-blocks"),value:"mix"},{label:(0,x.__)("Pocket","b-blocks"),value:"pocket"},{label:(0,x.__)("Buffer","b-blocks"),value:"buffer"},{label:(0,x.__)("Instapaper","b-blocks"),value:"instapaper"},{label:(0,x.__)("Meneame","b-blocks"),value:"meneame"},{label:(0,x.__)("Baidu","b-blocks"),value:"baidu"},{label:(0,x.__)("Weibo","b-blocks"),value:"weibo"},{label:(0,x.__)("Xing","b-blocks"),value:"xing"},{label:(0,x.__)("RenRen","b-blocks"),value:"renren"},{label:(0,x.__)("Vkontakte (VK)","b-blocks"),value:"vkontakte"},{label:(0,x.__)("Odnoklassniki","b-blocks"),value:"odnoklassniki"},{label:(0,x.__)("My [email protected]","b-blocks"),value:"moimir"},{label:(0,x.__)("Surfingbird","b-blocks"),value:"surfingbird"},{label:(0,x.__)("LiveInternet","b-blocks"),value:"liveinternet"}],mD=[{label:(0,x.__)("SMS","b-blocks"),value:"sms"},{label:(0,x.__)("Skype","b-blocks"),value:"skype"},{label:(0,x.__)("Telegram","b-blocks"),value:"telegram"},{label:(0,x.__)("Viber","b-blocks"),value:"viber"},{label:(0,x.__)("WhatsApp","b-blocks"),value:"whatsapp"},{label:(0,x.__)("WeChat","b-blocks"),value:"wechat"},{label:(0,x.__)("LINE","b-blocks"),value:"line"
539 -}],bD=[["facebook","fab fa-facebook-f"],["twitter","fab fa-twitter"],["linkedin","fab fa-linkedin-in"],["pinterest","fab fa-pinterest-p"],["blogger","fab fa-blogger-b"],["wordpress","fa-brands fa-wordpress"],["tumblr","fab fa-tumblr"],["reddit","fab fa-reddit-alien"],["digg","fab fa-digg"],["evernote","fab fa-evernote"],["flipboard","fab fa-flipboard"],["mix","fab fa-mix"],["buffer","fab fa-buffer"],["weibo","fab fa-weibo"],["xing","fab fa-xing"],["renren","fab fa-renren"],["odnoklassniki","fab fa-odnoklassniki"],["sms","fas fa-sms"],["skype","fab fa-skype"],["telegram","fab fa-telegram-plane"],["viber","fab fa-viber"],["whatsapp","fab fa-whatsapp"],["wechat","fab fa-weixin"],["line","fab fa-line"]],fD=[["facebook","#1877f2"],["twitter","#1da1f2"],["linkedin","#0a66c2"],["pinterest","#bd081c"],["blogger","#fc4f08"],["wordpress","#0073aa"],["tumblr","#35465d"],["reddit","#ff4500"],["digg","#1b1a19"],["evernote","#00aa0f"],["flipboard","#f52828"],["mix","#ff8226"],["buffer","#000"],["weibo","#df152c"],["xing","#00a82d"],["renren","#0259a0"],["odnoklassniki","#f68b25"],["sms","#000"],["skype","#00aff0"],["telegram","#0088cc"],["viber","#794f9b"],["whatsapp","#25d366"],["wechat","#09b83e"],["line","#06c755"]],xD=[["facebook",!1],["twitter",!1],["linkedin",!1],["pinterest",!1],["blogger",!1],["wordpress",!1],["tumblr",!1],["reddit",!1],["digg",!1],["evernote",!1],["flipboard",!1],["mix",!1],["buffer",!1],["weibo",!1],["xing",!1],["renren",!1],["odnoklassniki",!1],["sms",!1],["skype",!1],["telegram",!1],["viber",!1],["whatsapp",!1],["line",!1],["livejournal",!0],["pocket",!0],["instapaper",!0],["meneame",!0],["baidu",!0],["vkontakte",!0],["moimir",!0],["surfingbird",!0],["liveinternet",!0]],yD=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:i})=>{const{socials:a,alignment:s,theme:c,background:d,size:u,padding:p,margin:g,border:m,shadow:b}=e,f=(e,o)=>{const i=Rb(a,(t=>{t[n][e]=o}));t({socials:i})},k=e=>{const o=Rb(a,(t=>{for(const o of e){const e=o[0],i=o[1],a=o?.[2];a?t[n][e][a]=i:t[n][e]=i}}));t({socials:o})},w=(e,n,o=!1)=>{const i=[...a];i.map(((t,a)=>{o?i[a][e][o]=n:i[a][e]=n})),t({socials:i})},{networkType:_="",network:C="",isUpIcon:j=!1,icon:$={},upIcon:S={}}=a[n]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:fn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove socials","b-blocks"),children:[null!==n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Social No ${n+1}:`,"b-blocks")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Network Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:_,onChange:e=>{k([["networkType",e],["network","mobileMessenger"===e?"sms":"facebook"],["isUpIcon",!1],["icon","mobileMessenger"===e?"fas fa-sms":"fab fa-facebook-f","class"],["icon","mobileMessenger"===e?"#000":"#1877f2","color"]])},options:hD})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Network:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:C,onChange:e=>{const t=[["network",e],["icon",uD(e,bD),"class"],["icon",uD(e,fD),"color"],["isUpIcon",uD(e,xD)]];k(t)},options:"mobileMessenger"===_?mD:gD})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Upload Icon?","b-blocks"),checked:j,onChange:e=>f("isUpIcon",e)}),j?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{className:"mt10",value:S,onChange:e=>f("upIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")})]}):(0,l.jsx)(Un,{label:(0,x.__)("Icon:","b-blocks"),value:$,onChange:e=>f("icon",e),defaults:{class:"fab fa-facebook-f",color:o},isSize:!1}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<a?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{e.preventDefault(),t({socials:[...a.slice(0,n),...a.slice(n+1)]}),i(0===n?0:n-1)},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{e.preventDefault(),t({socials:[...a.slice(0,n),{...a[n]},...a.slice(n)]}),i(n+1)},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Social","b-blocks"),onClick:()=>{t({socials:[...a,{networkType:"socialNetworks",network:"facebook",isUpIcon:!1,icon:{class:"fab fa-facebook-f",color:"#1877f2"},upIcon:{id:null,url:"",alt:"",title:""}}]}),i(a.length)},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Social","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Social Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>{t({theme:e}),"default"===e&&(t({background:{type:"solid",color:"#0000"},border:{width:"0",color:"#0000"}}),w("icon",o,"color")),"theme1"===e&&(t({background:{type:"gradient",gradient:r},border:{width:"0",color:"#0000"}}),w("icon","#fff","color")),"theme2"===e&&(t({background:{type:"solid",color:"#0000"},border:{width:"2px",color:o}}),w("icon",o,"color"))},options:pD})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Size:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({size:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({padding:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Space Between:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({margin:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:m,onChange:e=>t({border:e}),defaults:{radius:"50%"}}),(0,l.jsx)(od,{label:(0,x.__)("Shadow:","b-blocks"),value:b,onChange:e=>t({shadow:e})})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:s,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Social Icons Alignment"),alignmentControls:[{title:(0,x.__)("Social Icons in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Social Icons in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Social Icons in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},vD="bBlocksSocialShare",kD=({attributes:e,id:t})=>{const{socials:n,alignment:o,background:i,size:a,padding:s,margin:r,border:c,shadow:d}=e,u=`#${t}`,p=`${u} ul.${vD}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${u}{\n\t\t\ttext-align: ${o};\n\t\t}\n\t\t${p} li.icon{\n\t\t\tfont-size: ${a};\n\t\t\t${os(i)}\n\t\t\twidth: calc( ${a} + ${s} + ${s} );\n\t\t\theight: calc( ${a} + ${s} + ${s} );\n\t\t\tmargin: 0 calc( ${r} / 2 );\n\t\t\t${is(c)}\n\t\t\tbox-shadow: ${ds(d)||"none"};\n\t\t}\n\t\t${p} li.icon img{\n\t\t\twidth: ${a};\n\t\t}\n\n\t\t${n?.map(((e,t)=>`\n\t\t\t${p} li.icon-${t} i{\n\t\t\t\t${rs(e?.icon)}\n\t\t\t\tfont-size: inherit;\n\t\t\t}`)).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},wD=({attributes:e,isBackend:t=!1,custom:n})=>(0,l.jsx)("ul",{className:vD,children:e.socials?.map(((e,o)=>{const{network:i,isUpIcon:a,icon:s,upIcon:r}=e;return(0,l.jsx)("li",{onClick:()=>t&&n.setActiveIndex(o),className:`icon icon-${o} ${t&&o===n.activeIndex?"bPlNowEditing":""}`,"data-social":i,children:a?(0,l.jsx)("img",{className:r?.id?`wp-image-${r?.id}`:null,src:r?.url,alt:r?.alt}):s?.class&&(0,l.jsx)("i",{className:s?.class})},o)}))});Ll(dD.name)&&(0,p.registerBlockType)(dD,{icon:Hr,transforms:{from:[{type:"block",blocks:["bssb/social-share"],transform:e=>(0,p.createBlock)("b-blocks/social-share",e)},{
540 -type:"prefix",prefix:"share",transform:()=>(0,p.createBlock)("b-blocks/social-share")}],to:[{type:"block",blocks:["bssb/social-share"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("bssb/social-share",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e;(0,m.useEffect)((()=>me()),[i]);const[a,s]=(0,m.useState)(0);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(yD,{attributes:t,setAttributes:n,activeIndex:a,setActiveIndex:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(kD,{attributes:t,id:`block-${o}`}),(0,l.jsx)(wD,{attributes:t,isBackend:!0,custom:{activeIndex:a,setActiveIndex:s}})]})]})},save:()=>null});const _D=JSON.parse('{"UU":"b-blocks/whatsapp-chat"}'),CD=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),jD=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),$D=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),SD=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),TD=({attributes:e,setAttributes:t})=>{const{phoneNumber:n,buttonText:o,prefillMessage:i,showIcon:a,showStatusDot:s,tooltipText:r,buttonSize:c,hoverAnimation:d,openInNewTab:u,fullWidth:p,alignment:h,iconPosition:g,pulseAnimation:m}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("WhatsApp Settings","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:h,onChange:e=>t({alignment:e}),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:jD}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:$D}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:SD})]})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Phone Number","b-blocks"),help:(0,x.__)("Full international format without + or spaces, e.g. 15551234567","b-blocks"),value:n,onChange:e=>t({phoneNumber:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button Text","b-blocks"),value:o,onChange:e=>t({buttonText:e})}),(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Pre-filled Message","b-blocks"),help:(0,x.__)("This message will be pre-filled when the user opens WhatsApp.","b-blocks"),value:i,onChange:e=>t({prefillMessage:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Tooltip Text","b-blocks"),help:(0,x.__)("Shown on hover. Leave empty to disable.","b-blocks"),value:r,onChange:e=>t({tooltipText:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open in New Tab","b-blocks"),checked:u,onChange:e=>t({openInNewTab:e})})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Appearance","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Button Size","b-blocks"),value:c,options:[{label:(0,x.__)("Small","b-blocks"),value:"small"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"}],onChange:e=>t({buttonSize:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Full Width","b-blocks"),checked:p,onChange:e=>t({fullWidth:e})})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon & Status","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show WhatsApp Icon","b-blocks"),checked:a,onChange:e=>t({showIcon:e})}),a&&(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Icon Position","b-blocks"),value:g,options:[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],onChange:e=>t({iconPosition:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Online Status Dot","b-blocks"),help:(0,x.__)("Show a pulsing green dot to indicate availability.","b-blocks"),checked:s,onChange:e=>t({showStatusDot:e})})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Animations","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Hover Scale Animation","b-blocks"),checked:d,onChange:e=>t({hoverAnimation:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pulse Attention Animation","b-blocks"),help:(0,x.__)("Adds a subtle pulse to draw attention.","b-blocks"),checked:m,onChange:e=>t({pulseAnimation:e})})]})]})},ND=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,pulseAnimation:a,showIcon:s,showStatusDot:r}=t,[c,d]=(0,m.useState)("normal"),[u,p]=(0,m.useState)("normal");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:"Style",initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:i[o].margin,onChange:e=>n("styles",e,o,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:i[o].padding,onChange:e=>n("styles",e,o,"padding")}),a&&(0,l.jsx)(Ue,{label:(0,x.__)("Pulse Color","b-blocks"),value:i.pulseColor,onChange:e=>n("styles",e,"pulseColor")}),(0,l.jsx)(Oa,{value:i.typo,onChange:e=>n("styles",e,"typo")}),(0,
541 -l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:c,onChange:e=>d(e),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{value:i[c].bg,onChange:e=>n("styles",e,c,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i[c].color,onChange:e=>n("styles",e,c,"color")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),values:i[c].border,onChange:e=>n("styles",e,c,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i[c].radius,onChange:e=>n("styles",e,c,"radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),values:i[c].shadow,onChange:e=>n("styles",e,c,"shadow")}),"hover"===c&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),min:0,max:5e3,step:.01,value:i.hover.transition,onChange:e=>n("styles",e,"hover","transition")})]}),s&&(0,l.jsxs)(y.PanelBody,{title:"Icon",initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size","b-blocks"),value:i.icon.size,onChange:e=>n("styles",e,"icon","size")}),(0,l.jsx)("br",{}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:u,onChange:e=>p(e),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:i.icon[u].color,onChange:e=>n("styles",e,"icon",u,"color")})]}),r&&(0,l.jsxs)(y.PanelBody,{title:"Status",initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Status Size","b-blocks"),value:i.status.size,onChange:e=>n("styles",e,"status","size")}),(0,l.jsx)(An,{isImage:!1,label:(0,x.__)("Status Color","b-blocks"),value:i.status.color,onChange:e=>n("styles",e,"status","color")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Position X","b-blocks"),value:i.status.position.x,onChange:e=>n("styles",e,"status","position","x")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Position Y","b-blocks"),value:i.status.position.y,onChange:e=>n("styles",e,"status","position","y")})]})]})},MD=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(TD,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ND,{...e})})]})})})}),LD=({attributes:e,id:o})=>{const{alignment:i,styles:a}=e,{normal:s,hover:r,desktop:c,tablet:d,mobile:u,typo:p}=a,h=`#${o}.wp-block-b-blocks-whatsapp-chat`,g=`${h} .bBlocks-whatsapp-block-wrapper`,m=`${h} .bBlocks-whatsapp-block-btn`,b=`${m}.bBlocks-whatsapp-block-btn--pulse`,f=`${m} .bBlocks-whatsapp-block-btn__text`,x=`${m} .bBlocks-whatsapp-block-btn__icon`,y=`${m} .bBlocks-whatsapp-block-btn__status-dot`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${ps("",p).googleFontLink}\n\t\t${ps(f,p).styles}\n\n\t\t${g}{\n\t\t\t${ns("align-items",i)}\n\t\t}\n\n\t\t${b} {\n\t\t\tanimation: bBlocks-whatsapp-block-pulse 2s infinite;\n\t\t}\n\n\t\t@keyframes bBlocks-whatsapp-block-pulse {\n\t\t\t0% {\n\t\t\t\tbox-shadow: 0 0 0 0 ${a.pulseColor};\n\t\t\t}\n\n\t\t\t70% {\n\t\t\t\tbox-shadow: 0 0 0 12px rgba(37, 211, 102, 0);\n\t\t\t}\n\n\t\t\t100% {\n\t\t\t\tbox-shadow: 0 0 0 0 rgba(37, 211, 102, 0);\n\t\t\t}\n\t\t}\n\n\t\t${m}{\n\t\t\t${ns("margin",hs(c.margin))}\n\t\t\t${ns("padding",hs(c.padding))}\n\t\t\t${os(s.bg)}\n\t\t\t${ns("color",s.color)}\n\t\t\t${as(s.border)}\n\t\t\t${ns("border-radius",hs(s.radius))}\n\t\t\t${ds(s.shadow)}\n\t\t\ttransition: all ${r.transition}s ease-in-out;\n\t\t}\n\t\t${m}:hover{\n\t\t\t${os(r.bg)}\n\t\t\t${as(r.border)}\n\t\t\t${ns("color",r.color)}\n\t\t\t${ns("border-radius",hs(r.radius))}\n\t\t\t${ds(r.shadow)}\n\t\t}\n\n\t\t${f}{\n\t\t\t${ns("color",s.color)}\n\t\t}\n\n\t\t${m}:hover .bBlocks-whatsapp-block-btn__text{\n\t\t\t${ns("color",r.color)}\n\t\t}\n\n\t\t${x}>svg{\n\t\t\t${ns("width",a.icon.size)}\n\t\t\t${ns("fill",a.icon.normal.color)}\n\t\t}\n\n\t\t${m}:hover .bBlocks-whatsapp-block-btn__icon>svg{\n\t\t\t${ns("fill",a.icon.hover.color)}\n\t\t}\n\t\t\n\t\t${y}{\n\t\t\t${os(a.status.color)}\n\t\t\t${ns("width",a.status.size)}\n\t\t\t${ns("height",a.status.size)}\n\t\t\t${ns("left",a.status.position.x)}\n\t\t\t${ns("top",a.status.position.y)}\n\t\t}\n\t\t\n\t\t${t}{\n\t\t\t${m}{\n\t\t\t\t${ns("margin",hs(d.margin))}\n\t\t\t\t${ns("padding",hs(d.padding))}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t${m}{\n\t\t\t\t${ns("margin",hs(u.margin))}\n\t\t\t\t${ns("padding",hs(u.padding))}\n\t\t\t}\n\t\t}\n\t\t\n\t\t`.replace(/\s+/g," ")}})},PD=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{phoneNumber:a,buttonText:s,showIcon:r,showStatusDot:c,tooltipText:d,buttonSize:u,hoverAnimation:p,fullWidth:g,iconPosition:m,shadow:b,pulseAnimation:f}=t,y={small:"bBlocks-whatsapp-block-btn--small",medium:"bBlocks-whatsapp-block-btn--medium",large:"bBlocks-whatsapp-block-btn--large"},v=["bBlocks-whatsapp-block-btn",y[u]||y.medium,g?"bBlocks-whatsapp-block-btn--full":"",p?"bBlocks-whatsapp-block-btn--hover-anim":"",b?"bBlocks-whatsapp-block-btn--shadow":"",f?"bBlocks-whatsapp-block-btn--pulse":""].filter(Boolean).join(" "),k=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(MD,{attributes:t,setAttributes:n,updateObj:k,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(LD,{attributes:t,id:`block-${o}`}),!a&&(0,l.jsx)("p",{className:"bBlocks-whatsapp-block-notice",children:(0,x.__)("Please enter a WhatsApp phone number in the block settings.","bBlocks-whatsapp-block-whatsapp-chat")}),(0,l.jsxs)("div",{className:"bBlocks-whatsapp-block-wrapper",children:[(0,l.jsxs)("button",{className:v,type:"button","aria-label":s,children:[r&&"left"===m&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__icon",children:(0,l.jsx)(CD,{})}),(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__text",children:s}),r&&"right"===m&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__icon",children:(0,l.jsx)(CD,{})}),c&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__status-dot"})]}),d&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-tooltip",children:d})]})]})]})}));(0,p.registerBlockType)(_D.UU,{icon:kl,edit:PD})
542 -;const ED=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/woo-product-grid","title":"Woo Product Grid","category":"bBlocks","description":"Display WooCommerce products in a stunning, organized grid or list. Let shoppers filter by category, browse more without reloading, and add to cart right from the page.","keywords":["woocommerce","product grid","products","shop","store","ecommerce","add to cart","sale","featured"],"textdomain":"b-blocks","attributes":{"theme":{"type":"string","default":"default"},"layout":{"type":"object","default":{"type":"grid","titleTag":"h4","actionPosition":"overlay","actionAlign":"center","actionFull":false,"actionIconOnly":false,"actionOrder":"cart","imageSize":"default","desktop":{"columns":4,"contentAlign":"left","columnGap":"20px","rowGap":"20px"},"tablet":{"columns":2,"contentAlign":"","columnGap":"","rowGap":""},"mobile":{"columns":1,"contentAlign":"","columnGap":"","rowGap":""}}},"elements":{"type":"object","default":{"image":true,"category":false,"rating":true,"price":true,"saleBadge":true,"soldCount":false,"progressBar":false,"viewButton":false,"title":true,"cart":true}},"query":{"type":"object","default":{"type":"custom","orderBy":"date","order":"desc","perPage":4,"offset":0,"include":[],"exclude":[],"categoryMode":"include","categories":[],"tagMode":"include","tags":[],"onSaleOnly":false,"featuredOnly":false,"currentProductId":0,"noProductsMessage":"No products found."}},"contentOrder":{"type":"array","default":["price","rating","title","category","soldCount"]},"cart":{"type":"object","default":{"useCustomText":false,"simple":"Buy Now","variable":"Select options","grouped":"View products","external":"Buy now","default":"Read more","showIcon":true,"icon":"","iconColor":"","iconPosition":"left","typo":{"fontSize":{"desktop":"14px"},"fontWeight":500},"transition":0.2,"normal":{"color":"#ffffff","bg":{"type":"solid","color":"#146EF5"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"13px","right":"14px","bottom":"13px","left":"14px"},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"color":"#ffffff","bg":{"type":"solid","color":"#070127"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"desktop":{"iconSize":""},"tablet":{"iconSize":""},"mobile":{"iconSize":""}}},"viewButton":{"type":"object","default":{"text":"Visit Product","showIcon":true,"icon":"","iconColor":"","iconPosition":"left","typo":{"fontSize":{"desktop":"14px"},"fontWeight":500},"transition":0.2,"normal":{"color":"#070127","bg":{"type":"solid","color":"#ffffff"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"13px","right":"14px","bottom":"13px","left":"14px"},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"color":"#ffffff","bg":{"type":"solid","color":"#146EF5"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"desktop":{"iconSize":""},"tablet":{"iconSize":""},"mobile":{"iconSize":""}}},"badge":{"type":"object","default":{"align":"top","text":"Sale","content":"text","bg":{"type":"solid","color":"#e44d3a"},"color":"#ffffff","typo":{"fontSize":{"desktop":"12px"},"fontWeight":500},"desktop":{"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"padding":{"top":"3px","right":"10px","bottom":"3px","left":"10px"},"offset":"10px"},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"offset":""},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"offset":""}}},"pager":{"type":"object","default":{"enable":true,"type":"button","text":"Load More","align":"center","typo":{"fontSize":{"desktop":"14px"},"fontWeight":500},"transition":0.2,"normal":{"color":"#ffffff","bg":{"type":"solid","color":"#146EF5"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"8px","right":"18px","bottom":"8px","left":"18px"},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"color":"#ffffff","bg":{"type":"solid","color":"#070127"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"active":{"color":"#ffffff","bg":{"type":"solid","color":"#070127"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}}}},"filter":{"type":"object","default":{"enable":false,"taxonomy":"product_cat","allText":"All","align":"left","typo":{"fontSize":{"desktop":"14px"},"fontWeight":400},"transition":0.2,"normal":{"color":"#070127","bg":{"type":"solid","color":"#f1f5f9"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"6px","right":"14px","bottom":"6px","left":"14px"},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"color":"#ffffff","bg":{"type":"solid","color":"#146EF5"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}}}},"card":{"type":"object","default":{"transition":0.25,"bodyBg":{"type":"solid","color":""},"normal":{"bg":{"type":"solid","color":"#ffffff"},"border":{"width":"1px","style":"solid","color":"#e2e8f0"},"shadow":[],"desktop":{"padding":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"radius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{"type":"solid","color":"#ffffff"},"border":{"width":"1px","style":"solid","color":"#146EF5"},"shadow":[{"hOffset":"0px","vOffset":"6px","blur":"18px","spreed":"0px","color":"rgba(15, 23, 42, 0.12)","isInset":false}],"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"desktop":{"bodyMargin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"bodyMargin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"bodyMargin":{"top":"","right":"","bottom":"","left":""}},"divider":"#f1f5f9"}},"media":{"type":"object","default":{"ratio":"3/4","fit":"cover","bg":{"type":"solid","color":"#f1f5f9"},"overlay":{"type":"solid","color":"rgba(7, 1, 39, 0.45)"},"desktop":{"radius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}}},"title":{"type":"object","default":{"typo":{"fontSize":{"desktop":"","tablet":"","mobile":""},"fontWeight":600},"transition":0.2,"normal":{"color":"#070127"},"hover":{"color":"#146EF5"}}},"price":{"type":"object","default":{"typo":{"fontSize":{"desktop":"16px"},"fontWeight":700},"color":"#e44d3a","regularColor":"#999999"}},"rating":{"type":"object","default":{"style":"star","showEmpty":true,"color":"#f5a623","emptyColor":"#d1d5db","countColor":"#64748b","size":14}},"category":{"type":"object","default":{"typo":{"fontSize":{"desktop":"12px"}},"transition":0.2,"normal":{"color":"#6b7280"},"hover":{"color":"#146EF5"}}},"sold":{"type":"object","default":{"prefix":"Sold","suffix":"+","withoutStock":50,"typo":{"fontSize":{"desktop":"12px"}},"color":"#6b7280","bg":{"type":"solid","color":""},"progress":{"trackColor":"#e2e8f0","fillColor":"#146EF5","height":6,"desktop":{"radius":{"top":"3px","right":"3px","bottom":"3px","left":"3px"}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"position":{}}}},"supports":{"align":["wide","full"],"html":false,"customClassName":true},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),AD=e=>"string"==typeof e||"number"==typeof e?String(e):"",BD=(e,t)=>String(e||"").replace(/%[ds]/,t),ID=(e,t,n)=>{
543 -const o=e&&"object"==typeof e?e:{},i=o[t];return i&&"object"==typeof i&&!Array.isArray(i)&&n in i?i[n]:(a=o[n],a&&"object"==typeof a&&!Array.isArray(a)&&("desktop"in a||"tablet"in a||"mobile"in a)?a:{desktop:a??"",tablet:"",mobile:""})[t];var a},OD=(e,t)=>({desktop:ID(e,"desktop",t),tablet:ID(e,"tablet",t),mobile:ID(e,"mobile",t)}),RD=e=>!!e&&"object"==typeof e&&!Array.isArray(e),zD=["typo","advanced"],DD=(e,t)=>{if(null!=e){if(Array.isArray(t))return Array.isArray(e)?e:void 0;if(RD(t))return RD(e)?FD(e,t):void 0;switch(typeof t){case"string":return"string"==typeof e?e:"number"==typeof e?String(e):void 0;case"number":{const t="number"==typeof e?e:"string"==typeof e&&""!==e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}case"boolean":return"boolean"==typeof e?e:"true"===e||1===e||"false"!==e&&0!==e&&""!==e&&void 0;default:return e}}},FD=(e,t)=>{if(!RD(e)||!RD(t))return e;const n={};for(const[o,i]of Object.entries(e)){if(!(o in t)||zD.includes(o)){n[o]=i;continue}const e=DD(i,t[o]);void 0!==e&&(n[o]=e)}return n},HD="b-blocks-woo-product-grid",WD={price:"Price",rating:"Rating",title:"Title",category:"Category",soldCount:"Sold Count"},UD=(e,t)=>Object.fromEntries(t.filter((t=>e&&t in e)).map((t=>[t,e[t]]))),GD=(e={})=>({query:e.query||{},cart:UD(e.cart,["useCustomText","simple","variable","grouped","external","default"]),sold:UD(e.sold,["prefix","suffix","withoutStock"]),filter:UD(e.filter,["enable","taxonomy"]),viewButton:UD(e.viewButton,["text"]),layout:{imageSize:e.layout?.imageSize}}),VD=["h1","h2","h3","h4","h5","h6"],qD=(0,l.jsxs)("svg",{className:"b-blocks-woo-product-grid-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:[(0,l.jsx)("circle",{cx:"9",cy:"21",r:"1"}),(0,l.jsx)("circle",{cx:"20",cy:"21",r:"1"}),(0,l.jsx)("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"})]}),YD=(0,l.jsxs)("svg",{className:"b-blocks-woo-product-grid-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,l.jsx)("path",{d:"M15 3h6v6"}),(0,l.jsx)("path",{d:"M10 14 21 3"})]}),KD=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false",children:e}),QD=KD((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("rect",{x:"3",y:"5",width:"14",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"3",y:"11",width:"18",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"3",y:"17",width:"10",height:"2",rx:"1"})]})),ZD=KD((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("rect",{x:"5",y:"5",width:"14",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"3",y:"11",width:"18",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"7",y:"17",width:"10",height:"2",rx:"1"})]})),XD=KD((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("rect",{x:"7",y:"5",width:"14",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"3",y:"11",width:"18",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"11",y:"17",width:"10",height:"2",rx:"1"})]})),JD=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],eF=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],tF=[{label:(0,x.__)("Grid","b-blocks"),value:"grid"},{label:(0,x.__)("List","b-blocks"),value:"list"}],nF=[{label:(0,x.__)("Star","b-blocks"),value:"star"},{label:(0,x.__)("Star with Count","b-blocks"),value:"star-count"},{label:(0,x.__)("Number","b-blocks"),value:"number"}],oF=VD.map((e=>({label:e.toUpperCase(),value:e}))),iF=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Thumbnail","b-blocks"),value:"thumbnail"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"},{label:(0,x.__)("Full Size","b-blocks"),value:"full"}],aF=[{label:(0,x.__)("Custom Query","b-blocks"),value:"custom"},{label:(0,x.__)("Related Products","b-blocks"),value:"related"}],sF=[{label:(0,x.__)("Date","b-blocks"),value:"date"},{label:(0,x.__)("Title","b-blocks"),value:"title"},{label:(0,x.__)("Price","b-blocks"),value:"price"},{label:(0,x.__)("Popularity","b-blocks"),value:"popularity"},{label:(0,x.__)("Rating","b-blocks"),value:"rating"},{label:(0,x.__)("Menu Order","b-blocks"),value:"menu_order"},{label:(0,x.__)("Random","b-blocks"),value:"rand"},{label:(0,x.__)("ID","b-blocks"),value:"id"}],rF=[{label:(0,x.__)("Descending","b-blocks"),value:"desc"},{label:(0,x.__)("Ascending","b-blocks"),value:"asc"}],lF=[{label:(0,x.__)("Include","b-blocks"),value:"include"},{label:(0,x.__)("Exclude","b-blocks"),value:"exclude"}],cF=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],dF=[{label:(0,x.__)("Sale Text","b-blocks"),value:"text"},{label:(0,x.__)("Amount Saved","b-blocks"),value:"amount"},{label:(0,x.__)("Percent Off","b-blocks"),value:"percent"}],uF=[{label:(0,x.__)("Button","b-blocks"),value:"button"},{label:(0,x.__)("Pagination","b-blocks"),value:"pagination"},{label:(0,x.__)("Prev-Next","b-blocks"),value:"prev-next"}],pF=[{label:(0,x.__)("Left","b-blocks"),value:"left",icon:QD},{label:(0,x.__)("Center","b-blocks"),value:"center",icon:ZD},{label:(0,x.__)("Right","b-blocks"),value:"right",icon:XD}],hF=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],gF=[{label:"3:4",value:"3/4"},{label:"1:1",value:"1/1"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"}],mF=[{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"}],bF={desktop:4,tablet:2,mobile:1},fF=[{label:(0,x.__)("On Image","b-blocks"),value:"overlay"},{label:(0,x.__)("Below","b-blocks"),value:"below"},{label:(0,x.__)("Split","b-blocks"),value:"split"}],xF=[{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],yF=[{label:(0,x.__)("Cart","b-blocks"),value:"cart"},{label:(0,x.__)("View","b-blocks"),value:"view"}],vF=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],kF=(e,t=e,n=e,o=t)=>({top:e,right:t,bottom:n,left:o}),wF=()=>kF("","","",""),_F=e=>({type:"solid",color:e}),CF=(e,t,n)=>Object.fromEntries(["desktop","tablet","mobile"].map((o=>{const i="desktop"===o,a={padding:i?e:wF()};return n&&(a.margin=wF()),a.radius=i?t:wF(),[o,a]}))),jF=({color:e,bg:t,padding:n,radius:o,border:i={width:"",style:"solid",color:""},shadow:a=[],withMargin:s=!1})=>({...void 0===e?{}:{color:e},bg:_F(t),border:i,shadow:a,...CF(n,o,s)}),$F=e=>jF({...e,withMargin:!0}),SF=(e,t,n)=>[{hOffset:"0px",vOffset:e,blur:t,spreed:"0px",color:n,isInset:!1}],TF={layout:["actionPosition","actionAlign","actionFull","actionIconOnly","actionOrder"],elements:null,contentOrder:null,card:["transition","bodyBg","divider","normal","hover"],media:["ratio","fit","bg","overlay"],title:["transition","typo","normal","hover"],price:["typo","color","regularColor"],rating:["style","color","emptyColor","countColor","size"],category:["transition","typo","normal","hover"],sold:["typo","color","bg","progress"],cart:["transition","showIcon","typo","normal","hover"],viewButton:["transition","showIcon","typo","normal","hover"],badge:["align","content","bg","color","typo"]},NF=["desktop","tablet","mobile"],MF={layout:["contentAlign","columnGap","rowGap"],card:["bodyMargin"],media:["radius","margin"],badge:["radius","padding","offset"]},LF=e=>JSON.parse(JSON.stringify(e)),PF=(e,t)=>{const n={...e};for(const[o,i]of Object.entries(t||{})){const t=i&&"object"==typeof i&&!Array.isArray(i)
544 -;n[o]=t&&e?.[o]&&"object"==typeof e[o]?PF(e[o],i):i}return n},EF=(e,t)=>Object.fromEntries(t.filter((t=>t in(e||{}))).map((t=>[t,LF(e[t])]))),AF=()=>Object.fromEntries(Object.entries(TF).map((([e,t])=>{const n=ED.attributes[e]?.default;if(null===t)return[e,LF(n)];const o=EF(n,t);for(const t of MF[e]?NF:[])o[t]=EF(n?.[t],MF[e]);return[e,o]}))),BF={default:{label:"Default",attributes:AF()},editorial:{label:"Editorial",attributes:{layout:{actionPosition:"below",actionAlign:"center",actionFull:!0,actionIconOnly:!1,actionOrder:"view",desktop:{contentAlign:"center",columnGap:"28px",rowGap:"40px"}},elements:{image:!0,category:!1,rating:!1,price:!0,saleBadge:!1,soldCount:!1,progressBar:!1,viewButton:!0,title:!0,cart:!0},contentOrder:["title","price","rating","category","soldCount"],card:{transition:.3,bodyBg:_F("#ffffff"),desktop:{bodyMargin:kF("-56px","18px","0px","18px")},normal:jF({bg:"#f7efe9",padding:kF("28px","22px"),radius:wF()}),hover:jF({bg:"#f7efe9",padding:wF(),radius:wF()})},media:{ratio:"1/1",fit:"cover",bg:_F("#f7efe9"),desktop:{radius:wF()}},title:{transition:.2,typo:{fontSize:{desktop:"20px",tablet:"",mobile:""},fontWeight:400},normal:{color:"#1a1a1a"},hover:{color:"#8a6a52"}},price:{typo:{fontSize:{desktop:"17px"},fontWeight:600},color:"#1a1a1a",regularColor:"#9a9a9a"},cart:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:$F({color:"#1a1a1a",bg:"#ffffff",padding:kF("13px"),radius:kF("2px"),border:{width:"1px",style:"solid",color:"#d8d2cc"}}),hover:$F({color:"#ffffff",bg:"#1a1a1a",padding:wF(),radius:wF(),border:{width:"1px",style:"solid",color:"#1a1a1a"}})},viewButton:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:$F({color:"#ffffff",bg:"#111111",padding:kF("13px"),radius:kF("2px")}),hover:$F({color:"#ffffff",bg:"#3a3a3a",padding:wF(),radius:wF()})}},list:{card:{desktop:{bodyMargin:kF("18px","18px","18px","-40px")},mobile:{bodyMargin:kF("-56px","18px","0px","18px")},normal:{desktop:{padding:kF("24px")},mobile:{padding:kF("28px","22px")}}}}},catalogue:{label:"Catalogue",attributes:{layout:{actionPosition:"overlay",actionAlign:"right",actionFull:!1,actionIconOnly:!0,actionOrder:"view",desktop:{contentAlign:"left",columnGap:"24px",rowGap:"32px"}},elements:{image:!0,category:!0,rating:!0,price:!0,saleBadge:!0,soldCount:!1,progressBar:!1,viewButton:!0,title:!0,cart:!0},contentOrder:["category","title","rating","price","soldCount"],card:{transition:.2,bodyBg:_F(""),desktop:{bodyMargin:wF()},normal:jF({bg:"#ffffff",padding:kF("14px","4px","4px","4px"),radius:wF()}),hover:jF({bg:"#ffffff",padding:wF(),radius:wF()})},media:{ratio:"1/1",fit:"contain",bg:_F("#f4f5f7"),desktop:{radius:wF()}},title:{transition:.2,typo:{fontSize:{desktop:"15px"},fontWeight:400},normal:{color:"#2b2b2b"},hover:{color:"#12a5a5"}},category:{transition:.2,typo:{fontSize:{desktop:"12px"},fontWeight:400},normal:{color:"#9aa0a6"},hover:{color:"#12a5a5"}},price:{typo:{fontSize:{desktop:"15px"},fontWeight:700},color:"#12a5a5",regularColor:"#b6bcc2"},rating:{style:"star",color:"#f5a623",emptyColor:"#d6dade",countColor:"#9aa0a6",size:13},cart:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:$F({color:"#3c4043",bg:"#ffffff",padding:kF("9px"),radius:kF("2px")}),hover:$F({color:"#ffffff",bg:"#12a5a5",padding:wF(),radius:wF()})},viewButton:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:$F({color:"#3c4043",bg:"#ffffff",padding:kF("9px"),radius:kF("2px")}),hover:$F({color:"#ffffff",bg:"#12a5a5",padding:wF(),radius:wF()})},badge:{align:"left",bg:_F("#12a5a5"),color:"#ffffff",typo:{fontSize:{desktop:"11px"},fontWeight:600},desktop:{padding:kF("3px","9px"),radius:kF("2px"),offset:"8px"}}},list:{card:{normal:{desktop:{padding:kF("12px","16px")},mobile:{padding:kF("14px","4px","4px","4px")}}}}},bold:{label:"Bold",attributes:{layout:{actionPosition:"overlay",actionAlign:"bottom",actionFull:!0,actionIconOnly:!1,actionOrder:"cart",desktop:{contentAlign:"left"}},elements:{image:!0,category:!1,rating:!0,price:!0,saleBadge:!0,soldCount:!1,progressBar:!1,viewButton:!1,title:!0,cart:!0},card:{transition:.3,bodyBg:_F(""),desktop:{bodyMargin:wF()},normal:jF({bg:"#15161a",padding:kF("18px"),radius:kF("4px")}),hover:jF({bg:"#1f2127",padding:wF(),radius:wF(),shadow:SF("10px","28px","rgba(0, 0, 0, 0.45)")})},media:{ratio:"4/3",fit:"cover",bg:_F("#0f1013"),desktop:{radius:wF()}},title:{transition:.2,typo:{fontSize:{desktop:"17px"},fontWeight:600},normal:{color:"#f5f6f8"},hover:{color:"#ffb547"}},price:{typo:{fontSize:{desktop:"16px"},fontWeight:700},color:"#ffb547",regularColor:"#6b6f78"},rating:{style:"star",color:"#ffb547",emptyColor:"#3a3d45",countColor:"#8b9098",size:14},cart:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:600},normal:$F({color:"#15161a",bg:"#ffb547",padding:kF("12px"),radius:kF("2px")}),hover:$F({color:"#15161a",bg:"#ffffff",padding:wF(),radius:wF()})}}},soft:{label:"Soft",attributes:{layout:{actionPosition:"below",actionAlign:"center",actionFull:!1,actionIconOnly:!1,actionOrder:"cart",desktop:{contentAlign:"center",columnGap:"24px",rowGap:"30px"}},elements:{image:!0,category:!1,rating:!0,price:!0,saleBadge:!0,soldCount:!1,progressBar:!1,viewButton:!1,title:!0,cart:!0},card:{transition:.35,bodyBg:_F(""),desktop:{bodyMargin:wF()},normal:jF({bg:"#ffffff",padding:kF("20px"),radius:kF("18px"),shadow:SF("2px","10px","rgba(17, 24, 39, 0.06)")}),hover:jF({bg:"#ffffff",padding:wF(),radius:wF(),shadow:SF("14px","30px","rgba(17, 24, 39, 0.14)")})},media:{ratio:"1/1",fit:"cover",bg:_F("#f6f7fb"),desktop:{radius:kF("14px")}},title:{transition:.2,typo:{fontSize:{desktop:"16px"},fontWeight:500},normal:{color:"#1f2937"},hover:{color:"#6366f1"}},price:{typo:{fontSize:{desktop:"16px"},fontWeight:700},color:"#6366f1",regularColor:"#b6bcc8"},cart:{transition:.25,typo:{fontSize:{desktop:"13px"},fontWeight:600},normal:$F({color:"#ffffff",bg:"#6366f1",padding:kF("11px","20px"),radius:kF("999px")}),hover:$F({color:"#ffffff",bg:"#4f46e5",padding:wF(),radius:wF()})}}},storefront:{label:"Storefront",attributes:{layout:{actionPosition:"split",actionAlign:"center",actionFull:!1,actionIconOnly:!1,actionOrder:"cart",desktop:{contentAlign:"left",columnGap:"24px",rowGap:"24px"}},elements:{image:!0,category:!0,rating:!0,price:!0,saleBadge:!0,soldCount:!1,progressBar:!1,viewButton:!0,title:!0,cart:!0},contentOrder:["category","title","rating","price","soldCount"],card:{transition:.25,bodyBg:_F(""),divider:"#f1f5f9",desktop:{bodyMargin:wF()},normal:jF({bg:"#ffffff",padding:kF("14px","16px","16px","16px"),radius:kF("16px"),border:{width:"1px",style:"solid",color:"#e2e8f0"},shadow:SF("4px","14px","rgba(15, 23, 42, 0.06)")}),hover:jF({bg:"#ffffff",padding:wF(),radius:wF(),border:{width:"1px",style:"solid",color:"#e2e8f0"},shadow:SF("12px","28px","rgba(15, 23, 42, 0.10)")})},media:{ratio:"1/1",fit:"cover",bg:_F("#f1f5f9"),desktop:{radius:kF("10px"),margin:kF("16px","16px","0px","16px")}},title:{transition:.2,typo:{fontSize:{desktop:"16px"},fontWeight:600,lineHeight:"1.4"},normal:{color:"#0f172a"},hover:{color:"#146ef5"}},category:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:{color:"#94a3b8"},hover:{color:"#146ef5"}},price:{typo:{fontSize:{desktop:"18px"},fontWeight:700},color:"#0f172a",regularColor:"#94a3b8"},rating:{style:"star-count",color:"#fbbf24",emptyColor:"#e2e8f0",countColor:"#64748b",size:14},cart:{transition:.2,showIcon:!0,typo:{fontSize:{desktop:"14px"},fontWeight:600},normal:$F({color:"#ffffff",bg:"#146ef5",padding:kF("8px","14px"),radius:kF("8px")}),hover:$F({color:"#ffffff",bg:"#0f58d0",padding:wF(),radius:wF()})},viewButton:{transition:.2,showIcon:!1,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:$F({color:"#334155",bg:"rgba(255, 255, 255, 0.92)",padding:kF("6px","12px"),radius:kF("6px")}),hover:$F({color:"#0f172a",bg:"#ffffff",padding:wF(),radius:wF()})},badge:{align:"left",content:"amount",bg:_F("#2a9669"),color:"#ffffff",typo:{fontSize:{desktop:"12px"},fontWeight:700,
545 -textTransform:"none"},desktop:{padding:kF("4px","10px"),radius:kF("999px"),offset:"10px"}}},list:{card:{normal:{desktop:{padding:kF("16px","16px","16px","0px")},mobile:{padding:kF("14px","16px","16px","16px")}}},media:{desktop:{margin:kF("16px")},mobile:{margin:kF("16px","16px","0px","16px")}}}}},IF=Object.entries(BF).map((([e,{label:t}])=>({value:e,label:t}))),OF=(e,t={})=>{const n=BF[e];if(!n)return null;const o=AF(),i={},a="list"===t.layout?.type&&n.list?PF(n.attributes,n.list):n.attributes;for(const e of new Set([...Object.keys(o),...Object.keys(a)])){const n=o[e],s=a[e];if(Array.isArray(n)||Array.isArray(s))i[e]=[...Array.isArray(s)?s:n];else{i[e]={...t[e]||{},...n||{},...s||{}};for(const o of MF[e]?NF:[])i[e][o]={...t[e]?.[o]||{},...n?.[o]||{},...s?.[o]||{}}}}return i},RF=(e,t)=>e===t||!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&(Array.isArray(e)===Array.isArray(t)&&[...new Set([...Object.keys(e),...Object.keys(t)])].every((n=>void 0===e[n]&&void 0===t[n]||RF(e[n],t[n])))),zF=(e={})=>Object.keys(BF).find((t=>{const n=OF(t,e);return Object.keys(n).every((t=>RF(n[t],e[t])))}))||"",DF=({attributes:e,setAttributes:t})=>{const n=(0,Qa.useMemo)((()=>zF(e)),[e])||(BF[e.theme]?e.theme:"default");return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Theme","b-blocks"),initialOpen:!0,children:(0,l.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Preset","b-blocks"),labelPosition:"edge",value:n,options:IF,onChange:n=>t({...OF(n,e),theme:n})})})},FF=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},elements:a={},rating:s={},sold:r={}}=e,c=(e,t)=>(0,l.jsx)(y.ToggleControl,{className:"mt10",label:t,checked:!!a[e],onChange:t=>n("elements",t,e)});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Layouts:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.type,onChange:n=>{const o={...e,layout:{...i,type:n||"grid"}},a=zF(e);t(a?OF(a,o):{layout:o.layout})},children:tF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),"list"!==i.type&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]}),value:parseInt(ID(i,o,"columns"),10)||bF[o],onChange:e=>n("layout",e||bF[o],o,"columns"),min:1,max:12,step:1,allowReset:!0,resetFallbackValue:bF[o]}),c("image",(0,x.__)("Show Image","b-blocks")),c("category",(0,x.__)("Show Category","b-blocks")),c("rating",(0,x.__)("Show Rating","b-blocks")),a.rating&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show When Unreviewed","b-blocks"),help:(0,x.__)("Empty stars for products nobody has reviewed yet.","b-blocks"),checked:!1!==s.showEmpty,onChange:e=>n("rating",e,"showEmpty")}),a.rating&&(0,l.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"mt10",label:(0,x.__)("Rating Style","b-blocks"),labelPosition:"edge",value:s.style,options:nF,onChange:e=>n("rating",e,"style")}),c("price",(0,x.__)("Show Price","b-blocks")),c("saleBadge",(0,x.__)("Show Sale Badge","b-blocks")),c("soldCount",(0,x.__)("Show Sold Count","b-blocks")),a.soldCount&&(0,l.jsxs)(l.Fragment,{children:[c("progressBar",(0,x.__)("Show Sold Count Progress Bar","b-blocks")),(0,l.jsx)(y.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Prefix","b-blocks"),value:r.prefix,onChange:e=>n("sold",e,"prefix")}),(0,l.jsx)(y.TextControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Suffix","b-blocks"),value:r.suffix,onChange:e=>n("sold",e,"suffix")}),a.progressBar&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt20 mb5",children:(0,x.__)("Without Stock Value (%):","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{__next40pxDefaultSize:!0,help:(0,x.__)("Bar fill used when a product does not manage stock.","b-blocks"),value:r.withoutStock,onChange:e=>n("sold",Math.min(100,Math.max(0,parseInt(e,10)||0)),"withoutStock"),min:0,max:100,step:1})]})]}),c("title",(0,x.__)("Show Title","b-blocks")),a.title&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt20 mb5",children:(0,x.__)("Title Tag:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.titleTag,onChange:e=>n("layout",e||"h4","titleTag"),children:oF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(a.cart||a.viewButton)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt20 mb5",children:(0,x.__)("Buttons:","b-blocks")}),a.image&&(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Position:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.actionPosition,onChange:e=>n("layout",e||"overlay","actionPosition"),children:fF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),a.image&&!["below","split"].includes(i.actionPosition)&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Align:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.actionAlign,onChange:e=>n("layout",e||"center","actionAlign"),children:xF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),a.cart&&a.viewButton&&"split"!==i.actionPosition&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("First:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.actionOrder,onChange:e=>n("layout",e||"cart","actionOrder"),children:yF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),"split"!==i.actionPosition&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Full Width Buttons","b-blocks"),checked:!!i.actionFull,onChange:e=>n("layout",e,"actionFull")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Icon Only","b-blocks"),help:(0,x.__)("Hides the button text. The label is kept for screen readers.","b-blocks"),checked:!!i.actionIconOnly,onChange:e=>n("layout",e,"actionIconOnly")})]}),a.image&&(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Image Size","b-blocks"),value:i.imageSize,options:iF,onChange:e=>n("layout",e,"imageSize")})]})},HF=()=>{const{data:e}=jd("bBlocksUtils"),t=e?.nonce,n=(0,m.useRef)(null);(0,m.useEffect)((()=>()=>clearTimeout(n.current)),[]);const o=(0,m.useCallback)((e=>t&&window.wp?.ajax?window.wp.ajax.post("bb_wpg_search",{_wpnonce:t,...e}).then((e=>Array.isArray(e?.items)?e.items:[])).catch((()=>[])):Promise.resolve([])),[t]),i=(0,m.useCallback)((e=>new Promise((t=>{clearTimeout(n.current),n.current=setTimeout((()=>o(e).then(t)),300)}))),[o]);return{request:o,debouncedRequest:i,isReady:!!t}},WF=HF,UF=(e,t)=>t[e.label]&&t[e.label]!==e.id?`${e.label} (#${e.id})`:e.label,GF=({label:e,value:t=[],onChange:n,type:o,taxonomy:i="",placeholder:a=""})=>{const{request:s,debouncedRequest:r,isReady:c}=WF(),[d,u]=(0,m.useState)({}),[p,h]=(0,m.useState)([]),g=(0,m.useRef)(!1),b=(0,m.useMemo)((()=>Array.isArray(t)?t.map((e=>parseInt(e,10))).filter(Boolean):[]),[t]),f=e=>{e.length&&u((t=>{const n={...t};return e.forEach((e=>{n[e.id]=e.label})),n}))};(0,m.useEffect)((()=>{c&&!g.current&&b.length&&(g.current=!0,s({type:o,taxonomy:i,include:b}).then(f))}),[c,b,s,o,i])
546 -;const v=(0,m.useMemo)((()=>{const e={};return Object.entries(d).forEach((([t,n])=>{e[n]=e[n]??parseInt(t,10)})),e}),[d]),k=(0,m.useMemo)((()=>{const e={};return Object.entries(d).forEach((([t,n])=>{e[UF({id:parseInt(t,10),label:n},v)]=parseInt(t,10)})),e}),[d,v]),w=b.filter((e=>d[e])).map((e=>UF({id:e,label:d[e]},v))),_=p.filter((e=>d[e]&&!b.includes(e))).map((e=>UF({id:e,label:d[e]},v)));return(0,l.jsx)(y.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:e,value:w,suggestions:_,placeholder:a||(0,x.__)("Type to search…","b-blocks"),onInputChange:e=>{!e||e.length<2?h([]):r({type:o,taxonomy:i,search:e}).then((e=>{f(e),h(e.map((e=>e.id)))}))},onChange:e=>{const t=e.map((e=>"string"==typeof e?k[e]:e?.value)).filter((e=>Number.isInteger(e)));n([...new Set(t)])}})},VF=({attributes:e,updateObj:t})=>{const{query:n={}}=e,o="related"===n.type,i=(e,t,n,o)=>{const i=parseInt(e,10);return Number.isNaN(i)?o:Math.min(n,Math.max(t,i))},a=e=>n=>t("query",n,e);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Product Query","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Query Type","b-blocks"),value:n.type,options:aF,onChange:a("type")}),o&&(0,l.jsx)(y.Notice,{className:"mt10",status:"info",isDismissible:!1,children:(0,x.__)("Related Products only resolves on a single product page. Anywhere else the grid falls back to the newest products.","b-blocks")}),!o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Order By","b-blocks"),value:n.orderBy,options:sF,onChange:a("orderBy")}),(0,l.jsx)(y.SelectControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Order","b-blocks"),value:n.order,options:rF,onChange:a("order")})]}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,x.__)("Products Per Page","b-blocks"),value:n.perPage,onChange:e=>t("query",i(e,1,48,4),"perPage"),min:1,max:48,step:1}),!o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,x.__)("Offset","b-blocks"),value:n.offset,onChange:e=>t("query",i(e,0,1e3,0),"offset"),min:0,step:1}),(0,l.jsx)(GF,{label:(0,x.__)("Include Products","b-blocks"),placeholder:(0,x.__)("Search Products","b-blocks"),type:"product",value:n.include,onChange:a("include")}),(0,l.jsx)(GF,{label:(0,x.__)("Exclude Products","b-blocks"),placeholder:(0,x.__)("Search Products","b-blocks"),type:"product",value:n.exclude,onChange:a("exclude")}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Product Categories:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.categoryMode,onChange:e=>t("query",e||"include","categoryMode"),children:lF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsx)(GF,{label:"exclude"===n.categoryMode?(0,x.__)("Exclude Categories","b-blocks"):(0,x.__)("Include Categories","b-blocks"),placeholder:(0,x.__)("Search Product Categories","b-blocks"),type:"term",taxonomy:"product_cat",value:n.categories,onChange:a("categories")}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Product Tags:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.tagMode,onChange:e=>t("query",e||"include","tagMode"),children:lF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsx)(GF,{label:"exclude"===n.tagMode?(0,x.__)("Exclude Tags","b-blocks"):(0,x.__)("Include Tags","b-blocks"),placeholder:(0,x.__)("Search Product Tags","b-blocks"),type:"term",taxonomy:"product_tag",value:n.tags,onChange:a("tags")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("On Sale Only","b-blocks"),checked:!!n.onSaleOnly,onChange:a("onSaleOnly")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Featured Only","b-blocks"),checked:!!n.featuredOnly,onChange:a("featuredOnly")})]}),(0,l.jsx)(y.TextControl,{className:"mt20",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("No Products Message","b-blocks"),help:(0,x.__)("Shown when the query returns nothing.","b-blocks"),value:n.noProductsMessage,onChange:a("noProductsMessage")})]})},qF=({group:e,value:t={},updateObj:n,device:o="desktop"})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:!1!==t.showIcon,onChange:t=>n(e,t,"showIcon")}),!1!==t.showIcon&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon","b-blocks"),value:t.icon,onChange:t=>n(e,t,"icon")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Icon Color:","b-blocks"),value:t.iconColor,onChange:t=>n(e,t,"iconColor")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:JD,isUnitSelectTabbable:!0,value:ID(t,o,"iconSize"),onChange:t=>n(e,t||"",o,"iconSize")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon Position:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t.iconPosition,onChange:t=>n(e,t||"left","iconPosition"),children:vF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]})]})]}),YF=({attributes:e,updateObj:t,device:n="desktop"})=>{const{elements:o={},cart:i={}}=e,a=[["simple",(0,x.__)("Simple Product","b-blocks")],["variable",(0,x.__)("Variable Product","b-blocks")],["grouped",(0,x.__)("Grouped Product","b-blocks")],["external",(0,x.__)("External Product","b-blocks")],["default",(0,x.__)("Default Product","b-blocks")]];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Cart Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Cart Button","b-blocks"),checked:!!o.cart,onChange:e=>t("elements",e,"cart")}),o.cart&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Use Custom Text","b-blocks"),checked:!!i.useCustomText,onChange:e=>t("cart",e,"useCustomText"),help:i.useCustomText?(0,x.__)("Overrides the WooCommerce label per product type.","b-blocks"):(0,x.__)("Uses the label WooCommerce supplies for each product.","b-blocks")}),i.useCustomText&&a.map((([e,n])=>(0,l.jsx)(y.TextControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:n,value:i[e],onChange:n=>t("cart",n,e)},e))),(0,l.jsx)(qF,{group:"cart",value:i,updateObj:t,device:n})]})]})},KF=({attributes:e,updateObj:t,device:n="desktop"})=>{const{elements:o={},viewButton:i={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("View Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show View Button","b-blocks"),checked:!!o.viewButton,onChange:e=>t("elements",e,"viewButton")}),o.viewButton&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Button Text","b-blocks"),value:i.text,onChange:e=>t("viewButton",e,"text")}),(0,l.jsx)(qF,{group:"viewButton",value:i,updateObj:t,device:n})]})]})},QF=({attributes:e,updateObj:t})=>{const{badge:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sale Badge","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Alignment:","b-blocks")}),(0,
547 -l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.align,onChange:e=>t("badge",e||"top","align"),children:cF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Show","b-blocks"),labelPosition:"edge",value:n.content||"text",options:dF,onChange:e=>t("badge",e,"content")}),(0,l.jsx)(y.TextControl,{className:"mt10",help:"text"===(n.content||"text")?"":(0,x.__)("Used for products with no saving to show, such as grouped products.","b-blocks"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Sale Text","b-blocks"),value:n.text,onChange:e=>t("badge",e,"text")})]})},ZF=({attributes:e,updateObj:t})=>{const{pager:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Load More Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Load More Option?","b-blocks"),checked:!!n.enable,onChange:e=>t("pager",e,"enable")}),n.enable&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RadioControl,{className:"mt10",label:(0,x.__)("More Posts Type","b-blocks"),selected:n.type,options:uF,onChange:e=>t("pager",e,"type")}),"button"===n.type&&(0,l.jsx)(y.TextControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Button Text","b-blocks"),value:n.text,onChange:e=>t("pager",e,"text")}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Alignment:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.align,onChange:e=>t("pager",e||"center","align"),children:pF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:e.icon},e.value)))})]})]})]})},XF=({attributes:e,setAttributes:t})=>{const{contentOrder:n=[]}=e,o={price:(0,x.__)("Price","b-blocks"),rating:(0,x.__)("Rating","b-blocks"),title:(0,x.__)("Title","b-blocks"),category:(0,x.__)("Category","b-blocks"),soldCount:(0,x.__)("Sold Count","b-blocks")},i=Object.keys(WD),a=[...n.filter((e=>i.includes(e))),...i.filter((e=>!n.includes(e)))].map((e=>({id:e,label:o[e]})));return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sorting Content","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Ma,{label:(0,x.__)("Drag to reorder the card content:","b-blocks"),value:a,property:"label",onChange:e=>t({contentOrder:e.map((e=>e.id)).filter(Boolean)})})})},JF=({attributes:e,updateObj:t})=>{const{filter:n={}}=e,{taxonomies:o,isLoading:i}=(()=>{const{request:e,isReady:t}=HF(),[n,o]=(0,m.useState)([]),[i,a]=(0,m.useState)(!0);return(0,m.useEffect)((()=>{if(!t)return;let n=!1;return e({type:"taxonomies"}).then((e=>{n||(o(e.map((e=>({label:e.label,value:String(e.id)})))),a(!1))})),()=>{n=!0}}),[t,e]),{taxonomies:n,isLoading:i}})();return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Filter By Taxonomy","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Filter By Taxonomy?","b-blocks"),checked:!!n.enable,onChange:e=>t("filter",e,"enable")}),n.enable&&(i?(0,l.jsx)(y.Spinner,{}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Select Taxonomy Type","b-blocks"),value:n.taxonomy,options:o.length?o:[{label:(0,x.__)("No product taxonomies found","b-blocks"),value:""}],onChange:e=>t("filter",e,"taxonomy")}),(0,l.jsx)(y.TextControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)('"All" Button Text',"b-blocks"),value:n.allText,onChange:e=>t("filter",e,"allText")}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Alignment:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.align||"left",onChange:e=>t("filter",e||"left","align"),children:pF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:e.icon},e.value)))})]})]}))]})},eH=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(DF,{...e}),(0,l.jsx)(FF,{...e}),(0,l.jsx)(VF,{...e}),(0,l.jsx)(YF,{...e}),(0,l.jsx)(KF,{...e}),(0,l.jsx)(QF,{...e}),(0,l.jsx)(ZF,{...e}),(0,l.jsx)(XF,{...e}),(0,l.jsx)(JF,{...e})]}),tH=({attributes:e,updateObj:t,device:n="desktop"})=>{const{layout:o={},card:i={}}=e,[a,s]=(0,Qa.useState)("normal");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Grid","b-blocks"),initialOpen:!0,children:["list"!==o.type&&(0,l.jsx)(y.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Column Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:JD,isUnitSelectTabbable:!0,value:ID(o,n,"columnGap"),onChange:e=>t("layout",e||"",n,"columnGap")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"list"!==o.type?"mt10":"",__next40pxDefaultSize:!0,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Row Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:JD,isUnitSelectTabbable:!0,value:ID(o,n,"rowGap"),onChange:e=>t("layout",e||"",n,"rowGap")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(v,{className:"flex2",children:[(0,x.__)("Content Alignment:","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1 mb20",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:ID(o,n,"contentAlign"),onChange:e=>t("layout",e||"",n,"contentAlign"),children:hF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(An,{label:(0,x.__)("Content Background:","b-blocks"),value:i.bodyBg,isImage:!1,onChange:e=>t("card",e,"bodyBg")}),(0,l.jsx)(k,{className:"mt10 mb20",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Content Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(i,n,"bodyMargin"),onChange:e=>t("card",e,n,"bodyMargin")}),"split"===o.actionPosition&&(0,l.jsx)(Ue,{className:"mb20",label:(0,x.__)("Footer Divider:","b-blocks"),value:i.divider,defaultColor:"#f1f5f9",onChange:e=>t("card",e,"divider")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e||"normal"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:i[a]?.bg,onChange:e=>t("card",e,a,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,x.__)("Border","b-blocks"),value:i[a]?.border,onChange:e=>t("card",e,a,"border")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:i[a]?.shadow,onChange:e=>t("card",e,a,"shadow")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(i[a],n,"padding"),onChange:e=>t("card",e,a,n,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(i[a],n,"radius"),onChange:e=>t("card",e,a,n,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Transition (s)","b-blocks"),help:(0,x.__)("How long the change from normal to hover takes.","b-blocks"),value:i.transition,onChange:e=>t("card",e??0,"transition"),min:0,max:2,step:.05,allowReset:!0,
548 -resetFallbackValue:.25})]})]})},nH=({attributes:e,updateObj:t,device:n="desktop"})=>{const{media:o={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Aspect Ratio","b-blocks"),labelPosition:"edge",value:o.ratio,options:gF,onChange:e=>t("media",e,"ratio")}),(0,l.jsx)(y.SelectControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Object Fit","b-blocks"),labelPosition:"edge",value:o.fit,options:mF,onChange:e=>t("media",e,"fit")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(o,n,"radius"),onChange:e=>t("media",e,n,"radius")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(o,n,"margin"),onChange:e=>t("media",e,n,"margin")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o.bg,isImage:!1,onChange:e=>t("media",e,"bg")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hover Overlay","b-blocks"),initialOpen:!1,children:(0,l.jsx)(An,{label:(0,x.__)("Overlay Background:","b-blocks"),value:o.overlay,isImage:!1,onChange:e=>t("media",e,"overlay")})})]})},oH=({attributes:e,updateObj:t,device:n="desktop"})=>{const{title:o={},price:i={},rating:a={},category:s={},sold:r={}}=e,c=r.progress||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography:","b-blocks"),value:o.typo,onChange:e=>t("title",e,"typo")}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color:","b-blocks"),value:o.normal?.color,defaultColor:"#070127",onChange:e=>t("title",e,"normal","color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:o.hover?.color,defaultColor:"#146EF5",onChange:e=>t("title",e,"hover","color")}),(0,l.jsx)(y.RangeControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Transition (s)","b-blocks"),help:(0,x.__)("How long the change to the hover colour takes.","b-blocks"),value:o.transition,onChange:e=>t("title",e??0,"transition"),min:0,max:2,step:.05,allowReset:!0,resetFallbackValue:.2})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Price","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography:","b-blocks"),value:i.typo,onChange:e=>t("price",e,"typo")}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Price Color:","b-blocks"),value:i.color,defaultColor:"#e44d3a",onChange:e=>t("price",e,"color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Strikethrough Regular Price:","b-blocks"),value:i.regularColor,defaultColor:"#999999",onChange:e=>t("price",e,"regularColor")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Rating","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Star Color:","b-blocks"),value:a.color,defaultColor:"#f5a623",onChange:e=>t("rating",e,"color")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Empty Star Color:","b-blocks"),value:a.emptyColor,defaultColor:"#d1d5db",onChange:e=>t("rating",e,"emptyColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Review Count Color:","b-blocks"),value:a.countColor,defaultColor:"#64748b",onChange:e=>t("rating",e,"countColor")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Star Size (px)","b-blocks"),value:a.size,onChange:e=>t("rating",e??14,"size"),min:8,max:40,allowReset:!0,resetFallbackValue:14})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Category","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography:","b-blocks"),value:s.typo,onChange:e=>t("category",e,"typo")}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color:","b-blocks"),value:s.normal?.color,defaultColor:"#6b7280",onChange:e=>t("category",e,"normal","color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:s.hover?.color,defaultColor:"#146EF5",onChange:e=>t("category",e,"hover","color")}),(0,l.jsx)(y.RangeControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Transition (s)","b-blocks"),help:(0,x.__)("How long the change to the hover colour takes.","b-blocks"),value:s.transition,onChange:e=>t("category",e??0,"transition"),min:0,max:2,step:.05,allowReset:!0,resetFallbackValue:.2})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sold Count","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography:","b-blocks"),value:r.typo,onChange:e=>t("sold",e,"typo")}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color:","b-blocks"),value:r.color,defaultColor:"#6b7280",onChange:e=>t("sold",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:r.bg,isImage:!1,onChange:e=>t("sold",e,"bg")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Progress Bar","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Track Color:","b-blocks"),value:c.trackColor,defaultColor:"#e2e8f0",onChange:e=>t("sold",e,"progress","trackColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Fill Color:","b-blocks"),value:c.fillColor,defaultColor:"#146EF5",onChange:e=>t("sold",e,"progress","fillColor")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Height (px)","b-blocks"),value:c.height,onChange:e=>t("sold",e??6,"progress","height"),min:2,max:24,allowReset:!0,resetFallbackValue:6}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(c,n,"radius"),onChange:e=>t("sold",e,"progress",n,"radius")})]})]})},iH=({group:e,value:t={},title:n,updateObj:o,device:i="desktop",defaultColors:a={},states:s,withMargin:r=!1})=>{const c=s||[["normal",(0,x.__)("Normal","b-blocks")],["hover",(0,x.__)("Hover","b-blocks")]],[d,u]=(0,Qa.useState)("normal"),p=t[d]||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:n,initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:t.typo,onChange:t=>o(e,t,"typo")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:d,onChange:e=>u(e||"normal"),children:c.map((([e,t])=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:t,value:e},e)))}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:p.color,defaultColor:a[d],onChange:t=>o(e,t,d,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:p.bg,isImage:!1,onChange:t=>o(e,t,d,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(p,i,"padding"),onChange:t=>o(e,t,d,i,"padding")}),r&&(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(p,i,"margin"),onChange:t=>o(e,t,d,i,"margin")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,x.__)("Border","b-blocks"),value:p.border,onChange:t=>o(e,t,d,"border")}),"hover"===d&&(0,l.jsx)(y.RangeControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Transition (s)","b-blocks"),help:(0,x.__)("How long the change from normal to hover takes.","b-blocks"),value:t.transition,onChange:t=>o(e,t??0,"transition"),min:0,max:2,step:.05,allowReset:!0,resetFallbackValue:.2}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(p,i,"radius"),onChange:t=>o(e,t,d,i,"radius")})]})},aH=({attributes:e,updateObj:t,device:n="desktop"})=>{const{cart:o={},viewButton:i={},badge:a={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iH,{group:"cart",withMargin:!0,value:o,title:(0,
549 -x.__)("Cart Button","b-blocks"),updateObj:t,device:n,defaultColors:{normal:"#ffffff",hover:"#ffffff"}}),(0,l.jsx)(iH,{group:"viewButton",withMargin:!0,value:i,title:(0,x.__)("View Button","b-blocks"),updateObj:t,device:n,defaultColors:{normal:"#070127",hover:"#ffffff"}}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sale Badge","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:a.bg,isImage:!1,onChange:e=>t("badge",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:a.color,defaultColor:"#ffffff",onChange:e=>t("badge",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typo,onChange:e=>t("badge",e,"typo")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(a,n,"padding"),onChange:e=>t("badge",e,n,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:ID(a,n,"radius"),onChange:e=>t("badge",e,n,"radius")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Offset","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:JD,isUnitSelectTabbable:!0,help:(0,x.__)("Distance from the top and side of the image.","b-blocks"),value:ID(a,n,"offset"),onChange:e=>t("badge",e||"",n,"offset")})]})]})},sH=({attributes:e,updateObj:t,device:n="desktop"})=>{const{filter:o={},pager:i={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iH,{group:"filter",value:o,title:(0,x.__)("Filter Buttons","b-blocks"),updateObj:t,device:n,defaultColors:{normal:"#070127",hover:"#ffffff"},states:[["normal",(0,x.__)("Normal","b-blocks")],["hover",(0,x.__)("Active","b-blocks")]]}),(0,l.jsx)(iH,{group:"pager",value:i,title:(0,x.__)("Load More / Pagination","b-blocks"),updateObj:t,device:n,defaultColors:{normal:"#ffffff",hover:"#ffffff",active:"#ffffff"},states:[["normal",(0,x.__)("Normal","b-blocks")],["hover",(0,x.__)("Hover","b-blocks")],["active",(0,x.__)("Active","b-blocks")]]})]})},rH=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tH,{...e}),(0,l.jsx)(nH,{...e}),(0,l.jsx)(oH,{...e}),(0,l.jsx)(aH,{...e}),(0,l.jsx)(sH,{...e})]}),lH=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:eF,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(eH,{...e}),"style"===t.name&&(0,l.jsx)(rH,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},cH={left:"flex-start",center:"center",right:"flex-end"},dH=e=>e&&"object"==typeof e&&!Array.isArray(e)?e:{},uH=e=>Array.isArray(e)?e:[],pH=e=>{let t=String(e).replace(/</g,"");for(let e=0;e<3;e++){const e=t.replace(/[^{}]*\{\s*\}/g,"");if(e===t)break;t=e}return t},hH=({attributes:e,id:o,advancedCSS:i=""})=>{const a=dH(e),s=dH(a.layout),r=dH(a.card),c=dH(a.media),d=dH(a.title),u=dH(a.price),p=dH(a.rating),h=dH(a.category),g=dH(a.sold),m=dH(a.cart),b=dH(a.viewButton),f=dH(a.badge),x=dH(a.filter),y=dH(a.pager),v=OD(s,"columnGap"),k=OD(s,"rowGap"),w=OD(s,"columns"),_=OD(s,"contentAlign"),C=dH(g.progress),j=dH(r.normal),$=dH(r.hover),S=OD(j,"padding"),T=OD(j,"radius"),N=OD($,"padding"),M=OD($,"radius"),L=OD(r,"bodyMargin"),P=OD(c,"radius"),E=OD(c,"margin"),A=OD(f,"radius"),B=OD(f,"padding"),I=OD(C,"radius"),O=e=>`#${o} .${HD}${e?`-${e}`:""}`,R=O("grid"),z=O("card"),D=O("card-body"),F=`${z}:hover, ${z}:focus-within`,H=`.${HD}-card-body`,W=`${z}:hover ${H}, ${z}:focus-within ${H}`,U=O("media"),G=O("title"),V=O("price"),q=O("star"),Y=O("category"),K=O("sold-text"),Q=O("progress"),Z=O("atc-btn"),X=O("filter-btn"),J=`${O("load-more")}, ${O("page-btn")}`,ee=`${O("view-btn")}, #${o} .${HD} .added_to_cart`,te=`${Z} .${HD}-icon`,ne=`${O("view-btn")} .${HD}-icon`,oe=`${O("rating-count")}, ${O("rating-value")}`,ie=e=>cH[e]?`${ns("align-items",cH[e])} ${ns("text-align",e)}`:"",ae=p.emptyColor||"#d1d5db",se=OD(f,"offset"),re=e=>{const t=se[e];return`${ns("top",t)} ${"top"===f.align?"":ns("left"===f.align?"left":"right",t)}`},le=Number.isFinite(p.size)?`${p.size}px`:"",ce=Number.isFinite(C.height)?`${C.height}px`:"",de=y.normal?.bg?.color||"#146EF5",ue=e=>ns("padding",hs(e)),pe=e=>ns("margin",hs(e)),he=(e,t)=>Number.isFinite(t)&&t>0?`@media (prefers-reduced-motion: no-preference){ ${e}{ transition: all ${t}s ease; } }`:"",ge=e=>ns("border-radius",hs(e)),me=e=>!(!dH(e).width&&!dH(e).color),be=e=>{const t=dH(e);return me(t)||["top","right","bottom","left"].some((e=>me(t[e])))?as(t):""},fe="list"===s.type,xe=(e,t)=>fe?"":ns("grid-template-columns",`repeat(${e??t}, minmax(0, 1fr))`),ye=(e,t)=>pe(fe&&"mobile"!==t&&e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,["top","bottom"].includes(e)&&/^\s*-/.test(String(t??""))?"0px":t]))):e),ve=(e,t)=>e.split(", ").flatMap((e=>t.map((t=>`${e}${t}`)))).join(", "),ke=(e,t)=>t.trim()?`${e}{ ${t} }`:"",we=(e,t)=>t.trim()?`${e}{ ${t} }`:"",_e=(e,t)=>`\n\t\t${ue(ID(e,t,"padding"))}\n\t\t${pe(ID(e,t,"margin"))}\n\t\t${ge(ID(e,t,"radius"))}\n\t`,Ce=(e,o)=>{const i=!!o.active,a=[[dH(o.normal),e],[dH(o.hover),ve(e,i?[":hover",":focus-visible"]:[":hover",":focus-visible",".is-active"])],...i?[[dH(o.active),ve(e,[".is-active"])]]:[]],s=e=>a.map((([t,n])=>ke(n,_e(t,e)))).join("\n");return`\n\t\t\t${a.map((([e,t])=>ke(t,`\n\t\t\t\t${ns("color",e.color)}\n\t\t\t\t${os(e.bg)}\n\t\t\t\t${be(e.border)}\n\t\t\t\t${_e(e,"desktop")}\n\t\t\t`))).join("\n")}\n\t\t\t${ps(e,o.typo)?.styles}\n\t\t\t${he(e,o.transition)}\n\t\t\t${we(t,s("tablet"))}\n\t\t\t${we(n,s("mobile"))}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
550 -__html:pH(`\n\t\t${ps("",d.typo)?.googleFontLink}\n\t\t${ps("",u.typo)?.googleFontLink}\n\t\t${ps("",h.typo)?.googleFontLink}\n\t\t${ps("",g.typo)?.googleFontLink}\n\t\t${ps("",m.typo)?.googleFontLink}\n\t\t${ps("",b.typo)?.googleFontLink}\n\t\t${ps("",x.typo)?.googleFontLink}\n\t\t${ps("",y.typo)?.googleFontLink}\n\t\t${ps("",f.typo)?.googleFontLink}\n\n\t\t${R}{\n\t\t\t${xe(w.desktop,4)}\n\t\t\t${ns("column-gap",v.desktop)}\n\t\t\t${ns("row-gap",k.desktop)}\n\t\t}\n\t\t${t}{\n\t\t\t${R}{ ${xe(w.tablet,2)} ${ns("column-gap",v.tablet)} ${ns("row-gap",k.tablet)} }\n\t\t}\n\t\t${n}{\n\t\t\t${R}{ ${xe(w.mobile,1)} ${ns("column-gap",v.mobile)} ${ns("row-gap",k.mobile)} }\n\t\t}\n\n\t\t${ke(z,`\n\t\t\t${os(j.bg)}\n\t\t\t${be(j.border)}\n\t\t\t${ge(T.desktop)}\n\t\t\t${ns("box-shadow",ls(uH(j.shadow))||"none")}\n\t\t`)}\n\t\t${he(z,r.transition)}\n\t\t${ke(F,`\n\t\t\t${os($.bg)}\n\t\t\t${be($.border)}\n\t\t\t${ge(M.desktop)}\n\t\t\t${ns("box-shadow",ls(uH($.shadow)))}\n\t\t`)}\n\t\t${ke(D,`${os(r.bodyBg)} ${ue(S.desktop)} ${ye(L.desktop,"desktop")} ${ie(_.desktop)}`)}\n\t\t${ke(W,ue(N.desktop))}\n\t\t${we(t,`\n\t\t\t${ke(z,ge(T.tablet))}\n\t\t\t${ke(F,ge(M.tablet))}\n\t\t\t${ke(D,`${ue(S.tablet)} ${ye(L.tablet,"tablet")} ${ie(_.tablet)}`)}\n\t\t\t${ke(W,ue(N.tablet))}\n\t\t`)}\n\t\t${we(n,`\n\t\t\t${ke(z,ge(T.mobile))}\n\t\t\t${ke(F,ge(M.mobile))}\n\t\t\t${ke(D,`${ue(S.mobile)} ${ye(L.mobile,"mobile")} ${ie(_.mobile)}`)}\n\t\t\t${ke(W,ue(N.mobile))}\n\t\t`)}\n\n\t\t${U}{\n\t\t\t${os(c.bg)}\n\t\t\t${ge(P.desktop)}\n\t\t\t${pe(E.desktop)}\n\t\t}\n\t\t${O("image-link")}{ ${ns("aspect-ratio",c.ratio)} }\n\t\t${O("image")}{ ${ns("object-fit",c.fit)} }\n\t\t${U} .${HD}-actions:not(.${HD}-actions--split){ ${os(c.overlay)} }\n\t\t${ke(O("card-footer"),ns("border-top-color",r.divider))}\n\n\t\t${O("sale-badge")}{\n\t\t\t${ns("color",f.color)}\n\t\t\t${os(f.bg)}\n\t\t\t${ge(A.desktop)}\n\t\t\t${ue(B.desktop)}\n\t\t\t${re("desktop")}\n\t\t}\n\t\t${ps(O("sale-badge"),f.typo)?.styles}\n\n\t\t${we(t,`\n\t\t\t${ke(U,`${ge(P.tablet)} ${pe(E.tablet)}`)}\n\t\t\t${ke(O("sale-badge"),`${ge(A.tablet)} ${ue(B.tablet)} ${re("tablet")}`)}\n\t\t\t${ke(Q,ge(I.tablet))}\n\t\t`)}\n\t\t${we(n,`\n\t\t\t${ke(U,`${ge(P.mobile)} ${pe(E.mobile)}`)}\n\t\t\t${ke(O("sale-badge"),`${ge(A.mobile)} ${ue(B.mobile)} ${re("mobile")}`)}\n\t\t\t${ke(Q,ge(I.mobile))}\n\t\t`)}\n\n\t\t${ke(te,`${ns("color",m.iconColor)} ${ns("font-size",ID(m,"desktop","iconSize"))}`)}\n\t\t${ke(ne,`${ns("color",b.iconColor)} ${ns("font-size",ID(b,"desktop","iconSize"))}`)}\n\t\t${we(t,`\n\t\t\t${ke(te,ns("font-size",ID(m,"tablet","iconSize")))}\n\t\t\t${ke(ne,ns("font-size",ID(b,"tablet","iconSize")))}\n\t\t`)}\n\t\t${we(n,`\n\t\t\t${ke(te,ns("font-size",ID(m,"mobile","iconSize")))}\n\t\t\t${ke(ne,ns("font-size",ID(b,"mobile","iconSize")))}\n\t\t`)}\n\n\t\t${Ce(Z,m)}\n\t\t${Ce(ee,b)}\n\t\t${Ce(X,x)}\n\t\t${Ce(J,y)}\n\n\t\t${O("pager-wrap")}{ ${ns("justify-content",cH[y.align]||"center")} }\n\t\t${O("filter")}{ ${ns("justify-content",cH[x.align]||"flex-start")} }\n\n\t\t${G}{ ${ns("color",d.normal?.color)} }\n\t\t${he(`${G}, ${O("title-link")}`,d.transition)}\n\t\t${O("title-link")}:hover, ${O("title-link")}:focus-visible{ ${ns("color",d.hover?.color)} }\n\n\t\t${V}{ ${ns("color",u.color)} }\n\t\t${V} ins{ ${ns("color",u.color)} }\n\t\t${V} del{ ${ns("color",u.regularColor)} }\n\n\t\t${q}{ ${ns("font-size",le)} ${ns("color",ae)} }\n\t\t${q}.is-full{ ${ns("color",p.color)} }\n\t\t${q}.is-half{\n\t\t\t${ns("background",`linear-gradient(90deg, ${p.color||ae} 50%, ${ae} 50%)`)}\n\t\t\t${ns("-webkit-background-clip","text")}\n\t\t\t${ns("background-clip","text")}\n\t\t}\n\n\t\t${oe}{ ${ns("font-size",le)} ${ns("color",p.countColor)} }\n\n\t\t${Y}{ ${ns("color",h.normal?.color)} }\n\t\t${he(`${Y}, ${Y} a`,h.transition)}\n\t\t${Y} a:hover, ${Y} a:focus-visible{ ${ns("color",h.hover?.color)} }\n\n\t\t${K}{ ${ns("color",g.color)} ${os(g.bg)} }\n\n\t\t${Q}{\n\t\t\t${ns("height",ce)}\n\t\t\t${ns("background",C.trackColor)}\n\t\t\t${ge(I.desktop)}\n\t\t}\n\t\t${O("progress-fill")}{ ${ns("background",C.fillColor)} }\n\n\t\t${O("btn")}:focus-visible,\n\t\t${X}:focus-visible,\n\t\t${O("load-more")}:focus-visible,\n\t\t${O("page-btn")}:focus-visible,\n\t\t${O("title-link")}:focus-visible{\n\t\t\t${ns("outline",`2px solid ${de}`)}\n\t\t\t${ns("outline-offset","2px")}\n\t\t}\n\n\t\t${ps(G,d.typo)?.styles}\n\t\t${ps(V,u.typo)?.styles}\n\t\t${ps(Y,h.typo)?.styles}\n\t\t${ps(K,g.typo)?.styles}\n\n\t\t${i}\n\t`)}})},gH=({terms:e=[],activeTerm:t=0,attributes:n,isLoading:o=!1,labels:i={},onChange:a})=>{const{enable:s,allText:r}=n.filter||{};if(!s||!e.length)return null;const c=(e,n)=>{const i=e===t;return(0,l.jsx)("button",{type:"button",className:"b-blocks-woo-product-grid-filter-btn"+(i?" is-active":""),"aria-pressed":i,disabled:o,onClick:()=>!i&&a(e),children:n},e)};return(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-filter",role:"group","aria-label":i.filter,children:[c(0,AD(r)),e.map((e=>c(e.id,e.name)))]})},mH=({product:e})=>e.priceHtml?(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-price",dangerouslySetInnerHTML:{__html:e.priceHtml}}):null,bH=(e,t)=>e>=t?"b-blocks-woo-product-grid-star is-full":e>=t-.5?"b-blocks-woo-product-grid-star is-half":"b-blocks-woo-product-grid-star",fH=({product:e,attributes:t,isBackend:n=!1,only:o=""})=>{const{cart:i,viewButton:a}=t.elements||{},s=i&&"view"!==o,r=a&&"cart"!==o,{text:c}=t.viewButton||{};if(!s&&!r)return null;const{id:d,link:u,cartText:p,cartAjax:h,cartUrl:g,cartClass:m,sku:b,cartAria:f,viewAria:x}=e,y=!n&&h?` button ${m||""} add_to_cart_button ajax_add_to_cart`:"",{actionAlign:v="center",actionFull:k,actionIconOnly:w,actionOrder:_,actionPosition:C}=t.layout||{},j="split"===C,$=t.cart||{},S=t.viewButton||{},T=(e,t)=>!1!==e.showIcon||w?e.icon?(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:e.icon}}):t:null,N=e=>"right"===e.iconPosition?" is-icon-right":"",M=["b-blocks-woo-product-grid-actions",j?"b-blocks-woo-product-grid-actions--split":`b-blocks-woo-product-grid-actions--${v}`,k&&!j?"is-full":"",w?"is-icon-only":""].filter(Boolean).join(" "),L=s&&(0,l.jsxs)("a",{className:`b-blocks-woo-product-grid-btn b-blocks-woo-product-grid-atc-btn${N($)}${y}`,href:g||u,rel:"nofollow","aria-label":f,"data-product_id":h?d:void 0,"data-product_sku":h?b||"":void 0,"data-quantity":h?1:void 0,onClick:n?e=>e.preventDefault():void 0,children:[T($,qD),(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-btn-label",children:p})]},"cart"),P=r&&(0,l.jsxs)("a",{className:`b-blocks-woo-product-grid-btn b-blocks-woo-product-grid-view-btn${N(S)}`,href:u,"aria-label":x,onClick:n?e=>e.preventDefault():void 0,children:[T(S,YD),(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-btn-label",children:AD(c)})]},"view");return(0,l.jsx)("div",{className:M,children:"view"===_?[P,L]:[L,P]})},xH={price:{Component:mH,toggle:"price"},rating:{Component:({product:e,attributes:t})=>{const{style:n,showEmpty:o=!0}=t.rating||{},{rating:i=0,ratingCount:a=0}=e;if(!a&&!o)return null;const s=Math.round(2*i)/2;return(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-rating",role:"img","aria-label":e.ratingLabel,children:["number"!==n&&[1,2,3,4,5].map((e=>(0,l.jsx)("span",{className:bH(s,e),"aria-hidden":"true",children:"★"},e))),"star-count"===n&&(0,l.jsxs)("span",{className:"b-blocks-woo-product-grid-rating-count","aria-hidden":"true",children:["(",a,")"]}),"number"===n&&(0,l.jsxs)("span",{className:"b-blocks-woo-product-grid-rating-value","aria-hidden":"true",children:[a>0&&(0,l.jsxs)(l.Fragment,{children:[i.toFixed(1)," "]}),(0,l.jsxs)("span",{className:"b-blocks-woo-product-grid-rating-count",children:["(",a,")"]})]})]})},toggle:"rating"},title:{Component:({product:e,attributes:t})=>{const{titleTag:n}=t.layout||{};if(!e.title)return null;const o=VD.includes(n)?n:"h4";return(0,l.jsx)(o,{className:"b-blocks-woo-product-grid-title",children:(0,
551 -l.jsx)("a",{className:"b-blocks-woo-product-grid-title-link",href:e.link,children:e.title})})},toggle:"title"},category:{Component:({product:e})=>e.categoriesHtml?(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-category",dangerouslySetInnerHTML:{__html:e.categoriesHtml}}):null,toggle:"category"},soldCount:{Component:({product:e,attributes:t})=>{const n=t.elements?.progressBar,{soldLabel:o="",soldPercent:i=0,soldBarLabel:a=""}=e;return(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-sold",children:[n&&(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-progress",role:"img","aria-label":a,children:(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-progress-fill",style:{width:`${i}%`}})}),(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-sold-text",children:o})]})},toggle:"soldCount"}},yH=({product:e,attributes:t,isBackend:n=!1,index:o=0})=>{const i=Array.isArray(t.contentOrder)?t.contentOrder:[],a=t.elements||{},s=t.badge||{},{image:r,saleBadge:c}=a,{text:d}=s,u=(0,l.jsx)(fH,{product:e,attributes:t,isBackend:n}),{actionPosition:p}=t.layout||{},h="split"===p,g=r&&"below"!==p&&!h,m=h&&r,b=a.cart||!m&&a.viewButton,f=h&&(a.price||b)&&(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-card-footer",children:[a.price&&(0,l.jsx)(mH,{product:e,attributes:t}),(0,l.jsx)(fH,{product:e,attributes:t,isBackend:n,only:m?"cart":""})]}),{content:x}=s,y="amount"===x&&e.saveLabel||"percent"===x&&e.percentLabel||AD(d),{image:v={}}=e,k=o<(parseInt(ID(t.layout,"desktop","columns"),10)||4);return(0,l.jsxs)("article",{className:"b-blocks-woo-product-grid-card",role:"listitem","aria-label":e.title,children:[r&&(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-media",children:[c&&e.onSale&&(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-sale-badge",children:y}),(0,l.jsx)("a",{className:"b-blocks-woo-product-grid-image-link",href:e.link,tabIndex:-1,"aria-hidden":"true",children:v.url&&(0,l.jsx)("img",{className:"b-blocks-woo-product-grid-image",src:v.url,srcSet:v.srcset||void 0,sizes:v.sizes||void 0,width:v.width||void 0,height:v.height||void 0,alt:v.alt||"",loading:k?"eager":"lazy",fetchpriority:0===o?"high":void 0,decoding:"async"})}),g&&u,m&&(0,l.jsx)(fH,{product:e,attributes:t,isBackend:n,only:"view"})]}),(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-card-body"+(f?" has-footer":""),children:[!g&&!h&&u,i.map((n=>{const o=xH[n];if(!o||!a[o.toggle])return null;if(h&&"price"===n)return null;const{Component:i}=o;return(0,l.jsx)(i,{product:e,attributes:t},n)})),f]})]})},vH=({products:e=[],attributes:t,isLoading:n,isBackend:o,labels:i={}})=>{const{noProductsMessage:a}=t.query||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-grid"+(n?" is-loading":""),role:"list","aria-label":i.products,"aria-busy":n,children:e.map(((e,n)=>(0,l.jsx)(yH,{product:e,attributes:t,isBackend:o,index:n},e.id)))}),!e.length&&!n&&(0,l.jsx)("p",{className:"b-blocks-woo-product-grid-empty",children:AD(a)})]})},kH=(e,t)=>{if(t<=7)return Array.from({length:t},((e,t)=>t+1));const n=[1];e>3&&n.push("...");for(let o=Math.max(2,e-1);o<=Math.min(t-1,e+1);o++)n.push(o);return e<t-2&&n.push("..."),n.push(t),n},wH=({attributes:e,page:t=1,maxPages:n=1,isLoading:o=!1,labels:i={},onPage:a})=>{const{enable:s,type:r,text:c}=e.pager||{};return!s||n<=1?null:"pagination"===r?(0,l.jsx)("nav",{className:"b-blocks-woo-product-grid-pager b-blocks-woo-product-grid-pager--pagination","aria-label":i.pagination,children:kH(t,n).map(((e,n)=>"..."===e?(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-page-gap","aria-hidden":"true",children:"…"},`gap-${n}`):(0,l.jsx)("button",{type:"button",className:"b-blocks-woo-product-grid-page-btn"+(e===t?" is-active":""),"aria-current":e===t?"page":void 0,disabled:o,"aria-label":BD(i.goToPage,e),onClick:()=>e!==t&&a(e),children:e},e)))}):"prev-next"===r?(0,l.jsxs)("nav",{className:"b-blocks-woo-product-grid-pager b-blocks-woo-product-grid-pager--prev-next","aria-label":i.pagination,children:[(0,l.jsx)("button",{type:"button",className:"b-blocks-woo-product-grid-page-btn b-blocks-woo-product-grid-page-prev",disabled:o||t<=1,"aria-label":i.prevPage,onClick:()=>a(t-1),children:i.prev}),(0,l.jsx)("button",{type:"button",className:"b-blocks-woo-product-grid-page-btn b-blocks-woo-product-grid-page-next",disabled:o||t>=n,"aria-label":i.nextPage,onClick:()=>a(t+1),children:i.next})]}):t>=n?null:(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-pager b-blocks-woo-product-grid-pager--button",children:(0,l.jsxs)("button",{type:"button",className:"b-blocks-woo-product-grid-load-more"+(o?" is-loading":""),"aria-busy":o,disabled:o,onClick:()=>a(t+1,{append:!0}),children:[(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-load-more-label",children:AD(c)}),o&&(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-spinner","aria-hidden":"true"})]})})},_H=e=>{const{attributes:t,id:n,isBackend:o=!1,advancedCSS:i,products:a,terms:s,activeTerm:r,page:c,maxPages:d,isLoading:u,status:p,labels:h,hasError:g,onTerm:m,onPage:b}=e,{type:f}=t.layout||{},{align:x}=t.badge||{},y=[HD,`${HD}--${f}`,`${HD}--badge-${x}`].join(" "),v=(0,l.jsxs)("div",{className:y,children:[(0,l.jsx)(gH,{terms:s,activeTerm:r,attributes:t,isLoading:u,labels:h,onChange:m}),(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-status","aria-live":"polite","aria-atomic":"true",children:p}),g&&h.error&&(0,l.jsx)("p",{className:"b-blocks-woo-product-grid-error",role:"alert",children:h.error}),(0,l.jsx)(vH,{products:a,attributes:t,isLoading:u,isBackend:o,labels:h}),(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-pager-wrap",children:(0,l.jsx)(wH,{attributes:t,page:c,maxPages:d,isLoading:u,labels:h,onPage:b})})]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hH,{attributes:t,id:n,advancedCSS:i}),o?(0,l.jsx)("div",{children:v}):v]})},CH=({ajaxUrl:e,nonce:t,attributes:n,seed:o=null})=>{const[i,a]=(0,m.useState)(o?.products||[]),[s,r]=(0,m.useState)(o?.maxPages||0),[l,c]=(0,m.useState)(""),[d,u]=(0,m.useState)({page:1,term:0,attempt:0}),[p,h]=(0,m.useState)({page:1,term:0}),g=(0,m.useRef)(!1),[b,f]=(0,m.useState)(!o),x=JSON.stringify(GD(n)),y=(0,m.useRef)(!0);(0,m.useEffect)((()=>{y.current?y.current=!1:(g.current=!1,u((e=>({page:1,term:0,attempt:e.attempt+1}))),h({page:1,term:0}),f(!0))}),[x]);const{products:v,terms:k,labels:w,maxPages:_,respPage:C,respTerm:j,hasWoo:$,installUrl:S,isLoading:T,isReady:N,hasError:M}=((e,t,n,o=1,i=0,a=!1,s=0)=>{const r=GD(n),l=JSON.stringify(r),c=(0,m.useRef)(l);c.current=l;const d=(0,m.useRef)(0),[u,p]=(0,m.useState)(null),[h,g]=(0,m.useState)(!1),[b,f]=(0,m.useState)(!1),x=(0,m.useRef)(!0);return(0,m.useEffect)((()=>()=>{x.current=!1}),[]),(0,m.useEffect)((()=>{if(!e||!t||a)return;const n=++d.current,s=()=>x.current&&n===d.current;g(!0),f(!1);const r=new URLSearchParams({action:"bb_wpg_query",_wpnonce:t,queryAttr:c.current,pageNumber:String(o),termId:String(i)});fetch(e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:r.toString()}).then((e=>e.json())).then((e=>{s()&&(e?.success?p(e.data):f(!0))})).catch((()=>{s()&&f(!0)})).finally((()=>{s()&&g(!1)}))}),[e,t,o,i,a,s]),{respPage:u?.page??0,respTerm:u?.termId??0,labels:u?.labels||{},products:u?.products||[],terms:u?.terms||[],maxPages:u?.maxPages||0,total:u?.total||0,hasWoo:!1!==u?.woo,installUrl:u?.installUrl||"",hasError:b,isLoading:h||!u&&!!t&&!a&&!b,isReady:!!u}})(e,t,n,d.page,d.term,!b,d.attempt),L=o?.labels||w||{},P=C===d.page&&j===d.term;(0,m.useEffect)((()=>{if(!b||!N||T||!P)return;const e=g.current;a((t=>((e,t,n)=>{const o=Array.isArray(t)?t:[];if(!n)return o;const i=Array.isArray(e)?e:[],a=new Set(i.map((e=>e?.id)));return[...i,...o.filter((e=>!a.has(e?.id)))]})(t,v,e))),r(_),h({page:d.page,term:d.term}),e||c(v.length?BD(L.showing,v.length):n.query?.noProductsMessage)}),[v,N,T,P]),(0,m.useEffect)((()=>{g.current&&c(BD(L.showing,i.length))}),[i]),(0,m.useEffect)((()=>{
552 -M&&L.error&&c(L.error)}),[M]);const E=b&&T;return{products:i,terms:o?.terms?.length?o.terms:k,maxPages:s,page:p.page,activeTerm:p.term,status:l,labels:L,isLoading:E,isReady:N||!!o,hasError:M,hasWoo:$,installUrl:S,onTerm:e=>{E||(g.current=!1,f(!0),u((t=>({page:1,term:e,attempt:t.attempt+1}))))},onPage:(e,{append:t=!1}={})=>{E||(g.current=t,f(!0),u((t=>({...t,page:e,attempt:t.attempt+1}))))}}},jH=({installUrl:e})=>{const t=(0,x.__)("WooCommerce is not installed/activated on your site. Please install and activate <a>WooCommerce</a> first.","b-blocks");return(0,l.jsx)("p",{className:"b-blocks-woo-product-grid-notice",children:(0,Qa.createInterpolateElement)(t,{a:e?(0,l.jsx)("a",{href:e,target:"_blank",rel:"noreferrer noopener"}):(0,l.jsx)("strong",{})})})},$H=Object.fromEntries(Object.entries(ED.attributes).map((([e,{default:t}])=>[e,t]))),SH=(0,w.compose)((0,f.withSelect)((e=>{const t=e("core/editor");return{device:t?.getDeviceType()?.toLowerCase()||"desktop",currentProductId:"product"===t?.getCurrentPostType()?t.getCurrentPostId():0}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop",currentProductId:a=0}=e,s=(0,Qa.useMemo)((()=>FD(t,$H)),[t]),r=`block-${o}`,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,{data:d}=jd("bBlocksUtils"),u=d?.nonce,p=fe(s,n),g={...s,query:{...s.query,currentProductId:a}},{hasWoo:m,installUrl:b,isReady:f,...v}=CH({ajaxUrl:window.ajaxurl,nonce:u,attributes:g}),k=(0,Qa.useMemo)((()=>_s(r,s.advanced,!0)),[r,JSON.stringify(s.advanced)]),w=(0,h.useBlockProps)({id:r});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(lH,{...e,attributes:s,updateObj:p,device:i,isPremium:c}),(0,l.jsxs)("div",{...w,children:[!f&&!v.hasError&&(0,l.jsxs)("p",{className:"b-blocks-woo-product-grid-loading",children:[(0,l.jsx)(y.Spinner,{}),(0,x.__)("Loading product grid…","b-blocks")]}),!f&&v.hasError&&(0,l.jsx)("p",{className:"b-blocks-woo-product-grid-error",role:"alert",children:(0,x.__)("Products could not be loaded. Check that you are still signed in, then reload the editor.","b-blocks")}),f&&!m&&(0,l.jsx)(jH,{installUrl:b}),f&&m&&(0,l.jsx)(_H,{isBackend:!0,attributes:s,id:r,advancedCSS:k,...v})]})]})}));Ll(ED.name)&&(0,p.registerBlockType)(ED,{icon:Sl,edit:SH,save:()=>null});const TH=JSON.parse('{"apiVersion":3,"name":"b-blocks/star-rating","title":"Star Rating","description":"Gutenberg editing with easy-to-use, responsive star-rating more.","category":"bBlocks","keywords":["star-rating","Rating","Gutenberg"],"textdomain":"star-rating","attributes":{"align":{"type":"string","default":""},"ratingScale":{"type":"number","default":5},"rating":{"type":"number","default":4.3},"iconStyle":{"type":"string","default":"solid"},"iconColor":{"type":"string","default":"#f0ad4e"},"prefix":{"type":"string","default":""},"gap":{"type":"string","default":"0px"},"alignment":{"type":"string","default":"center"},"margin":{"type":"object","default":{"top":"","right":"","bottom":"","left":""}},"textTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"textColor":{"type":"string","default":"#7a7a7a"},"textShadow":{"type":"array","default":[]},"iconSize":{"type":"string","default":"20px"},"unmarkedColor":{"type":"string","default":"#ccd6df"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),NH=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:(0,l.jsx)("path",{d:"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"})}),MH=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:(0,l.jsx)("path",{d:"M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.6 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z"})}),LH=[{label:"0-5",value:5},{label:"0-10",value:10}],PH=[{label:(0,x.__)("Solid","b-blocks"),value:"solid",icon:NH},{label:(0,x.__)("Outline","b-blocks"),value:"outline",icon:MH}],EH=[{label:(0,x.__)("left","b-blocks"),value:"left",icon:"editor-alignleft"},{label:(0,x.__)("center","b-blocks"),value:"center",icon:"editor-aligncenter"},{label:(0,x.__)("right","b-blocks"),value:"right",icon:"editor-alignright"}],AH=({attributes:e,setAttributes:t})=>{const{ratingScale:n,rating:o,iconStyle:i,prefix:a,gap:s,alignment:r,margin:c,textTypo:d,textColor:u,textShadow:p,iconColor:g="#f0ad4e",iconSize:m="20px",unmarkedColor:b="#ccd6df"}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Star Rating","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Rating Scale","b-blocks"),labelPosition:"left",value:n,onChange:e=>t({ratingScale:parseInt(e),rating:5===parseInt(e)?parseFloat((o/2).toFixed(1)):parseFloat((2*o).toFixed(1))}),options:LH}),(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Prefix","b-blocks"),value:a,onChange:e=>t({prefix:e})}),(0,l.jsx)(y.RangeControl,{className:"mt20",label:(0,x.__)("Rating","b-blocks"),labelPosition:"left",value:o,onChange:e=>t({rating:e}),min:1,max:n,step:.1}),(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Icon Style","b-blocks"),value:i,onChange:e=>t({iconStyle:e}),options:PH,isIcon:!0})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Star Rating","b-blocks"),children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:m,onChange:e=>t({iconSize:e}),units:[Pe(10),Ae(1)],isResetValueOnUnitChange:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s,onChange:e=>t({gap:e}),units:[Pe(10),Ae(1)],isResetValueOnUnitChange:!0})]}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:c,onChange:e=>t({margin:e})}),(0,l.jsx)(Tn,{label:(0,x.__)("Alignment","b-blocks"),value:r,onChange:e=>t({alignment:e}),options:EH,isIcon:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:g,onChange:e=>t({iconColor:e})}),(0,l.jsx)(Ue,{label:(0,x.__)("Unmarked Icon Color","b-blocks"),value:b,onChange:e=>t({unmarkedColor:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Gap","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({gap:e}),units:[Pe(10),Ae(1)],isResetValueOnUnitChange:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:u,onChange:e=>t({textColor:e}),defaultColor:"#7a7a7a"}),(0,l.jsx)(Oa,{label:(0,x.__)("Text Typography","b-blocks"),value:d,onChange:e=>t({textTypo:e}),defaults:{fontSize:16}}),(0,l.jsx)(yt,{label:(0,x.__)("Text Shadow","b-blocks"),value:p,onChange:e=>t({textShadow:e}),type:"text"})]})]})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:r,onChange:e=>t({alignment:e}),
553 -describedBy:(0,x.__)("Rating Alignment"),alignmentControls:[{title:(0,x.__)("Rating in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Rating in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Rating in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},BH=e=>Array.from({length:e},((e,t)=>t+1)),IH="bBlocksRating",OH=({attributes:e,id:t})=>{const{rating:n,gap:o,alignment:i,margin:a,textTypo:s,textColor:r,textShadow:c,iconColor:d="#f0ad4e",iconSize:u="20px",unmarkedColor:p="#ccd6df"}=e,h=`#${t} .${IH}`,g=`${h} .stars .star`,m=(n+"").split("."),b=parseInt(m[0]),f=parseInt(m[1]||0);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",s)?.googleFontLink}\n\t\t${ps(`${h} .ratingPrefix`,s)?.styles}\n\n\t\t${h} {\n\t\t\tjustify-content: ${i};\n\t\t\tgap: ${o};\n\t\t\tcolor: ${r};\n\t\t\t${ns("margin",hs(a))}\n\t\t}\n\n\t\t${h} .ratingPrefix{\n\t\t\ttext-shadow: ${ls(c,"text")}\n\t\t}\n\n\t\t${h} .stars{\n\t\t\t${ns("gap",o)}\n\t\t}\n\n\t\t${g}>.starFill>svg{\n\t\t\t${ns("fill",d)}\n\t\t\t${ns("width",u)}\n\t\t\t${ns("height",u)}\n\t\t}\n\n\t\t${g}>svg{\n\t\t\t${ns("fill",p)}\n\t\t\t${ns("width",u)}\n\t\t\t${ns("height",u)}\n\t\t}\n\n\t\t${g}{\n\t\t\t${ns("width",u)}\n\t\t\t${ns("height",u)}\n\t\t}\n\n\t\t${BH(b).map((e=>`${g}:nth-child(${e}) .starFill`)).join(", ")}{\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t${g}:nth-child(${b+1}) .starFill{\n\t\t\twidth: ${(()=>{switch(f){case 1:return 25;case 2:return 30;case 3:return 35;case 4:return 42.5;case 5:return 50;case 6:return 57.5;case 7:return 65;case 8:return 70;case 9:return 75;default:return 0}})()}%;\n\t\t}\n\t`}})},RH=({attributes:e})=>{const{ratingScale:t,iconStyle:n,prefix:o}=e;return(0,l.jsxs)("div",{className:IH,children:[(0,l.jsx)("span",{className:"ratingPrefix",children:o}),(0,l.jsx)("div",{className:"stars",children:BH(t).map((e=>(0,l.jsxs)("span",{className:"star",children:["solid"===n?NH:MH,(0,l.jsx)("span",{className:"starFill",children:NH})]},e)))})]})};Ll(TH.name)&&(0,p.registerBlockType)(TH,{icon:Wr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(AH,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(OH,{attributes:t,id:`block-${o}`}),(0,l.jsx)(RH,{attributes:t})]})]})},save:()=>null});const zH=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/stacked-cards","title":"Stacked Cards","category":"bBlocks","description":"Create interactive stacked card layouts that stay sticky while scrolling. The Stacked Cards block helps you present content in a layered, engaging format that enhances the user experience as visitors navigate your page.","keywords":["stacked","cards","stack","cards"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"options":{"type":"object","default":{"effect":"default","responsive":{"desktop":false,"tablet":true,"mobile":true}}},"styles":{"type":"object","default":{"stickyTop":30,"cardGaps":30,"desktop":{"height":""},"tablet":{"height":""},"mobile":{"height":""}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"bottom":"","top":"","right":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"x":"","y":"","z":""},"tablet":{"x":"","y":"","z":""},"mobile":{"x":"","y":"","z":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b0","isInset":false}],"border":{"width":"","style":"none"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"visibility":{"zIndex":{"desktop":""},"overflow":""},"responsive":{"desktop":false,"tablet":false,"mobile":false}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),DH=((0,x.__)("Simple"),(0,x.__)("Minimal"),(0,x.__)("Small"),(0,x.__)("Short"),(0,x.__)("Vertical","b-blocks"),(0,x.__)("Horizontal","b-blocks"),[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}]),FH=e=>{const{attributes:t,updateObj:n,device:o="desktop"}=e,{styles:i,options:a}=t,{stickyTop:s}=i,{responsive:r}=a;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Sticky Top Value","b-blocks"),value:s,onChange:e=>n("styles",e,"stickyTop"),min:0,max:1e3}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Card Height","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i[o].height,onChange:e=>n("styles",e,o,"height")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Disable On Desktop","b-blocks"),checked:r.desktop,value:r.desktop,onChange:e=>n("options",e,"responsive","desktop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Disable On Tablet","b-blocks"),checked:r.tablet,value:r.tablet,onChange:e=>n("options",e,"responsive","tablet")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Disable On Mobile","b-blocks"),checked:r.mobile,value:r.mobile,onChange:e=>n("options",e,"responsive","mobile")})]})]})},HH=e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{advanced:i}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:DH,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(FH,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e})})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.Button,{onClick:()=>{const e=[...(0,f.select)("core/block-editor").getBlocks(o)],t=(0,p.createBlock)("b-blocks/container",{className:"bBlocksStackedSingleCard"});e.push(t),(0,f.dispatch)("core/block-editor").replaceInnerBlocks(o,e,!1)},style:{height:"100%"},children:"Add Card"})})]})},WH=({attributes:e,id:o,isBackend:i=!1})=>{
554 -const{styles:a,options:s,advanced:r}=e,{responsive:c}=s,d=`#${o} .b-blocks-stackedCardsMainWrapper .bBlocksStackedSingleCard`,u=`${d} .bBlocksContainer .bBlocksContainerContent`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${d}{\n\t\t\t${i?"":ns("top",a.stickyTop+"px")}\n\t\t\t${i?"":ns("position",c.desktop?"unset":"sticky")}\n\t\t\t${c.desktop?"transform: scale(1) !important;":""}\n\n\t\t}\n\t\t${d}:last-child{\n\t\t\t${ns("margin-bottom","0px")}\n\t\t}\n\t\t${u}{\n\t\t\t${i?"":ns("height",a.desktop.height)}\n\t\t}\n\t\t${t}{\n\t\t\t${d}{\n\t\t\t\t${i?"":ns("position",c.tablet?"unset":"sticky")}\n\t\t\t\t${c.tablet?"transform: scale(1) !important;":""}\n\t\t\t}\n\t\t\t${u}{\n\t\t\t\t${i?"":ns("height",a.tablet.height)}\n\t\t\t}\n\t\t}\n\n\t\t${n}{\n\t\t\t${d}{\n\t\t\t\t${i?"":ns("position",c.mobile?"unset":"sticky")}\n\t\t\t\t${c.desktop?"transform: scale(1) !important;":""}\n\t\t\t}\n\t\t\t${u}{\n\t\t\t\t${i?"":ns("height",a.mobile.height)}\n\t\t\t}\n\t\t}\n\n\t\t${Cs(o,r,i)}\n\t`}})},UH=["rgba(230, 244, 255, 1)","rgba(230, 227, 255, 1)","rgba(230, 252, 255, 1)"].map(((e,t)=>["b-blocks/container",{advanced:{dimension:{padding:{desktop:{top:"45px",right:"45px",bottom:"45px",left:"45px"}}},background:{normal:{type:"color",color:e}},borderShadow:{normal:{radius:{top:"15px",right:"15px",bottom:"15px",left:"15px"}}}},className:"bBlocksStackedSingleCard"},[["b-blocks/section-heading",{textAlign:"center",title:`Card Item #${t+1}`,titleTypo:{fontSize:{desktop:"40px",tablet:"",mobile:""},fontWeight:600},titleMargin:{side:4,bottom:"20px"},isSep:!1,desc:"Insert your own content to showcase or highlight<br> the feature you want to represent. Add any <br>blocks you want to customize it as per<br> your preference.",descTypo:{fontSize:{desktop:"20px"},fontWeight:500,fontVariant:"500"},descColor:"rgba(0, 0, 0, 1)"}]]])),GH=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,[a,s]=(0,m.useState)(0),r=fe(t,n),c=(0,h.useInnerBlocksProps)({className:"b-blocksStackedCards"},{template:UH,templateLock:!1,renderAppender:!1});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(HH,{attributes:t,setAttributes:n,updateObj:r,activeIndex:a,setActiveIndex:s,clientId:o,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(WH,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"b-blocks-stackedCardsMainWrapper",children:(0,l.jsx)("div",{className:"b-blocksStackedCardsWrapper",...c})})})]})]})}));Ll(zH.name)&&(0,p.registerBlockType)(zH,{icon:cl,edit:GH,save:h.InnerBlocks.Content})
555 -;const VH=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/stat-cards","title":"Stat Cards","category":"bBlocks","description":"Display a static, responsive grid of impact stat cards — a big number with prefix/suffix, label, optional trend badge, description, and per-card link. No JavaScript.","keywords":["stats","statistics","kpi","numbers","metrics","counter","impact"],"textdomain":"b-blocks","attributes":{"layout":{"type":"object","default":{"align":"center","columnGap":{"desktop":"24px","tablet":"24px","mobile":"24px"},"rowGap":{"desktop":"24px","tablet":"24px","mobile":"24px"},"columns":{"desktop":3,"tablet":2,"mobile":1}}},"card":{"type":"object","default":{"style":"flat","orientation":"vertical","shadow":[],"accentColor":"#146EF5","accentWidth":4,"bg":{"type":"solid","color":""},"border":{"color":"#e2e8f0","style":"solid","width":"1px"},"borderRadius":{"desktop":{"top":"12px","right":"12px","bottom":"12px","left":"12px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"28px","right":"24px","bottom":"28px","left":"24px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"number":{"type":"object","default":{"color":"#111827","typography":{"fontSize":{"desktop":"48px","tablet":"40px","mobile":"32px"},"fontWeight":700},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"label":{"type":"object","default":{"color":"#374151","typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":400},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"description":{"type":"object","default":{"show":true,"color":"#6B7280","typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"icon":{"type":"object","default":{"show":true,"color":"#146EF5","size":"32px","bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"trend":{"type":"object","default":{"show":true}},"items":{"type":"array","default":[{"icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z\\"/></svg>","orientation":"","number":"500","prefix":"","suffix":"+","label":"Customers","description":"","trendValue":"","trendDirection":"up","trendColor":"","linkUrl":"","linkTarget":false},{"icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z\\"/></svg>","orientation":"","number":"98","prefix":"","suffix":"%","label":"Satisfaction","description":"","trendValue":"","trendDirection":"up","trendColor":"","linkUrl":"","linkTarget":false},{"icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z\\"/></svg>","orientation":"","number":"4.9","prefix":"","suffix":"","label":"Average Rating","description":"","trendValue":"","trendDirection":"up","trendColor":"","linkUrl":"","linkTarget":false}]},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),qH=(e,t)=>Number.isFinite(parseInt(e,10))?parseInt(e,10):t,YH=(e={})=>`\n\t${os(e.bg)}\n\t${as(e.border)}\n\t${ns("border-radius",hs(e.borderRadius))}\n\t${ns("padding",hs(e.padding))}\n\t${ns("margin",hs(e.margin))}\n`,KH=({attributes:e,id:o,isBackend:i=!1})=>{
556 -const{layout:a={},card:s={},number:r={},label:c={},description:d={},icon:u={},advanced:p}=e,h=a.columns||{},g=a.columnGap||{},m=a.rowGap||{},b=["left","center","right"].includes(a.align)?a.align:"center",f="left"===b?"flex-start":"right"===b?"flex-end":"center",x=s.style||"flat",y="outlined"===x||"accent-top"===x,v=s.padding||{},k=s.borderRadius||{},w=s.margin||{},_=r.typography||{},C=_.fontSize?.tablet,j=_.fontSize?.mobile,$=`#${o} .bBlocks-stat-cards-wrapper`,S=`${$} .bBlocks-stat-cards-grid`,T=`${$} .bBlocks-stat-cards-item`,N=`${$} .bBlocks-stat-cards-icon`,M=`${$} .bBlocks-stat-cards-number`,L=`${$} .bBlocks-stat-cards-label`,P=`${$} .bBlocks-stat-cards-desc`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",_).googleFontLink}\n\t\t\t${ps("",c.typography).googleFontLink}\n\t\t\t${ps("",d.typography).googleFontLink}\n\t\t\t${S}{\n\t\t\t\tgrid-template-columns: repeat(${qH(h.desktop,3)}, minmax(0, 1fr));\n\t\t\t\tcolumn-gap: ${g.desktop||"24px"};\n\t\t\t\trow-gap: ${m.desktop||"24px"};\n\t\t\t}\n\t\t\t${T}{\n\t\t\t\talign-items: ${f};\n\t\t\t\ttext-align: ${b};\n\t\t\t\t${ns("padding",hs(v.desktop))}\n\t\t\t\t${ns("margin",hs(w.desktop))}\n\t\t\t\t${ns("border-radius",hs(k.desktop))}\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${ns("box-shadow",ls(s.shadow))}\n\t\t\t\t${y?as(s.border):""}\n\t\t\t\t${"accent-top"===x?`border-top: ${qH(s.accentWidth,4)}px solid ${s.accentColor};`:""}\n\t\t\t}\n\t\t\t${N}{\n\t\t\t\t${ns("color",u.color)}\n\t\t\t\tfont-size: ${u.size};\n\t\t\t\t${YH(u)}\n\t\t\t}\n\t\t\t${ps(M,_).styles}\n\t\t\t${M}{\n\t\t\t\t${ns("color",r.color)}\n\t\t\t\tjustify-content: ${f};\n\t\t\t\t${YH(r)}\n\t\t\t}\n\t\t\t${ps(L,c.typography).styles}\n\t\t\t${L}{\n\t\t\t\t${ns("color",c.color)}\n\t\t\t\t${YH(c)}\n\t\t\t}\n\t\t\t${ps(P,d.typography).styles}\n\t\t\t${P}{\n\t\t\t\t${ns("color",d.color)}\n\t\t\t\t${YH(d)}\n\t\t\t}\n\t\t\t${t}{\n\t\t\t\t${S}{\n\t\t\t\t\tgrid-template-columns: repeat(${qH(h.tablet,2)}, minmax(0, 1fr));\n\t\t\t\t\tcolumn-gap: ${g.tablet||g.desktop||"24px"};\n\t\t\t\t\trow-gap: ${m.tablet||m.desktop||"24px"};\n\t\t\t\t}\n\t\t\t\t${T}{\n\t\t\t\t\t${ns("padding",hs(v.tablet))}\n\t\t\t\t\t${ns("margin",hs(w.tablet))}\n\t\t\t\t\t${ns("border-radius",hs(k.tablet))}\n\t\t\t\t}\n\t\t\t\t${C?`${M}{ font-size: ${C}; }`:""}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${S}{\n\t\t\t\t\tgrid-template-columns: repeat(${qH(h.mobile,1)}, minmax(0, 1fr));\n\t\t\t\t\tcolumn-gap: ${g.mobile||g.tablet||g.desktop||"24px"};\n\t\t\t\t\trow-gap: ${m.mobile||m.tablet||m.desktop||"24px"};\n\t\t\t\t}\n\t\t\t\t${T}{\n\t\t\t\t\t${ns("padding",hs(v.mobile))}\n\t\t\t\t\t${ns("margin",hs(w.mobile))}\n\t\t\t\t\t${ns("border-radius",hs(k.mobile))}\n\t\t\t\t}\n\t\t\t\t${j?`${M}{ font-size: ${j}; }`:""}\n\t\t\t}\n\t\t\t${_s(o,p,i,!1)}\n\t\t\t`}})},QH=({direction:e})=>{let t="M18 15l-6-6-6 6";return"down"===e?t="M6 9l6 6 6-6":"neutral"===e&&(t="M5 12h14"),(0,l.jsx)("svg",{className:"bBlocks-stat-cards-trend-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:t,fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})},ZH=["left","center","right"],XH=["flat","outlined","accent-top"],JH=({attributes:e})=>{const{layout:t={},card:n={},icon:o={},description:i={},trend:a={},items:s=[]}=e,r=ZH.includes(t.align)?t.align:"center",c=XH.includes(n.style)?n.style:"flat",d=n.orientation||"vertical",u=!1!==o.show,p=!1!==i.show,h=!1!==a.show,g=(Array.isArray(s)?s:[]).filter((e=>{const t=e||{};return t.number||t.label||t.prefix||t.suffix||""})),m=["bBlocks-stat-cards-wrapper",`bBlocks-stat-cards-style-${c}`,`bBlocks-stat-cards-align-${r}`].join(" ");return 0===g.length?(0,l.jsx)("div",{className:m,children:(0,l.jsx)("p",{className:"bBlocks-stat-cards-empty",children:(0,x.__)("Add stat cards from the block settings.","b-blocks")})}):(0,l.jsx)("div",{className:m,children:(0,l.jsx)("dl",{className:"bBlocks-stat-cards-grid","aria-label":(0,x.__)("Key statistics","b-blocks"),children:g.map(((e,t)=>{const n=e||{},o=`${n.prefix||""}${n.number||""}${n.suffix||""}`,i=h&&n.trendValue,a=n.trendDirection||"up",s=n.trendColor?{backgroundColor:n.trendColor,color:"#ffffff"}:void 0,r=n.label?(0,x.sprintf)(/* translators: 1: label, 2: value */ /* translators: 1: label, 2: value */(0,x.__)("%1$s: %2$s","b-blocks"),n.label,o):o,c=(0,l.jsxs)(l.Fragment,{children:[n.prefix&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-prefix",children:n.prefix}),(0,l.jsx)("span",{className:"bBlocks-stat-cards-value",children:n.number}),n.suffix&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-suffix",children:n.suffix})]}),g=n.orientation||d;return(0,l.jsxs)("div",{className:`bBlocks-stat-cards-item bBlocks-stat-cards-item-${g}`,children:[u&&n.icon&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:n.icon}}),n.linkUrl?(0,l.jsxs)("a",{className:"bBlocks-stat-cards-link",href:n.linkUrl,"aria-label":r,...n.linkTarget?{target:"_blank",rel:"noopener noreferrer"}:{},children:[""!==o&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-number",children:c}),n.label&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-label",children:n.label})]}):(0,l.jsxs)(l.Fragment,{children:[""!==o&&(0,l.jsx)("dd",{className:"bBlocks-stat-cards-number",children:c}),n.label&&(0,l.jsx)("dt",{className:"bBlocks-stat-cards-label",children:n.label})]}),i&&(0,l.jsxs)("span",{className:`bBlocks-stat-cards-trend bBlocks-stat-cards-trend-${a}`,style:s,"aria-label":(0,x.sprintf)(/* translators: 1: direction, 2: value */ /* translators: 1: direction, 2: value */(0,x.__)("Trend: %1$s %2$s","b-blocks"),a,n.trendValue),children:[(0,l.jsx)(QH,{direction:a}),(0,l.jsx)("span",{className:"bBlocks-stat-cards-trend-text",children:n.trendValue})]}),p&&n.description&&(0,l.jsx)("p",{className:"bBlocks-stat-cards-desc",children:n.description})]},n._key||t)}))})})},eW=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],tW=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],nW=[{label:(0,x.__)("Flat","b-blocks"),value:"flat"},{label:(0,x.__)("Outlined","b-blocks"),value:"outlined"},{label:(0,x.__)("Accent top","b-blocks"),value:"accent-top"}],oW=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],iW=((0,x.__)("Normal","b-blocks"),(0,x.__)("Medium","b-blocks"),(0,x.__)("Semi-bold","b-blocks"),(0,x.__)("Bold","b-blocks"),(0,x.__)("Extra-bold","b-blocks"),(0,x.__)("Black","b-blocks"),[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}]),aW=[{label:(0,x.__)("Default (inherit)","b-blocks"),value:""},...iW],sW=[{label:(0,x.__)("Up","b-blocks"),value:"up"},{label:(0,x.__)("Down","b-blocks"),value:"down"},{label:(0,x.__)("Neutral","b-blocks"),value:"neutral"}],rW=e=>{const{attributes:t,updateObj:n,index:o}=e,i=t.items[o]||{},a=(e,t)=>n("items",t,o,e);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:i.icon,onChange:e=>a("icon",e)}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Orientation:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i.orientation||"",options:aW,onChange:e=>a("orientation",e)})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(y.FlexItem,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Prefix","b-blocks"),value:i.prefix||"",onChange:e=>a("prefix",e),placeholder:"$",__nextHasNoMarginBottom:!0})}),(0,l.jsx)(y.FlexItem,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Number","b-blocks"),value:i.number||"",onChange:e=>a("number",e),placeholder:"500",__nextHasNoMarginBottom:!0})}),(0,l.jsx)(y.FlexItem,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Suffix","b-blocks"),value:i.suffix||"",
557 -onChange:e=>a("suffix",e),placeholder:"+",__nextHasNoMarginBottom:!0})})]}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Label","b-blocks"),value:i.label||"",onChange:e=>a("label",e),placeholder:(0,x.__)("e.g. Customers","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Description","b-blocks"),value:i.description||"",onChange:e=>a("description",e),help:(0,x.__)("Optional one-line supporting text.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Trend value","b-blocks"),value:i.trendValue||"",onChange:e=>a("trendValue",e),placeholder:(0,x.__)("e.g. 34%","b-blocks"),help:(0,x.__)("Leave blank to hide the trend badge.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Trend direction:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i.trendDirection||"up",options:sW,onChange:e=>a("trendDirection",e)})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Trend color override:","b-blocks"),value:i.trendColor||"",onChange:e=>a("trendColor",e)}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link URL","b-blocks"),type:"url",value:i.linkUrl||"",onChange:e=>a("linkUrl",e),placeholder:"https://",__nextHasNoMarginBottom:!0}),i.linkUrl&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open link in new tab","b-blocks"),checked:!!i.linkTarget,onChange:e=>a("linkTarget",e)})]})},lW={desktop:3,tablet:2,mobile:1},cW=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},card:a={},icon:s={},description:r={},trend:c={}}=e,d=i.columns||{},u=i.columnGap||{},p=i.rowGap||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Card alignment:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.align||"center",onChange:e=>n("layout",e||"center","align"),children:oW.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Card orientation:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a.orientation||"vertical",onChange:e=>n("card",e||"vertical","orientation"),children:iW.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]}),value:parseInt(d[o],10)||lW[o],onChange:e=>n("layout",e,"columns",o),min:1,max:6,step:1}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Column Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:eW,isUnitSelectTabbable:!0,value:u[o],onChange:e=>n("layout",e,"columnGap",o)}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Row Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:eW,isUnitSelectTabbable:!0,value:p[o],onChange:e=>n("layout",e,"rowGap",o)})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:!1!==s.show,onChange:e=>n("icon",e,"show")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Description","b-blocks"),checked:!1!==r.show,onChange:e=>n("description",e,"show")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Trend Badge","b-blocks"),checked:!1!==c.show,onChange:e=>n("trend",e,"show")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Stat cards","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,updateObj:n,newItem:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"/></svg>',orientation:"",number:"",prefix:"",suffix:"",label:"",description:"",trendValue:"",trendDirection:"up",trendColor:"",linkUrl:"",linkTarget:!1},design:"sortable",itemLabel:"Stat",arrKey:"items",title:"label",ItemSettings:rW})})]})},dW={top:"",right:"",bottom:"",left:""},uW=({attrKey:e,value:t={},updateObj:n})=>{const{bg:o={},border:i={},borderRadius:a={},padding:s={},margin:r={}}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:o,onChange:t=>n(e,t,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i,onChange:t=>n(e,t||{},"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),units:eW,values:a,resetValues:dW,onChange:t=>n(e,t,"borderRadius")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),units:eW,values:s,resetValues:dW,onChange:t=>n(e,t,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Margin","b-blocks"),units:eW,values:r,resetValues:dW,onChange:t=>n(e,t,"margin")})]})},pW=({attributes:e,updateObj:t,device:n="desktop"})=>{const{card:o={},number:i={},label:a={},description:s={},icon:r={}}=e,c=o.style||"flat",d="outlined"===c||"accent-top"===c,u=o.borderRadius||{},p=o.padding||{},h=o.margin||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Card style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,options:nW,onChange:e=>t("card",e,"style")})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o.bg,onChange:e=>t("card",e,"bg")}),"accent-top"===c&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Accent line height (px)","b-blocks"),value:o.accentWidth??4,onChange:e=>t("card",e,"accentWidth"),min:2,max:12,step:1}),d&&(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("card",e||{},"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:eW,values:u[n],resetValues:dW,onChange:e=>t("card",e,"borderRadius",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:eW,values:p[n],resetValues:dW,onChange:e=>t("card",e,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:eW,values:h[n],resetValues:dW,onChange:e=>t("card",e,"margin",n)}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Shadow:","b-blocks"),value:o.shadow||[],onChange:e=>t("card",e,"shadow")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Number","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:i.color||"#111827",onChange:e=>t("number",e,"color"),defaultColor:"#111827"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typography,onChange:e=>t("number",e,"typography")}),(0,l.jsx)(uW,{attrKey:"number",value:i,updateObj:t})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,
558 -x.__)("Color:","b-blocks"),value:a.color||"#374151",onChange:e=>t("label",e,"color"),defaultColor:"#374151"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typography,onChange:e=>t("label",e,"typography")}),(0,l.jsx)(uW,{attrKey:"label",value:a,updateObj:t})]}),!1!==s.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:s.color||"#6B7280",onChange:e=>t("description",e,"color"),defaultColor:"#6B7280"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typography,onChange:e=>t("description",e,"typography")}),(0,l.jsx)(uW,{attrKey:"description",value:s,updateObj:t})]}),!1!==r.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r.color||"#146EF5",onChange:e=>t("icon",e,"color"),defaultColor:"#146EF5"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:eW,isUnitSelectTabbable:!0,value:r.size||"32px",onChange:e=>t("icon",e,"size")})]}),(0,l.jsx)(uW,{attrKey:"icon",value:r,updateObj:t})]})]})},hW=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:tW,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(cW,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(pW,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},gW=["left","center","right"],mW=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{layout:a={}}=t,s=bBlocksPremiumChecker,r=fe(t,n),c=gW.includes(a.align)?a.align:"center";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:c,onChange:e=>r("layout",e||"center","align"),alignmentControls:[{icon:"editor-alignleft",title:(0,x.__)("Align left","b-blocks"),align:"left"},{icon:"editor-aligncenter",title:(0,x.__)("Align center","b-blocks"),align:"center"},{icon:"editor-alignright",title:(0,x.__)("Align right","b-blocks"),align:"right"}]})}),(0,l.jsx)(hW,{attributes:t,setAttributes:n,updateObj:r,isPremium:s,device:i}),(0,l.jsx)("div",{...(0,h.useBlockProps)(),children:(0,l.jsxs)("div",{children:[(0,l.jsx)(KH,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(JH,{attributes:t})]})})]})}));Ll(VH.name)&&(0,p.registerBlockType)(VH,{icon:_l,edit:mW,save:()=>null})
559 -;const bW=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/svg-draw","version":"1.0.0","title":"SVG Draw","category":"bBlocks","description":"Add animated SVG drawings to your content with customizable paths, timing, and effects.","keywords":["svg","draw","icon","draw svg","animated icon"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"icon":{"type":"object","default":{"upload":"","library":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 448 512\\"><path d=\\"M103.3 344.3c-6.5-14.2-6.9-18.3 7.4-23.1 25.6-8 8 9.2 43.2 49.2h.3v-93.9c1.2-50.2 44-92.2 97.7-92.2 53.9 0 97.7 43.5 97.7 96.8 0 63.4-60.8 113.2-128.5 93.3-10.5-4.2-2.1-31.7 8.5-28.6 53 0 89.4-10.1 89.4-64.4 0-61-77.1-89.6-116.9-44.6-23.5 26.4-17.6 42.1-17.6 157.6 50.7 31 118.3 22 160.4-20.1 24.8-24.8 38.5-58 38.5-93 0-35.2-13.8-68.2-38.8-93.3-24.8-24.8-57.8-38.5-93.3-38.5s-68.8 13.8-93.5 38.5c-.3.3-16 16.5-21.2 23.9l-.5.6c-3.3 4.7-6.3 9.1-20.1 6.1-6.9-1.7-14.3-5.8-14.3-11.8V20c0-5 3.9-10.5 10.5-10.5h241.3c8.3 0 8.3 11.6 8.3 15.1 0 3.9 0 15.1-8.3 15.1H130.3v132.9h.3c104.2-109.8 282.8-36 282.8 108.9 0 178.1-244.8 220.3-310.1 62.8zm63.3-260.8c-.5 4.2 4.6 24.5 14.6 20.6C306 56.6 384 144.5 390.6 144.5c4.8 0 22.8-15.3 14.3-22.8-93.2-89-234.5-57-238.3-38.2zM393 414.7C283 524.6 94 475.5 61 310.5c0-12.2-30.4-7.4-28.9 3.3 24 173.4 246 256.9 381.6 121.3 6.9-7.8-12.6-28.4-20.7-20.4zM213.6 306.6c0 4 4.3 7.3 5.5 8.5 3 3 6.1 4.4 8.5 4.4 3.8 0 2.6.2 22.3-19.5 19.6 19.3 19.1 19.5 22.3 19.5 5.4 0 18.5-10.4 10.7-18.2L265.6 284l18.2-18.2c6.3-6.8-10.1-21.8-16.2-15.7L249.7 268c-18.6-18.8-18.4-19.5-21.5-19.5-5 0-18 11.7-12.4 17.3L234 284c-18.1 17.9-20.4 19.2-20.4 22.6z\\" stroke-dasharray=\\"5371.4248046875\\" style=\\"stroke-dashoffset: 699.897px;\\"></path></svg>","custom":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 448 512\\"><path d=\\"M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z\\"/></svg>","type":{"svgType":"icon","iconType":"library"}}},"options":{"type":"object","default":{"duration":3000,"repeat":true,"direction":"normal","delay":250,"easing":"linear"}},"style":{"type":"object","default":{"height":"200px","width":"200px","align":"center","strokeWidth":2,"colors":{"normal":{"strokeColor":"#146EF5","fill":"#0000","shadow":{"color":"#000"}},"hover":{"strokeColor":"","fill":"","shadow":{"color":"#000"},"transition":200}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos","wp-util","wp-api"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),fW=({attributes:e,id:t,isBackend:n=!1})=>{const{style:o,advanced:i}=e,{height:a,width:s,align:r,margin:c,padding:d,background:u,border:p,borderRadius:h,colors:g}=o,{normal:m,hover:b}=g,f=`#${t} .svdr-icon-draw-wrapper`,x=`${f} .svdr-svg-wrapper`,y=`${x} svg`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${f}{\n\t\t\t\t${ns("justify-content",r)}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${ns("height",a)}\n\t\t\t\t${ns("width",s)}\n\t\t\t\t${ns("margin",hs(c))}\n\t\t\t\t${ns("padding",hs(d))}\n\t\t\t\t${os(u)}\n\t\t\t\t${as(p)}\n\t\t\t\t${ns("border-radius",hs(h))}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${ns("fill",m.fill)}\n\t\t\t\t${ns("stroke",m.strokeColor)}\n\t\t\t\tfilter:drop-shadow(${ds(m.shadow,"text")});\n\t\t\t\ttransition:${b.transition}ms ease-in-out;\n\t\t\t}\n\t\t\t${y}:hover{\n\t\t\t\t${ns("fill",b.fill)}\n\t\t\t\t${ns("stroke",b.strokeColor)}\n\t\t\t\tfilter:drop-shadow(${ds(b.shadow,"text")});\n\t\t\t}\n\t\t\t${Cs(t,i,n)}\n\t`}})},xW=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],yW=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")}],vW=["easeInSine","easeInExpo","easeInCirc","easeInBack","easeInElastic","easeOutQuad","easeOutCubic","easeOutQuart","easeOutQuint","easeOutSine","easeOutExpo","easeOutCirc","easeOutBack","easeOutElastic","easeInOutQuad","easeInOutCubic","easeInOutQuart","easeInOutQuint","easeInOutSine","easeInOutExpo","easeInOutCirc","easeInCubic","easeInQuart","easeInQuint"],kW=[{label:"Linear",value:"linear"},{label:"EaseInOutElastic",value:"easeInOutElastic"},{label:"EaseInQuad",value:"easeInQuad"},{label:"EaseInQuart",value:"easeInQuart"},{label:"EaseInSine",value:"easeInSine"},{label:"EaseInExpo",value:"easeInExpo"},{label:"EaseInCirc",value:"easeInCirc"},{label:"EaseInBack",value:"easeInBack"},{label:"EaseInElastic",value:"easeInElastic"},{label:"EaseOutQuad",value:"easeOutQuad"},{label:"EaseOutCubic",value:"easeOutCubic"},{label:"EaseOutQuart",value:"easeOutQuart"},{label:"EaseOutQuint",value:"easeOutQuint"},{label:"EaseOutSine",value:"easeOutSine"},{label:"EaseOutExpo",value:"easeOutExpo"},{label:"EaseOutCirc",value:"easeOutCirc"},{label:"EaseOutBack",value:"easeOutBack"},{label:"EaseOutElastic",value:"easeOutElastic"},{label:"EaseInOutQuad",value:"easeInOutQuad"},{label:"EaseInOutCubic",value:"easeInOutCubic"},{label:"EaseInOutQuart",value:"easeInOutQuart"},{label:"EaseInOutQuint",value:"easeInOutQuint"},{label:"EaseInOutSine",value:"easeInOutSine"},{label:"EaseInOutExpo",value:"easeInOutExpo"},{label:"EaseInOutCirc",value:"easeInOutCirc"},{label:"EaseInCubic",value:"easeInCubic"},{label:"EaseInQuart",value:"easeInQuart"},{
560 -label:"EaseInQuint",value:"easeInQuint"}];function wW(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})})}function _W(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})})}function CW(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})})}const jW=' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M0 336c0 79.5 64.5 144 144 144l368 0c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z"/></svg>',$W=e=>{const{attributes:t,setAttributes:n,isPremium:o,setIsProModalOpen:i}=e,{icon:a,options:s}=t,{data:r}=jd("bBlocksUtils"),{refetch:c}=Cd("b-blocks-enable-svg-mime-type",{_wpnonce:r?.nonce},!1),d=new Tt;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("SVG Type","b-blocks"),labelPosition:"left",options:[{label:"Icon",value:"icon"},{label:"Custom SVG",value:"custom"}],value:a.type.svgType,onChange:e=>n({icon:be(a,e,"type","svgType")})}),"custom"===a.type.svgType&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TextareaControl,{value:a.custom,onChange:e=>n({icon:be(a,e,"custom")}),rows:8})}),"icon"===a.type.svgType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{label:(0,x.__)("Icon Type","b-blocks"),options:[{label:"Upload "+(o?"":"(Pro)"),value:"upload"},{label:"Library",value:"library"}],value:a.type.iconType,onChange:e=>{o?n({icon:be(a,e,"type","iconType")}):i(!0)}}),"upload"===a.type.iconType&&(0,l.jsx)(we,{types:["image/svg+xml"],onClick:async()=>{$d(),await c()},label:(0,x.__)("Upload SVG","b-blocks"),value:{url:a.upload},default:jW,onChange:async e=>{const t=e?.url?await d.sanitizeFile(e?.url):"";n({icon:be(a,t,"upload")})},isSvgEnabled:!0}),"library"===a.type.iconType&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:a.library,onChange:e=>n({icon:be(a,e,"library")})})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Fill Duration","b-blocks"),labelPosition:"edge",value:s.duration,onChange:e=>n({options:be(s,e,"duration")})}),(0,l.jsx)("small",{children:"Duration on SVG files (in ms)"}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Delay","b-blocks"),labelPosition:"edge",value:s.delay,onChange:e=>n({options:be(s,e,"delay")})}),(0,l.jsx)("small",{children:"Duration on SVG draws (in ms)"}),(0,l.jsx)(y.SelectControl,{className:"mt10 mb10",label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",options:[{label:"Normal",value:"normal"},{label:"Reverse",value:"reverse"},{label:"Alternate",value:"alternate"}],value:s.direction,onChange:e=>n({options:be(s,e,"direction")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Repeat Drawing","b-blocks"),checked:s.repeat,value:s.repeat,onChange:e=>n({options:be(s,e,"repeat")})}),(0,l.jsx)(Za,{className:"mt10",label:(0,x.__)("Animation Easing","b-blocks"),labelPosition:"edge",options:kW,value:s.easing,onChange:e=>n({options:be(s,e,"easing")}),isPremium:o,proValues:vW,setIsProModalOpen:i})]})]})},SW=e=>{const{attributes:t,setAttributes:n}=e,{style:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height","b-blocks"),labelPosition:"edge",value:t.style.height,onChange:e=>n({style:be(t.style,e,"height")})}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width","b-blocks"),labelPosition:"edge",className:"mt10",value:t.style.width,onChange:e=>n({style:be(t.style,e,"width")})}),(0,l.jsx)(Tn,{label:(0,x.__)("Alignment","b-blocks"),className:"mt10",options:[{label:"Left",value:"left",icon:(0,l.jsx)(wW,{})},{label:"Center",value:"center",icon:(0,l.jsx)(_W,{})},{label:"Right",value:"right",icon:(0,l.jsx)(CW,{})}],value:o.align,onChange:e=>n({style:be(o,e,"align")}),isIcon:!0}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Path Thickness","b-blocks"),className:"mt10",value:o.strokeWidth,onChange:e=>n({style:be(o,e,"strokeWidth")}),step:.1,min:0,max:100}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:yW,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Color","b-blocks"),value:o.colors[e.name].strokeColor,onChange:t=>n({style:be(o,t,"colors",e.name,"strokeColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Fill Color","b-blocks"),value:o.colors[e.name].fill,onChange:t=>n({style:be(o,t,"colors",e.name,"fill")})}),(0,l.jsx)(od,{label:(0,x.__)("Shadow","b-blocks"),value:o.colors[e.name].shadow,onChange:t=>n({style:be(o,t,"colors",e.name,"shadow")}),type:"text"}),"hover"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition (ms)","b-blocks"),value:o.colors.hover.transition,step:50,max:1e4,onChange:e=>n({style:be(o,e,"colors","hover","transition")})})})]})})]})})},TW=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,[a,s]=(0,m.useState)(!1),r={isProModalOpen:a,setIsProModalOpen:s,...e};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Ra,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:xW,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)($W,{...r})}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(SW,{...r})}),"advanced"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]}),(0,l.jsxs)(jn,{isProModalOpen:a,setIsProModalOpen:s,block:"SVG Draw",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("SVG Upload: ","b-blocks")}),(0,x.__)("Upload custom SVG files from your device.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Animation Easing: ","b-blocks")}),(0,x.__)("Advanced easing families (Quart, Quint, Elastic, Back, Circ, Expo, Bounce, and many variations) that create richer, more natural or stylized motion.","b-blocks")]})]})]})};var NW={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},MW={duration:1e3,delay:0,endDelay:0,
561 -easing:"easeOutElastic(1, .5)",round:0},LW=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],PW={CSS:{},springs:{}};function EW(e,t,n){return Math.min(Math.max(e,t),n)}function AW(e,t){return e.indexOf(t)>-1}function BW(e,t){return e.apply(null,t)}var IW={arr:function(e){return Array.isArray(e)},obj:function(e){return AW(Object.prototype.toString.call(e),"Object")},pth:function(e){return IW.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||IW.svg(e)},str:function(e){return"string"==typeof e},fnc:function(e){return"function"==typeof e},und:function(e){return void 0===e},nil:function(e){return IW.und(e)||null===e},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return IW.hex(e)||IW.rgb(e)||IW.hsl(e)},key:function(e){return!NW.hasOwnProperty(e)&&!MW.hasOwnProperty(e)&&"targets"!==e&&"keyframes"!==e}};function OW(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map((function(e){return parseFloat(e)})):[]}function RW(e,t){var n=OW(e),o=EW(IW.und(n[0])?1:n[0],.1,100),i=EW(IW.und(n[1])?100:n[1],.1,100),a=EW(IW.und(n[2])?10:n[2],.1,100),s=EW(IW.und(n[3])?0:n[3],.1,100),r=Math.sqrt(i/o),l=a/(2*Math.sqrt(i*o)),c=l<1?r*Math.sqrt(1-l*l):0,d=l<1?(l*r-s)/c:-s+r;function u(e){var n=t?t*e/1e3:e;return n=l<1?Math.exp(-n*l*r)*(1*Math.cos(c*n)+d*Math.sin(c*n)):(1+d*n)*Math.exp(-n*r),0===e||1===e?e:1-n}return t?u:function(){var t=PW.springs[e];if(t)return t;for(var n=1/6,o=0,i=0;;)if(1===u(o+=n)){if(++i>=16)break}else i=0;var a=o*n*1e3;return PW.springs[e]=a,a}}function zW(e){return void 0===e&&(e=10),function(t){return Math.ceil(EW(t,1e-6,1)*e)*(1/e)}}var DW,FW,HW=function(){var e=.1;function t(e,t){return 1-3*t+3*e}function n(e,t){return 3*t-6*e}function o(e){return 3*e}function i(e,i,a){return((t(i,a)*e+n(i,a))*e+o(i))*e}function a(e,i,a){return 3*t(i,a)*e*e+2*n(i,a)*e+o(i)}return function(t,n,o,s){if(0<=t&&t<=1&&0<=o&&o<=1){var r=new Float32Array(11);if(t!==n||o!==s)for(var l=0;l<11;++l)r[l]=i(l*e,t,o);return function(l){return t===n&&o===s||0===l||1===l?l:i(function(n){for(var s=0,l=1;10!==l&&r[l]<=n;++l)s+=e;--l;var c=s+(n-r[l])/(r[l+1]-r[l])*e,d=a(c,t,o);return d>=.001?function(e,t,n,o){for(var s=0;s<4;++s){var r=a(t,n,o);if(0===r)return t;t-=(i(t,n,o)-e)/r}return t}(n,c,t,o):0===d?c:function(e,t,n,o,a){var s,r,l=0;do{(s=i(r=t+(n-t)/2,o,a)-e)>0?n=r:t=r}while(Math.abs(s)>1e-7&&++l<10);return r}(n,s,s+e,t,o)}(l),n,s)}}}}(),WW=(DW={linear:function(){return function(e){return e}}},FW={Sine:function(){return function(e){return 1-Math.cos(e*Math.PI/2)}},Expo:function(){return function(e){return e?Math.pow(2,10*e-10):0}},Circ:function(){return function(e){return 1-Math.sqrt(1-e*e)}},Back:function(){return function(e){return e*e*(3*e-2)}},Bounce:function(){return function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}},Elastic:function(e,t){void 0===e&&(e=1),void 0===t&&(t=.5);var n=EW(e,1,10),o=EW(t,.1,2);return function(e){return 0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-o/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/o)}}},["Quad","Cubic","Quart","Quint"].forEach((function(e,t){FW[e]=function(){return function(e){return Math.pow(e,t+2)}}})),Object.keys(FW).forEach((function(e){var t=FW[e];DW["easeIn"+e]=t,DW["easeOut"+e]=function(e,n){return function(o){return 1-t(e,n)(1-o)}},DW["easeInOut"+e]=function(e,n){return function(o){return o<.5?t(e,n)(2*o)/2:1-t(e,n)(-2*o+2)/2}},DW["easeOutIn"+e]=function(e,n){return function(o){return o<.5?(1-t(e,n)(1-2*o))/2:(t(e,n)(2*o-1)+1)/2}}})),DW);function UW(e,t){if(IW.fnc(e))return e;var n=e.split("(")[0],o=WW[n],i=OW(e);switch(n){case"spring":return RW(e,t);case"cubicBezier":return BW(HW,i);case"steps":return BW(zW,i);default:return BW(o,i)}}function GW(e){try{return document.querySelectorAll(e)}catch(e){return}}function VW(e,t){for(var n=e.length,o=arguments.length>=2?arguments[1]:void 0,i=[],a=0;a<n;a++)if(a in e){var s=e[a];t.call(o,s,a,e)&&i.push(s)}return i}function qW(e){return e.reduce((function(e,t){return e.concat(IW.arr(t)?qW(t):t)}),[])}function YW(e){return IW.arr(e)?e:(IW.str(e)&&(e=GW(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function KW(e,t){return e.some((function(e){return e===t}))}function QW(e){var t={};for(var n in e)t[n]=e[n];return t}function ZW(e,t){var n=QW(e);for(var o in e)n[o]=t.hasOwnProperty(o)?t[o]:e[o];return n}function XW(e,t){var n=QW(e);for(var o in t)n[o]=IW.und(e[o])?t[o]:e[o];return n}function JW(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function eU(e,t){return IW.fnc(e)?e(t.target,t.id,t.total):e}function tU(e,t){return e.getAttribute(t)}function nU(e,t,n){if(KW([n,"deg","rad","turn"],JW(t)))return t;var o=PW.CSS[t+n];if(!IW.und(o))return o;var i=document.createElement(e.tagName),a=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;a.appendChild(i),i.style.position="absolute",i.style.width=100+n;var s=100/i.offsetWidth;a.removeChild(i);var r=s*parseFloat(t);return PW.CSS[t+n]=r,r}function oU(e,t,n){if(t in e.style){var o=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=e.style[t]||getComputedStyle(e).getPropertyValue(o)||"0";return n?nU(e,i,n):i}}function iU(e,t){return IW.dom(e)&&!IW.inp(e)&&(!IW.nil(tU(e,t))||IW.svg(e)&&e[t])?"attribute":IW.dom(e)&&KW(LW,t)?"transform":IW.dom(e)&&"transform"!==t&&oU(e,t)?"css":null!=e[t]?"object":void 0}function aU(e){if(IW.dom(e)){for(var t,n=e.style.transform||"",o=/(\w+)\(([^)]*)\)/g,i=new Map;t=o.exec(n);)i.set(t[1],t[2]);return i}}function sU(e,t,n,o){switch(iU(e,t)){case"transform":return function(e,t,n,o){var i=AW(t,"scale")?1:0+function(e){return AW(e,"translate")||"perspective"===e?"px":AW(e,"rotate")||AW(e,"skew")?"deg":void 0}(t),a=aU(e).get(t)||i;return n&&(n.transforms.list.set(t,a),n.transforms.last=t),o?nU(e,a,o):a}(e,t,o,n);case"css":return oU(e,t,n);case"attribute":return tU(e,t);default:return e[t]||0}}function rU(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var o=JW(e)||0,i=parseFloat(t),a=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return i+a+o;case"-":return i-a+o;case"*":return i*a+o}}function lU(e,t){if(IW.col(e))return function(e){return IW.rgb(e)?(n=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(t=e))?"rgba("+n[1]+",1)":t:IW.hex(e)?function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"}(e):IW.hsl(e)?function(e){var t,n,o,i=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),a=parseInt(i[1],10)/360,s=parseInt(i[2],10)/100,r=parseInt(i[3],10)/100,l=i[4]||1;function c(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(0==s)t=n=o=r;else{var d=r<.5?r*(1+s):r+s-r*s,u=2*r-d;t=c(u,d,a+1/3),n=c(u,d,a),o=c(u,d,a-1/3)}return"rgba("+255*t+","+255*n+","+255*o+","+l+")"}(e):void 0;var t,n}(e);if(/\s/g.test(e))return e;var n=JW(e),o=n?e.substr(0,e.length-n.length):e;return t?o+t:o}function cU(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function dU(e){for(var t,n=e.points,o=0,i=0;i<n.numberOfItems;i++){var a=n.getItem(i);i>0&&(o+=cU(t,a)),t=a}return o}function uU(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return function(e){return 2*Math.PI*tU(e,"r")}(e);case"rect":return function(e){return 2*tU(e,"width")+2*tU(e,"height")}(e);case"line":return function(e){return cU({x:tU(e,"x1"),y:tU(e,"y1")},{x:tU(e,"x2"),
562 -y:tU(e,"y2")})}(e);case"polyline":return dU(e);case"polygon":return function(e){var t=e.points;return dU(e)+cU(t.getItem(t.numberOfItems-1),t.getItem(0))}(e)}}function pU(e,t){var n=t||{},o=n.el||function(e){for(var t=e.parentNode;IW.svg(t)&&IW.svg(t.parentNode);)t=t.parentNode;return t}(e),i=o.getBoundingClientRect(),a=tU(o,"viewBox"),s=i.width,r=i.height,l=n.viewBox||(a?a.split(" "):[0,0,s,r]);return{el:o,viewBox:l,x:l[0]/1,y:l[1]/1,w:s,h:r,vW:l[2],vH:l[3]}}function hU(e,t,n){function o(n){void 0===n&&(n=0);var o=t+n>=1?t+n:0;return e.el.getPointAtLength(o)}var i=pU(e.el,e.svg),a=o(),s=o(-1),r=o(1),l=n?1:i.w/i.vW,c=n?1:i.h/i.vH;switch(e.property){case"x":return(a.x-i.x)*l;case"y":return(a.y-i.y)*c;case"angle":return 180*Math.atan2(r.y-s.y,r.x-s.x)/Math.PI}}function gU(e,t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,o=lU(IW.pth(e)?e.totalLength:e,t)+"";return{original:o,numbers:o.match(n)?o.match(n).map(Number):[0],strings:IW.str(e)||t?o.split(n):[]}}function mU(e){return VW(e?qW(IW.arr(e)?e.map(YW):YW(e)):[],(function(e,t,n){return n.indexOf(e)===t}))}function bU(e){var t=mU(e);return t.map((function(e,n){return{target:e,id:n,total:t.length,transforms:{list:aU(e)}}}))}function fU(e,t){var n=QW(t);if(/^spring/.test(n.easing)&&(n.duration=RW(n.easing)),IW.arr(e)){var o=e.length;2!==o||IW.obj(e[0])?IW.fnc(t.duration)||(n.duration=t.duration/o):e={value:e}}var i=IW.arr(e)?e:[e];return i.map((function(e,n){var o=IW.obj(e)&&!IW.pth(e)?e:{value:e};return IW.und(o.delay)&&(o.delay=n?0:t.delay),IW.und(o.endDelay)&&(o.endDelay=n===i.length-1?t.endDelay:0),o})).map((function(e){return XW(e,n)}))}var xU={css:function(e,t,n){return e.style[t]=n},attribute:function(e,t,n){return e.setAttribute(t,n)},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,o,i){if(o.list.set(t,n),t===o.last||i){var a="";o.list.forEach((function(e,t){a+=t+"("+e+") "})),e.style.transform=a}}};function yU(e,t){bU(e).forEach((function(e){for(var n in t){var o=eU(t[n],e),i=e.target,a=JW(o),s=sU(i,n,a,e),r=rU(lU(o,a||JW(s)),s),l=iU(i,n);xU[l](i,n,r,e.transforms,!0)}}))}function vU(e,t){return VW(qW(e.map((function(e){return t.map((function(t){return function(e,t){var n=iU(e.target,t.name);if(n){var o=function(e,t){var n;return e.tweens.map((function(o){var i=function(e,t){var n={};for(var o in e){var i=eU(e[o],t);IW.arr(i)&&1===(i=i.map((function(e){return eU(e,t)}))).length&&(i=i[0]),n[o]=i}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(o,t),a=i.value,s=IW.arr(a)?a[1]:a,r=JW(s),l=sU(t.target,e.name,r,t),c=n?n.to.original:l,d=IW.arr(a)?a[0]:c,u=JW(d)||JW(l),p=r||u;return IW.und(s)&&(s=c),i.from=gU(d,p),i.to=gU(rU(s,d),p),i.start=n?n.end:0,i.end=i.start+i.delay+i.duration+i.endDelay,i.easing=UW(i.easing,i.duration),i.isPath=IW.pth(a),i.isPathTargetInsideSVG=i.isPath&&IW.svg(t.target),i.isColor=IW.col(i.from.original),i.isColor&&(i.round=1),n=i,i}))}(t,e),i=o[o.length-1];return{type:n,property:t.name,animatable:e,tweens:o,duration:i.end,delay:o[0].delay,endDelay:i.endDelay}}}(e,t)}))}))),(function(e){return!IW.und(e)}))}function kU(e,t){var n=e.length,o=function(e){return e.timelineOffset?e.timelineOffset:0},i={};return i.duration=n?Math.max.apply(Math,e.map((function(e){return o(e)+e.duration}))):t.duration,i.delay=n?Math.min.apply(Math,e.map((function(e){return o(e)+e.delay}))):t.delay,i.endDelay=n?i.duration-Math.max.apply(Math,e.map((function(e){return o(e)+e.duration-e.endDelay}))):t.endDelay,i}var wU=0,_U=[],CU=function(){var e;function t(n){for(var o=_U.length,i=0;i<o;){var a=_U[i];a.paused?(_U.splice(i,1),o--):(a.tick(n),i++)}e=i>0?requestAnimationFrame(t):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){$U.suspendWhenDocumentHidden&&(jU()?e=cancelAnimationFrame(e):(_U.forEach((function(e){return e._onDocumentVisibility()})),CU()))})),function(){e||jU()&&$U.suspendWhenDocumentHidden||!(_U.length>0)||(e=requestAnimationFrame(t))}}();function jU(){return!!document&&document.hidden}function $U(e){void 0===e&&(e={});var t,n=0,o=0,i=0,a=0,s=null;function r(e){var t=window.Promise&&new Promise((function(e){return s=e}));return e.finished=t,t}var l=function(e){var t=ZW(NW,e),n=ZW(MW,e),o=function(e,t){var n=[],o=t.keyframes;for(var i in o&&(t=XW(function(e){for(var t=VW(qW(e.map((function(e){return Object.keys(e)}))),(function(e){return IW.key(e)})).reduce((function(e,t){return e.indexOf(t)<0&&e.push(t),e}),[]),n={},o=function(o){var i=t[o];n[i]=e.map((function(e){var t={};for(var n in e)IW.key(n)?n==i&&(t.value=e[n]):t[n]=e[n];return t}))},i=0;i<t.length;i++)o(i);return n}(o),t)),t)IW.key(i)&&n.push({name:i,tweens:fU(t[i],e)});return n}(n,e),i=bU(e.targets),a=vU(i,o),s=kU(a,n),r=wU;return wU++,XW(t,{id:r,children:[],animatables:i,animations:a,duration:s.duration,delay:s.delay,endDelay:s.endDelay})}(e);function c(){var e=l.direction;"alternate"!==e&&(l.direction="normal"!==e?"normal":"reverse"),l.reversed=!l.reversed,t.forEach((function(e){return e.reversed=l.reversed}))}function d(e){return l.reversed?l.duration-e:e}function u(){n=0,o=d(l.currentTime)*(1/$U.speed)}function p(e,t){t&&t.seek(e-t.timelineOffset)}function h(e){for(var t=0,n=l.animations,o=n.length;t<o;){var i=n[t],a=i.animatable,s=i.tweens,r=s.length-1,c=s[r];r&&(c=VW(s,(function(t){return e<t.end}))[0]||c);for(var d=EW(e-c.start-c.delay,0,c.duration)/c.duration,u=isNaN(d)?1:c.easing(d),p=c.to.strings,h=c.round,g=[],m=c.to.numbers.length,b=void 0,f=0;f<m;f++){var x=void 0,y=c.to.numbers[f],v=c.from.numbers[f]||0;x=c.isPath?hU(c.value,u*y,c.isPathTargetInsideSVG):v+u*(y-v),h&&(c.isColor&&f>2||(x=Math.round(x*h)/h)),g.push(x)}var k=p.length;if(k){b=p[0];for(var w=0;w<k;w++){p[w];var _=p[w+1],C=g[w];isNaN(C)||(b+=_?C+_:C+" ")}}else b=g[0];xU[i.type](a.target,i.property,b,a.transforms),i.currentValue=b,t++}}function g(e){l[e]&&!l.passThrough&&l[e](l)}function m(e){var u=l.duration,m=l.delay,b=u-l.endDelay,f=d(e);l.progress=EW(f/u*100,0,100),l.reversePlayback=f<l.currentTime,t&&function(e){if(l.reversePlayback)for(var n=a;n--;)p(e,t[n]);else for(var o=0;o<a;o++)p(e,t[o])}(f),!l.began&&l.currentTime>0&&(l.began=!0,g("begin")),!l.loopBegan&&l.currentTime>0&&(l.loopBegan=!0,g("loopBegin")),f<=m&&0!==l.currentTime&&h(0),(f>=b&&l.currentTime!==u||!u)&&h(u),f>m&&f<b?(l.changeBegan||(l.changeBegan=!0,l.changeCompleted=!1,g("changeBegin")),g("change"),h(f)):l.changeBegan&&(l.changeCompleted=!0,l.changeBegan=!1,g("changeComplete")),l.currentTime=EW(f,0,u),l.began&&g("update"),e>=u&&(o=0,l.remaining&&!0!==l.remaining&&l.remaining--,l.remaining?(n=i,g("loopComplete"),l.loopBegan=!1,"alternate"===l.direction&&c()):(l.paused=!0,l.completed||(l.completed=!0,g("loopComplete"),g("complete"),!l.passThrough&&"Promise"in window&&(s(),r(l)))))}return r(l),l.reset=function(){var e=l.direction;l.passThrough=!1,l.currentTime=0,l.progress=0,l.paused=!0,l.began=!1,l.loopBegan=!1,l.changeBegan=!1,l.completed=!1,l.changeCompleted=!1,l.reversePlayback=!1,l.reversed="reverse"===e,l.remaining=l.loop,t=l.children;for(var n=a=t.length;n--;)l.children[n].reset();(l.reversed&&!0!==l.loop||"alternate"===e&&1===l.loop)&&l.remaining++,h(l.reversed?l.duration:0)},l._onDocumentVisibility=u,l.set=function(e,t){return yU(e,t),l},l.tick=function(e){i=e,n||(n=i),m((i+(o-n))*$U.speed)},l.seek=function(e){m(d(e))},l.pause=function(){l.paused=!0,u()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,_U.push(l),u(),CU())},l.reverse=function(){c(),l.completed=!l.reversed,u()},l.restart=function(){l.reset(),l.play()},l.remove=function(e){TU(mU(e),l)},l.reset(),l.autoplay&&l.play(),l}function SU(e,t){for(var n=t.length;n--;)KW(e,t[n].animatable.target)&&t.splice(n,1)}function TU(e,t){var n=t.animations,o=t.children;SU(e,n);for(var i=o.length;i--;){var a=o[i],s=a.animations;SU(e,s),s.length||a.children.length||o.splice(i,1)}n.length||o.length||t.pause()}$U.version="3.2.1",$U.speed=1,$U.suspendWhenDocumentHidden=!0,$U.running=_U,$U.remove=function(e){
563 -for(var t=mU(e),n=_U.length;n--;)TU(t,_U[n])},$U.get=sU,$U.set=yU,$U.convertPx=nU,$U.path=function(e,t){var n=IW.str(e)?GW(e)[0]:e,o=t||100;return function(e){return{property:e,el:n,svg:pU(n),totalLength:uU(n)*(o/100)}}},$U.setDashoffset=function(e){var t=uU(e);return e.setAttribute("stroke-dasharray",t),t},$U.stagger=function(e,t){void 0===t&&(t={});var n=t.direction||"normal",o=t.easing?UW(t.easing):null,i=t.grid,a=t.axis,s=t.from||0,r="first"===s,l="center"===s,c="last"===s,d=IW.arr(e),u=d?parseFloat(e[0]):parseFloat(e),p=d?parseFloat(e[1]):0,h=JW(d?e[1]:e)||0,g=t.start||0+(d?u:0),m=[],b=0;return function(e,t,f){if(r&&(s=0),l&&(s=(f-1)/2),c&&(s=f-1),!m.length){for(var x=0;x<f;x++){if(i){var y=l?(i[0]-1)/2:s%i[0],v=l?(i[1]-1)/2:Math.floor(s/i[0]),k=y-x%i[0],w=v-Math.floor(x/i[0]),_=Math.sqrt(k*k+w*w);"x"===a&&(_=-k),"y"===a&&(_=-w),m.push(_)}else m.push(Math.abs(s-x));b=Math.max.apply(Math,m)}o&&(m=m.map((function(e){return o(e/b)*b}))),"reverse"===n&&(m=m.map((function(e){return a?e<0?-1*e:-e:Math.abs(b-e)})))}return g+(d?(p-u)/b:u)*(Math.round(100*m[t])/100)+h}},$U.timeline=function(e){void 0===e&&(e={});var t=$U(e);return t.duration=0,t.add=function(n,o){var i=_U.indexOf(t),a=t.children;function s(e){e.passThrough=!0}i>-1&&_U.splice(i,1);for(var r=0;r<a.length;r++)s(a[r]);var l=XW(n,ZW(MW,e));l.targets=l.targets||e.targets;var c=t.duration;l.autoplay=!1,l.direction=t.direction,l.timelineOffset=IW.und(o)?c:rU(o,c),s(t),t.seek(l.timelineOffset);var d=$U(l);s(d),a.push(d);var u=kU(a,e);return t.delay=u.delay,t.endDelay=u.endDelay,t.duration=u.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t},$U.easing=UW,$U.penner=WW,$U.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};const NU=$U,MU=({attributes:e})=>{const{icon:t,options:n,style:o}=e,{type:i}=t,{strokeWidth:a}=o,s=(0,m.useRef)(null),[r,c]=(0,m.useState)(n),{duration:d,repeat:u,direction:p,delay:h,easing:g}=n;(0,m.useEffect)((()=>{NU({targets:s.current?.querySelectorAll("svg path"),strokeDashoffset:[NU.setDashoffset,0],easing:g,duration:d,delay:(e,t)=>t*Number(h),loop:u,autoplay:!0,direction:p})}),[s.current?.querySelectorAll("svg"),n,r]);const b={strokeWidth:a};return(0,l.jsxs)("div",{className:"svdr-icon-draw-wrapper",children:["icon"===i.svgType&&"library"===i.iconType&&t.library&&(0,l.jsx)("div",{ref:s,className:"react-svg-drawing svdr-svg-wrapper",style:b,dangerouslySetInnerHTML:{__html:t.library}}),"icon"===i.svgType&&"upload"===i.iconType&&(0,l.jsx)("div",{ref:s,className:"react-svg-drawing svdr-svg-wrapper",style:b,dangerouslySetInnerHTML:{__html:t.upload||jW}}),"custom"===i.svgType&&(0,l.jsx)("div",{ref:s,className:"react-svg-drawing svdr-svg-wrapper",style:b,dangerouslySetInnerHTML:{__html:t.custom}})]})};Ll(bW.name)&&(0,p.registerBlockType)(bW,{icon:Ur,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=`svg-draw-${o}`,a=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(TW,{attributes:t,setAttributes:n,isPremium:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),id:i,children:[(0,l.jsx)(fW,{attributes:t,id:i,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(MU,{attributes:t})})]})]})}})
564 -;const LU=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-of-content","title":"Table of Contents","category":"bBlocks","description":"The Table of Contents block automatically generates a table of contents for your WordPress post or page.","keywords":["table","content","table of contents","heading"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"isNested":{"type":"boolean","default":false},"rendered":{"type":"boolean","default":true},"header":{"type":"object","default":{"bgColor":"","textColor":"#444","iconColor":"#000","separatorWidth":1,"separatorColor":"#ccc"}},"headings":{"type":"array","default":[]},"boxList":{"type":"object","default":{"txtStyle":"normal","nTxtColor":"#2e2e2e","nBarColor":"#b0aeb1","hTxtColor":"#ec1e75","hBarColor":"#ec1e75","nTxtDecoration":false,"hTxtDecoration":false,"dotSize":15,"panelHeight":0,"treeColor":"blueviolet","dotShadow":[{"hOffset":"1px","vOffset":"1px","blur":"5px","spreed":"1px","color":"#b3b3b3","isInset":false}],"maxHeight":{"desktop":0,"tablet":0,"mobile":0},"padding":{"desktop":{"top":"0px","bottom":"0px","left":"20px","right":"0px"},"tablet":{"top":"0px","bottom":"0px","left":"20px","right":"0px"},"mobile":{"top":"0px","bottom":"0px","left":"20px","right":"0px"}}}},"tagName":{"type":"array","default":["h1","h2","h3"]},"title":{"type":"object","default":{"text":"Table of Contents","tag":"h3"}},"markup":{"type":"object","default":{"view":"decimal","icon":"fa-solid fa-circle","color":"#000","markupSize":{"desktop":"16px","tablet":"16px","mobile":"16px"}}},"minimize":{"type":"object","default":{"toggle":true,"expandIcon":"fa-solid fa-chevron-down","collapseIcon":"fa-solid fa-chevron-up"}},"theme":{"type":"string","default":"default"},"sticky":{"type":"object","default":{"toggle":false,"device":["Desktop"],"width":{"desktop":"617px","tablet":"90%","mobile":"100%"},"horizonAlign":"left","verticalAlign":"top","right":{"desktop":"0px","tablet":"0px","mobile":"0px"},"left":{"desktop":"0px","tablet":"0px","mobile":"0px"},"top":{"desktop":"0px","tablet":"0px","mobile":"0px"},"bottom":{"desktop":"0px","tablet":"0px","mobile":"0px"},"zIndex":{"desktop":100,"tablet":100,"mobile":100}}},"slideTitle":{"type":"object","default":{"titleColor":"#2e2e2e","slideBarColor":"#abababbf","spaceDevice":"desktop","space":{"desktop":"15px","tablet":"15px","mobile":"15px"},"spaceBottomDevice":"desktop","spaceBottom":{"desktop":"15px","tablet":"15px","mobile":"15px"},"spaceBottomUnit":{"desktop":"px","tablet":"px","mobile":"px"}}},"slideList":{"type":"object","default":{"spaceDevice":"desktop","space":{"desktop":"15px","tablet":"15px","mobile":"15px"},"fontSize":{"desktop":"16px"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"#fff","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css"],"render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),PU=()=>document.querySelectorAll('a[href^="#"]')?.forEach((e=>{e.addEventListener("click",(function(e){e.preventDefault(),document.querySelector(this.getAttribute("href"))?.scrollIntoView({behavior:"smooth"})}))})),EU=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"div",value:"div"}],AU=[{label:"Numbers",value:"decimal"},{label:"Bullets",value:"disc"}],BU=[{name:"Orange",color:"#F57C00"},{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Cyan",color:"#00BCD4"},{name:"Pink",color:"#E91E63"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],IU=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],OU=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:(0,l.jsx)("path",{d:"M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"})}),RU=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:(0,l.jsx)("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})}),zU=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:(0,l.jsx)("path",{d:"M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z"})}),DU=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"})}),FU=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M246.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L224 402.7 361.4 265.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-160 160zm160-352l-160 160c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L224 210.7 361.4 73.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3z"})}),HU=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",...e,children:(0,l.jsx)("path",{
565 -d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"})}),WU=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M384 480c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"})}),UU=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M384 432c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0zm64-16c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"})}),GU=[{label:"Circle",value:"fa-solid fa-circle",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"})})},{label:"Dot Circle",value:"fa-solid fa-circle-dot",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"})})},{label:"Squire",value:"fa-solid fa-square-full",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M0 0H512V512H0V0z"})})},{label:"Circle",value:"fa-regular fa-circle",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"})})},{label:"Dot Circle",value:"fa-regular fa-circle-dot",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"})})}],VU=[{label:"Chevron Down",value:"fa-solid fa-chevron-down",icon:(0,l.jsx)(RU,{})},{label:"Circle Chevron Down",value:"fa-solid fa-circle-chevron-down",icon:(0,l.jsx)(zU,{})},{label:"Angel Down",value:"fa-solid fa-angle-down",icon:(0,l.jsx)(DU,{})},{label:"Angel Double Down",value:"fa-solid fa-angles-down",icon:(0,l.jsx)(FU,{})},{label:"Caret Down",value:"fa-solid fa-caret-down",icon:(0,l.jsx)(HU,{})},{label:"Squire Caret Down",value:"fa-solid fa-square-caret-down",icon:(0,l.jsx)(WU,{})},{label:"Squire Caret Down",value:"fa-regular fa-square-caret-down",icon:(0,l.jsx)(UU,{})}],qU=[{label:"Chevron Up",value:"fa-solid fa-chevron-up",icon:(0,l.jsx)(RU,{className:"tbcnb-rotate180deg"})},{label:"Circle Chevron Up",value:"fa-solid fa-circle-chevron-up",icon:(0,l.jsx)(zU,{className:"tbcnb-rotate180deg"})},{label:"Angel Up",value:"fa-solid fa-angle-up",icon:(0,l.jsx)(DU,{className:"tbcnb-rotate180deg"})},{label:"Angel Double Up",value:"fa-solid fa-angles-up",icon:(0,l.jsx)(FU,{className:"tbcnb-rotate180deg"})},{label:"Caret Up",value:"fa-solid fa-caret-up",icon:(0,l.jsx)(HU,{className:"tbcnb-rotate180deg"})},{label:"Squire Caret Up",value:"fa-solid fa-square-caret-up",icon:(0,l.jsx)(WU,{className:"tbcnb-rotate180deg"})},{label:"Squire Caret Up",value:"fa-regular fa-square-caret-up",icon:(0,l.jsx)(UU,{className:"tbcnb-rotate180deg"})}],YU=({icons:e,label:t,default:n,renderFunction:o,value:i})=>{const[a,s]=(0,m.useState)(!1),r=(0,m.useRef)(),c=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const e=e=>{c?.current?.contains(e.target)||r?.current?.contains(e.target)||s(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}})),(0,l.jsxs)("div",{className:"bblocks-tbcn-iconPicker-main-wrapper",children:[(0,l.jsxs)("div",{className:"bblocks-tbcn-iconPicker-wrapper",children:[(0,l.jsx)("p",{style:{width:"50%",margin:"0"},children:t}),(0,l.jsxs)("div",{className:"bblocks-tbcn-iconPicker",children:[(0,l.jsx)("div",{onClick:()=>o(n),className:"single-icon-admin-panel",children:(0,l.jsx)(OU,{})}),(0,l.jsx)("div",{ref:c,onClick:()=>s(!a),className:"single-icon-admin-panel selectIcon",children:e.map((({value:e,icon:t})=>e===i&&t))})]})]}),a&&(0,l.jsx)("div",{ref:r,className:"bblocks-tbcn-iconPicker-popover-icons",children:e&&e.map(((e,t)=>(0,l.jsxs)("div",{onClick:()=>o(e.value),className:"bblocks-tbcn-single-icon-picker-admin "+(e.value===i?"selectIcon":""),children:[(0,l.jsx)("div",{className:"bblocks-tbcn-icon-picker-tooltip-container",children:(0,l.jsxs)("div",{className:"bblocks-tbcn-icon-picker-tooltip",children:[(0,l.jsx)("span",{children:e.label}),(0,l.jsx)(HU,{})]})}),e.icon]},t)))})]})},KU=({attributes:e,setAttributes:t})=>{const{minimize:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Minimize Box","b-blocks"),checked:n.toggle,onChange:e=>t({minimize:{...n,toggle:e}})}),n.toggle&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(YU,{icons:VU,default:"fa-solid fa-chevron-down",label:(0,x.__)("Expand Icon","b-blocks"),value:n.expandIcon,renderFunction:e=>t({minimize:{...n,expandIcon:e}})}),(0,l.jsx)("div",{className:"mt10",children:(0,l.jsx)(YU,{icons:qU,default:"fa-solid fa-chevron-up",label:(0,x.__)("Collapse Icon","b-blocks"),value:n.collapseIcon,renderFunction:e=>t({minimize:{...n,collapseIcon:e}})})})]})]})},QU=({attributes:e,setAttributes:t})=>{const{title:n,theme:o,markup:i,tagName:a,isNested:s=!1}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table of Contents","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Title","b-blocks"),value:n.text,onChange:e=>((e,o)=>{const i=Rb(n,(e=>{e.text=o}));t({title:i})})(0,e)}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title Tag","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:n.tag,onChange:e=>t({title:{...n,tag:e}}),options:EU})]}),(0,l.jsx)(v,{children:(0,x.__)("Anchors By Tags","b-blocks")}),(0,l.jsx)(Ft,{options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],value:a,onChange:e=>t({tagName:e})}),(0,l.jsx)("br",{}),(0,l.jsx)(y.ToggleControl,{help:"Headings are displayed in a hierarchical structure.",label:(0,x.__)("Enable Nesting","b-blocks"),checked:s,onChange:e=>t({isNested:e})}),"default"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:"Markup view"}),(0,l.jsx)(y.SelectControl,{value:i.view,options:AU,onChange:e=>t({markup:{...i,view:e,icon:"disc"===e&&"fa-solid fa-circle"}})})]}),"disc"===i.view&&(0,l.jsx)(YU,{icons:GU,label:"Icon",renderFunction:e=>t({markup:{...i,icon:e,view:"decimal"===e?"decimal":"disc"}}),value:i.icon,default:"decimal"})]})]})},ZU=e=>{const{attributes:t,setAttributes:n}=e,{theme:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(QU,{attributes:t,setAttributes:n}),"default"===o&&(0,l.jsx)(KU,{attributes:t,setAttributes:n})]})},XU=({label:e,units:t,className:n,style:o,value:i="0px",onChange:a=()=>{},...s})=>{const r=(0,m.useRef)(),[c,d]=(0,m.useState)(!1),u=[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"vh",value:"vh"}]||t,p=i.split("").filter((e=>!isNaN(e)&&"%"!==e)).join(""),h=i.split("").filter((e=>isNaN(e)||"%"===e)).join(""),[g,b]=(0,m.useState)(p),[f,x]=(0,m.useState)(h)
566 -;(0,m.useEffect)((()=>{a(`${g}${f}`)}),[g,f]),(0,m.useEffect)((()=>{const e=e=>{r?.current?.contains(e.target)||d(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}));const v=Math.floor(999999*Math.random());return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("style",{children:"\n .labelWrapper {\n display: flex;\n justify-content: space-between;\n }\n .rangeControlWrapper {\n display: flex;\n }\n\n .unitControlBtn {\n font-size: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 9999;\n border: 1px solid rgb(168, 168, 168);\n border-left: none;\n cursor: pointer;\n font-weight: 600;\n background-color: #0000;\n height: 32px;\n width: 21px;\n border-radius: 0 2px 2px 0;\n text-transform: uppercase;\n margin-left: -1px;\n }\n\n .unitControlBtn:focus {\n border-color: #3858e9;\n border-left: 1px solid #3858e9;\n }\n .unitControlWrapper {\n position: relative;\n }\n .unitListWrapper {\n position: absolute;\n right: 0px;\n z-index: 9999 !important;\n background: #fff;\n font-weight: 600;\n border: 1px solid rgb(168, 168, 168);\n width: 19px;\n text-align: center;\n border-radius: 0 0 2px 2px;\n }\n .unitList {\n margin: 0;\n cursor: default;\n font-size: 10px;\n }\n .unitList:hover {\n background-color: #3858e9;\n color: aliceblue;\n }\n .hoverBgColor {\n background-color: #3858e9;\n color: aliceblue;\n }\n "}),(0,l.jsxs)("div",{id:`unitId-${v}`,className:`unitRangeWrapper ${n}`,style:o,children:[(0,l.jsx)("div",{className:"labelWrapper",children:(0,l.jsx)("label",{htmlFor:"",children:e})}),(0,l.jsxs)("div",{className:"rangeControlWrapper",children:[(0,l.jsx)("div",{style:{width:"100%"},children:(0,l.jsx)(y.RangeControl,{value:Number(p),onChange:e=>b(e),...s})}),(0,l.jsxs)("div",{ref:r,className:"unitControlWrapper",children:[(0,l.jsx)("button",{onClick:()=>d(!c),className:"unitControlBtn",children:h}),c&&(0,l.jsx)("div",{className:"unitListWrapper",children:u?.map(((e,t)=>(0,l.jsx)("p",{onClick:()=>{x(e.value),d(!1)},className:`unitList ${e.value===f?"hoverBgColor":""} `,children:e.label},t)))})]})]})]})]})},JU=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,device:n})=>{const{header:o,boxList:i,markup:a}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Background Color","b-blocks"),value:o.bgColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"bgColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:o.txtColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"txtColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:o.iconColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"iconColor")})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Separator Width","b-blocks"),value:o.separatorWidth,onChange:e=>t({header:be(o,e,"separatorWidth")}),min:0,max:100,step:1}),(0,l.jsx)(Ue,{label:(0,x.__)("Separator Color","b-blocks"),value:o.separatorColor,defaults:"#ccc",colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"separatorColor")})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("List Item","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"60px",top:"0px"}}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i.padding[n],resetValues:{top:"0px",left:"20px",right:"0px",bottom:"0px"},onChange:e=>t({boxList:be(i,e,"padding",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"80px",top:"0px"}}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Max Height","b-blocks"),value:i.maxHeight[n],onChange:e=>t({boxList:be(i,e,"maxHeight",n)}),min:0,max:1e3,step:1})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.nTxtColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({boxList:{...i,nTxtColor:e}})}),(0,l.jsx)("div",{style:{marginTop:"10px"},children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Underline","b-blocks"),checked:i.nTxtDecoration,onChange:e=>t({boxList:{...i,nTxtDecoration:e}})})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.hTxtColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({boxList:{...i,hTxtColor:e}})}),(0,l.jsx)("div",{style:{marginTop:"10px"},children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Underline","b-blocks"),checked:i.hTxtDecoration,onChange:e=>t({boxList:{...i,hTxtDecoration:e}})})})]})]})}),(0,l.jsx)("div",{style:{borderTop:"1px solid #ccc",margin:"15px 0",paddingTop:"10px"},children:(0,l.jsx)("strong",{children:"Marker"})}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({markup:be(a,e,"color")})}),(0,l.jsx)("div",{style:{marginTop:"10px"},children:(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition"}),(0,l.jsx)(XU,{label:(0,x.__)("Size","b-blocks"),value:a.markupSize[n],min:0,step:1,max:a.markupSize[n].includes("px")?50:100,onChange:e=>t({markup:be(a,e,"markupSize",n)})})]})})]})]})})),eG=(0,f.withSelect)((e=>({device:e("core/edit-post").__experimentalGetPreviewDeviceType()?.toLowerCase()})))((({attributes:e,setAttributes:t,device:n})=>{const{slideTitle:o,slideList:i,boxList:a}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("List","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"Heading"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color","b-blocks"),value:o.titleColor,colors:[{name:"Orange",color:"#F57C00"},{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Cyan",color:"#00BCD4"},{name:"Pink",color:"#E91E63"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({slideTitle:{...o,titleColor:e}})}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(XU,{label:(0,x.__)("Space Top","b-blocks"),value:o.space[n],min:0,max:o.space[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(XU,{label:(0,x.__)("Space Bottom","b-blocks"),value:o.spaceBottom[n],min:0,max:o.spaceBottom[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"spaceBottom",n)})})]}),(0,l.jsxs)("div",{style:{
567 -marginTop:"10px",borderTop:"1px solid #ccc",paddingTop:"10px"},children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"List Item"}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(XU,{label:(0,x.__)("List Space Bottom","b-blocks"),value:i.space[n],min:0,max:i.space[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(XU,{label:(0,x.__)("List Font Size","b-blocks"),value:i.fontSize[n],min:0,max:i.fontSize[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"fontSize",n)})})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.nTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,nTxtColor:e}})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:a.nbarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,nbarColor:e}})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.hTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,hTxtColor:e}})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:a.hBarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,hBarColor:e}})})]})]})})]})})})),tG=(0,f.withSelect)((e=>({device:e("core/edit-post").__experimentalGetPreviewDeviceType()?.toLowerCase()})))((({attributes:e,setAttributes:t,device:n})=>{const{slideTitle:o,slideList:i,boxList:a}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slide","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"Heading"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color","b-blocks"),value:o.titleColor,colors:BU,onChange:e=>t({slideTitle:{...o,titleColor:e}})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:o.slideBarColor,colors:BU,onChange:e=>t({slideTitle:{...o,slideBarColor:e}})}),(0,l.jsxs)("div",{style:{marginTop:"10px"},children:[(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"70px"}}),(0,l.jsx)(XU,{label:(0,x.__)("Space Top","b-blocks"),value:o.space[n],min:0,step:1,max:o.space[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"90px"}}),(0,l.jsx)(XU,{label:(0,x.__)("Space Bottom","b-blocks"),value:o.spaceBottom[n],min:0,step:1,max:o.spaceBottom[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"spaceBottom",n)})})]})]}),(0,l.jsxs)("div",{style:{marginTop:"10px",borderTop:"1px solid #ccc",paddingTop:"10px"},children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"List Item"}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(XU,{label:(0,x.__)("List Space Bottom","b-blocks"),value:i.space[n],min:0,max:i.space[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"90px"}}),(0,l.jsx)(XU,{label:(0,x.__)("List Font Size","b-blocks"),value:i.fontSize[n],min:0,max:i.fontSize[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"fontSize",n)})})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.nTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(a,e,"nTxtColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:a.nBarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(a,e,"nBarColor")})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.hTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(a,e,"hTxtColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:a.hBarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(a,e,"hBarColor")})})]})]})})]})})})),nG=(0,f.withSelect)((e=>({device:e("core/edit-post").__experimentalGetPreviewDeviceType()?.toLowerCase()})))((({attributes:e,setAttributes:t,device:n})=>{const{slideTitle:o,slideList:i,boxList:a}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Timeline","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"Heading"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color","b-blocks"),value:o.titleColor,colors:[{name:"Orange",color:"#F57C00"},{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Cyan",color:"#00BCD4"},{name:"Pink",color:"#E91E63"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({slideTitle:{...o,titleColor:e}})}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(XU,{label:(0,x.__)("Space Top","b-blocks"),value:o.space[n],min:0,max:o.space[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(XU,{label:(0,x.__)("Space Bottom","b-blocks"),value:o.spaceBottom[n],min:0,max:o.spaceBottom[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"spaceBottom",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px",borderTop:"1px solid #ccc",paddingTop:"10px"},children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"List Item"}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(XU,{label:(0,x.__)("List Space Bottom","b-blocks"),value:i.space[n],min:0,max:i.space[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"space",n)})})]
568 -}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(XU,{label:(0,x.__)("List Font Size","b-blocks"),value:i.fontSize[n],min:0,max:i.fontSize[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"fontSize",n)})})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.nTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,nTxtColor:e}})})}),"hover"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.hTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,hTxtColor:e}})})})]})}),(0,l.jsxs)("div",{style:{borderTop:"1px solid #ccc",marginTop:"10px",paddingTop:"10px"},children:[(0,l.jsx)("p",{style:{marginBottom:"10px"},children:(0,l.jsx)("strong",{children:"Dots"})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Size","b-blocks"),value:a.dotSize,min:0,step:1,max:70,onChange:e=>t({boxList:{...a,dotSize:e}})}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:a.dotShadow,onChange:e=>t({boxList:{...a,dotShadow:e}}),defaults:[{hOffset:"1px",vOffset:"1px",blur:"5px",spread:"1px",color:"#b3b3b3"}]}),(0,l.jsx)(Ue,{label:(0,x.__)("Tree Color","b-blocks"),value:a.treeColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],defaults:"blueviolet",onChange:e=>t({boxList:{...a,treeColor:e}})})]})]})})})),oG=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,device:n})=>{const{theme:o,sticky:i}=e;return(0,l.jsxs)(l.Fragment,{children:[i.toggle&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Container","b-blocks"),children:(0,l.jsx)(y.__experimentalUnitControl,{value:i.width[n],label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),onChange:e=>t({sticky:be(i,e,"width",n)})})}),"default"===o&&(0,l.jsx)(JU,{attributes:e,setAttributes:t}),"slide"===o&&(0,l.jsx)(tG,{attributes:e,setAttributes:t}),"timeline"===o&&(0,l.jsx)(nG,{attributes:e,setAttributes:t}),"list"===o&&(0,l.jsx)(eG,{attributes:e,setAttributes:t})]})})),iG=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,a={dimension:["padding","margin"],transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0};return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:IU,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ZU,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(oG,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),enabled:a,isPremium:o})})]})})})})},aG=()=>(0,l.jsx)("div",{style:{padding:"14px"},children:(0,l.jsx)("p",{style:{margin:"0px"},children:"No headings were found on this page!"})}),sG=({attributes:e,id:t})=>{const{header:n,boxList:o,markup:i,sticky:a}=e,s=`#${t}`,r=`${s} .bblocks-tbcn-accordion`,c=`${r} .bblocks-tbcn-accordion-title`,d=`${r} .bblocks-tbcn-panel`,u=`${d} .bblocks-tbcn-panel-table-container-order-list`,p=`${u} .bblocks-tbcn-panel-table-list-items`,h=`${s} ol li a.bblocks-tbcn-table-content-anchor-list`;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("style",{
569 -children:`\n ${h}:hover{\n color:${o.hTxtColor} !important; \n text-decoration:${o.hTxtDecoration?"underline":"none"} !important;\n }\n ${d} :where(ol){\n list-style:none !important;\n }\n ${h}{\n color:${o.nTxtColor} !important;\n text-decoration:${o.nTxtDecoration?"underline":"none"};\n\n }\n ${r}.sticky {\n ${ns("width",a.width.desktop)}\n z-index: ${a.zIndex.desktop} !important;\n position:fixed;\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].desktop};\n }`)).join("")}\n ${u} .bblocks-tbcn-list-item-content{\n display:flex;\n align-items:center;\n gap:5px;\n }\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e]?.desktop}\n }`)).join("")}\n ${"center"===a.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${"decimal"===i.view?`\n \n ${u}{\n list-style-type:none;\n margin:0px;\n }\n ${p}::marker{\n color:${i.color};\n font-size:${i.markupSize.desktop};\n }\n ${p} .bblocks-tbcn-list-item-content>span{\n color:${i.color};\n font-size:${i.markupSize.desktop};\n }\n ${p} .bblocks-tbcn-list-item-content{\n gap:0px;\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n ${p} .bblocks-tbcn-list-item-content>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.desktop} !important;\n }\n `}\n ${c}{\n background:${n.bgColor};\n border-bottom: ${n.separatorWidth}px solid ${n.separatorColor};\n margin-bottom:-2px;\n }\n ${c}>svg{\n fill:${n.iconColor}\n }\n ${r}>.panel{\n ${o.maxHeight.desktop>0?"max-height:"+o.maxHeight.desktop+"px;":""}\n ${o.maxHeight.desktop>0?"overflow-y:auto;":""}\n \n \n }\n ${h}.item-active{\n color:${o.hTxtColor} !important;\n }\n ${p}{\n padding-top:${o.padding.desktop?.top};\n padding-bottom:${o.padding.desktop?.bottom};\n padding-right:${o.padding.desktop?.right};\n }\n ${u}{\n padding-left:${o.padding.desktop?.left};\n }\n @media screen and (min-width: 1024px) {\n ${r}.sticky {\n z-index: ${a.zIndex.desktop} !important;\n position:${a?.device.includes("Desktop")?"fixed":"initial"};\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].desktop};\n }`)).join("")}\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].desktop}\n }`)).join("")}\n ${"center"===a.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${d}{\n ${o.maxHeight.desktop>0?"max-height:"+o.maxHeight.desktop+"px;":""}\n ${o.maxHeight.desktop>0?"overflow-y:auto;":""}\n }\n ${p}{\n padding-top:${o.padding.desktop?.top};\n padding-bottom:${o.padding.desktop?.bottom};\n padding-right:${o.padding.desktop?.right};\n }\n ${u}{\n padding-left:${o.padding.desktop?.left};\n }\n ${"decimal"===i.view?`\n ${p}::marker{\n font-size:${i.markupSize.desktop};\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n\n ${p} .bblocks-tbcn-list-item-content>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.desktop} !important;\n }\n `}\n }\n @media only screen and (min-width:641px) and (max-width: 1024px){\n ${r}.sticky {\n ${ns("width",a.width.tablet)}\n z-index: ${a.zIndex.tablet} !important;\n position:${a.device.includes("Tablet")?"fixed":"initial"};\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].tablet};\n }`)).join("")}\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].tablet}\n }`)).join("")}\n ${"center"===a.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${d}{\n ${o.maxHeight.tablet>0?"max-height:"+o.maxHeight.tablet+"px;":""}\n ${o.maxHeight.tablet>0?"overflow-y:auto;":""}\n }\n ${p}{\n padding-top:${o.padding.tablet?.top};\n padding-bottom:${o.padding.tablet?.bottom};\n padding-right:${o.padding.tablet?.right};\n }\n ${u}{\n padding-left:${o.padding.tablet?.left};\n }\n ${"decimal"===i.view?`\n ${p}::marker{\n font-size:${i.markupSize.tablet};\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n ${p}>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.tablet} !important;\n }\n `}\n\n }\n @media only screen and (max-width: 640px) {\n ${r}.sticky {\n ${ns("width",a.width.mobile)}\n z-index: ${a.zIndex.mobile} !important;\n position:${a.device.includes("Mobile")?"fixed":"initial"};\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].mobile};\n }`)).join("")}\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].mobile}\n }`)).join("")}\n ${"center"===a.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${d}{\n ${o.maxHeight.mobile>0?"max-height:"+o.maxHeight.mobile+"px;":""}\n ${o.maxHeight.mobile>0?"overflow-y:auto;":""}\n }\n ${p}{\n padding-top:${o.padding.mobile?.top};\n padding-bottom:${o.padding.mobile?.bottom};\n padding-right:${o.padding.mobile?.right};\n }\n ${u}{\n padding-left:${o.padding.mobile?.left};\n }\n ${"decimal"===i.view?`\n ${p}::marker{\n font-size:${i.markupSize.mobile};\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n ${p} .bblocks-tbcn-list-item-content>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.mobile} !important;\n }\n `}\n }\n `})})},rG=({items:e,markup:t,bullets:n,contentsAttr:o,setContentsAttr:i,className:a="",prefix:s=""})=>e&&0!==e.length?(0,l.jsx)("ol",{className:`bblocks-tbcn-panel-table-container-order-list ${a}`,children:e.map(((e,a)=>{const r=s?`${s}.${a+1}`:`${a+1}`;return"bblocks-tbcn-content-table-title"!==e.className&&(0,l.jsxs)("li",{className:"bblocks-tbcn-panel-table-list-items",children:[(0,l.jsxs)("div",{className:"bblocks-tbcn-list-item-content",children:["decimal"===t.view?(0,l.jsxs)("span",{className:"bblocks-tbcn-decimal-number",children:[r,"."]}):(0,l.jsx)("span",{children:n.map((({value:e,icon:n},o)=>e===t.icon&&(0,l.jsx)(m.Fragment,{children:n},`bullet-${o}`)))}),(0,l.jsx)("a",{className:"bblocks-tbcn-table-content-anchor-list "+(e.id===o?"item-active":""),href:`#${e.id}`,onClick:()=>i(e.id),children:e.contents})]}),e.children&&e.children.length>0&&(0,l.jsx)(rG,{items:e.children,markup:t,bullets:n,contentsAttr:o,setContentsAttr:i,className:"bblocks-tbcn-nested-list",prefix:r})]},e.id+e.contents+s)}))}):null,lG=rG,cG=({attributes:e,setAttributes:t,id:n})=>{const[o,i]=(0,m.useState)(!0),[a,s]=(0,m.useState)(),{boxList:r,header:c,title:d,tagName:u,minimize:p,markup:h,sticky:g,isNested:b=!1}=e,f=(0,m.useRef)(),x=(0,m.useRef)(),y=(0,m.useRef)(),{content:v,savedElements:k}=((e,t,n,o,i,a)=>{const[s,r]=(0,m.useState)([]),[l,c]=(0,m.useState)([]),d=(0,m.useCallback)((e=>e.className===i?null:(Array.from(e.children).slice(1).forEach((e=>e.remove())),{contents:e.textContent,tag:e.tagName,id:e.children[0]?.getAttribute("id")
570 -})),[]),u=(0,m.useCallback)((e=>{Array.from(e).forEach(((e,t)=>{if(e.className!=i&&e?.children&&!Array.from(e?.children).some((e=>e.getAttribute("id")?.startsWith("bppb-heading-anchor-")))){const n=document.createElement("span");n.setAttribute("id",`bppb-heading-anchor-${t}`),e.insertAdjacentElement("afterbegin",n)}}))}),[]),p=(0,m.useCallback)(((e,t)=>{if(e){if("div"!==e.tagName.toLowerCase()){const t=e.querySelector("span");t?.remove()}e.innerHTML=t}}),[]);return(0,m.useEffect)((()=>{(()=>{const i=a?.ownerDocument||a||document,s=i?.querySelector(".wp-block-post-content");if(!s&&!a)return;const l=e.join(", "),h=s?.querySelectorAll(l);if(!h?.length)return;const g=Array.from(h).map(d).filter(Boolean);c(g),u(h);const m=document.querySelector(o),b=m?.querySelector(t);p(b,n),r(h)})()}),[e,t,n,o,d,u,p,a]),{savedElements:l,content:s}})(u,d.tag,d.text,".bblocks-tbcn-accordion-title","bblocks-tbcn-content-table-title",f?.current);(0,m.useEffect)((()=>{k&&t({headings:k})}),[k]),(0,m.useEffect)((()=>{const e=y.current,t=()=>{const t="0px"!==e.style.height,n=t?"0px":`${e.scrollHeight}px`;e.style.height=n,i(!t)};return p.toggle&&x.current.addEventListener("click",t),()=>x.current?.removeEventListener("click",t)}),[JSON.stringify(r),r.maxHeight,d.tag,u,h.view,p.toggle]);const w=b?(e=>{const t=[],n=[{level:0,children:t}];return e.forEach((e=>{const t=parseInt(e.tag.replace("H",""),10),o={...e,children:[]};for(;n.length>1&&n[n.length-1].level>=t;)n.pop();n[n.length-1].children.push(o),n.push({level:t,children:o.children})})),t})(e.headings):e.headings;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(sG,{attributes:e,id:n}),(0,l.jsxs)("div",{ref:f,className:`bblocks-tbcn-accordion ${g.toggle?"sticky":""} ${g.horizonAlign} ${g.verticalAlign} `,children:[(0,l.jsxs)("div",{ref:x,className:"bblocks-tbcn-accordion-title",children:[(0,l.jsx)(zn,{className:"bblocks-tbcn-content-table-title",style:{margin:"0",color:c.txtColor},tagName:d?.tag,dangerouslySetInnerHTML:{__html:d?.text}}),p.toggle&&(0,l.jsx)(l.Fragment,{children:o?qU.map((({value:e,icon:t},n)=>e===p.collapseIcon&&(0,l.jsx)("span",{children:t},`expand-${n}`))):VU.map((({value:e,icon:t},n)=>e===p.expandIcon&&(0,l.jsx)("span",{children:t},`expand-${n}`)))})]}),(0,l.jsx)("div",{ref:y,className:"bblocks-tbcn-panel",children:v?.length>1?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(lG,{items:w,markup:h,bullets:GU,contentsAttr:a,setContentsAttr:s})}):(0,l.jsx)(aG,{})})]})]})};Ll(LU.name)&&(0,p.registerBlockType)(LU,{icon:Gr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{minimize:i}=t,{advanced:a}=t,{headingContent:s,headingTags:r}=(()=>{const[e,t]=(0,m.useState)(null),[n,o]=(0,m.useState)([]),i=(0,m.useRef)([]),a=(0,f.useSelect)((e=>e("core/block-editor").getBlocks()),[]);return(0,m.useEffect)((()=>{const e=a,n=i.current,s=e.filter((e=>"core/heading"===e.name)),r=n.filter((e=>"core/heading"===e.name));s.forEach((e=>{const n=r.find((t=>t.clientId===e.clientId));n&&n.attributes.content!==e.attributes.content&&t(e.attributes.content)}));const l=s.map((e=>({level:e.attributes.level,content:e.attributes.content})));o(l),i.current=e}),[a]),{headingContent:e,headingTags:n}})(),c=bBlocksPremiumChecker,d=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iG,{attributes:t,setAttributes:n,isPremium:c}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`${_s(d,a,!1)}`}}),(0,l.jsxs)("div",{children:[(0,l.jsx)(PU,{}),(0,l.jsx)(cG,{setAttributes:n,attributes:t,id:d},i.toggle+s+r+a?.animation?.type)]})]})]})}});const dG=JSON.parse('{"apiVersion":3,"name":"b-blocks/team-members","title":"Team Members","description":"Display Team members section.","category":"bBlocks","keywords":["team","members","team members section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"members":{"type":"array","default":[{"background":{"color":"#0000"},"border":{"radius":"3px"},"shadow":[],"photo":{"id":null,"url":"","alt":"","title":""},"photoBorder":{"radius":"50%"},"name":"Martin","nameColor":"#333","title":"Founder","titleColor":"#333","separator":{"width":"20%","height":"3px","color":"#777"},"bio":"I am a self-motivated and self-taught professional who likes to solve problems.","bioColor":"#333","social":[{"link":"#","icon":{"class":"fab fa-facebook-f"}},{"link":"#","icon":{"class":"fab fa-twitter"}},{"link":"#","icon":{"class":"fab fa-linkedin-in"}}],"socialIconColors":{"color":"#fff","bg":"#146EF5"},"iconStyle":{"hover":{"socialIconColors":{"color":"#fff","bg":"#146EF5"},"border":{},"shadow":{}},"normal":{"border":{},"shadow":[]}}},{"background":{"color":"#0000"},"border":{"radius":"3px"},"shadow":[],"photo":{"id":null,"url":"","alt":"","title":""},"photoBorder":{"radius":"50%"},"name":"Mary","nameColor":"#333","title":"Co-Founder","titleColor":"#333","separator":{"width":"20%","height":"3px","color":"#777"},"bio":"I am a self-motivated and self-taught professional who likes to solve problems.","bioColor":"#333","social":[{"link":"#","icon":{"class":"fab fa-facebook-f"}},{"link":"#","icon":{"class":"fab fa-twitter"}},{"link":"#","icon":{"class":"fab fa-linkedin-in"}}],"socialIconColors":{"color":"#fff","bg":"#146EF5"},"iconStyle":{"hover":{"socialIconColors":{"color":"#fff","bg":"#146EF5"},"border":{},"shadow":{}},"normal":{"border":{},"shadow":[]}}},{"background":{"color":"#0000"},"border":{"radius":"3px"},"shadow":[],"photo":{"id":null,"url":"","alt":"","title":""},"photoBorder":{"radius":"50%"},"name":"John Doe","nameColor":"#333","title":"CEO","titleColor":"#333","separator":{"width":"20%","height":"3px","color":"#777"},"bio":"I am a self-motivated and self-taught professional who likes to solve problems.","bioColor":"#333","social":[{"link":"#","icon":{"class":"fab fa-facebook-f"}},{"link":"#","icon":{"class":"fab fa-twitter"}},{"link":"#","icon":{"class":"fab fa-linkedin-in"}}],"socialIconColors":{"color":"#fff","bg":"#146EF5"},"iconStyle":{"hover":{"socialIconColors":{"color":"#fff","bg":"#146EF5"},"border":{},"shadow":{}},"normal":{"border":{},"shadow":[]}}}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"30px"},"rowGap":{"type":"string","default":"30px"},"layout":{"type":"string","default":"vertical"},"theme":{"type":"string","default":"default"},"isLinkNewTab":{"type":"boolean","default":false},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"20px"}},"photoWidth":{"type":"string","default":"170px"},"photoMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"nameTypo":{"type":"object","default":{"fontSize":{"desktop":"20px","tablet":"18px","mobile":"16px"},"fontWeight":600}},"nameMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isTitle":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isSep":{"type":"boolean","default":true},"sepMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isBio":{"type":"boolean","default":true},"bioTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"bioMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isSocial":{"type":"boolean","default":true},"socialSize":{"type":"string","default":"22px"},"socialIconMargin":{"type":"object","default":{"side":2,"vertical":"10px","horizontal":"10px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),uG=({attributes:e,index:t,updateMember:n})=>{
571 -const{members:i}=e,{background:a={},border:s={},shadow:r={},photo:c,photoBorder:d={},nameColor:u="",titleColor:p="",separator:h={},bioColor:g="",socialIconColors:m={},iconStyle:b={}}=i[t]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:a,onChange:e=>n(t,"background",e)}),(0,l.jsx)(Jc,{label:(0,x.__)("Border:","b-blocks"),value:s,onChange:e=>n(t,"border",e),defaults:{radius:"3px"}}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow:","b-blocks"),value:r?.shadow||r,onChange:e=>n(t,"shadow",e)}),(0,l.jsx)(v,{children:(0,x.__)("Photo:","b-blocks")}),(0,l.jsx)(ke,{value:c,onChange:e=>n(t,"photo",e),placeholder:(0,x.__)("Enter Image URL","b-blocks")}),(0,l.jsx)(td,{className:"mt20",value:c,onChange:e=>n(t,"photo",e)}),(0,l.jsx)(Jc,{label:(0,x.__)("Photo Border:","b-blocks"),value:d,onChange:e=>n(t,"photoBorder",e),defaults:{radius:"50%"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Name Color:","b-blocks"),value:u,onChange:e=>n(t,"nameColor",e),defaultColor:"#333"}),(0,l.jsx)(Ue,{label:(0,x.__)("Designation/Title Color:","b-blocks"),value:p,onChange:e=>n(t,"titleColor",e),defaultColor:"#333"}),(0,l.jsx)(Ta,{value:h,onChange:e=>n(t,"separator",e),defaults:{width:"20%",height:"3px",color:"#777"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Bio Color:","b-blocks"),value:g,onChange:e=>n(t,"bioColor",e),defaultColor:"#333"}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{label:(0,x.__)("Social Icon Colors:","b-blocks"),value:m,onChange:e=>n(t,"socialIconColors",e),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(Jc,{label:(0,x.__)("Icon Border","b-blocks"),value:b?.normal?.border,onChange:e=>n(t,"iconStyle",e,"normal","border")}),(0,l.jsx)(yt,{label:(0,x.__)("Icon Shadow","b-blocks"),value:b?.normal?.shadow,onChange:e=>n(t,"iconStyle",e,"normal","shadow")})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{label:(0,x.__)("Social Icon Colors:","b-blocks"),value:b?.hover?.socialIconColors,onChange:e=>n(t,"iconStyle",e,"hover","socialIconColors")}),(0,l.jsx)(Jc,{label:(0,x.__)("Icon Border","b-blocks"),value:b?.hover?.border,onChange:e=>n(t,"iconStyle",e,"hover","border")}),(0,l.jsx)(yt,{label:(0,x.__)("Icon Shadow","b-blocks"),value:b?.hover?.border,onChange:e=>n(t,"iconStyle",e,"hover","shadow")})]})]})})]})},pG=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Theme 1","b-blocks"),value:"theme1"},{label:(0,x.__)("Theme 2","b-blocks"),value:"theme2"},{label:(0,x.__)("Theme 3","b-blocks"),value:"theme3"},{label:(0,x.__)("Theme 4","b-blocks"),value:"theme4"}],hG=[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical",icon:d},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal",icon:u}],gG=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateMember:n,activeIndex:i,setActiveIndex:a,isPremium:s,device:r})=>{const{members:c=[],columns:d,columnGap:u,rowGap:p,layout:g,theme:m,isLinkNewTab:b,textAlign:f,padding:k,photoWidth:w,photoMargin:C,nameTypo:j,nameMargin:$,isTitle:S,titleTypo:T,titleMargin:N,isSep:M,sepMargin:L,isBio:P,bioTypo:E,bioMargin:A,isSocial:B,socialSize:I,socialIconMargin:O}=e,R=()=>({background:{color:"#0000"},border:{radius:"3px"},shadow:[],photo:{id:null,url:"",alt:"",title:""},photoBorder:{radius:"50%"},name:"John Smith",nameColor:"#333",title:"Manager",titleColor:"#333",separator:{width:"20%",height:"3px",style:"solid",color:"#777"},bio:"I am a self-motivated and self-taught professional who likes to solve problems.",bioColor:"#333",social:[{link:"#",icon:{class:"fab fa-facebook-f",fontSize:22,color:"#fff"}},{link:"#",icon:{class:"fab fa-twitter",fontSize:22,color:"#fff"}},{link:"#",icon:{class:"fab fa-linkedin-in",fontSize:22,color:"#fff"}}],socialIconColors:{color:"#fff",bg:o}}),z=e=>{const n=Rb(c,(t=>{t.map(((n,o)=>{for(const n of e){const e=n[0],i=n[1];t[o][e]=i}}))}));t({members:n})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:h=>(0,l.jsxs)(l.Fragment,{children:["general"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:xn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Add or Remove Members","b-blocks"),children:[(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:i,setActiveIndex:a,updateMember:n,arrKey:"members",ItemSettings:uG,itemLabel:"Team Member",newItem:R(),design:s?"sortable":"single"}),!s&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:d[r],onChange:e=>{t({columns:{...d,[r]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(Tn,{value:g,onChange:e=>{t({layout:e}),"vertical"===e&&t({columns:{...d,desktop:3,tablet:2},textAlign:"center",padding:{...k,vertical:"50px"}}),"horizontal"===e&&t({columns:{...d,desktop:2,tablet:1},textAlign:"left",padding:{...k,vertical:"30px"}})},options:hG,isIcon:!0})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:m,onChange:e=>{t({theme:e}),"default"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"170px",nameTypo:{...j,fontSize:20,textTransform:"none"},titleTypo:{...T,fontSize:16,textTransform:"none"},isSep:!0,isBio:!0,socialSize:"22px"}),"theme1"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"190px",nameTypo:{...j,fontSize:20,textTransform:"none"},titleTypo:{...T,fontSize:14,textTransform:"uppercase"},isSep:!0,isBio:!0,socialSize:"22px"}),"theme2"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"190px",nameTypo:{...j,fontSize:20,textTransform:"none"},titleTypo:{...T,fontSize:14,textTransform:"uppercase"},isSep:!0,isBio:!1,socialSize:"22px"}),"theme3"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"170px",nameTypo:{...j,fontSize:24,textTransform:"none"},titleTypo:{...T,fontSize:18,textTransform:"none"},isSep:!1,isBio:!1,socialSize:"28px"}),"theme4"===e&&t({padding:{...k,vertical:"15px",horizontal:"15px"},photoWidth:"100%",nameTypo:{...j,fontSize:20,textTransform:"uppercase"},titleTypo:{...T,fontSize:15,textTransform:"none"},isSep:!1,isBio:!1,socialSize:"22px"}),c.map((t=>{const{background:n,border:i,photoBorder:a,separator:s,socialIconColors:r}=t,l=[["background",{...n,color:"#0000"}],["border",{...i,radius:"3px"}],["shadow",[{hOffset:"",vOffset:"",blur:"0px",color:"#7090b0"}]],["photoBorder",{...a,width:"0px",color:"#0000",radius:"50%"}],["nameColor","#333"],["titleColor","#333"],["separator",{...s,color:"#777"}],["bioColor","#333"],["socialIconColors",{...r,color:"#fff",bg:o}]],c=[["background",{...n,color:"#0000"}],["border",{...i,radius:"3px"}],["shadow",[{hOffset:"",vOffset:"",blur:"20px",color:"#e8edfb"}]],["photoBorder",{...a,width:"10px",color:"#e8edfb",radius:"50%"}],["nameColor","#333"],["titleColor","#7a7a7a"],["separator",{...s,color:o}],["bioColor","#7a7a7a"],["socialIconColors",{...r,color:"#fff",bg:o
572 -}]],d=[["background",{...n,color:"#0000"}],["border",{...i,radius:"3px"}],["shadow",[{hOffset:"",vOffset:"",blur:"0px",color:"#7090b0"}]],["photoBorder",{...a,width:"0px",color:"#0000",radius:"50%"}],["nameColor","#333"],["titleColor","#7a7a7a"],["separator",{...s,color:"#999"}],["bioColor","#7a7a7a"],["socialIconColors",{...r,color:o,bg:"#0000"}]],u=[["background",{...n,color:"#f2f3f7"}],["border",{...i,radius:"10px"}],["shadow",[{hOffset:"-10px",vOffset:"-10px",blur:"20px",color:"#f7f7f7"},{hOffset:"10px",vOffset:"10px",blur:"20px",color:"#d7e0e8"}]],["photoBorder",{...a,width:"0px",color:"#0000",radius:"50%"}],["nameColor","#32285C"],["titleColor","#677592"],["separator",{...s,color:"#777"}],["bioColor","#333"],["socialIconColors",{...r,color:"#677592",bg:"#0000"}]],p=[["background",{...n,color:o}],["border",{...i,radius:"0px"}],["shadow",[{hOffset:"",vOffset:"",blur:"0px",color:"#7090b0"}]],["photoBorder",{...a,width:"0px",color:"#0000",radius:"0px"}],["nameColor","#fff"],["titleColor","#fff"],["separator",{...s,color:"#777"}],["bioColor","#fff"],["socialIconColors",{...r,color:o,bg:"#fff"}]];"default"===e&&z(l),"theme1"===e&&z(c),"theme2"===e&&z(d),"theme3"===e&&z(u),"theme4"===e&&z(p)}))},options:pG})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:S,onChange:e=>t({isTitle:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Separator","b-blocks"),checked:M,onChange:e=>t({isSep:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Bio","b-blocks"),checked:P,onChange:e=>t({isBio:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Social","b-blocks"),checked:B,onChange:e=>t({isSocial:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open Link in New Tab","b-blocks"),checked:b,onChange:e=>t({isLinkNewTab:e})})]})]}),"style"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:f,onChange:e=>t({textAlign:e}),options:Jt.filter((e=>"justify"!==e.value)),isIcon:!0})]}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:k,onChange:e=>t({padding:e}),defaults:{vertical:"50px",horizontal:"20px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Photo","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:w,onChange:e=>t({photoWidth:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>t({photoMargin:e}),defaults:{side:4,bottom:"20px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Name","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:j,onChange:e=>t({nameTypo:e}),defaults:{fontSize:{desktop:20,tablet:18,mobile:16},fontWeight:600}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:$,onChange:e=>t({nameMargin:e}),defaults:{side:4,bottom:"10px"}})]}),S&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Designation/Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:T,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:N,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),M&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:L,onChange:e=>t({sepMargin:e}),defaults:{side:4,bottom:"15px"}})}),P&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Bio","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:E,onChange:e=>t({bioTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:A,onChange:e=>t({bioMargin:e}),defaults:{side:4,bottom:"15px"}})]}),B&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Social","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size:","b-blocks"),labelPosition:"left",value:I,onChange:e=>t({socialSize:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Icon Margin:","b-blocks"),value:O,onChange:e=>t({socialIconMargin:e}),defaults:{vertical:"10px",horizontal:"10px"}})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Member","b-blocks"),onClick:()=>{const e=[...c,R()];t({members:e}),a(c.length)},children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:f,onChange:e=>t({textAlign:e})})]})]})})),mG="bBlocksTeamMembers",bG=({attributes:e,id:t})=>{const{members:n=[],columnGap:o,rowGap:i,layout:a,textAlign:s,padding:r,photoWidth:c,photoMargin:d,nameTypo:u,nameMargin:p,titleTypo:h,titleMargin:g,sepMargin:m,bioTypo:b,bioMargin:f,socialSize:x,socialIconMargin:y}=e,v=`#${t}`,k=`${v} .${mG}`,w=`${k} .teamMember`,_=`${w} .memberDetails`,C=`${_} .memberSocial`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",u)?.googleFontLink}\n\t\t${ps("",h)?.googleFontLink}\n\t\t${ps("",b)?.googleFontLink}\n\t\t${ps(`${_} .memberName`,u)?.styles}\n\t\t${ps(`${_} .memberTitle`,h)?.styles}\n\t\t${ps(`${_} .memberBio`,b)?.styles}\n\n\t\t${k}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t}\n\t\t${w}{\n\t\t\ttext-align: ${s};\n\t\t\tpadding: ${us(r)};\n\t\t}\n\t\t${w} .memberPhoto{\n\t\t\twidth: ${c};\n\t\t\tmargin: ${"horizontal"===a?"0 20px 0 0":`${us(d)}`};\n\t\t}\n\t\t${_} .memberName{\n\t\t\tmargin: ${us(p)};\n\t\t}\n\t\t${_} .memberTitle{\n\t\t\tmargin: ${us(g)};\n\t\t}\n\t\t${_} .memberSeparator{\n\t\t\tmargin: ${us(m)};\n\t\t}\n\t\t${_} .memberBio{\n\t\t\tmargin: ${us(f)};\n\t\t}\n\t\t${C} .icon,\n\t\t${C} .memberSocialAdd{\n\t\t\tmargin: ${us(y)};\n\t\t}\n\t\t${C} .icon i,\n\t\t${C} .memberSocialAdd i{\n\t\t\tfont-size: ${x};\n\t\t\twidth: ${x};\n\t\t}\n\n\t\t${n.map(((e,t)=>{const{background:n,border:o,shadow:i,photoBorder:a,nameColor:r,titleColor:l,separator:c,bioColor:d,socialIconColors:u,iconStyle:p={}}=e,h=`${v} #teamMember-${t}`,g=`${h} .memberDetails`,m=`${g} .memberSocial`;return`\n\t\t\t\t${h}{\n\t\t\t\t\t${os(n)}\n\t\t\t\t\t${is(o)}\n\t\t\t\t\tbox-shadow: ${ls(i?.shadow||(i?.color?[i]:i))};\n\t\t\t\t}\n\t\t\t\t${h} .memberPhoto{\n\t\t\t\t\t${is(a)}\n\t\t\t\t}\n\t\t\t\t${g} .memberName{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t\t${g} .memberTitle{\n\t\t\t\t\tcolor: ${l};\n\t\t\t\t}\n\t\t\t\t${h} .memberSeparator{\n\t\t\t\t\t${cs(c)}\n\t\t\t\t}\n\t\t\t\t${g} .memberBio{\n\t\t\t\t\tcolor: ${d};\n\t\t\t\t}\n\t\t\t\t${m}{\n\t\t\t\t\tjustify-content: ${"center"===s?"center":"right"===s?"flex-end":"flex-start"}\n\t\t\t\t}\n\t\t\t\t${m} li a{\n\t\t\t\t\t${ss(u)}\n\t\t\t\t\t${is(p?.normal?.border)}\n\t\t\t\t\t${ls(p?.normal?.shadow)}\n\t\t\t\t\ttransition:all 0.2s ease-in-out;\n\t\t\t\t}\n\t\t\t\t${m} li a:hover{\n\t\t\t\t\t${ss(p?.hover?.socialIconColors)}\n\t\t\t\t\t${is(p?.hover?.border)}\n\t\t\t\t\t${ls(p?.hover?.shadow)}\n\t\t\t\t}\n\t\t\t\t${m} li.isSelected{\n\t\t\t\t\tborder: 2px solid ${u?.bg};\n\t\t\t\t}\n\t\t\t\t${m} li.memberSocialAdd button i{\n\t\t\t\t\tcolor: ${u?.bg};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})};Ll(dG.name)&&(0,p.registerBlockType)(dG,{icon:Vr,transforms:{from:[{type:"block",blocks:["tsb/team"],transform:e=>(0,p.createBlock)("b-blocks/team-members",e)},{type:"prefix",prefix:"counter",transform:()=>(0,p.createBlock)("b-blocks/team-members")}],to:[{type:"block",blocks:["tsb/team"],isMatch:e=>!!e,transform:e=>(0,
573 -p.createBlock)("tsb/team",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e,{members:a=[],columns:s,layout:r,isTitle:c,isSep:d,isBio:u,isSocial:p}=t,{desktop:g,tablet:b,mobile:f}=s||{},[k,w]=(0,m.useState)(0),[_,C]=(0,m.useState)(null),j=bBlocksPremiumChecker;(0,m.useEffect)((()=>{w(i&&a.length?0:null)}),[i]),(0,m.useEffect)((()=>{!i&&C(null)}),[i]);const $=(e,t,o,i=!1,s=!1)=>{const r=Rb(a,(n=>{!1!==i&&s?n[e][t][i][s]=o:n[e][t]=o}));n({members:r}),w(e)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(gG,{attributes:t,setAttributes:n,updateMember:$,activeIndex:k,setActiveIndex:w,isPremium:j}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(bG,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:`${mG} ${r||"vertical"} columns-${g} columns-tablet-${b} columns-mobile-${f}`,children:a.map(((e,t)=>{const{photo:n,name:o,title:a,bio:s,social:r=[]}=e;return(0,l.jsxs)("div",{onClick:()=>w(t),className:"teamMember "+(t===k?"bPlNowEditing":""),id:`teamMember-${t}`,children:[n?.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{className:`memberPhoto ${n?.id?`wp-image-${n?.id}`:null}`,src:n?.url,alt:n?.alt}),(0,ed.isBlobURL)(n?.url)&&(0,l.jsx)(y.Spinner,{})]}):(0,l.jsx)(nd,{label:(0,x.__)(" Member Photo:","b-blocks"),value:n,onChange:e=>$(t,"photo",e)}),(0,l.jsxs)("div",{className:"memberDetails",children:[(0,l.jsx)(h.RichText,{className:"memberName",tagName:"h4",value:o,onChange:e=>$(t,"name",e),placeholder:(0,x.__)("Member name","b-blocks"),inlineToolbar:!0}),c&&(0,l.jsx)(h.RichText,{className:"memberTitle",tagName:"p",value:a,onChange:e=>$(t,"title",e),placeholder:(0,x.__)("Member designation/title","b-blocks"),inlineToolbar:!0}),d&&(0,l.jsx)("span",{className:"memberSeparator"}),u&&(0,l.jsx)(h.RichText,{className:"memberBio",tagName:"p",value:s,onChange:e=>$(t,"bio",e),placeholder:(0,x.__)("Biography of the member","b-blocks"),inlineToolbar:!0}),p&&(0,l.jsx)("ul",{className:"memberSocial",children:r?.map(((e,n)=>{const{icon:o}=e;return(0,l.jsx)("li",{onClick:()=>C(n),className:`icon icon-${t}-${n} ${i&&t===k&&n===_?"isSelected":null}`,children:(0,l.jsx)("a",{href:"#",children:(0,l.jsx)("i",{className:o?.class})})},n)}))}),null!==_&&t===k&&(0,l.jsxs)("div",{className:"socialAction memberSocialForm",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.__experimentalInputControl,{value:r[_]?.link,onChange:e=>$(t,"social",e,_,"link")}),(0,l.jsx)(Un,{value:r[_]?.icon,onChange:e=>$(t,"social",e,_,"icon"),defaults:{class:"fab fa-facebook-f",fontSize:22},isSize:!1,isColor:!1}),(0,l.jsxs)("a",{className:"memberSocialRemove mt15",onClick:e=>{e.preventDefault(),$(t,"social",[...r.slice(0,_),...r.slice(_+1)]),C(null)},children:[(0,l.jsx)("i",{className:"fa fa-times"}),(0,x.__)("Remove this link","b-blocks")]})]}),i&&p&&t===k&&(0,l.jsx)("div",{className:"socialAction memberSocialAdd mt20",children:(0,l.jsxs)(y.Button,{showTooltip:!0,tooltipPosition:"top enter",label:(0,x.__)("Add Social Link","b-blocks"),onClick:()=>{$(t,"social",[...r,{link:"#",icon:{class:"fab fa-facebook-f"}}]),C(r.length)},children:[(0,l.jsx)("i",{className:"fa fa-plus"})," Add new social"]})})]})]},t)}))}),!a.length&&(0,l.jsx)("h3",{className:"addItemFirst",children:(0,x.__)("Please add a member first!","b-blocks")})]})]})},save:()=>null});const fG=JSON.parse('{"UU":"b-blocks/testimonials"}'),xG=({attributes:e,expanded:t,onChange:n})=>{const{elements:o}=e,{expandBtn:i,expandText:a,collapseText:s}=o;return i&&(0,l.jsx)("span",{className:"expandBtn",type:"button",onClick:n,children:t?s:a})},yG=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#000000",width:"20px",height:"20px",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M232 280L64 280 64 232 232 232 232 64 280 64 280 232 448 232 448 280 280 280 280 448 232 448 232 280Z"})}),vG=(e,t=0)=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:e,width:"15px",height:"15px",viewBox:"0 -32 576 576",children:(0,l.jsx)("path",{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"})},t),kG=(e,t)=>{let n=[];for(let o=1;o<=5;o++)o<=e?n.push(vG(t,o)):n.push(vG("#ccc",o));return n},wG={padding:{top:"10px",right:"15px",bottom:"10px",left:"15px"},image:{width:"70",height:"70"},imgBorder:{width:"1px",style:"solid",color:"#C6C6C652",radius:"50%"}},_G=(e,t)=>"default"===e?wG:"theme_1"===e?{...wG,image:{width:"70",height:"70"},imgBorder:{width:t?.width,style:t?.style,color:t?.color,side:"all",radius:"50%"}}:"theme_2"===e?{...wG,expandedColors:{bg:"#fbfbfb00"}}:"theme_3"===e?wG:"theme_4"===e?{...wG,padding:{top:"0px",right:"0px",bottom:"0px",left:"0px"},image:{width:"70",height:"70"},quoteIcon:{size:23}}:"theme_5"===e?{...wG,imgBorder:{width:"4px",style:"solid",color:"#C6C6C652",radius:"1px"},quoteIcon:{size:15}}:void 0,CG=[{label:(0,x.__)("Default","b-testimonials-block"),value:"default"},{label:(0,x.__)("Slider","b-testimonials-block"),value:"slider"},{label:(0,x.__)("Masonry","b-testimonials-block"),value:"masonry"}],jG=[{label:(0,x.__)("Default","b-testimonials-block"),value:"default"},{label:(0,x.__)("Theme-1","b-testimonials-block"),value:"theme_1"},{label:(0,x.__)("Theme-2","b-testimonials-block"),value:"theme_2"},{label:(0,x.__)("Theme-3","b-testimonials-block"),value:"theme_3"},{label:(0,x.__)("Theme-4","b-testimonials-block"),value:"theme_4"},{label:(0,x.__)("Theme-5","b-testimonials-block"),value:"theme_5"},{label:(0,x.__)("Theme-6","b-testimonials-block"),value:"theme_6"}],$G=((0,x.__)("Vertical","block-directory"),(0,x.__)("Horizontal","block-directory"),[{name:"general",title:(0,x.__)("General","b-testimonials-block")},{name:"style",title:(0,x.__)("Style","b-testimonials-block")}]),SG={img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/02/p-29.png"},name:"John Doe",deg:"Developer",reviewText:"It is a long-established fact that a reader will be distracted by the readable content of a page when looking at its layout",rating:4},TG=e=>{const{attributes:t,setAttributes:n,index:o}=e,{items:i}=t,{img:a,name:s,reviewText:r,deg:c,rating:d}=i[o]||{},u=(e,t,a=!1)=>{const s=Rb(i,(n=>{a?n[o][e][a]=t:n[o][e]=t}));n({items:s})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Image:","b-testimonials-block")}),(0,l.jsx)(ke,{value:a,type:["image"],onChange:e=>u("img",e),placeholder:(0,x.__)("Enter Image URL","b-testimonials-block")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Name","b-testimonials-block"),value:s,onChange:e=>u("name",e)}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Designation","b-testimonials-block"),value:c,onChange:e=>u("deg",e)}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Review","b-testimonials-block"),value:r,onChange:e=>u("reviewText",e)}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Rating:","b-testimonials-block"),labelPosition:"left",value:d,onChange:e=>u("rating",e),min:1,max:5})]})},NG=({attributes:e,setAttributes:t,setActiveIndex:n,activeIndex:o})=>{const{items:i}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Testimonials","b-testimonials-block"),children:(0,l.jsx)(_a,{value:i,onChange:t,attributes:e,setAttributes:t,arrKey:"items",newItem:SG,ItemSettings:TG,itemLabel:"Item",activeIndex:o,setActiveIndex:n,design:"sortable",title:"name"})})})},MG=e=>{const{attributes:t,setAttributes:n,setActiveIndex:o}=e,{columns:i,columnGap:a,rowGap:s,layout:r,theme:c,items:d,elements:u,background:p,padding:g,shadow:b,border:f,image:k,imgBorder:w,nameTypo:_,nameColor:C,degTypo:j,degColor:$,textTypo:S,textColor:T,starIconColor:N,textLength:M,grid2Bg:L,grid2Padding:P,slider:E}=t,[A,B]=(0,m.useState)("desktop"),{autoPlay:I,mouseWheel:O,navigation:R}=E,z=(e,o,i)=>{const a={...t[e]};a[o]=i,n({[e]:a})};return(0,
574 -l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:$G,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(NG,{...e}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Image","b-testimonials-block"),labelPosition:"left",checked:u?.img,onChange:e=>z("elements","img",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Name","b-testimonials-block"),labelPosition:"left",checked:u?.name,onChange:e=>z("elements","name",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Designation","b-testimonials-block"),labelPosition:"left",checked:u?.deg,onChange:e=>z("elements","deg",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Review Text","b-testimonials-block"),labelPosition:"left",checked:u?.reviewText,onChange:e=>z("elements","reviewText",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rating","b-testimonials-block"),labelPosition:"left",checked:u?.icon,onChange:e=>z("elements","icon",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Expanded Button","b-testimonials-block"),labelPosition:"left",checked:u?.expandBtn,onChange:e=>z("elements","expandBtn",e)})]}),u?.expandBtn&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{className:"",label:(0,x.__)("Expand Text","b-testimonials-block"),value:u?.expandText,onChange:e=>z("elements","expandText",e)}),(0,l.jsx)(y.TextControl,{className:"",label:(0,x.__)("Collapse Text","b-testimonials-block"),value:u?.collapseText,onChange:e=>z("elements","collapseText",e)})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0 mb0",children:(0,x.__)("Layout:","b-testimonials-block")}),(0,l.jsx)(y.SelectControl,{value:r,onChange:e=>n({layout:e}),options:CG})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0 mb0",children:(0,x.__)("Theme:","b-testimonials-block")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>n({theme:e,..._G(e,f)}),options:jG})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{mt:"0",children:(0,x.__)("Columns:","b-testimonials-block")}),(0,l.jsx)(Pa,{device:A,onChange:e=>B(e)})]}),(0,l.jsx)(y.RangeControl,{value:i[A],onChange:e=>{n({columns:{...i,[A]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-testimonials-block"),labelPosition:"left",value:a,onChange:e=>n({columnGap:e}),units:[Pe(30),Ee(3),Ae(2)],isResetValueOnUnitChange:!0}),"slider"!==r&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-testimonials-block"),labelPosition:"left",value:s,onChange:e=>n({rowGap:e}),units:[Pe(40),Ee(3),Ae(2.5)],isResetValueOnUnitChange:!0})]}),"slider"===r&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("AutoPlay","b-testimonials-block"),labelPosition:"left",checked:I,onChange:e=>z("slider","autoPlay",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("MouseWheel","b-testimonials-block"),labelPosition:"left",checked:O,onChange:e=>z("slider","mouseWheel",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Navigation","b-testimonials-block"),labelPosition:"left",checked:R,onChange:e=>z("slider","navigation",e)})]})]}),"style"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Background Color","b-testimonials-block"),value:p,onChange:e=>n({background:e})}),(0,l.jsx)(y.__experimentalBoxControl,{label:(0,x.__)("Padding","b-testimonials-block"),values:g,onChange:e=>n({padding:e}),resetValues:{top:"5px",right:"10px",bottom:"5px",left:"10px"},units:[Pe(3),Ae(2)]}),(0,l.jsx)(Jc,{className:"",label:(0,x.__)("Border","b-testimonials-block"),value:f,onChange:e=>n({border:e})}),(0,l.jsx)(od,{label:(0,x.__)("Shadow:","sound-cloud"),value:b,onChange:e=>n({shadow:e}),produce:Rb})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Width:","b-testimonials-block"),labelPosition:"left",value:k?.width,onChange:e=>z("image","width",e)}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Height:","b-testimonials-block"),labelPosition:"left",value:k?.height,onChange:e=>z("image","height",e)})]}),(0,l.jsx)(Jc,{className:"",label:(0,x.__)("Border","b-testimonials-block"),value:w,onChange:e=>n({imgBorder:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Name","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-testimonials-block"),value:_,onChange:e=>n({nameTypo:e}),produce:Rb}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Color","b-testimonials-block"),value:C,onChange:e=>n({nameColor:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Designation","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-testimonials-block"),value:j,onChange:e=>n({degTypo:e}),produce:Rb}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Color","b-testimonials-block"),value:$,onChange:e=>n({degColor:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Review Text","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-testimonials-block"),value:S,onChange:e=>n({textTypo:e}),produce:Rb}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Color","b-testimonials-block"),value:T,onChange:e=>n({textColor:e})}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Rating Icon Color","b-testimonials-block"),value:N,onChange:e=>n({starIconColor:e})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Excerpt length","b-testimonials-block"),labelPosition:"left",value:M,onChange:e=>{n({textLength:e})},min:10,max:1e3,step:1,beforeIcon:"grid-view"})]}),("theme_2"===r||"masonry"===r)&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Top","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Background Color","b-testimonials-block"),value:L,onChange:e=>n({grid2Bg:e})}),(0,l.jsx)(y.__experimentalBoxControl,{label:(0,x.__)("Padding","b-testimonials-block"),values:P,onChange:e=>n({grid2Padding:e}),resetValues:{top:"10px",right:"10px",bottom:"10px",left:"10px"},units:[Pe(3),Ae(2)]})]})]})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Item","b-blocks"),onClick:()=>{n({items:[...d,{img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/02/p-29.png"},name:"John Doe",deg:"Developer",reviewText:"It is a long-established fact that a reader will be distracted by the readable content of a page when looking at its layout",rating:4}]}),o(d.length)},children:(0,l.jsx)(y.Dashicon,{icon:"plus",size:23})})})})]})},LG=({attributes:e,id:t})=>{const{columnGap:n,rowGap:o,background:i,padding:a,border:s,shadow:r,image:c,imgBorder:d,nameTypo:u,nameColor:p,degTypo:h,degColor:g,textTypo:m,textColor:b,expandedTypo:f,grid2Bg:x,grid2Padding:y}=e,v=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
575 -__html:`\n\t\t${ps("",u)?.googleFontLink}\n\t\t${ps("",h)?.googleFontLink}\n\t\t${ps("",m)?.googleFontLink}\n\t\t${ps("",f)?.googleFontLink}\n\t\t${ps(`${v} .layoutSection .single .name`,u)?.styles}\n\t\t${ps(`${v} .layoutSection .single .deg`,h)?.styles}\n\t\t${ps(`${v} .layoutSection .single .reviewText`,m)?.styles}\n\n\t\t${v} .slider-layout .swiper-slide {\n\t\t\t \n\t\t} \n\n\t\t${v} .layoutSection {\n\t\t\tgrid-gap: ${o} ${n};\n\t\t}\n\n\t\t${v} .theme_2 .single .top, ${v} .masonry .single .top {\n\t\t\tbackground:${x};\n\t\t\tpadding:${he(y)};\n\t\t}\n\n\t\t${v} .masonry .single .top::after {\n\t\t\tborder-right: 27px solid ${x};\n\t\t}\n\n\t\t${v} .theme_4 .single .bottom{\n\t\t\tborder-top:${s?.width} ${s?.style} ${s?.color};\n\t\t}\n\n\t\t${v} .theme_4 .single .info {\n\t\t\tborder-left: ${s?.width} ${s?.style} ${s?.color};\n\t\t}\n\n\t\t${v} .layoutSection .single {\n\t\t\tbackground:${i};\n\t\t\tpadding:${he(a)};\n\t\t\t${is(s)};\n\t\t\tbox-shadow: ${ds(r)};\n\t\t}\n \n\t\t${v} .layoutSection .single .img{\n\t\t\twidth:${c?.width}px;\n\t\t\theight:${c?.height}px;\n\t\t\t${is(d)};\n\t\t}\n\n\t\t${v} .layoutSection .single .name{\n\t\t\tcolor:${p};\n\t\t}\n\n\t\t${v} .layoutSection .single .deg{\n\t\t\tcolor:${g};\n\t\t}\n\n\t\t${v} .layoutSection .single .reviewText{\n\t\t\tcolor:${b};\n\t\t}\n\n\t`}})},PG=({attributes:e,children:t,img:n})=>{const{elements:o}=e;return o?.img&&(0,l.jsx)("div",{className:"authorImg",children:(0,l.jsxs)("div",{className:"img",children:[(0,l.jsx)("img",{src:n?.url,alt:n?.title}),t]})})},EG=({attributes:e,itemEls:t})=>{const{elements:n}=e;return n.reviewText&&t?.reviewText},AG=({attributes:e,getStar:t,rating:n,starIconColor:o})=>{const{elements:i}=e;return i?.icon&&(0,l.jsx)("div",{className:"rating",children:t(n,o)})},BG=({item:e,index:t,itemEls:n,attributes:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r}=o,{img:c,reviewText:d,rating:u}=e;return(0,l.jsxs)("div",{className:"single "+(s&&t===i?"btbNowEditing":""),onClick:()=>s&&a(t),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(PG,{attributes:o,img:c,children:n.img}),(0,l.jsxs)("div",{className:"info",children:[n.name,n.deg]})]}),(0,l.jsx)(AG,{attributes:o,getStar:kG,rating:u,starIconColor:r}),(0,l.jsx)("div",{className:"body",children:(0,l.jsx)(EG,{attributes:o,itemEls:n,isBackend:s,reviewText:d})})]},t)},IG=({attributes:e,itemEls:t,item:n,index:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r}=e,{img:c,reviewText:d,rating:u}=n;return(0,l.jsxs)("div",{className:"single "+(s&&o===i?"btbNowEditing":""),onClick:()=>s&&a(o),children:[(0,l.jsx)("div",{className:"top",children:(0,l.jsx)(PG,{attributes:e,img:c,children:t.img})}),(0,l.jsx)("div",{className:"body",children:(0,l.jsx)(EG,{itemEls:t,attributes:e,isBackend:s,reviewText:d})}),(0,l.jsxs)("div",{className:"footer",children:[(0,l.jsxs)("div",{className:"info",children:[t.name,t.deg]}),(0,l.jsx)(AG,{attributes:e,getStar:kG,rating:u,starIconColor:r})]})]},o)},OG=({attributes:e,itemEls:t,item:n,index:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r,grid2Bg:c}=e,{img:d,reviewText:u,rating:p}=n;return(0,l.jsxs)("div",{className:"single "+(s&&o===i?"btbNowEditing":""),onClick:()=>s&&a(o),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(AG,{attributes:e,getStar:kG,rating:p,starIconColor:r}),(0,l.jsx)(EG,{attributes:e,itemEls:t,isBackend:s,reviewText:u}),(0,l.jsx)("div",{className:"icon",children:(h=c,(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20px",height:"20px",viewBox:"0 0 19 13",fill:h,style:{left:"24px"},children:(0,l.jsx)("path",{d:"M0.965704 0.000125914H10.3736L19 5.15272e-05C19 5.15272e-05 16.2331 5.15665 10.3736 8.99489C6.68171 11.4132 3.12703 12.3741 1.00222 12.7541C0.488597 12.8459 0.227225 12.1436 0.617463 11.7973C2.03909 10.5355 3.88298 8.3072 3.88294 5.23718C3.88287 9.44134e-05 0.965704 0.000125914 0.965704 0.000125914Z"})}))})]}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsx)(PG,{attributes:e,img:d,children:t.img}),(0,l.jsxs)("div",{className:"info",children:[t.name,t.deg]})]})]},o);var h},RG=({attributes:e,itemEls:t,item:n,index:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r}=e,{img:c,reviewText:d,rating:u}=n;return(0,l.jsxs)("div",{className:"single "+(s&&o===i?"btbNowEditing":""),onClick:()=>s&&a(o),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(EG,{attributes:e,itemEls:t,isBackend:s,reviewText:d},o),(0,l.jsx)(AG,{attributes:e,getStar:kG,rating:u,starIconColor:r},o)]}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsxs)("div",{className:"info",children:[t.name,t.deg]}),(0,l.jsx)(PG,{attributes:e,img:c,children:t.img})]})]},o)},zG=({itemEls:e,item:t,index:n,attributes:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{nameColor:r,quoteIcon:c}=o,{img:d,reviewText:u}=t;return(0,l.jsxs)("div",{className:"single "+(s&&n===i?"btbNowEditing":""),onClick:()=>s&&a(n),children:[(0,l.jsx)("div",{className:"top",children:(0,l.jsx)(PG,{attributes:o,img:d,children:e.img})}),(0,l.jsx)("div",{className:"body",children:(0,l.jsx)(EG,{attributes:o,itemEls:e,isBackend:s,reviewText:u})}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsx)("div",{className:"rightQuote",children:(p=r,h=c?.size,(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:p,width:h,height:h,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"})}))}),(0,l.jsxs)("div",{className:"info",children:[e.name,e.deg]})]})]},n);var p,h},DG=({itemEls:e,item:t,index:n,attributes:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r}=o,{img:c,reviewText:d,rating:u}=t;return(0,l.jsxs)("div",{className:"single "+(s&&n===i?"btbNowEditing":""),onClick:()=>s&&a(n),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(PG,{attributes:o,img:c,children:e.img}),(0,l.jsx)("div",{className:"right",children:(0,l.jsx)(EG,{attributes:o,itemEls:e,isBackend:s,reviewText:d})})]}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsxs)("div",{className:"info",children:[e.name,e.deg]}),(0,l.jsx)(AG,{attributes:o,getStar:kG,rating:u,starIconColor:r})]})]},n)},FG=({itemEls:e,item:t,index:n,attributes:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r}=o,{img:c,reviewText:d,rating:u}=t;return(0,l.jsxs)("div",{className:"single "+(s&&n===i?"btbNowEditing":""),onClick:()=>s&&a(n),children:[(0,l.jsx)("div",{className:"top",children:(0,l.jsx)(EG,{attributes:o,itemEls:e,isBackend:s,reviewText:d})}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsx)(PG,{attributes:o,img:c,children:e.img}),(0,l.jsxs)("div",{className:"info",children:[e.name,e.deg,(0,l.jsx)(AG,{attributes:o,getStar:kG,rating:u,starIconColor:r},n)]})]})]},n)},HG=({attributes:e,itemsEls:t,itemProps:n})=>{const{items:o,slider:i,columnGap:a,theme:s,columns:r}=e,{desktop:c,tablet:d,mobile:u}=r,{autoPlay:p,mouseWheel:h,navigation:g}=i,[b,f]=(0,m.useState)(!0),x=()=>(0,l.jsx)(Wx,{modules:[Lf,Bf,If,Nf],spaceBetween:a,slidesPerView:u,breakpoints:{576:{slidesPerView:d},768:{slidesPerView:c}},autoplay:p,mousewheel:h,navigation:g,pagination:!0,scrollbar:{draggable:!0},loop:!0,children:o.map(((e,o)=>{const i={item:e,index:o,itemEls:t[o],...n};switch(s){case"default":return(0,l.jsx)(Ux,{children:(0,l.jsx)(BG,{...i})},o);case"theme_1":return(0,l.jsx)(Ux,{children:(0,l.jsx)(IG,{...i})},o);case"theme_2":return(0,l.jsx)(Ux,{children:(0,l.jsx)(OG,{...i})},o);case"theme_3":return(0,l.jsx)(Ux,{children:(0,l.jsx)(RG,{...i})},o);case"theme_4":return(0,l.jsx)(Ux,{children:(0,l.jsx)(zG,{...i})},o);case"theme_5":return(0,l.jsx)(Ux,{children:(0,
576 -l.jsx)(DG,{...i})},o);case"theme_6":return(0,l.jsx)(Ux,{children:(0,l.jsx)(FG,{...i})},o);default:return null}}))});return(0,m.useEffect)((()=>{f(!b)}),[o,i,a,s,r]),(0,l.jsx)(x,{})},WG=({itemsEls:e,ToolbarButton:t,MediaUpload:n,MediaUploadCheck:o,attributes:i,setActiveIndex:a,activeIndex:s,updateItem:r,isBackend:c=!1,__,RichText:d})=>{const{items:u,columnGap:p,rowGap:h,layout:g,theme:m,columns:b}=i,{desktop:f,tablet:x,mobile:y}=b,v={attributes:i,setActiveIndex:a,activeIndex:s,updateItem:r,isBackend:c,__,RichText:d,MediaUpload:n,MediaUploadCheck:o,ToolbarButton:t},k=(t,n)=>{const o={item:t,index:n,itemEls:e[n],...v};switch(m){case"default":return(0,l.jsx)(BG,{...o});case"theme_1":return(0,l.jsx)(IG,{...o});case"theme_2":return(0,l.jsx)(OG,{...o});case"theme_3":return(0,l.jsx)(RG,{...o});case"theme_4":return(0,l.jsx)(zG,{...o});case"theme_5":return(0,l.jsx)(DG,{...o});case"theme_6":return(0,l.jsx)(FG,{...o});default:return null}};return(0,l.jsx)("div",{className:`layoutSection ${g}-layout ${m} columns-${f} columns-tablet-${x} columns-mobile-${y}`,children:(()=>{switch(g){case"masonry":return(0,l.jsx)(sR,{columnsCountBreakPoints:{0:y,576:x,768:f},children:(0,l.jsx)(rR,{columnsCount:3,gutter:`${h} ${p}`,children:u.map(((e,t)=>k(e,t)))})});case"slider":return(0,l.jsx)(HG,{attributes:i,itemsEls:e,itemProps:v});case"default":return u.map(((e,t)=>k(e,t)));default:return null}})()})},UG=(0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,selectBlock:a}=e,{items:s,elements:r,textLength:c}=t;(0,m.useEffect)((()=>{o&&n({cId:o.substring(0,10)})}),[o]),(0,m.useEffect)((()=>me()),[i]);const[d,u]=(0,m.useState)(0),p=(e,t,o=!1)=>{const i=Rb(s,(n=>{o?n[d][e][o]=t:n[d][e]=t}));n({items:i})},g=s.map((e=>{const{name:n,deg:o,img:i,reviewText:a}=e,s=(d=a,d.replace(/(<([^>]+)>)/gi,"")).length;var d;return{img:(0,l.jsx)("div",{className:"upload",children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],value:i,onSelect:({id:e,url:t,alt:n,title:o})=>p("img",{id:e,url:t,alt:n,title:o}),render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{label:"upload",icon:yG,onClick:e})})})}),name:r?.name&&(0,l.jsx)(h.RichText,{tagName:"h3",className:"name",value:n,onChange:e=>p("name",e),placeholder:(0,x.__)("Enter your name","b-testimonials-block"),inlineToolbar:!0}),deg:r?.deg&&(0,l.jsx)(h.RichText,{tagName:"h5",className:"deg",value:o,onChange:e=>p("deg",e),placeholder:(0,x.__)("Enter your designation","b-testimonials-block"),inlineToolbar:!0}),reviewText:(0,l.jsx)(GG,{attributes:t,elements:r,contentLength:s,textLength:c,reviewText:a,updateItem:p})}}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(MG,{attributes:t,setAttributes:n,updateItem:p,activeIndex:d,setActiveIndex:u}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),onClick:()=>a(o),children:[(0,l.jsx)(LG,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:"btbTestimonialsDir",children:(0,l.jsx)(WG,{itemsEls:g,ToolbarButton:y.ToolbarButton,MediaUpload:h.MediaUpload,MediaUploadCheck:h.MediaUploadCheck,isBackend:!0,attributes:t,activeIndex:d,setActiveIndex:u,updateItem:p,__:x.__,RichText:h.RichText})})]})]})})),GG=({attributes:e,elements:t,contentLength:n,textLength:o,reviewText:i,updateItem:a})=>{const[s,r]=(0,m.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[t?.reviewText&&(0,l.jsx)(h.RichText,{tagName:"p",className:"reviewText",value:i,onChange:e=>a("reviewText",e),placeholder:(0,x.__)("Enter your review","b-testimonials-block"),inlineToolbar:!0}),n>o&&(0,l.jsx)(xG,{attributes:e,reviewText:i,expanded:s,onChange:()=>r(!s)})]})};Ll(fG.UU)&&(0,p.registerBlockType)(fG.UU,{icon:Xr,edit:UG})
577 -;const VG=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/timeline","title":"Timeline","category":"bBlocks","description":"A vertical timeline. Each entry is a Timeline Item child block holding a date, an icon marker and any inner blocks you like.","keywords":["timeline","history","roadmap","events","milestones","steps"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"desktop":{"direction":"vertical","side":"alternate","itemGap":"10px","cardWidth":"100%","cardGap":"0px","markerGap":"10px"},"tablet":{"direction":"","side":"","itemGap":"","cardWidth":"","cardGap":"","markerGap":""},"mobile":{"direction":"","side":"","itemGap":"","cardWidth":"","cardGap":"","markerGap":""}}},"connector":{"type":"object","default":{"line":{"show":true,"style":"solid","bg":{"type":"solid","color":"#d9d9d9"},"progress":false,"activeBg":{"type":"solid","color":"#1e1e1e"},"progressFade":false,"extent":"markers","desktop":{"width":"2px","dash":"8px","gap":"6px"},"tablet":{"width":"","dash":"","gap":""},"mobile":{"width":"","dash":"","gap":""}},"arrow":{"show":true,"align":"center","color":"","desktop":{"size":"14px","offset":"16px"},"tablet":{"size":"","offset":""},"mobile":{"size":"","offset":""}}}},"marker":{"type":"object","default":{"shape":"circle","transition":300,"pulse":{"show":false,"bg":{"type":"solid","color":""},"speed":2400},"normal":{"bg":{"type":"solid","color":"#efefef"},"color":{"icon":"#1e1e1e"},"border":{"width":"0px"},"ring":{"width":"0px","style":"solid","offset":"0px","color":""},"shadow":[]},"hover":{"bg":{"type":"solid","color":""},"color":{"icon":""},"border":{},"ring":{"width":"","style":"","offset":"","color":""},"shadow":[]},"desktop":{"size":"34px","iconSize":"16px","radius":{}},"tablet":{"size":"","iconSize":"","radius":{}},"mobile":{"size":"","iconSize":"","radius":{}}}},"card":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#efefef"},"border":{"width":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]},"hover":{"bg":{"type":"solid","color":""},"border":{}},"desktop":{"padding":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{},"radius":{}},"mobile":{"padding":{},"radius":{}}}},"date":{"type":"object","default":{"show":true,"color":"#1e1e1e","typo":{"fontSize":{"desktop":"16px"}},"desktop":{"gap":"16px"},"tablet":{"gap":""},"mobile":{"gap":""}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),qG=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],YG=[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}],KG=YG.map((e=>e.value)),QG=[{label:(0,x.__)("Alternate","b-blocks"),value:"alternate"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}].map((e=>e.value)),ZG=[{label:(0,x.__)("Between markers","b-blocks"),value:"markers"},{label:(0,x.__)("Full length","b-blocks"),value:"full"}],XG=ZG.map((e=>e.value)),JG=["start","center","end"],eV=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"},{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Diamond","b-blocks"),value:"diamond"},{label:(0,x.__)("Hexagon","b-blocks"),value:"hexagon"}],tV=(eV.map((e=>e.value)),{circle:"50%",rounded:"25%",square:"0",diamond:"0",hexagon:"0"}),nV=["hexagon"],oV={diamond:45},iV=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],aV=(iV.map((e=>e.value)),(e={})=>{const{width:t,style:n,offset:o,color:i}=e;return[t?`outline-width: ${t};`:"",n?`outline-style: ${n};`:"",i?`outline-color: ${i};`:"",o?`outline-offset: ${o};`:""].filter(Boolean).join(" ")}),sV=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"}],rV=sV.map((e=>e.value)),lV=["dashed","dotted"],cV=((0,x.__)("Auto (follow layout)","b-blocks"),(0,x.__)("Left","b-blocks"),(0,x.__)("Right","b-blocks"),"b-blocks/timeline"),dV="b-blocks/timeline-item",uV=[dV],pV="<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'><path d='M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z'/></svg>",hV=e=>[["core/heading",{level:3,content:e}],["core/paragraph",{content:(0,x.__)("Describe what happened at this point on the timeline.","b-blocks")}]],gV=[[dV,{date:"01-01-2026",icon:pV},hV((0,x.__)("First milestone","b-blocks"))],[dV,{date:"01-01-2026",icon:pV},hV((0,x.__)("Second milestone","b-blocks"))],[dV,{date:"01-01-2026",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z'/></svg>"},hV((0,x.__)("Third milestone","b-blocks"))]],mV=(e,t)=>{if(null==t)return e;if(Array.isArray(t)){
578 -const n=e&&"object"==typeof e&&!Array.isArray(e);return 0===t.length&&n?e:t}if("object"!=typeof t)return t;if(!e||"object"!=typeof e||Array.isArray(e))return t;const n={...e};return Object.keys(t).forEach((o=>{n[o]=mV(e[o],t[o])})),n},bV=Object.fromEntries(Object.entries(VG.attributes).map((([e,t])=>[e,t.default]))),fV=(e={})=>mV(bV,e),xV=(e={})=>{const{layout:t={},connector:n={},date:o={}}=e,{line:i={},arrow:a={}}=n,s=(e,n,o,i)=>("desktop"===e?[t.desktop?.[n]]:"tablet"===e?[t.tablet?.[n],t.desktop?.[n]]:[t.mobile?.[n],t.tablet?.[n],t.desktop?.[n]]).find((e=>o.includes(e)))||i,r=e=>s(e,"side",QG,"alternate"),l=e=>s(e,"direction",KG,"vertical"),c=XG.includes(i.extent)?i.extent:"markers",d=rV.includes(i.style)?i.style:"solid",u=JG.includes(a.align)?a.align:"center";return["b-blocks-timeline",`b-blocks-timeline-desktop-${l("desktop")}`,`b-blocks-timeline-tablet-${l("tablet")}`,`b-blocks-timeline-mobile-${l("mobile")}`,`b-blocks-timeline-desktop-${r("desktop")}`,`b-blocks-timeline-tablet-${r("tablet")}`,`b-blocks-timeline-mobile-${r("mobile")}`,!1===i.show?"b-blocks-timeline-no-line":"",`b-blocks-timeline-line-${d}`,i.progress?"b-blocks-timeline-progress":"",i.progress&&i.progressFade?"b-blocks-timeline-progress-fade":"","full"===c?"b-blocks-timeline-line-full":"",!1===a.show?"b-blocks-timeline-no-arrow":"",`b-blocks-timeline-arrow-${u}`,!1===o.show?"b-blocks-timeline-no-date":""].filter(Boolean).join(" ")},yV=(e={})=>["b-blocks-timeline-item",["left","right"].includes(e.side)?`b-blocks-timeline-side-${e.side}`:"",JG.includes(e.arrowAlign)?`b-blocks-timeline-item-arrow-${e.arrowAlign}`:""].filter(Boolean).join(" "),vV=e=>{const t=tV[e];return`${void 0===t?"":`border-radius: ${t};`} ${nV.includes(e)?"clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);":""}`},kV=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:a,connector:s,marker:r,card:c,date:d,advanced:u}=fV(e),{line:p,arrow:h}=s,g=oV[r.shape]||0,m=nV.includes(r.shape),b=os(r.pulse?.bg,!0,!0,!1)||os(r.normal.bg,!0,!0,!1),f=`#${o}`,x=`${f} .b-blocks-timeline-items`,y=`${f} .b-blocks-timeline-item`,v=`${f} .b-blocks-timeline-content`,k=`${f} .b-blocks-timeline-card`,w=`${f} .b-blocks-timeline-marker`,_=`${f} .b-blocks-timeline-date`,C=e=>"horizontal"!==(e=>("desktop"===e?a.desktop?.direction:"tablet"===e?a.tablet?.direction||a.desktop?.direction:a.mobile?.direction||a.tablet?.direction||a.desktop?.direction)||"vertical")(e),j=(e,t)=>"desktop"===e?p.desktop[t]:"tablet"===e?p.tablet[t]||p.desktop[t]:p.mobile[t]||p.tablet[t]||p.desktop[t],$=lV.includes(p.style),S=(e,t,n,o)=>`\n\t\t${f} .b-blocks-timeline-item ${t}{ ${n} }\n\t\t${f}.b-blocks-timeline-${e}-right .b-blocks-timeline-item ${t}{ ${o} }\n\t\t${f}.b-blocks-timeline-${e}-alternate .b-blocks-timeline-item:where(:nth-of-type(even)) ${t}{ ${o} }\n\t\t${f} .b-blocks-timeline-item.b-blocks-timeline-side-left ${t}{ ${n} }\n\t\t${f} .b-blocks-timeline-item.b-blocks-timeline-side-right ${t}{ ${o} }\n\t`,T=e=>{const t=C(e),n=r[e].size,o=g&&n?`calc(${n} / 1.4142)`:n,i=j(e,"width"),s=n?`calc(${n} / 2)`:"17px",l="full"===p.extent?"0px":s,u=`var(--bb-tl-line-start, ${l})`,m=`var(--bb-tl-line-end, ${l})`,b=t?`top: ${u}; bottom: ${m}; left: 50%; right: auto; transform: translateX(-50%);`:`left: ${u}; right: ${m}; top: var(--bb-tl-line-cross, 50%); bottom: auto; transform: translateY(-50%);`,_=a[e].cardGap||"0px",T=h[e].size||"14px",N=h[e].offset||"16px",M=d[e].gap||"16px",L="solid"===(c.normal.bg?.type||"solid")?c.normal.bg?.color:"",P=h.color||L||"#efefef",E=!1===h.show?"0px":T,A=(e,n)=>t?`padding-inline: ${e} ${n};`:`padding-block: ${e} ${n};`,B=`\n\t\t\t${S(e,".b-blocks-timeline-content",A("0",`calc(${_} + ${E})`),A(`calc(${_} + ${E})`,"0"))}\n\t\t\t${S(e,".b-blocks-timeline-date",A(M,"0"),A("0",M))}\n\t\t`,I=(n,o)=>{const i=(n=>{const o=`calc((100% - ${((e,t)=>"desktop"===e?a.desktop[t]:"tablet"===e?a.tablet[t]||a.desktop[t]:a.mobile[t]||a.tablet[t]||a.desktop[t])(e,"cardWidth")||"100%"}) / 2)`,i=t?`calc(${N} + ${T})`:`calc(${o} + ${N} + ${T})`,s=(e,n)=>t?`margin-block: ${e} ${n};`:`margin-inline: ${e} ${n};`;return"center"===n?{arrow:"",anchor:`${s("0","0")}`}:{arrow:(r=n,(t?"start"===r?`top: ${N}; bottom: auto;`:`top: auto; bottom: ${N};`:"start"===r?`inset-inline-start: ${N}; inset-inline-end: auto;`:`inset-inline-start: auto; inset-inline-end: ${N};`)+" transform: none;"),anchor:"start"===n?s(i,"0"):s("0",i)};var r})(o);return`\n\t\t\t\t${n} .b-blocks-timeline-card::after{ ${i.arrow} }\n\t\t\t\t${n} .b-blocks-timeline-marker,\n\t\t\t\t${n} .b-blocks-timeline-date{ ${i.anchor} }\n\t\t\t`};return`\n\t\t${B}\n\t\t${k}::after{\n\t\t\t${ns("width",t?T:`calc(${T} * 2)`)}\n\t\t\t${ns("height",t?`calc(${T} * 2)`:T)}\n\t\t\t${ns("background",P)}\n\t\t}\n\t\t${I(`${f} .b-blocks-timeline-item`,h.align||"center")}\n\t\t${["start","center","end"].map((e=>I(`${f} .b-blocks-timeline-item.b-blocks-timeline-item-arrow-${e}`,e))).join("")}\n\n\t\t${x}{\n\t\t\t${ns(t?"row-gap":"column-gap",a[e].itemGap)}\n\t\t}\n\t\t${x}::before,\n\t\t${x}::after{\n\t\t\t${(e=>{return $?(t=(e=>{const t=C(e),n=j(e,"gap")||"6px";if("dotted"===p.style){const o=j(e,"width")||"2px";return{image:"radial-gradient(circle closest-side, #000 99%, transparent 100%)",size:t?`${o} calc(${o} + ${n})`:`calc(${o} + ${n}) ${o}`,repeat:t?"repeat-y":"repeat-x"}}const o=j(e,"dash")||"8px";return{image:`repeating-linear-gradient(${t?"to bottom":"to right"}, #000 0 ${o}, transparent ${o} calc(${o} + ${n}))`,size:"auto",repeat:"repeat"}})(e),`\n\t\t\t-webkit-mask-image: ${t.image};\n\t\t\tmask-image: ${t.image};\n\t\t\t-webkit-mask-size: ${t.size};\n\t\t\tmask-size: ${t.size};\n\t\t\t-webkit-mask-repeat: ${t.repeat};\n\t\t\tmask-repeat: ${t.repeat};\n\t\t\t-webkit-mask-position: center;\n\t\t\tmask-position: center;\n\t`):"";var t})(e)}\n\t\t}\n\t\t${x}::before{\n\t\t\t${b}\n\t\t\t${os(p.bg)}\n\t\t\t${ns("width",t?i:"auto")}\n\t\t\t${ns("height",t?"auto":i)}\n\t\t}\n\t\t${x}::after{\n\t\t\t${b}\n\t\t\t${os(p.activeBg)}\n\t\t\t${ns("width",t?i:"auto")}\n\t\t\t${ns("height",t?"auto":i)}\n\t\t}\n\t\t${y}{\n\t\t\t${ns(t?"column-gap":"row-gap",a[e].markerGap)}\n\t\t}\n\t\t${v}{\n\n\t\t}\n\t\t${k}{\n\t\t\t${ns("width",a[e].cardWidth)}\n\t\t\t${ns("padding",hs(c[e].padding))}\n\t\t\t${ns("border-radius",hs(c[e].radius))}\n\t\t}\n\t\t${w}{\n\t\t\t${ns("width",o)}\n\t\t\t${ns("height",o)}\n\t\t\t${ns("font-size",r[e].iconSize)}\n\t\t\t${ns("border-radius",hs(r[e].radius))}\n\t\t}\n\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
579 -__html:`\n\t\t\t${ps("",d.typo).googleFontLink}\n\t\t\t${ps(_,d.typo).styles}\n\n\t\t\t${k}{\n\t\t\t\t${os(c.normal.bg)}\n\t\t\t\t${as(c.normal.border)}\n\t\t\t\t${ns("box-shadow",ls(c.normal.shadow||[]))}\n\t\t\t}\n\t\t\t${k}:hover{\n\t\t\t\t${os(c.hover.bg)}\n\t\t\t\t${as(c.hover.border)}\n\t\t\t}\n\t\t\t${w}{\n\t\t\t\t${os(r.normal.bg)}\n\t\t\t\t${ns("color",r.normal.color.icon)}\n\t\t\t\t${as(r.normal.border)}\n\t\t\t\t${vV(r.shape)}\n\t\t\t\t${m?"":aV(r.normal.ring)}\n\t\t\t\t${ns("box-shadow",ls(r.normal.shadow||[]))}\n\t\t\t\t${g?`rotate: ${g}deg;`:""}\n\t\t\t\t${r.transition?`transition: background ${r.transition}ms ease, color ${r.transition}ms ease, border-color ${r.transition}ms ease, outline-color ${r.transition}ms ease, outline-offset ${r.transition}ms ease, box-shadow ${r.transition}ms ease;`:""}\n\t\t\t}\n\t\t\t${g?`${w} svg{ rotate: -${g}deg; }`:""}\n\t\t\t${w}:hover{\n\t\t\t\t${os(r.hover.bg)}\n\t\t\t\t${ns("color",r.hover.color.icon)}\n\t\t\t\t${as(r.hover.border)}\n\t\t\t\t${m?"":aV(r.hover.ring)}\n\t\t\t\t${ns("box-shadow",ls(r.hover.shadow||[]))}\n\t\t\t}\n\t\t\t${r.pulse?.show&&!m?`\n\t\t\t\t${w}::after{\n\t\t\t\t\t${b}\n\t\t\t\t\tanimation-name: bb-tl-marker-pulse;\n\t\t\t\t\t${ns("animation-duration",r.pulse.speed?`${r.pulse.speed}ms`:"")}\n\t\t\t\t}\n\t\t\t`:""}\n\t\t\t${_}{\n\t\t\t\t${ns("color",d.color)}\n\t\t\t}\n\n\t\t\t${T("desktop")}\n\n\t\t\t${t}{\n\t\t\t\t${T("tablet")}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t${T("mobile")}\n\t\t\t}\n\n\t\t\t${_s(o,u,i,!1)}\n\t\t\t`}})},wV=e=>Math.round(1e3*e)/1e3,_V=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{layout:o}=e,i="horizontal"===(e=>("desktop"===e?o.desktop.direction:"tablet"===e?o.tablet.direction||o.desktop.direction:o.mobile.direction||o.tablet.direction||o.desktop.direction)||"vertical")(t),a=[..."desktop"===t?[]:[{label:(0,x.__)("Default","b-blocks"),value:""}],{label:(0,x.__)("Alternate","b-blocks"),value:"alternate"},{label:i?(0,x.__)("Above","b-blocks"):(0,x.__)("Left","b-blocks"),value:"left"},{label:i?(0,x.__)("Below","b-blocks"):(0,x.__)("Right","b-blocks"),value:"right"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Layout","b-blocks"),children:[(0,l.jsx)(y.__experimentalToggleGroupControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Direction","b-blocks")," ",(0,l.jsx)(_,{})]}),help:i?(0,x.__)("Entries run left to right along a horizontal line. Set a narrower breakpoint to turn it upright on smaller screens.","b-blocks"):(0,x.__)("Entries run top to bottom along a vertical line.","b-blocks"),value:o[t].direction||"",onChange:e=>n("layout",e,t,"direction"),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[..."desktop"===t?[]:[{label:(0,x.__)("Default","b-blocks"),value:""}],...YG].map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.__experimentalToggleGroupControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Side","b-blocks")," ",(0,l.jsx)(_,{})]}),help:(0,x.__)("Alternate places entries on opposite sides. Set a narrower breakpoint to change it there — one card per row on phones, say. Any single entry can override this from its own settings.","b-blocks"),value:o[t].side||"",onChange:e=>n("layout",e,t,"side"),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:a.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap Between Entries","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",units:[Pe(),Ae(),Ee()],isUnitSelectTabbable:!0,value:o[t].itemGap,onChange:e=>n("layout",e,t,"itemGap")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Card Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Ee(),Pe(),Ae()],isUnitSelectTabbable:!0,value:o[t].cardWidth,onChange:e=>n("layout",e,t,"cardWidth")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Card Offset From Line","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",units:[Pe(),Ae(),Ee()],isUnitSelectTabbable:!0,value:o[t].cardGap,onChange:e=>n("layout",e,t,"cardGap")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Marker Spacing","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:o[t].markerGap,onChange:e=>n("layout",e,t,"markerGap")})]})})),CV=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{layout:o,connector:i}=e,{line:a,arrow:s}=i,r="horizontal"===(("desktop"===t?o.desktop.direction:"tablet"===t?o.tablet.direction||o.desktop.direction:o.mobile.direction||o.tablet.direction||o.desktop.direction)||"vertical"),c=lV.includes(a.style),d=[{label:r?(0,x.__)("Left","b-blocks"):(0,x.__)("Top","b-blocks"),value:"start"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:r?(0,x.__)("Right","b-blocks"):(0,x.__)("Bottom","b-blocks"),value:"end"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Connectors","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Line","b-blocks"),checked:!!a.show,onChange:e=>n("connector",e,"line","show"),__nextHasNoMarginBottom:!0}),a.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Line Style","b-blocks"),value:a.style,options:sV,onChange:e=>n("connector",e,"line","style"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Line Length","b-blocks"),labelPosition:"edge",help:(0,x.__)("Between markers stops the line at the first and last marker; full length runs it edge to edge.","b-blocks"),value:a.extent,options:ZG,onChange:e=>n("connector",e,"line","extent"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Line Thickness","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:a[t].width,onChange:e=>n("connector",e,"line",t,"width")}),c&&(0,l.jsxs)(l.Fragment,{children:["dashed"===a.style&&(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Dash Length","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:a[t].dash,onChange:e=>n("connector",e,"line",t,"dash")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,help:"dotted"===a.style?(0,x.__)("Space between dots. The dot size follows the line thickness.","b-blocks"):(0,x.__)("Space between dashes.","b-blocks"),value:a[t].gap,onChange:e=>n("connector",e,"line",t,"gap")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Progress","b-blocks"),help:(0,x.__)("Fills the line as the reader scrolls down it. Works with any line style — the fill follows the same shape.","b-blocks"),checked:!!a.progress,onChange:e=>n("connector",e,"line","progress"),__nextHasNoMarginBottom:!0}),a.progress&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fade Trailing End","b-blocks"),help:(0,x.__)("Dissolves the far end of the fill into the track, so it reads as a beam following the reader rather than a filled bar.","b-blocks"),checked:!!a.progressFade,onChange:e=>n("connector",e,"line","progressFade"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Arrow","b-blocks"),help:(0,
580 -x.__)("The small arrow that points from a card back to the line.","b-blocks"),checked:!!s.show,onChange:e=>n("connector",e,"arrow","show"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("br",{}),s.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalToggleGroupControl,{label:(0,x.__)("Arrow Alignment","b-blocks"),value:s.align,onChange:e=>n("connector",e,"arrow","align"),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:d.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Arrow Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:s[t].size,onChange:e=>n("connector",e,"arrow",t,"size")}),"center"!==s.align&&(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Arrow Offset","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae(),Ee()],isUnitSelectTabbable:!0,help:(0,x.__)("Distance from the edge the arrow is aligned to.","b-blocks"),value:s[t].offset,onChange:e=>n("connector",e,"arrow",t,"offset")})]})]})})),jV=({attributes:e,updateObj:t})=>{const{marker:n}=e,o=nV.includes(n.shape);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Shape","b-blocks"),labelPosition:"edge",help:o?(0,x.__)("The hexagon is cut to shape, so it cannot carry a ring or a pulse.","b-blocks"):(0,x.__)("Sets the corners. Border Radius in the Style tab takes them over as soon as you set one of them.","b-blocks"),value:n.shape,options:eV,onChange:e=>t("marker",e,"shape"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),!o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Pulse","b-blocks"),help:(0,x.__)("A halo that spreads out from behind every marker. It follows the marker’s shape and stops for readers who ask for reduced motion.","b-blocks"),checked:!!n.pulse.show,onChange:e=>t("marker",e,"pulse","show"),__nextHasNoMarginBottom:!0}),n.pulse.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Pulse Color:","b-blocks"),value:n.pulse.bg,onChange:e=>t("marker",e,"pulse","bg"),isImage:!1}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Pulse Speed (ms)","b-blocks"),value:n.pulse.speed,onChange:e=>t("marker",e,"pulse","speed"),min:600,max:6e3,step:100,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]})},$V=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{card:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Card","b-blocks"),children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[t].padding,resetValues:{top:"16px",right:"16px",bottom:"16px",left:"16px"},units:[Pe(),Ae(),Ee()],onChange:e=>n("card",e,t,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{top:"4px",right:"4px",bottom:"4px",left:"4px"},units:[Pe(),Ee(),Ae()],onChange:e=>n("card",e,t,"radius")})]})})),SV=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{date:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Date","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Date","b-blocks"),checked:!!o.show,onChange:e=>n("date",e,"show"),__nextHasNoMarginBottom:!0}),o.show&&(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Distance From Marker","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:o[t].gap,onChange:e=>n("date",e,t,"gap")})]})})),TV=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_V,{...e}),(0,l.jsx)(jV,{...e}),(0,l.jsx)($V,{...e}),(0,l.jsx)(CV,{...e}),(0,l.jsx)(SV,{...e})]}),NV=({attributes:e,updateObj:t})=>{const{connector:n}=e,{line:o,arrow:i}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Connectors","b-blocks"),children:[o.show&&(0,l.jsx)(An,{label:o.progress?(0,x.__)("Track Color:","b-blocks"):(0,x.__)("Line Color:","b-blocks"),value:o.bg,onChange:e=>t("connector",e,"line","bg"),isImage:!1}),o.show&&o.progress&&(0,l.jsx)(An,{label:(0,x.__)("Progress Color:","b-blocks"),value:o.activeBg,onChange:e=>t("connector",e,"line","activeBg"),isImage:!1}),i.show&&(0,l.jsx)(Ue,{label:(0,x.__)("Arrow Color","b-blocks"),value:i.color,onChange:e=>t("connector",e,"arrow","color")}),i.show&&(0,l.jsx)("p",{className:"description",children:(0,x.__)("Leave the arrow color empty to keep it matching the card background.","b-blocks")})]})},MV=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{marker:o}=e,i=nV.includes(o.shape);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:o[t].size,onChange:e=>n("marker",e,t,"size")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:o[t].iconSize,onChange:e=>n("marker",e,t,"iconSize")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{top:"",right:"",bottom:"",left:""},units:[Ee(),Pe(),Ae()],onChange:e=>n("marker",e,t,"radius")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:Me,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o[e].bg,onChange:t=>n("marker",t,e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:o[e].color.icon,onChange:t=>n("marker",t,e,"color","icon")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e].border,onChange:t=>n("marker",t,e,"border")}),!i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Width","b-blocks"),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,help:"normal"===e?(0,x.__)("A halo drawn outside the border. It follows the marker’s shape, takes no space in the layout, and uses the icon colour unless you set one below.","b-blocks"):void 0,value:o[e].ring.width,onChange:t=>n("marker",t,e,"ring","width")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Ring Style","b-blocks"),labelPosition:"edge",value:o[e].ring.style||"",options:"normal"===e?iV:[{label:(0,x.__)("Default","b-blocks"),value:""},...iV],onChange:t=>n("marker",t,e,"ring","style"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Offset","b-blocks"),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,help:"normal"===e?(0,x.__)("Gap between the marker and its ring.","b-blocks"):void 0,value:o[e].ring.offset,onChange:t=>n("marker",t,e,"ring","offset")}),(0,l.jsx)(Ue,{label:(0,x.__)("Ring Color","b-blocks"),value:o[e].ring.color,onChange:t=>n("marker",t,e,"ring","color")})]}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:o[e].shadow,onChange:t=>n("marker",t,e,"shadow")})]})}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,
581 -x.__)("Transition Speed (ms)","b-blocks"),help:(0,x.__)("How long the marker takes to settle into its hover state.","b-blocks"),value:o.transition,onChange:e=>n("marker",e,"transition"),min:0,max:1200,step:50,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})})),LV=({attributes:e,updateObj:t})=>{const{card:n}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Card","b-blocks"),children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:Me,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n[e].bg,onChange:n=>t("card",n,e,"bg")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:n[e].border,onChange:n=>t("card",n,e,"border")}),"normal"===e&&(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:n.normal.shadow,onChange:e=>t("card",e,"normal","shadow")})]})})})},PV=({attributes:e,updateObj:t})=>{const{date:n}=e;return n.show?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Date","b-blocks"),children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("date",e,"typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("date",e,"color")})]}):null},EV=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(NV,{...e}),(0,l.jsx)(MV,{...e}),(0,l.jsx)(LV,{...e}),(0,l.jsx)(PV,{...e})]}),AV=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:qG,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(TV,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(EV,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})},BV=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=fV(t),{layout:s,connector:r,marker:c}=a,d=bBlocksPremiumChecker,u=fe(t,n),p=(0,h.useBlockProps)({className:xV(a)}),g=(0,f.useSelect)((e=>{const{getBlockOrder:t,getBlockAttributes:n}=e("core/block-editor");return t(o).map((e=>{const t=n(e)?.item;return`${t?.side||""}.${t?.arrowAlign||""}`})).join("|")}),[o]),m=(0,Qa.useRef)(null);(0,Qa.useEffect)((()=>{if(m.current)return((e,t={})=>{if(!e)return()=>{};let n=null;const o=()=>{null===n&&(n=requestAnimationFrame((()=>{n=null,((e,t={})=>{if(!e)return;const n=getComputedStyle(e),o="grid"===n.display?!n.gridAutoFlow.includes("column"):"row"!==n.flexDirection,i=e.getBoundingClientRect(),a=o?i.height:i.width;if(!a)return;const s=Array.from(e.querySelectorAll(":scope > * > .b-blocks-timeline-marker")),r=s.map((e=>{const t=e.getBoundingClientRect();return o?t.top-i.top+t.height/2:t.left-i.left+t.width/2})).sort(((e,t)=>e-t));if(s.length){const t=s[0].getBoundingClientRect(),n=o?t.left-i.left+t.width/2:t.top-i.top+t.height/2;e.style.setProperty("--bb-tl-line-cross",`${wV(n)}px`)}const l="full"!==t.extent&&r.length>0,c=l?r[0]:0,d=l?r[r.length-1]:a;e.style.setProperty("--bb-tl-line-start",`${wV(c)}px`),e.style.setProperty("--bb-tl-line-end",`${wV(a-d)}px`)})(e,t)})))};o();const i="undefined"!=typeof ResizeObserver?new ResizeObserver(o):null;return i?(i.observe(e),e.querySelectorAll(":scope > *").forEach((e=>i.observe(e)))):window.addEventListener("resize",o),()=>{null!==n&&cancelAnimationFrame(n),i?i.disconnect():window.removeEventListener("resize",o)}})(m.current,{extent:r.line.extent})}),[s,r,c,g]),(0,Qa.useEffect)((()=>{if(r.line.progress&&m.current)return(e=>{const t=e.ownerDocument?.defaultView||window;let n=null,o=!0;const i=()=>{n=null;const o=e.getBoundingClientRect(),i=(t.innerHeight||e.ownerDocument.documentElement.clientHeight)/2-o.top,a=o.height||1,s=Math.min(Math.max(i/a,0),1);e.style.setProperty("--bb-tl-line-progress",s.toFixed(4))},a=()=>{null===n&&o&&(n=requestAnimationFrame(i))},s=void 0!==t.IntersectionObserver?new t.IntersectionObserver((e=>{o=e.some((e=>e.isIntersecting)),a()})):null;return s&&s.observe(e),t.addEventListener("scroll",a,{passive:!0}),t.addEventListener("resize",a,{passive:!0}),i(),()=>{null!==n&&cancelAnimationFrame(n),s&&s.disconnect(),t.removeEventListener("scroll",a),t.removeEventListener("resize",a)}})(m.current)}),[r.line.progress,g]);const b=(0,h.useInnerBlocksProps)({className:"b-blocks-timeline-items"},{allowedBlocks:uV,template:gV,templateLock:!1,orientation:"vertical",renderAppender:h.InnerBlocks.ButtonBlockAppender});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(AV,{attributes:a,setAttributes:n,updateObj:u,isPremium:d,device:i}),(0,l.jsxs)("div",{...p,children:[(0,l.jsx)(kV,{attributes:a,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{...b,ref:m})]})]})}));Ll(VG.name)&&(0,p.registerBlockType)(VG,{icon:Nl,edit:BV,save:h.InnerBlocks.Content})
582 -;const IV=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/timeline-item","version":"1.0.0","title":"Timeline Item","category":"bBlocks","description":"A single entry on a Timeline: a date, an icon marker and any inner blocks you want inside its card.","keywords":["timeline item","timeline entry","milestone","event"],"parent":["b-blocks/timeline"],"textdomain":"b-blocks","attributes":{"date":{"type":"string","default":""},"icon":{"type":"string","default":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 384 512\'><path d=\'M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z\'/></svg>"},"item":{"type":"object","default":{"side":"","arrowAlign":"","marker":{"normal":{"bg":{"type":"solid","color":""},"color":{"icon":""},"ring":{"width":"","style":"","offset":"","color":""},"shadow":[]},"hover":{"bg":{"type":"solid","color":""},"color":{"icon":""},"ring":{"width":"","style":"","offset":"","color":""},"shadow":[]}},"pulse":{"show":"","bg":{"type":"solid","color":""},"speed":""},"card":{"normal":{"bg":{"type":"solid","color":""}}},"date":{"color":""},"arrow":{"bg":{"type":"solid","color":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"html":false,"reusable":false,"inserter":true},"example":{"attributes":{}},"editorScript":"file:../index.js","render":"file:./render.php","viewScript":"file:./view.js"}'),OV=Object.fromEntries(Object.entries(IV.attributes).map((([e,t])=>[e,t.default]))),RV=(e={})=>mV(OV,e),zV=({attributes:e,id:t,isBackend:n=!1})=>{const{item:o,advanced:i}=RV(e),{marker:a,pulse:s,card:r,date:c,arrow:d}=o,u=`#${t}`,p=`${u}.b-blocks-timeline-item`,h=`${u} .b-blocks-timeline-card`,g=`${u} .b-blocks-timeline-marker`,m=`${u} .b-blocks-timeline-date`,b=os(d.bg)||os(r.normal.bg),f=["on"===s.show?"animation-name: bb-tl-marker-pulse;":"","off"===s.show?"animation-name: none;":"","off"===s.show?"":os(s.bg,!0,!0,!1),"off"===s.show?"":ns("animation-duration",s.speed?`${s.speed}ms`:"")].filter(Boolean).join(" "),x=n?`#${t}>div>div:first-child`:`#${t}>div`,y=_s(t,i,n,!0).split(x).join(`#${t}`);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${h}{\n\t\t\t\t${os(r.normal.bg)}\n\t\t\t}\n\t\t\t${p} .b-blocks-timeline-card::after{\n\t\t\t\t${b}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${os(a.normal.bg)}\n\t\t\t\t${ns("color",a.normal.color.icon)}\n\t\t\t\t${aV(a.normal.ring)}\n\t\t\t\t${ns("box-shadow",ls(a.normal.shadow||[]))}\n\t\t\t}\n\t\t\t${g}:hover{\n\t\t\t\t${os(a.hover.bg)}\n\t\t\t\t${ns("color",a.hover.color.icon)}\n\t\t\t\t${aV(a.hover.ring)}\n\t\t\t\t${ns("box-shadow",ls(a.hover.shadow||[]))}\n\t\t\t}\n\t\t\t${f?`${g}::after{ ${f} }`:""}\n\t\t\t${m}{\n\t\t\t\t${ns("color",c.color)}\n\t\t\t}\n\t\t\t${y}\n\t\t\t`}})},DV=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],FV=({attributes:e,setAttributes:t,updateObj:n,clientId:o})=>{const{icon:i,item:a}=e,s="horizontal"===(0,f.useSelect)((e=>{const{getBlockParentsByBlockName:t,getBlock:n}=e("core/block-editor"),i=t(o,cV);return i?.length&&n(i[i.length-1])?.attributes?.layout?.desktop?.direction||"vertical"}),[o]),r=[{label:(0,x.__)("Auto (follow layout)","b-blocks"),value:""},{label:s?(0,x.__)("Above","b-blocks"):(0,x.__)("Left","b-blocks"),value:"left"},{label:s?(0,x.__)("Below","b-blocks"):(0,x.__)("Right","b-blocks"),value:"right"}],c=[{label:(0,x.__)("Auto (follow Timeline)","b-blocks"),value:""},{label:s?(0,x.__)("Left","b-blocks"):(0,x.__)("Top","b-blocks"),value:"start"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:s?(0,x.__)("Right","b-blocks"):(0,x.__)("Bottom","b-blocks"),value:"end"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Entry","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Side","b-blocks"),labelPosition:"edge",help:(0,x.__)("Overrides the side this entry would get from the Timeline layout.","b-blocks"),value:a.side||"",options:r,onChange:e=>n("item",e,"side"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Arrow Alignment","b-blocks"),labelPosition:"edge",help:(0,x.__)("Overrides where this entry’s arrow sits along its card edge. Arrow size and offset stay with the Timeline.","b-blocks"),value:a.arrowAlign||"",options:c,onChange:e=>n("item",e,"arrowAlign"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(Zn,{label:(0,x.__)("Marker Icon","b-blocks"),value:i,onChange:e=>t({icon:e})})]})},HV=({attributes:e,updateObj:t,clientId:n})=>{const{item:o}=e,{pulse:i}=o,a=(0,f.useSelect)((e=>{const{getBlockParentsByBlockName:t,getBlock:o}=e("core/block-editor"),i=t(n,cV);return i?.length&&o(i[i.length-1])?.attributes?.marker||{}}),[n]);if(nV.includes(a.shape))return null;const s=[{label:a.pulse?.show?(0,x.__)("Default — on, from the Timeline","b-blocks"):(0,x.__)("Default — off, from the Timeline","b-blocks"),value:""},{label:(0,x.__)("On","b-blocks"),value:"on"},{label:(0,x.__)("Off","b-blocks"),value:"off"}],r=""===i.show?!!a.pulse?.show:"on"===i.show;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Pulse","b-blocks"),help:(0,x.__)("A halo that spreads out from behind this entry’s marker.","b-blocks"),value:i.show||"",options:s,onChange:e=>t("item",e,"pulse","show"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Pulse Color:","b-blocks"),value:i.bg,
583 -onChange:e=>t("item",e,"pulse","bg"),isImage:!1}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Pulse Speed (ms)","b-blocks"),help:(0,x.__)("Leave unset to follow the Timeline.","b-blocks"),value:i.speed||void 0,onChange:e=>t("item",e||"","pulse","speed"),min:600,max:6e3,step:100,allowReset:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})},WV=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(FV,{...e}),(0,l.jsx)(HV,{...e})]}),UV=({attributes:e,updateObj:t})=>{const{item:n}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.Notice,{className:"mb10",status:"info",isDismissible:!1,children:(0,x.__)("Empty values follow the Timeline.","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:Me,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n.marker[e].bg,onChange:n=>t("item",n,"marker",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:n.marker[e].color.icon,onChange:n=>t("item",n,"marker",e,"color","icon")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Width","b-blocks"),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:n.marker[e].ring.width,onChange:n=>t("item",n,"marker",e,"ring","width")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Ring Style","b-blocks"),labelPosition:"edge",value:n.marker[e].ring.style||"",options:[{label:(0,x.__)("Default (follow Timeline)","b-blocks"),value:""},...iV],onChange:n=>t("item",n,"marker",e,"ring","style"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Offset","b-blocks"),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:n.marker[e].ring.offset,onChange:n=>t("item",n,"marker",e,"ring","offset")}),(0,l.jsx)(Ue,{label:(0,x.__)("Ring Color","b-blocks"),value:n.marker[e].ring.color,onChange:n=>t("item",n,"marker",e,"ring","color")}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:n.marker[e].shadow,onChange:n=>t("item",n,"marker",e,"shadow")})]})})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Card","b-blocks"),children:(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n.card.normal.bg,onChange:e=>t("item",e,"card","normal","bg")})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Arrow","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Arrow Color:","b-blocks"),value:n.arrow.bg,onChange:e=>t("item",e,"arrow","bg"),isImage:!1}),(0,l.jsx)("p",{className:"description",children:(0,x.__)("Leave empty to keep the arrow matching this entry’s card background.","b-blocks")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Date","b-blocks"),children:(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.date.color,onChange:e=>t("item",e,"date","color")})})]})},GV=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(UV,{...e})}),VV=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:DV,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(WV,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(GV,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})},qV=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=RV(t),{date:s,icon:r,item:c}=a,d=bBlocksPremiumChecker,u=fe(t,n),p=(0,f.useSelect)((e=>0===e("core/block-editor").getBlockCount(o)),[o]),g=(0,h.useBlockProps)({className:yV(c)}),m=(0,h.useInnerBlocksProps)({className:"b-blocks-timeline-card"},{templateLock:!1,renderAppender:p?h.InnerBlocks.ButtonBlockAppender:h.InnerBlocks.DefaultBlockAppender});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(VV,{attributes:a,setAttributes:n,updateObj:u,isPremium:d,device:i,clientId:o}),(0,l.jsxs)("div",{...g,children:[(0,l.jsx)(zV,{attributes:a,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:"b-blocks-timeline-content",children:(0,l.jsx)("div",{...m})}),(0,l.jsx)("div",{className:"b-blocks-timeline-marker",children:r&&(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:r}})}),(0,l.jsx)(h.RichText,{tagName:"div",className:"b-blocks-timeline-date",value:s,onChange:e=>n({date:e}),placeholder:(0,x.__)("Add a date…","b-blocks")})]})]})}));Ll(cV)&&(0,p.registerBlockType)(IV,{icon:Ml,edit:qV,save:h.InnerBlocks.Content});const YV=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/toggle-content","title":"Toggle Content","category":"bBlocks","description":"A clean toggle switch lets users click to switch between two content sections below the heading.","keywords":["toggle content","toggle switch","toggle content switch","toggle content switcher","toggle content switcher block","toggle"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"toggle":{"type":"object","default":{"contentType":"primary","switchType":"rounded"}},"label":{"type":"object","default":{"left":"First","right":"Second"}},"styles":{"type":"object","default":{"header":{"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"headingGap":"10px"},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"headingGap":""},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"headingGap":""},"normal":{"bg":"","border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":"","border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}},"transition":0.3}},"toggle":{"direction":"row","width":"","height":"","desktop":{"align":"center"},"tablet":{"align":""},"mobile":{"align":""},"active":{"color":{},"bg":{}},"inactive":{"color":{},"bg":{}}},"label":{"gap":"","typo":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"active":{"first":{"color":""},"second":{"color":""}},"inactive":{"first":{"color":""},"second":{"color":""}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),KV=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],QV=[{value:"rounded",label:(0,x.__)("Rounded","b-blocks")},{value:"rectangle",label:(0,x.__)("Rectangle","b-blocks")}],ZV=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),XV=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",
584 -strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),JV=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),eq=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,label:a,toggle:s}=t,{toggle:r,header:c,label:d}=i;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Toggle","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Switch Type","b-blocks"),labelPosition:"edge",options:QV,value:s?.switchType,onChange:e=>n("toggle",e,"switchType")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r?.[o]?.align,onChange:e=>n("styles",e,"toggle",o,"align"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:ZV}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:XV}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:JV})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r?.direction,onChange:e=>n("styles",e,"toggle","direction"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"row"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"column"})]})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2 mb0",children:[(0,x.__)("Heading Gap","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:c?.[o]?.headingGap,onChange:e=>n("styles",e,"header",o,"headingGap")})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Label Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:d?.[o]?.gap,onChange:e=>n("styles",e,"label",o,"gap")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Left Label","b-blocks"),value:a?.left,onChange:e=>n("label",e,"left")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Right Label","b-blocks"),value:a?.right,onChange:e=>n("label",e,"right")})]})]})},tq=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(eq,{...e})}),nq=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{header:a}=i,[s,r]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{values:a[o].padding,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),onChange:e=>n("styles",e,"header",o,"padding")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>r(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{value:a[s].bg,onChange:e=>n("styles",e,"header",s,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",value:a[s].border,onChange:e=>n("styles",e,"header",s,"border")}),(0,l.jsx)(k,{values:a[s][o].radius,className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Radius","b-blocks"),(0,l.jsx)(_,{})]}),onChange:e=>n("styles",e,"header",s,o,"radius")})]})},oq=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{label:i}=o,[a,s]=(0,m.useState)("inactive");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Label Styles","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:i.typo,onChange:e=>n("styles",e,"label","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"inactive"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Left Label Color","b-blocks"),value:i[a].first.color,onChange:e=>n("styles",e,"label",a,"first","color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Right Label Color","b-blocks"),value:i[a].second.color,onChange:e=>n("styles",e,"label",a,"second","color")})]})},iq=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{toggle:i}=o,[a,s]=(0,m.useState)("inactive");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Switcher","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i?.width,onChange:e=>n("styles",e,"toggle","width")})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i?.height,onChange:e=>n("styles",e,"toggle","height")})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"inactive"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsx)(An,{label:(0,x.__)("Color","b-blocks"),value:i[a].color,onChange:e=>n("styles",e,"toggle",a,"color"),isImage:!1}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[a].bg,onChange:e=>n("styles",e,"toggle",a,"bg")})]})},aq=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nq,{...e}),(0,l.jsx)(iq,{...e}),(0,l.jsx)(oq,{...e})]}),sq=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:KV,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(tq,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(aq,{...e})})]})})})}),rq=(e,o)=>{
585 -const{styles:i}=e,{toggle:a,header:s,label:r}=i,l=`#${o}`,c=`${l} .b-blocks-toggle-content__wrapper .b-blocks-toggle-content__head`,d=`${c} .b-blocks-toggle-content-switch__wrapper`,u=`${d} .b-blocks-toggle-content__switch`,p=`${l} .is-b .b-blocks-toggle-content__switch`,h=`${l} .is-a .b-blocks-toggle-content__switch`,g=`${u} .b-blocks-toggle-content__knob`,m=`${l} .is-b .b-blocks-toggle-content__knob`,b=`${l} .is-a .b-blocks-toggle-content__knob`,f=`${d} .b-blocks-toggle-content__label`;return`\n\t\t${ps("",r.typo).googleFontLink}\n\t\t${ps(f,r.typo).styles}\n\n\t\t${c}{\n\t\t\t${ns("justify-content",a?.desktop?.align)}\n\t\t\t${ns("margin-bottom",s?.desktop?.headingGap)}\n\t\t\t${ns("padding",hs(s?.desktop?.padding))}\n\t\t\t${os(s.normal.bg)}\n\t\t\t${as(s.normal.border)}\n\t\t\t${ns("border-radius",hs(s.normal.desktop.radius))}\n\t\t}\n\n\t\t${c}:hover{\n\t\t\t${os(s.hover.bg)}\n\t\t\t${as(s.hover.border)}\n\t\t\t${ns("border-radius",hs(s.hover.desktop.radius))}\n\t\t}\n\n\t\t${d}{\n\t\t\t${ns("flex-direction",a?.direction)}\n\t\t\t${ns("gap",r?.desktop?.gap)}\n\t\t}\n\n\t\t${u}{\n\t\t\t${ns("width",a.width)}\n\t\t\t${ns("height",a.height)}\n\t\t}\n\n\t\t${p}{\n\t\t\t${os(a.active.bg)}\n\t\t}\n\n\t\t${h}{\n\t\t\t${os(a.inactive.bg)}\n\t\t}\n\n\t\t${g}{\n\t\t\t${ns("width",a.height?`calc(${a.height} - 6px)`:"")}\n\t\t\t${ns("height",a.height?`calc(${a.height} - 6px)`:"")}\n\t\t\t\n\t\t}\n\t\t${m}{\n\t\t\t${ns("transform",a.width?`translateX(calc(${a.width?a.width:"60px"} - ${a.height?a.height:"30px"}))`:"")}\n\t\t\t${os(a.active.color)}\n\t\t}\n\t\t${b}{\n\t\t\t${os(a.inactive.color)}\n\t\t}\n\n\t\t${f}.b-blocks-toggle-content__label--left {\n\t\t\t${ns("color",r.inactive.first.color)}\n\t\t}\n\n\t\t${f}.b-blocks-toggle-content__label--right{\n\t\t\t${ns("color",r.inactive.second.color)}\n\t\t}\n\t\t${f}.b-blocks-toggle-content__label--left.is-active {\n\t\t\t${ns("color",r.active.first.color)}\n\t\t}\n\n\t\t${f}.b-blocks-toggle-content__label--right.is-active{\n\t\t\t${ns("color",r.active.second.color)}\n\t\t}\n\n\t\t${t}{\n\t\t\t${c}{\n\t\t\t\t${ns("justify-content",a?.tablet?.align)}\n\t\t\t\t${ns("margin-bottom",s?.tablet?.headingGap)}\n\t\t\t\t${ns("padding",hs(s?.tablet?.padding))}\n\t\t\t\t${ns("border-radius",hs(s.normal.tablet.radius))}\n\t\t\t}\n\n\t\t\t${c}:hover{\n\t\t\t\t${ns("border-radius",hs(s.hover.tablet.radius))}\n\t\t\t}\n\n\t\t\t${d}{\n\t\t\t\t${ns("gap",r?.tablet?.gap)}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t${c}{\n\t\t\t\t${ns("justify-content",a?.mobile?.align)}\n\t\t\t\t${ns("margin-bottom",s?.mobile?.headingGap)}\n\t\t\t\t${ns("padding",hs(s?.mobile?.padding))}\n\t\t\t\t${ns("border-radius",hs(s.normal.mobile.radius))}\n\t\t\t}\n\n\t\t\t${c}:hover{\n\t\t\t\t${ns("border-radius",hs(s.hover.mobile.radius))}\n\t\t\t}\n\n\t\t\t${d}{\n\t\t\t\t${ns("gap",r?.mobile?.gap)}\n\t\t\t}\n\t\t}\n\n\t`},lq=[["b-blocks/container",{className:"b-blocks-toggle-content__panel b-blocks-toggle-content__panel--a",lock:{remove:!0,move:!0}},[]],["b-blocks/container",{className:"b-blocks-toggle-content__panel b-blocks-toggle-content__panel--b",lock:{remove:!0,move:!0}},[]]],cq=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,className:n,device:o,clientId:i})=>{const{label:a,toggle:s}=e,[r,c]=(0,Qa.useState)(!0),d=(0,h.useBlockProps)({className:n}),u=fe(e,t);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(sq,{attributes:e,updateObj:u,device:o}),(0,l.jsxs)("div",{...d,children:[(0,l.jsx)("style",{children:rq(e,`block-${i}`)}),(0,l.jsxs)("div",{className:"b-blocks-toggle-content__wrapper "+(r?"is-a":"is-b"),children:[(0,l.jsx)("div",{className:"b-blocks-toggle-content__head",children:(0,l.jsxs)("div",{className:"b-blocks-toggle-content-switch__wrapper",children:[(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-toggle-content__label b-blocks-toggle-content__label--left "+(r?"":"is-active"),value:a.left,onChange:e=>u("label",e,"left"),onClick:()=>c(!0),placeholder:(0,x.__)("First","b-blocks"),allowedFormats:[]}),(0,l.jsx)("div",{className:`b-blocks-toggle-content__switch b-blocks-toggle-content-switch-${s.switchType} ${r?"":"is-b"}`,role:"button",tabIndex:0,"aria-label":(0,x.__)("Toggle content","b-blocks"),onClick:()=>c((e=>!e)),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||c((e=>!e))},children:(0,l.jsx)("div",{className:"b-blocks-toggle-content__knob"})}),(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-toggle-content__label b-blocks-toggle-content__label--right "+(r?"":"is-active"),value:a.right,onChange:e=>u("label",e,"right"),onClick:()=>c(!1),placeholder:(0,x.__)("Second","b-blocks"),allowedFormats:[]})]})}),(0,l.jsx)("div",{className:"b-blocks-toggle-content__content",children:(0,l.jsx)(h.InnerBlocks,{template:lq,renderAppender:!1})})]})]})]})}));Ll(YV.name)&&(0,p.registerBlockType)(YV,{icon:al,edit:cq,save:h.InnerBlocks.Content});const dq={none:{label:(0,x.__)("None","accordion-block"),items:[]},faq:{label:(0,x.__)("FAQ","accordion-block"),items:[{title:(0,x.__)("What is your return policy?","accordion-block"),content:(0,x.__)("We offer a 30-day money-back guarantee. If you're not satisfied with your purchase, contact our support team for a full refund.","accordion-block"),isOpen:!1},{title:(0,x.__)("How long does shipping take?","accordion-block"),content:(0,x.__)("Standard shipping takes 5-7 business days. Express shipping options are available at checkout for faster delivery.","accordion-block"),isOpen:!1},{title:(0,x.__)("Do you offer customer support?","accordion-block"),content:(0,x.__)("Yes! Our customer support team is available 24/7 via email, phone, and live chat to assist you with any questions.","accordion-block"),isOpen:!1}]},features:{label:(0,x.__)("Product Features","accordion-block"),items:[{title:(0,x.__)("Easy to Use","accordion-block"),content:(0,x.__)("Our intuitive interface makes it simple to get started. No technical knowledge required - just install and start creating.","accordion-block"),isOpen:!1},{title:(0,x.__)("Fully Customizable","accordion-block"),content:(0,x.__)("Customize every aspect of your accordion with our powerful theme editor. Colors, spacing, fonts - it's all under your control.","accordion-block"),isOpen:!1},{title:(0,x.__)("Mobile Responsive","accordion-block"),content:(0,x.__)("Works perfectly on all devices. Your accordions will look great whether viewed on desktop, tablet, or mobile.","accordion-block"),isOpen:!1}]},timeline:{label:(0,x.__)("Timeline","accordion-block"),items:[{title:(0,x.__)("2020 - Foundation","accordion-block"),content:(0,x.__)("Our company was founded with a vision to create innovative solutions that make a difference in people's lives.","accordion-block"),isOpen:!1},{title:(0,x.__)("2021 - Growth","accordion-block"),content:(0,x.__)("Expanded our team and launched three major products that received excellent feedback from customers worldwide.","accordion-block"),isOpen:!1},{title:(0,x.__)("2022 - Innovation","accordion-block"),content:(0,x.__)("Introduced cutting-edge features and won multiple industry awards for innovation and customer satisfaction.","accordion-block"),isOpen:!1},{title:(0,x.__)("2023 - Global Expansion","accordion-block"),content:(0,x.__)("Opened offices in 5 new countries and reached 1 million satisfied customers across the globe.","accordion-block"),isOpen:!1}]},pricing:{label:(0,x.__)("Pricing Details","accordion-block"),items:[{title:(0,x.__)("Basic Plan - $9/month","accordion-block"),content:(0,x.__)("Perfect for individuals and small projects. Includes 10 GB storage, basic support, and access to core features.","accordion-block"),isOpen:!1},{title:(0,x.__)("Pro Plan - $29/month","accordion-block"),content:(0,x.__)("Ideal for professionals and growing businesses. Includes 100 GB storage, priority support, and all premium features.","accordion-block"),isOpen:!1},{title:(0,x.__)("Enterprise Plan - Custom","accordion-block"),content:(0,
586 -x.__)("For large organizations with specific needs. Unlimited storage, dedicated support team, custom integrations, and SLA guarantees.","accordion-block"),isOpen:!1}]},steps:{label:(0,x.__)("Steps Guide","accordion-block"),items:[{title:(0,x.__)("Step 1: Sign Up","accordion-block"),content:(0,x.__)("Create your free account in seconds. Just enter your email address and choose a secure password to get started.","accordion-block"),isOpen:!1},{title:(0,x.__)("Step 2: Configure Settings","accordion-block"),content:(0,x.__)("Customize your preferences and connect your existing tools. Our setup wizard will guide you through the process.","accordion-block"),isOpen:!1},{title:(0,x.__)("Step 3: Add Content","accordion-block"),content:(0,x.__)("Start adding your content using our intuitive editor. Import existing data or create new content from scratch.","accordion-block"),isOpen:!1},{title:(0,x.__)("Step 4: Publish & Share","accordion-block"),content:(0,x.__)("When you're ready, publish your work and share it with your audience. Track performance with built-in analytics.","accordion-block"),isOpen:!1}]}},uq=[{name:"Black",color:"#000000"},{name:"White",color:"#FFFFFF"},{name:"Light Gray",color:"#f8f9fa"},{name:"Gray",color:"#6c757d"},{name:"Dark Gray",color:"#343a40"},{name:"Blue",color:"#0d6efd"},{name:"Indigo",color:"#6610f2"},{name:"Purple",color:"#6f42c1"},{name:"Pink",color:"#d63384"},{name:"Red",color:"#dc3545"},{name:"Orange",color:"#fd7e14"},{name:"Yellow",color:"#ffc107"},{name:"Green",color:"#198754"},{name:"Teal",color:"#20c997"},{name:"Cyan",color:"#0dcaf0"}],pq=JSON.parse('{"UU":"b-blocks/accordion-block"}');Ll(pq.UU)&&(0,p.registerBlockType)(pq.UU,{icon:Qr,edit:({attributes:e,setAttributes:t})=>{const{items:n,theme:o,template:i,customStyles:a}=e,[s,r]=(0,m.useState)(n.map(((e,t)=>0===t))),c=(0,h.useBlockProps)({className:`accordion-block accordion-theme-${o}`}),d=()=>{const e=[...n,{title:(0,x.__)("New Accordion Item","accordion-block"),content:(0,x.__)("Add your content here.","accordion-block"),isOpen:!1}];t({items:e}),r([...s,!1])},u=(e,o,i)=>{const a=[...n];a[e]={...a[e],[o]:i},t({items:a})},p=(e,n)=>{t({customStyles:{...a,[e]:n}})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Accordion Items","accordion-block"),initialOpen:!0,children:(0,l.jsx)(y.Button,{variant:"primary",onClick:d,style:{width:"100%"},children:(0,x.__)("Add Item","accordion-block")})}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Theme Settings","accordion-block"),initialOpen:!1,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Theme","accordion-block"),value:o,options:[{label:(0,x.__)("Modern","accordion-block"),value:"modern"},{label:(0,x.__)("Classic","accordion-block"),value:"classic"},{label:(0,x.__)("Minimal","accordion-block"),value:"minimal"},{label:(0,x.__)("Custom","accordion-block"),value:"custom"}],onChange:e=>t({theme:e})})}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Templates","accordion-block"),initialOpen:!1,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Apply Template","accordion-block"),value:i,options:Object.keys(dq).map((e=>({label:dq[e].label,value:e}))),onChange:e=>{"none"!==e&&dq[e]&&(t({template:e,items:dq[e].items}),r(dq[e].items.map((()=>!1))))},help:(0,x.__)("Select a pre-built template to get started quickly","accordion-block")})}),"custom"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Header Styles","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Background Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:uq,value:a.headerBgColor,onChange:e=>p("headerBgColor",e||"#f8f9fa")}),(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Text Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:uq,value:a.headerTextColor,onChange:e=>p("headerTextColor",e||"#212529")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Font Size","accordion-block"),value:a.headerFontSize,onChange:e=>p("headerFontSize",e),min:12,max:32}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Padding","accordion-block"),value:a.headerPadding,onChange:e=>p("headerPadding",e),min:8,max:40})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Content Styles","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Background Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:uq,value:a.contentBgColor,onChange:e=>p("contentBgColor",e||"#ffffff")}),(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Text Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:uq,value:a.contentTextColor,onChange:e=>p("contentTextColor",e||"#495057")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Font Size","accordion-block"),value:a.contentFontSize,onChange:e=>p("contentFontSize",e),min:12,max:24}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Padding","accordion-block"),value:a.contentPadding,onChange:e=>p("contentPadding",e),min:8,max:40})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Border & Spacing","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Border Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:uq,value:a.borderColor,onChange:e=>p("borderColor",e||"#dee2e6")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Border Width","accordion-block"),value:a.borderWidth,onChange:e=>p("borderWidth",e),min:0,max:5}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Border Radius","accordion-block"),value:a.borderRadius,onChange:e=>p("borderRadius",e),min:0,max:30})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon & Animation","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Icon Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:uq,value:a.iconColor,onChange:e=>p("iconColor",e||"#212529")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Animation Speed (ms)","accordion-block"),value:a.animationSpeed,onChange:e=>p("animationSpeed",e),min:100,max:1e3,step:50})]})]})]}),(0,l.jsxs)("div",{...c,style:"custom"!==o?{}:{"--bBlocks-accordion-header-bg":a.headerBgColor,"--bBlocks-accordion-header-text":a.headerTextColor,"--bBlocks-accordion-content-bg":a.contentBgColor,"--bBlocks-accordion-content-text":a.contentTextColor,"--bBlocks-accordion-border-color":a.borderColor,"--bBlocks-accordion-borderWidth":`${a.borderWidth}px`,"--bBlocks-accordion-borderRadius":`${a.borderRadius}px`,"--bBlocks-accordion-headerPadding":`${a.headerPadding}px`,"--bBlocks-accordion-content-padding":`${a.contentPadding}px`,"--bBlocks-accordion-header-font-size":`${a.headerFontSize}px`,"--bBlocks-accordion-content-font-size":`${a.contentFontSize}px`,"--bBlocks-accordion-icon-color":a.iconColor,"--bBlocks-accordion-animation-speed":`${a.animationSpeed}ms`},children:[(0,l.jsx)("div",{className:"accordion-items",children:n.map(((e,o)=>(0,l.jsxs)("div",{className:"accordion-item "+(s[o]?"is-open":""),children:[(0,l.jsxs)("div",{className:"accordion-header",children:[(0,l.jsxs)("button",{className:"accordion-toggle",onClick:()=>(e=>{const t=[...s];t[e]=!t[e],r(t)})(o),type:"button",children:[(0,l.jsx)(h.RichText,{tagName:"span",value:e.title,onChange:e=>u(o,"title",e),placeholder:(0,x.__)("Accordion title...","accordion-block"),className:"accordion-title"}),(0,l.jsx)("span",{className:"accordion-icon",children:s[o]?"−":"+"})]}),(0,l.jsx)(y.Button,{isDestructive:!0,isSmall:!0,onClick:()=>(e=>{const o=n.filter(((t,n)=>n!==e));t({items:o});const i=s.filter(((t,n)=>n!==e));r(i)})(o),className:"accordion-remove",children:(0,x.__)("Remove Item","accordion-block")})]}),s[o]&&(0,l.jsx)("div",{className:"accordion-content",style:{maxHeight:"unset"},children:(0,l.jsx)(h.RichText,{tagName:"div",value:e.content,onChange:e=>u(o,"content",e),placeholder:(0,x.__)("Accordion content...","accordion-block"),className:"accordion-text"})})]},o)))}),0===n.length&&(0,l.jsxs)("div",{
587 -className:"accordion-empty",children:[(0,l.jsx)("p",{children:(0,x.__)('No accordion items yet. Click "Add Item" to get started.',"accordion-block")}),(0,l.jsx)(y.Button,{variant:"primary",onClick:d,children:(0,x.__)("Add Item","accordion-block")})]})]})]})}});const hq=JSON.parse('{"apiVersion":3,"name":"b-blocks/video","title":"Video","description":"A Simple, accessible, Easy to Use & fully Customizable video player.","icon":"video-alt2","category":"bBlocks","keywords":["video embed","mp4 ogg player","any video play"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"source":{"type":"string","default":""},"poster":{"type":"string","default":""},"controls":{"type":"object","default":{"play-large":true,"restart":false,"rewind":true,"play":true,"fast-forward":true,"progress":true,"current-time":true,"duration":false,"mute":true,"volume":true,"pip":false,"airplay":false,"settings":true,"download":false,"fullscreen":true}},"width":{"type":"string","default":"100%"},"radius":{"type":"string","default":"0px"},"repeat":{"type":"boolean","default":false},"autoplay":{"type":"boolean","default":false},"muted":{"type":"boolean","default":false},"resetOnEnd":{"type":"boolean","default":false},"autoHideControl":{"type":"boolean","default":true}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"sourceType":"link"}},"editorScript":["file:../index.js","plyr"],"style":["file:./view.css","plyr"],"render":"file:./render.php","viewScript":["file:./view.js","plyr"]}'),gq=({attributes:e,setAttributes:t})=>{const{source:n,poster:o,controls:i,width:a,radius:s,repeat:r,autoplay:c,muted:d,resetOnEnd:u,autoHideControl:p}=e,{restart:g,rewind:m,play:b,progress:f,duration:v,mute:k,volume:w,pip:_,airplay:C,settings:j,download:$,fullscreen:S}=i,T=(e,n)=>{const o={...i};o[e]=n,t({controls:o})};return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:[{name:"settings",title:(0,x.__)("Settings","b-blocks")},{name:"controls",title:(0,x.__)("Controls","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],children:e=>(0,l.jsxs)(l.Fragment,{children:["settings"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Settings","b-blocks"),children:[(0,l.jsx)(ve,{value:n,types:["video"],onChange:e=>t({source:e}),placeholder:(0,x.__)("Video url","b-blocks")}),(0,l.jsx)(ve,{value:o,types:["image"],onChange:e=>t({poster:e}),placeholder:(0,x.__)("Poster url","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Repeat","b-blocks"),checked:r,onChange:e=>t({repeat:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Autoplay","b-blocks"),checked:c,onChange:e=>t({autoplay:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Muted","b-blocks"),checked:d,onChange:e=>t({muted:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Reset On End","b-blocks"),checked:u,onChange:e=>t({resetOnEnd:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Auto Hide Control","b-blocks"),checked:p,onChange:e=>t({autoHideControl:e})})]})]}),"controls"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Play Large","b-blocks"),checked:i["play-large"],onChange:e=>T("play-large",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Restart","b-blocks"),checked:g,onChange:e=>T("restart",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Rewind","b-blocks"),checked:m,onChange:e=>T("rewind",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Play","b-blocks"),checked:b,onChange:e=>T("play",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Fast Forward","b-blocks"),checked:i["fast-forward"],onChange:e=>T("fast-forward",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Progress","b-blocks"),checked:f,onChange:e=>T("progress",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Current Time","b-blocks"),checked:i["current-time"],onChange:e=>T("current-time",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Duration","b-blocks"),checked:v,onChange:e=>T("duration",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Mute","b-blocks"),checked:k,onChange:e=>T("mute",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Volume","b-blocks"),checked:w,onChange:e=>T("volume",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("PIP","b-blocks"),checked:_,onChange:e=>T("pip",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Airplay","b-blocks"),checked:C,onChange:e=>T("airplay",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Settings","b-blocks"),checked:j,onChange:e=>T("settings",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Download","b-blocks"),checked:$,onChange:e=>T("download",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Fullscreen","b-blocks"),checked:S,onChange:e=>T("fullscreen",e)})]}),"style"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({width:e}),units:[Pe(),Ae(),Ee()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Round Corner:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({radius:e}),units:[Pe()]})]})]})})})},mq="bBlocksVideo",bq=({attributes:e,id:t})=>{const{width:n,radius:o}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t#${t} .${mq}{\n\t\t\twidth: ${["0px","0%","0em"].includes(n)?"100%":n};\n\t\t\tborder-radius: ${o};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},fq=e=>{const t=[];return Object.keys(e).map((n=>{e[n]&&t.push(n)})),t},xq=({attributes:e})=>{const{source:t,poster:n,controls:o,repeat:i,autoplay:a,muted:s,resetOnEnd:r,autoHideControl:c}=e,d=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const e=window?.bBlocksGlobal?.assetsUrl||"",t=new Plyr(d.current,{controls:fq(o),clickToPlay:!1,loop:{active:i},muted:s,autoplay:a,resetOnEnd:r,hideControls:c,loadSprite:!1,iconUrl:`${e}plyr.svg`});return()=>t?.destroy()}),[]),(0,l.jsx)("div",{className:mq,children:(0,l.jsx)("div",{className:"videoWrapper",children:(0,l.jsxs)("video",{controls:!0,playsinline:!0,"data-poster":n,preload:"metadata",ref:d,children:["Your browser does not support the video tag.",(0,l.jsx)("source",{src:t,type:"video/mp4"})]})})})};Ll(hq.name)&&(0,p.registerBlockType)(hq,{icon:qr,transforms:{from:[{type:"block",blocks:["vpb/video"],transform:e=>(0,p.createBlock)("b-blocks/video",e)},{type:"prefix",prefix:"video",transform:()=>(0,p.createBlock)("b-blocks/video")}],to:[{type:"block",blocks:["vpb/video"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("vpb/video",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{source:i}=t,a=()=>(0,l.jsx)(xq,{attributes:t});return i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(gq,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(bq,{attributes:t,id:`block-${o}`}),(0,l.jsx)(a,{})]})]}):(0,l.jsx)(_e,{type:"video",icon:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",className:"html5-block-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("polygon",{points:"23 7 16 12 23 17 23 7"}),(0,l.jsx)("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"})]}),onChange:e=>n({source:e.url})})},save:()=>null})
588 -;const yq=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/text-path","version":"1.0.0","title":"Text Path","category":"bBlocks","description":"Craft eye-catching text paths with interactive visual effects.","keywords":["path","text path","text on path","svg","svg path","text on svg path"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"icon":{"type":"object","default":{"type":"wave","iconType":"library","library":"","upload":"","title":"Add Your Text Here"}},"styles":{"type":"object","default":{"container":{"desktop":{"alignment":"flex-start"},"tablet":{"alignment":""},"mobile":{"alignment":""}},"path":{"color":"#000","thickness":1,"staringPoint":0,"rotate":0,"size":"250px"},"title":{"typo":{"fontSize":{"desktop":"16px"}},"normal":{"color":"","textShadow":[],"textStroke":{"isStroke":false,"size":0,"color":""}},"hover":{"color":"","textShadow":[],"textStroke":{"isStroke":false,"size":0,"color":""}},"transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),vq=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],kq=[{Label:(0,x.__)("Wave","b-blocks"),value:"wave"},{Label:(0,x.__)("Arc","b-blocks"),value:"arc"},{Label:(0,x.__)("Circle","b-blocks"),value:"circle"},{Label:(0,x.__)("Custom","b-blocks"),value:"custom"}],wq=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),_q=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),Cq=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),jq=e=>{const{attributes:t,updateObj:n,device:o}=e,{icon:i,styles:a}=t,{container:s}=a,{data:r}=jd("bBlocksUtils"),{refetch:c}=Cd("b-blocks-enable-svg-mime-type",{_wpnonce:r?.nonce},!1),d=new Tt;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text Path","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Title","b-blocks"),value:i.title,onChange:e=>n("icon",e,"title")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Path Type","b-blocks"),labelPosition:"edge",options:kq,value:i.type,onChange:e=>n("icon",e,"type")}),"custom"===i.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{label:(0,x.__)("Icon Type","b-blocks"),value:i.iconType,onChange:e=>n("icon",e,"iconType"),options:[{label:(0,x.__)("Library","b-blocks"),value:"library"},{label:(0,x.__)("Upload","b-blocks"),value:"upload"}]}),"library"===i.iconType&&(0,l.jsx)(Zn,{value:i.library,onChange:e=>n("icon",e,"library")}),"upload"===i.iconType&&(0,l.jsx)(we,{types:["image/svg+xml"],onClick:async()=>{$d(),await c()},label:(0,x.__)("Upload SVG","b-blocks"),value:{url:i.upload},onChange:async e=>{const t=e?.url?await d.sanitizeFile(e?.url):"";n("icon",t,"upload")},isSvgEnabled:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s[o]?.alignment,onChange:e=>n("styles",e,"container",o,"alignment"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:wq}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:_q}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:Cq})]})]})]})})},$q=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{title:i,path:a}=o,[s,r]=(0,m.useState)("normal");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Oa,{value:i.typo,onChange:e=>n("styles",e,"title","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>r(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{value:i[s]?.color,onChange:e=>n("styles",e,"title",s,"color")}),(0,l.jsx)(yt,{value:i[s]?.textShadow,onChange:e=>n("styles",e,"title",s,"textShadow"),type:"text"}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Stroke","b-blocks"),checked:i[s]?.textStroke?.isStroke,value:i[s]?.textStroke?.isStroke,onChange:e=>n("styles",e,"title",s,"textStroke","isStroke")}),i[s]?.textStroke?.isStroke&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{step:.1,className:"mt10",label:(0,x.__)("Stroke Size","b-blocks"),value:i[s]?.textStroke?.size,min:0,max:10,onChange:e=>n("styles",e,"title",s,"textStroke","size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Color","b-blocks"),value:i[s]?.textStroke?.color,onChange:e=>n("styles",e,"title",s,"textStroke","color")})]}),"hover"===s&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.01,value:i.transition,onChange:e=>n("styles",e,"title","transition")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Path","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{value:a.color,onChange:e=>n("styles",e,"path","color")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Size","b-blocks"),value:a.size,onChange:e=>n("styles",e,"path","size")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Thickness","b-blocks"),value:a.thickness,step:.1,min:0,max:20,onChange:e=>n("styles",e,"path","thickness")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Starting Point","b-blocks"),value:a.staringPoint,step:.1,min:0,max:2e3,onChange:e=>n("styles",e,"path","staringPoint")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Rotate","b-blocks"),value:a.rotate,step:.1,min:0,max:360,onChange:e=>n("styles",e,"path","rotate")})]})]})},Sq=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:vq,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(jq,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)($q,{...e})})]})})
589 -})}),Tq=({attributes:e,id:o})=>{const{styles:i}=e,{container:a,title:s,path:r}=i,c=`#${o} .b-blocks-text-path-container`,d=`${c} .b-blocks-text-path-svg`,u=`${d} .b-blocks-text-path-title`,p=(e="normal")=>{const t=s[e],n=t?.textStroke.isStroke?`${ns("stroke-width",t.textStroke.size?t.textStroke.size+"px":"")}\n\t\t\t${ns("stroke",t.textStroke.color)}`:"";return`\n\t\t\t${ns("color",t.color)}\n\t\t\t${ns("fill",t.color)}\n\t\t\t${ns("text-shadow",ls(t.textShadow,"text"))}\n\t\t\t${n}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${ps("",s.typo).googleFontLink}\n\n\t\t${ps(u,s.typo).styles}\n\n\t\t${c}{\n\t\t\t${ns("justify-content",a.desktop.alignment)}\n\t\t}\n\n\t\t${d}{\n\t\t\t${ns("rotate",r.rotate?r.rotate+"deg":"")}\n\t\t\t${ns("width",r.size)}\n\t\t\t${ns("width",r.size)}\n\t\t}\n\n\t\t${u}{\n\t\t\t${p("normal")}\t\t\n\t\t\ttransition: all ${s.transition}s ease-in-out;\n\t\t}\n\n\t\t${u}:hover{\n\t\t\t${p("hover")}\t\t\n\t\t}\n\t\t\n\t\t${t}{\n\t\t\t\t${c}{\n\t\t\t${ns("justify-content",a.tablet.alignment)}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t\t${c}{\n\t\t\t${ns("justify-content",a.mobile.alignment)}\n\t\t\t}\n\t\t}\n\t\t\n\t`}})};function Nq(e,t,n){return Math.max(t,Math.min(n,e))}function Mq(e){if("number"==typeof e)return Nq(e,0,1);const t=String(e).trim();if(t.endsWith("%"))return Nq(parseFloat(t.slice(0,-1))/100,0,1);const n=Number(t);return Number.isFinite(n)?Nq(n,0,1):0}const Lq=({pathSize:e=300,alignment:t="start",customPath:n="",customSvgPathSelector:o="",showIcon:i=!1,icon:a=null,iconSize:s=24,iconStartOffset:r="5%",iconEndOffset:c="95%",attributes:d})=>{const{icon:u,styles:p}=d,{type:h,iconType:g,title:f}=u,{path:x}=p,y="custom"===h?"library"===g?u.library:u.upload:"",v=(0,m.useMemo)((()=>`textPath-${Math.random().toString(36).slice(2)}`),[]),k=(0,m.useRef)(null),[w,_]=(0,m.useState)(null),[C,j]=(0,m.useState)(null),$=(0,m.useMemo)((()=>y?function(e,t){if(!e||"string"!=typeof e)return null;if("undefined"==typeof window)return null;try{const n=(new DOMParser).parseFromString(e,"image/svg+xml"),o=n.querySelector("svg");if(!o)return null;const i=o.getAttribute("viewBox")||null,a=(t?n.querySelector(t):null)||n.querySelector("path"),s=a?.getAttribute("d")||null;return s?{viewBox:i,d:s}:null}catch{return null}}(y,o||null):null),[y,o]),S="custom"===h&&$?.viewBox||$?.viewBox||`0 0 ${e} ${e}`;(0,m.useEffect)((()=>{if(!i)return;const e=k.current;if(!e)return;let t=0;try{t=e.getTotalLength()}catch{return}if(!t||!Number.isFinite(t))return;const n=Mq(r),o=Mq(c),a=e.getPointAtLength(t*n),s=e.getPointAtLength(t*o);_({x:a.x,y:a.y}),j({x:s.x,y:s.y})}),[i,r,c,e,h,n,y,$?.d]);const T=()=>a&&b().isValidElement(a)?b().cloneElement(a,{...a.props,width:s,height:s,fill:a.props.fill??"currentColor",stroke:a.props.stroke??"currentColor",style:{display:"block",...a.props.style||{}}}):null;return(0,l.jsx)("div",{className:"b-blocks-text-path-container",children:(0,l.jsxs)("svg",{viewBox:S,style:{transition:"transform 0.3s ease"},className:"b-blocks-text-path-svg",children:[(0,l.jsx)("defs",{children:(0,l.jsx)("path",{ref:k,id:v,d:(()=>{const t=e,o=e,i=t/2,a=o/2;switch(h){case"arc":return`M 50,${a+50} Q ${i},${a-100} ${t-50},${a+50}`;case"wave":{const e=40,n=2;let o=`M 0,${a}`;for(let i=0;i<=t;i+=5)o+=` L ${i},${a+e*Math.sin(i/t*Math.PI*n)}`;return o}case"circle":{const e=Math.min(t,o)/2-20;return`M ${i-e},${a}\n A ${e},${e} 0 1,1 ${i+e},${a}\n A ${e},${e} 0 1,1 ${i-e},${a}`}case"custom":return y&&$?.d?$.d:n||`M 50,${a} L ${t-50},${a}`;case"line":return`M 50,${a} L ${t-50},${a}`}})(),fill:"none",stroke:x.color,strokeWidth:x.thickness,strokeLinecap:"round",style:{transition:"stroke 0.3s ease"}})}),(0,l.jsx)("use",{href:`#${v}`}),i&&w&&(0,l.jsx)("g",{transform:`translate(${w.x}, ${w.y})`,children:(0,l.jsx)("g",{transform:`translate(${-s/2}, ${-s/2})`,fill:x.color,stroke:x.color,children:T()})}),i&&C&&(0,l.jsx)("g",{transform:`translate(${C.x}, ${C.y})`,children:(0,l.jsx)("g",{transform:`translate(${-s/2}, ${-s/2})`,fill:x.color,stroke:x.color,children:T()})}),(0,l.jsx)("text",{className:"b-blocks-text-path-title",textAnchor:t,children:(0,l.jsx)("textPath",{href:`#${v}`,startOffset:x.staringPoint,style:{textAnchor:t},children:f})})]})})},Pq=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Sq,{attributes:t,setAttributes:n,updateObj:a,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Tq,{attributes:t,id:`block-${o}`}),(0,l.jsx)(Lq,{attributes:t})]})]})}));Ll(yq.name)&&(0,p.registerBlockType)(yq,{icon:il,edit:Pq});const Eq=window.wp.richText,Aq=(0,x.__)("B Remove All Formats","b-blocks");(0,Eq.registerFormatType)("b-blocks/remove-inline-formats",{title:Aq,tagName:"none",className:null,edit:({value:e,onChange:t})=>(0,l.jsx)(h.RichTextToolbarButton,{icon:"editor-removeformatting",title:Aq,onClick:()=>t({...e,formats:Array(e.formats.length)})})});[{type:"b-blocks/text-highlight",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 1024 1024",children:(0,l.jsx)("path",{d:"M957.6 507.4L603.2 158.2a7.9 7.9 0 0 0-11.2 0L353.3 393.4a8.03 8.03 0 0 0-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 0 0-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0 0 11.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0 0 11.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2z"})}),title:(0,x.__)("B Text Highlight","b-blocks"),tagName:"mark",className:"bBlocksTextHighlight"},{type:"b-blocks/text-uppercase",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 32 32",children:(0,l.jsx)("path",{d:"M 1 6 L 1 8 L 7 8 L 7 26 L 9 26 L 9 8 L 15 8 L 15 6 L 1 6 z M 17 6 L 17 8 L 23 8 L 23 26 L 25 26 L 25 8 L 31 8 L 31 6 L 17 6 z"})}),title:(0,x.__)("B Text Uppercase","b-blocks"),tagName:"span",className:"bBlocksTextUppercase"},{type:"b-blocks/text-underline",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 16 16",children:(0,l.jsx)("path",{d:"M3,13l10,0l0,2l-10,0l0,-2Zm8,-12l2,0l0,6c0,2.76 -2.24,5 -5,5c-2.76,0 -5,-2.24 -5,-5l0,-6l2,0l-0,6c-0,1.656 1.344,3 3,3c1.656,0 3,-1.344 3,-3l0,-6Z"})}),title:(0,x.__)("B Text Underline","b-blocks"),tagName:"span",className:"bBlocksTextUnderline"},{type:"b-blocks/text-overline",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M19,3v2H5V3H19z M12,7c-3.87,0-7,3.13-7,7c0,3.87,3.13,7,7,7s7-3.13,7-7C19,10.13,15.87,7,12,7z M12,18.5 c-2.49,0-4.5-2.01-4.5-4.5S9.51,9.5,12,9.5s4.5,2.01,4.5,4.5S14.49,18.5,12,18.5z"})}),title:(0,x.__)("B Text Overline","b-blocks"),tagName:"span",className:"bBlocksTextOverline"}].forEach((e=>{const{type:t,icon:n,title:o,tagName:i,className:a}=e;(0,Eq.registerFormatType)(t,{title:o,tagName:i,className:a,edit:({isActive:e,value:i,onChange:a})=>(0,l.jsx)(h.RichTextToolbarButton,{title:o,onClick:()=>{a((0,Eq.toggleFormat)(i,{type:t}))},isActive:e,icon:n("bBlocksInlineIcon "+(e?"bBlocksInlineIconActive":""))})})})),wp.blocks.updateCategory("bBlocks",{icon:c})})()})();
449 +wavevertical:`polygon(\n 0% ${42.167+e-41}%,\n 2.389% ${42.45+e-41}%,\n 2.389% ${42.45+e-41}%,\n 3.175% ${42.54+e-41}%,\n 4.09% ${42.653+e-41}%,\n 5.119% ${42.795+e-41}%,\n 6.248% ${42.972+e-41}%,\n 7.463% ${43.188+e-41}%,\n 8.748% ${43.448+e-41}%,\n 10.09% ${43.76+e-41}%,\n 11.474% ${44.127+e-41}%,\n 12.886% ${44.555+e-41}%,\n 14.311% ${45.05+e-41}%,\n 14.311% ${45.05+e-41}%,\n 15.74% ${45.616+e-41}%,\n 17.168% ${46.224+e-41}%,\n 18.594% ${46.84+e-41}%,\n 20.019% ${47.435+e-41}%,\n 21.444% ${47.975+e-41}%,\n 22.87% ${48.429+e-41}%,\n 24.295% ${48.766+e-41}%,\n 25.721% ${48.952+e-41}%,\n 27.149% ${48.958+e-41}%,\n 28.578% ${48.75+e-41}%,\n 28.578% ${48.75+e-41}%,\n 30.005% ${48.31+e-41}%,\n 31.433% ${47.673+e-41}%,\n 32.863% ${46.886+e-41}%,\n 34.292% ${45.997+e-41}%,\n 35.722% ${45.052+e-41}%,\n 37.152% ${44.1+e-41}%,\n 38.582% ${43.188+e-41}%,\n 40.011% ${42.363+e-41}%,\n 41.439% ${41.674+e-41}%,\n 42.867% ${41.167+e-41}%,\n 42.867% ${41.167+e-41}%,\n 44.296% ${40.878+e-41}%,\n 45.723% ${40.793+e-41}%,\n 47.149% ${40.889+e-41}%,\n 48.575% ${41.14+e-41}%,\n 50% ${41.521+e-41}%,\n 51.425% ${42.007+e-41}%,\n 52.851% ${42.573+e-41}%,\n 54.277% ${43.193+e-41}%,\n 55.704% ${43.844+e-41}%,\n 57.133% ${44.5+e-41}%,\n 57.133% ${44.5+e-41}%,\n 58.561% ${45.137+e-41}%,\n 59.989% ${45.735+e-41}%,\n 61.418% ${46.275+e-41}%,\n 62.848% ${46.737+e-41}%,\n 64.278% ${47.104+e-41}%,\n 65.708% ${47.356+e-41}%,\n 67.137% ${47.474+e-41}%,\n 68.567% ${47.439+e-41}%,\n 69.995% ${47.232+e-41}%,\n 71.422% ${46.833+e-41}%,\n 71.422% ${46.833+e-41}%,\n 72.851% ${46.235+e-41}%,\n 74.279% ${45.469+e-41}%,\n 75.705% ${44.576+e-41}%,\n 77.13% ${43.598+e-41}%,\n 78.556% ${42.577+e-41}%,\n 79.981% ${41.555+e-41}%,\n 81.406% ${40.572+e-41}%,\n 82.832% ${39.672+e-41}%,\n 84.26% ${38.895+e-41}%,\n 85.689% ${38.283+e-41}%,\n 85.689% ${38.283+e-41}%,\n 87.114% ${37.863+e-41}%,\n 88.526% ${37.625+e-41}%,\n 89.91% ${37.542+e-41}%,\n 91.252% ${37.589+e-41}%,\n 92.538% ${37.74+e-41}%,\n 93.752% ${37.968+e-41}%,\n 94.881% ${38.247+e-41}%,\n 95.91% ${38.552+e-41}%,\n 96.825% ${38.856+e-41}%,\n 97.611% ${39.133+e-41}%,\n 100% ${40+e-41}%,\n 100% 100.167%,\n 97.611% 100.167%,\n 97.611% 100.167%,\n 96.825% 100.167%,\n 95.91% 100.167%,\n 94.881% 100.167%,\n 93.752% 100.167%,\n 92.538% 100.167%,\n 91.252% 100.167%,\n 89.91% 100.167%,\n 88.526% 100.167%,\n 87.114% 100.167%,\n 85.689% 100.167%,\n 85.689% 100.167%,\n 84.26% 100.167%,\n 82.832% 100.167%,\n 81.406% 100.167%,\n 79.981% 100.167%,\n 78.556% 100.167%,\n 77.13% 100.167%,\n 75.705% 100.167%,\n 74.279% 100.167%,\n 72.851% 100.167%,\n 71.422% 100.167%,\n 71.422% 100.167%,\n 69.995% 100.167%,\n 68.567% 100.167%,\n 67.137% 100.167%,\n 65.708% 100.167%,\n 64.278% 100.167%,\n 62.848% 100.167%,\n 61.418% 100.167%,\n 59.989% 100.167%,\n 58.561% 100.167%,\n 57.133% 100.167%,\n 57.133% 100.167%,\n 55.704% 100.167%,\n 54.277% 100.167%,\n 52.851% 100.167%,\n 51.425% 100.167%,\n 50% 100.167%,\n 48.575% 100.167%,\n 47.149% 100.167%,\n 45.723% 100.167%,\n 44.296% 100.167%,\n 42.867% 100.167%,\n 42.867% 100.167%,\n 41.439% 100.167%,\n 40.011% 100.167%,\n 38.582% 100.167%,\n 37.152% 100.167%,\n 35.722% 100.167%,\n 34.292% 100.167%,\n 32.863% 100.167%,\n 31.433% 100.167%,\n 30.005% 100.167%,\n 28.578% 100.167%,\n 28.578% 100.167%,\n 27.149% 100.167%,\n 25.721% 100.167%,\n 24.295% 100.167%,\n 22.87% 100.167%,\n 21.444% 100.167%,\n 20.019% 100.167%,\n 18.594% 100.167%,\n 17.168% 100.167%,\n 15.74% 100.167%,\n 14.311% 100.167%,\n 14.311% 100.167%,\n 12.886% 100.167%,\n 11.474% 100.167%,\n 10.09% 100.167%,\n 8.748% 100.167%,\n 7.463% 100.167%,\n 6.248% 100.167%,\n 5.119% 100.167%,\n 4.09% 100.167%,\n 3.175% 100.167%,\n 2.389% 100.167%,\n 0% 100.167%\n )`}),bN=({beforeLabelEl:e,height:t,afterLabelEl:n,beforeImg:o,afterImg:i,orientation:a,options:s,dragg:r,label:c,captionEl:d,...u})=>{const{defaultOffset:p,isMoveClick:h,autoSlide:g,moveMouseOver:b}=s,{isAutoSlide:f,isHoverStop:x,speed:y}=g,[v,k]=(0,m.useState)(100*p),[w,_]=(0,m.useState)(!1),C=(0,m.useRef)(null),{handleClick:j}=((e,t,n,o,i,a=!1,s,r=50,l=!1)=>{const[c,d]=(0,m.useState)(!0),u=(0,m.useRef)(),p=(0,m.useRef)(1),h=o=>{if(!e||!t.current)return;const a=t.current.getBoundingClientRect(),s="touches"in o?o.touches[0]:o,r=("horizontal"===i?s.clientX-a.left:s.clientY-a.top)/("horizontal"===i?a.width:a.height)*100;n(Math.min(Math.max(r,0),100))};return(0,m.useEffect)((()=>{if(!e)return;const t=()=>o(!1),n=e=>h(e),i=e=>h(e);return window.addEventListener("mousemove",n),window.addEventListener("mouseup",t),window.addEventListener("touchmove",i),window.addEventListener("touchend",t),()=>{window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",t),window.removeEventListener("touchmove",i),window.removeEventListener("touchend",t)}}),[e]),(0,m.useEffect)((()=>{if(!a||!c||e)return;let t;const o=e=>{t||(t=e);const i=(e-t)/1e3;t=e,n((e=>{let t=e+p.current*(10*r)*i;return t>=100&&(p.current=-1,t=100),t<=0&&(p.current=1,t=0),t})),u.current=requestAnimationFrame(o)};return u.current=requestAnimationFrame(o),()=>cancelAnimationFrame(u.current)}),[a,c,e,s,r]),(0,m.useEffect)((()=>{if(!t.current)return;const e=()=>d(!s),n=()=>d(!0);return t?.current?.addEventListener("mouseenter",e),t?.current?.addEventListener("mouseleave",n),()=>{t?.current?.removeEventListener("mouseenter",e),t?.current?.removeEventListener("mouseleave",n)}}),[t.current,s]),{handleClick:o=>{if(e||!t.current||!l)return;const a=t.current.getBoundingClientRect(),s=("horizontal"===i?o.clientX-a.left:o.clientY-a.top)/("horizontal"===i?a.width:a.height)*100;n(Math.min(Math.max(s,0),100))}}})(w,C,k,_,a,f,x,y,h),$=()=>{const e=C.current;if(!e)return;const n=Array.from(e.querySelectorAll("img"));if(!n.length)return;const o=parseInt(t,10);let i;if(!isNaN(o)&&o>0)i=o;else{const e=n.map((e=>e.getBoundingClientRect().height)).filter((e=>e>0));if(!e.length)return;i=Math.max(...e)}e.style.height=`${i}px`,n.forEach((e=>{e.style.height=`${i}px`}))};return(0,m.useEffect)((()=>{const e=C.current;if(!e)return;const t=new ResizeObserver($);return t.observe(e),()=>t.disconnect()}),[]),(0,l.jsxs)("div",{...u,className:cN,children:[(0,l.jsxs)("div",{ref:C,className:"b-blocks-comparison-wrapper "+(c.isShowHover?"b-blocks-label-hover":""),onMouseDown:()=>_(!0),onTouchStart:()=>_(!0),...b?{onMouseMove:()=>_(!0),onMouseLeave:()=>_(!1)}:{},onClick:j,children:[(0,l.jsxs)("div",{className:"b-blocks-image-wrapper",children:[(0,l.jsx)("img",{src:o?.url,alt:o?.alt||o?.title,onLoad:$}),e]}),(0,l.jsxs)("div",{className:"b-blocks-image-wrapper",style:{clipPath:mN(v)[r.shapeType+a]},children:[(0,l.jsx)("img",{src:i?.url,alt:i?.alt||i?.title,onLoad:$}),n]}),(0,l.jsx)("div",{className:`b-blocks-comparison-slider-handle b-blocks-slider-${a} ${r.handleType} ${"default"!==r.shapeType?"circle-outline-line-none":""} `,style:{left:"horizontal"===a?`${v}%`:"",
450 +top:"vertical"===a?`${v}%`:""},children:"default"===r.handleType?(0,l.jsx)("div",{className:"b-blocks-default-icon"},r.handleType):(0,l.jsx)("div",{className:`b-blocks-${r.handleType}-icon`,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(hN,{}),(0,l.jsx)(gN,{})]})},r.handleType)})]}),d]})};var fN=s(4589);const xN={style1:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5303 18.5303C14.2374 18.8232 13.7626 18.8232 13.4697 18.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697L13.4697 5.46967C13.7626 5.17678 14.2374 5.17678 14.5303 5.46967C14.8232 5.76256 14.8232 6.23744 14.5303 6.53033L9.06066 12L14.5303 17.4697C14.8232 17.7626 14.8232 18.2374 14.5303 18.5303Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.46967 5.46967C9.76256 5.17678 10.2374 5.17678 10.5303 5.46967L16.5303 11.4697C16.8232 11.7626 16.8232 12.2374 16.5303 12.5303L10.5303 18.5303C10.2374 18.8232 9.76256 18.8232 9.46967 18.5303C9.17678 18.2374 9.17678 17.7626 9.46967 17.4697L14.9393 12L9.46967 6.53033C9.17678 6.23744 9.17678 5.76256 9.46967 5.46967Z"})})},style2:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4939 20.5644C11.1821 20.8372 10.7083 20.8056 10.4356 20.4939L3.43557 12.4939C3.18814 12.2111 3.18814 11.7889 3.43557 11.5061L10.4356 3.50613C10.7083 3.1944 11.1822 3.16281 11.4939 3.43557C11.8056 3.70834 11.8372 4.18216 11.5644 4.49388L5.65283 11.25L20 11.25C20.4142 11.25 20.75 11.5858 20.75 12C20.75 12.4142 20.4142 12.75 20 12.75L5.65283 12.75L11.5644 19.5061C11.8372 19.8179 11.8056 20.2917 11.4939 20.5644Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5061 3.43557C12.8178 3.16281 13.2917 3.19439 13.5644 3.50612L20.5644 11.5061C20.8119 11.7889 20.8119 12.2111 20.5644 12.4939L13.5644 20.4939C13.2917 20.8056 12.8178 20.8372 12.5061 20.5644C12.1944 20.2917 12.1628 19.8178 12.4356 19.5061L18.3472 12.75H4C3.58579 12.75 3.25 12.4142 3.25 12C3.25 11.5858 3.58579 11.25 4 11.25H18.3472L12.4356 4.49388C12.1628 4.18215 12.1944 3.70833 12.5061 3.43557Z"})})},style3:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M11 20.74C10.9012 20.7423 10.803 20.7238 10.7118 20.686C10.6205 20.6481 10.5382 20.5916 10.47 20.52L2.47 12.52C2.32955 12.3794 2.25066 12.1888 2.25066 11.99C2.25066 11.7913 2.32955 11.6007 2.47 11.46L10.47 3.46003C10.576 3.35806 10.7096 3.2895 10.8542 3.26288C10.9989 3.23626 11.1481 3.25274 11.2835 3.31029C11.4188 3.36783 11.5342 3.4639 11.6154 3.58653C11.6966 3.70917 11.7399 3.85296 11.74 4.00003V7.30003H21C21.1981 7.30262 21.3874 7.38247 21.5275 7.52256C21.6676 7.66265 21.7474 7.85192 21.75 8.05003V16.05C21.7474 16.2481 21.6676 16.4374 21.5275 16.5775C21.3874 16.7176 21.1981 16.7974 21 16.8H11.74V19.99C11.7402 20.139 11.6954 20.2845 11.6116 20.4076C11.5277 20.5307 11.4087 20.6257 11.27 20.68C11.1848 20.7175 11.0931 20.7379 11 20.74ZM4.07 12L10.25 18.18V16.05C10.25 15.8511 10.329 15.6603 10.4697 15.5197C10.6103 15.379 10.8011 15.3 11 15.3H20.25V8.80003H11C10.8019 8.79744 10.6126 8.71759 10.4725 8.57749C10.3324 8.4374 10.2526 8.24813 10.25 8.05003V5.82003L4.07 12Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M13 20.74C12.9039 20.7541 12.8062 20.7541 12.71 20.74C12.5724 20.6823 12.4551 20.5849 12.3732 20.4602C12.2912 20.3355 12.2484 20.1892 12.25 20.04V16.7H3.00001C2.81189 16.6956 2.63208 16.6216 2.49538 16.4923C2.35868 16.363 2.27481 16.1876 2.26001 16V8.00002C2.25463 7.89856 2.26965 7.79706 2.30417 7.7015C2.3387 7.60595 2.39204 7.51829 2.46103 7.44371C2.53002 7.36913 2.61326 7.30913 2.70584 7.26727C2.79841 7.22542 2.89844 7.20255 3.00001 7.20002H12.25V4.01002C12.2498 3.86106 12.2946 3.71551 12.3784 3.59241C12.4623 3.4693 12.5813 3.37436 12.72 3.32002C12.8551 3.26039 13.0053 3.24376 13.1502 3.27238C13.2951 3.301 13.4277 3.37349 13.53 3.48002L21.53 11.48C21.6705 11.6206 21.7493 11.8113 21.7493 12.01C21.7493 12.2088 21.6705 12.3994 21.53 12.54L13.53 20.54C13.4601 20.6079 13.377 20.6608 13.2858 20.6952C13.1946 20.7296 13.0973 20.7448 13 20.74ZM3.76001 15.2H13C13.1981 15.2026 13.3874 15.2825 13.5275 15.4226C13.6676 15.5626 13.7474 15.7519 13.75 15.95V18.18L19.93 12L13.75 5.83002V8.00002C13.7477 8.19843 13.6689 8.3883 13.53 8.53002C13.3817 8.65257 13.1919 8.71343 13 8.70002H3.76001V15.2Z"})})},style4:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"M1.02698 11.9929L5.26242 16.2426L6.67902 14.8308L4.85766 13.0033L22.9731 13.0012L22.9728 11.0012L4.85309 11.0033L6.6886 9.17398L5.27677 7.75739L1.02698 11.9929Z"})}),right:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"M23.0677 11.9929L18.818 7.75739L17.4061 9.17398L19.2415 11.0032L0.932469 11.0012L0.932251 13.0012L19.2369 13.0032L17.4155 14.8308L18.8321 16.2426L23.0677 11.9929Z"})})},style5:{left:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"m4.431 12.822 13 9A1 1 0 0 0 19 21V3a1 1 0 0 0-1.569-.823l-13 9a1.003 1.003 0 0 0 0 1.645z"})}),right:(0,l.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{transform:'${\r direction === "vertical" ? "rotate(90, 13, 12)" : ""\r }',d:"M5.536 21.886a1.004 1.004 0 0 0 1.033-.064l13-9a1 1 0 0 0 0-1.644l-13-9A1 1 0 0 0 5 3v18a1 1 0 0 0 .536.886z"})})},style6:{left:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M16.5 8L13 11.5L16.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M10.5 8L7 11.5L10.5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),right:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",children:[(0,l.jsx)("path",{d:"M7 8L10.5 11.5L7 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M13 8L16.5 11.5L13 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}},yN=({icon:e,...t})=>(0,l.jsx)("div",{...t,children:e}),vN=({attributes:e,device:t,setActiveIndex:n})=>{const{orientation:o,options:i,dragg:a,label:s,slider:r,sliderOptions:c,isLabel:d,isCap:u,align:p}=e,h=(0,m.useRef)(),{hAlign:g,vAlign:b}=s,{height:f,autoplay:x,speed:y,autoplaySpeed:v,pauseOnHover:k,infinite:w,dots:_,arrows:C,slidesView:j,arrowType:$}=c;(0,m.useEffect)((()=>{h.current&&r.length<2&&h.current.innerSlider.list.querySelectorAll(".slick-cloned").forEach((e=>{e.style.display="none"}))}),[h.current]);const S={className:"center",centerMode:!0,arrows:C,dots:_,infinite:w,centerPadding:"15%",draggable:!1,autoplay:x,slidesToShow:j[t],speed:y,autoplaySpeed:v,pauseOnHover:k,nextArrow:(0,l.jsx)(yN,{className:"slick-arrow slick-prev",icon:xN[$].right}),
451 +prevArrow:(0,l.jsx)(yN,{className:"slick-arrow slick-next",icon:xN[$].left})};return(0,l.jsx)(fN.A,{...S,className:"b-blocks-image-compare-slider-wrapper",ref:h,children:r.map(((e,c)=>{const{beforeImg:h,afterImg:m,caption:x}=e,y={beforeLabelEl:d&&h.beforeLabel&&(0,l.jsx)("div",{className:`b-blocks-label b-blocks-before-label b-blocks-${o} ${"horizontal"===o?g:b}`,dangerouslySetInnerHTML:{__html:h.beforeLabel}}),afterLabelEl:d&&m.afterLabel&&(0,l.jsx)("div",{className:`b-blocks-label b-blocks-after-label b-blocks-${o} ${"horizontal"===o?g:b}`,dangerouslySetInnerHTML:{__html:m.afterLabel}}),captionEl:u&&x&&(0,l.jsx)("div",{className:"b-blocks-caption",dangerouslySetInnerHTML:{__html:x}}),orientation:o,options:i,dragg:a,label:s},v=`${t}-${h?.img?.url}-${m?.img?.url}-${r.length}-${JSON.stringify(f)}-${p}-${i.autoSlide.isMouseOver}`;return(0,l.jsx)(bN,{...y,height:f[t],beforeImg:h.img,afterImg:m.img,onClick:()=>n(c)},v)}))})},kN=({attributes:e,afterLabelEl:t,beforeLabelEl:n,captionEl:o,isBackend:i=!1,backDevice:a="desktop",activeIndex:s,setActiveIndex:r=()=>{}})=>{const{beforeImg:c,afterImg:d,orientation:u,styles:p,options:h,dragg:g,label:m,align:b,theme:f,slider:x,sliderOptions:y}=e,{device:v}=Cd(),k=i?a:v,w=`${c?.url}-${d?.url}-${JSON.stringify(p.container.height)}-${b}-${h.autoSlide.isMouseOver}-${k}`;return(0,l.jsxs)(l.Fragment,{children:["default"===f&&(0,l.jsx)(bN,{beforeLabelEl:n,afterLabelEl:t,captionEl:o,beforeImg:c,afterImg:d,orientation:u,options:h,dragg:g,label:m,device:k,height:p.container.height[k]},w),"slider"===f&&(0,l.jsx)(vN,{attributes:e,device:k,activeIndex:s,setActiveIndex:r},`${x.length}-${JSON.stringify(y)}`)]})},wN=[{name:"before-img",title:(0,x.__)("Before Img","image-compare")},{name:"after-img",title:(0,x.__)("After Img","image-compare")}],_N=[{label:"Horizontal",value:"horizontal",icon:"image-flip-horizontal"},{label:"Vertical",value:"vertical",icon:"image-flip-vertical"}],CN=[{label:"Top",value:"top",icon:dN},{label:"Middle",value:"middle",icon:uN},{label:"Bottom",value:"bottom",icon:pN}],jN=[{label:"Left",value:"left",icon:"editor-alignleft"},{label:"Center",value:"center",icon:"editor-aligncenter"},{label:"Right",value:"right",icon:"editor-alignright"}],$N=[{name:"general",title:(0,x.__)("General","textdomain")},{name:"style",title:(0,x.__)("Style","textdomain")}],SN=[{label:"Default",value:"default",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-default.png"},{label:"Rectangle Stroke",value:"rectangle-caret",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-rectangle-stroke.png",isPro:!0},{label:"Circle Small",value:"circle-caret",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-small.png",isPro:!0},{label:"Circle Big",value:"circle-big-caret",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-big.png",isPro:!0},{label:"Circle Outline",value:"circle-outline",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-outline.png",isPro:!0},{label:"Circle Outline Line None",value:"circle-outline-line-none",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-circle-outline-line-none.png",isPro:!0},{label:"Capsule Fill",value:"capsule-fill",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-fill.png",isPro:!0},{label:"Capsule Stroke",value:"capsule-stroke",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-stroke.png",isPro:!0},{label:"Capsule Tiny Fill Big",value:"capsule-tiny-fill-big",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-fill-big.png",isPro:!0},{label:"Capsule Tiny Stroke Big",value:"capsule-tiny-stroke-big",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-stroke-big.png",isPro:!0},{label:"Capsule Tiny Fill Small",value:"capsule-tiny-fill-small",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-fill-small.png",isPro:!0},{label:"Capsule Tiny Stroke Small",value:"capsule-tiny-stroke-small",img:"https://templates.bplugins.com/wp-content/uploads/2025/02/beaf-preset-capsule-tiny-stroke-small.png",isPro:!0}],TN=["rectangle-caret","circle-caret","circle-big-caret","capsule-stroke","capsule-tiny-stroke-big","capsule-tiny-stroke-small"],NN=[{label:(0,x.__)("Style 1","b-blocks"),value:"style1",icon:xN.style1.right},{label:(0,x.__)("Style 2","b-blocks"),value:"style2",icon:xN.style2.right},{label:(0,x.__)("Style 3","b-blocks"),value:"style3",icon:xN.style3.right},{label:(0,x.__)("Style 4","b-blocks"),value:"style4",icon:xN.style4.right},{label:(0,x.__)("Style 5","b-blocks"),value:"style5",icon:xN.style5.right},{label:(0,x.__)("Style 6","b-blocks"),value:"style6",icon:xN.style6.right}],MN=[{name:"navigation",title:(0,x.__)("Navigation","textdomain")},{name:"pagination",title:(0,x.__)("Pagination","textdomain")}],LN=({attributes:e,id:t})=>{const{alignment:n,width:o,border:i,dragg:a,labelTypo:s,labelColors:r,labelPadding:c,capTypo:d,capColors:u,capPadding:p,styles:h,theme:g,sliderStyle:m}=e,{dragg:b}=h,{pagination:f,navigation:x}=m,{icon:y,container:v}=x,k=`#${t}`,w=`${k} .${cN}`,_=`${w} .b-blocks-comparison-wrapper`,C=`${_} .b-blocks-label`,j=`${w} .b-blocks-caption`,$=`${_} .b-blocks-comparison-slider-handle`,S=`${k} .b-blocks-image-compare-slider-wrapper`,T=`${S} .slick-arrow`,N=`${S} .slick-dots`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",s)?.googleFontLink}\n\t\t${ps("",d)?.googleFontLink}\n\t\t${ps(C,s)?.styles}\n\t\t${ps(j,d)?.styles}\n\n\t\t${k}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${w}{\n\t\t\twidth: ${o};\n\t\t\t${is(i)}\n\t\t}\n\n\t\t${C}{\n\t\t\t${ss(r)}\n\t\t\tpadding: ${us(c)};\n\t\t}\n\t\t${j}{\n\t\t\t${ss(u)}\n\t\t\tpadding: ${us(p)};\n\t\t}\n\n\t\t${M=a.handleType,TN.includes(M)?`${$} .b-blocks-${a.handleType}-icon{\n\t\t${ns("border-color",b.handler.color)}\n\t\t${ns("border-width",jt(b.line.size)?b.line.size+"px":"")}\n\t\t\t}`:`${$} .b-blocks-${a.handleType}-icon{\n\t\t\t\t${ns("background-color",b.handler.color)}\n\t\t\t\t${ns("border-color",b.handler.color)}\n\t\t\t}`}\n\n\t\t${$} :where(svg){\n\t\t\t${ns("color",b.icon.color)}\n\t\t\t${ns("fill",b.icon.color)}\n\t\t}\n\t\t${$}::before{\n\t\t\tcontent:"";\n\t\t\t${ns("width",jt(b.line.size)?b.line.size+"px":"")}\n\t\t\t${os(b.line.bg)}\n\t\t}\n\t\t${$}::after{\n\t\t\tcontent:"";\n\t\t\t${ns("width",jt(b.line.size)?b.line.size+"px":"")}\n\t\t\t${os(b.line.bg)}\n\t\t}\n\t\t${"slider"===g?`\n\t\t\t\t${T}{\n\t\t\t\t\t${ns("height",v.height)}\n\t\t\t\t\t${ns("width",v.width)}\n\t\t\t\t\t${os(v.normal.bg)}\n\t\t\t\t\t${as(v.normal.border)}\n\t\t\t\t\t${ns("border-radius",hs(v.normal.radius))}\n\t\t\t\t}\n\n\t\t\t\t${T}:hover{\n\t\t\t\t\t${os(v.hover.bg)}\n\t\t\t\t\t${as(v.hover.border)}\n\t\t\t\t\t${ns("border-radius",hs(v.hover.radius))}\n\t\t\t\t}\n\n\t\t\t\t${T} > svg{\n\t\t\t\t\t${ns("width",y.normal.size)}\n\t\t\t\t\t${ns("fill",y.normal.color)}\n\t\t\t\t}\n\t\t\t\t${T}:hover svg{\n\t\t\t\t\t${ns("fill",y.hover.color)}\n\t\t\t\t\t${ns("width",y.hover.size)}\n\t\t\t\t}\n\t\t\t\t${N}>li>button::before{\n\t\t\t\t\t${ns("background-color",f.active)}\n\t\t\t\t}\n\t\t\t\t${N}>li.slick-active>button::before{\n\t\t\t\t\t${ns("background-color",f.active)}\n\t\t\t\t}\n\t\t\t\t`:""}\n\t\t`.replace(/\s+/g," ")}});var M},PN=({attributes:e,updateObj:t,index:n,setIsProModalOpen:o,premiumProps:i})=>{const{slider:a}=e,s=a[n],{beforeImg:r,afterImg:c,caption:d}=s;return(0,l.jsx)("div",{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:wN,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["before-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{isPremium:i,setIsProModalOpen:o,className:"mt10",label:(0,x.__)("Label","image-compare"),value:r.beforeLabel,onChange:e=>t("slider",e,n,"beforeImg","beforeLabel"),Component:y.TextControl}),(0,l.jsx)(Ya,{
452 +isPremium:i,setIsProModalOpen:o,className:"mt10",value:r.img,onChange:e=>t("slider",e,n,"beforeImg","img"),placeholder:(0,x.__)("Enter Image URL","image-compare"),Component:ke})]}),"after-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{isPremium:i,setIsProModalOpen:o,className:"mt10",label:(0,x.__)("Label","image-compare"),value:c.afterLabel,onChange:e=>t("slider",e,n,"afterImg","afterLabel"),Component:y.TextControl}),(0,l.jsx)(Ya,{isPremium:i,setIsProModalOpen:o,className:"mt10",value:c.img,onChange:e=>t("slider",e,n,"afterImg","img"),placeholder:(0,x.__)("Enter Image URL","image-compare"),Component:ke})]}),(0,l.jsx)(Ya,{isPremium:i,setIsProModalOpen:o,className:"mt10",label:(0,x.__)("Caption","image-compare"),value:d,onChange:e=>t("slider",e,n,"caption"),Component:y.TextControl})]})})})},EN=({value:e,options:t,onChange:n,isPremium:o=!1,setIsProModalOpen:i})=>(0,l.jsx)("div",{className:"icb-preset-items-wrapper",children:t.map(((t,a)=>(0,l.jsx)(y.Tooltip,{position:"top",text:`${t.label}`,delay:100,children:(0,l.jsxs)("div",{onClick:()=>"default"!==t.value&&!o&&t.isPro?i(!0):n(t.value),className:`icb-preset-item ${e===t.value?"active":""} ${"default"!==t.value&&!o&&t.isPro?"icb-premium":""}`,children:[(0,l.jsx)("img",{src:t.img}),(0,l.jsx)("div",{className:"icb-preset-badge",children:"Pro"})]})},a)))}),AN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n,isPremium:o,setIsProModalOpen:i})=>{const{sliderOptions:a}=e,{autoplay:s,speed:r,autoplaySpeed:c,pauseOnHover:d,infinite:u,dots:p,arrows:h,slidesView:g,arrowType:m}=a;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Settings","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Enable Autoplay","image-compare"),checked:s,value:s,onChange:e=>t("sliderOptions",e,"autoplay"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Stop Slider On Mouse Over"),checked:d,value:d,onChange:e=>t("sliderOptions",e,"pauseOnHover"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Enable Infinite Loop"),checked:u,value:u,onChange:e=>t("sliderOptions",e,"infinite"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Enable Pagination"),checked:p,value:p,onChange:e=>t("sliderOptions",e,"dots"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Enable Navigation"),checked:h,value:h,onChange:e=>t("sliderOptions",e,"arrows"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Slides To Show")," ",(0,l.jsx)(_,{})," "]}),step:1,min:1,max:10,value:g[n],onChange:e=>t("sliderOptions",e,"slidesView",n),Component:y.RangeControl}),s?(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Slider Speed (ms)"),step:50,min:0,max:1e4,value:c,onChange:e=>t("sliderOptions",e,"autoplaySpeed"),Component:y.RangeControl}):null,(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Slider Delay (ms)"),step:50,min:0,max:1e4,value:r,onChange:e=>t("sliderOptions",e,"speed"),Component:y.RangeControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Arrow","image-compare"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,x.__)("Arrow Style","image-compare")}),(0,l.jsx)(Ka,{isPremium:o,setIsProModalOpen:i,isIcon:!0,value:m,onChange:e=>t("sliderOptions",e,"arrowType"),options:NN,proValues:["style1","style2","style3","style4","style5","style6"],size:"default"})]})]})})),BN=({attributes:e,setAttributes:t,updateObj:n,isPremium:o,setIsProModalOpen:i,activeIndex:a,setActiveIndex:s})=>{const{beforeImg:r,afterImg:c,orientation:d,isSwap:u,isLabel:p,label:h,beforeLabel:g,afterLabel:m,isCap:b,cap:f,options:v,dragg:k,styles:w,theme:_}=e,C=["default","rectangle-caret","circle-caret"];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"before-after-image-compare",docsLink:"https://bblockswp.com/docs/image-compare"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image Comparison","image-compare"),initialOpen:!0,children:[(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,labelPosition:"edge",label:(0,x.__)("Theme","image-compare"),value:_,options:[{label:"Default",value:"default"},{label:"Slider",value:"slider"}],onChange:e=>t({theme:e}),Component:y.SelectControl}),(0,l.jsx)(Tn,{className:"mb10",label:(0,x.__)("Orientation","image-compare"),options:_N,value:d,onChange:e=>n("orientation",e),isIcon:!0}),"slider"===_&&(0,l.jsx)(_a,{premiumProps:o,attributes:e,setAttributes:t,activeIndex:a,setActiveIndex:s,updateObj:n,setIsProModalOpen:i,newItem:{beforeImg:{img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg.jpg"},beforeLabel:"Before Label"},afterImg:{img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/03/beafImg2.jpg"},afterLabel:"After Label"},caption:"Before After Image Caption"},itemLabel:"Slide",arrKey:"slider",design:"sortable",ItemSettings:PN}),"default"===_&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:wN,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["before-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ke,{className:"mt10",value:r,onChange:e=>n("beforeImg",e),placeholder:(0,x.__)("Enter Image URL","image-compare")}),(0,l.jsx)(nd,{className:"mt20",value:r,onChange:e=>n("beforeImg",e)})]}),"after-img"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ke,{className:"mt10",value:c,onChange:e=>n("afterImg",e),placeholder:(0,x.__)("Enter Image URL","image-compare")}),(0,l.jsx)(nd,{className:"mt20",value:c,onChange:e=>n("afterImg",e)})]})]})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Swap Images","image-compare"),checked:u,onChange:e=>t({isSwap:e,beforeImg:{...c},afterImg:{...r}})})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Labels","image-compare"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Labels","image-compare"),checked:p,onChange:e=>n("isLabel",e)}),p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show labels on hover","image-compare"),checked:h.isShowHover,onChange:e=>n("label",e,"isShowHover")}),"horizontal"===d&&(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Label Position","image-compare"),options:CN,value:h.hAlign,onChange:e=>n("label",{...h,hAlign:e}),isIcon:!0,Component:Tn}),"vertical"===d&&(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Label Position","image-compare"),options:jN,value:h.vAlign,onChange:e=>n("label",{...h,vAlign:e}),isIcon:!0,Component:Tn}),"default"===_&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Before Label","image-compare"),value:g,onChange:e=>n("beforeLabel",e),placeholder:(0,x.__)("Before image label","image-compare")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("After Label","image-compare"),value:m,onChange:e=>n("afterLabel",e),placeholder:(0,x.__)("After image label","image-compare")})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","image-compare"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Caption","image-compare"),checked:b,onChange:e=>n("isCap",e)}),"default"===_?b&&(0,l.jsx)(y.__experimentalInputControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Caption","image-compare"),value:f,onChange:e=>n("cap",e)}):""]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Default Offset","image-compare"),step:.1,max:1,min:0,value:v.defaultOffset,
453 +onChange:e=>n("options",e,"defaultOffset"),Component:y.RangeControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Move Slider On Click","image-compare"),checked:v.isMoveClick,onChange:e=>n("options",e,"isMoveClick"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Move Slider On Mouse Over","image-compare"),checked:v.moveMouseOver,onChange:e=>n("options",e,"moveMouseOver"),Component:y.ToggleControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,className:"mt10",label:(0,x.__)("Auto Slide","image-compare"),checked:v.autoSlide.isAutoSlide,onChange:e=>n("options",e,"autoSlide","isAutoSlide"),Component:y.ToggleControl}),v.autoSlide.isAutoSlide&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Auto Slide Speed","image-compare"),step:1,max:20,maxLength:20,minLength:0,min:0,value:v.autoSlide.speed,onChange:e=>n("options",e,"autoSlide","speed"),Component:y.RangeControl}),(0,l.jsx)(Ya,{isPremium:o,setIsProModalOpen:i,label:(0,x.__)("Stop Slider On Mouse Over","image-compare"),checked:v.autoSlide.isHoverStop,onChange:e=>n("options",e,"autoSlide","isHoverStop"),Component:y.ToggleControl})]})]}),"slider"===_&&(0,l.jsx)(AN,{attributes:e,updateObj:n,isPremium:o,setIsProModalOpen:i}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Presets","image-compare"),initialOpen:!1,children:(0,l.jsx)(EN,{value:k.handleType,setIsProModalOpen:i,options:SN,onChange:e=>C.includes(e)?t({dragg:{...k,handleType:e},styles:{...w,dragg:{...w.dragg,line:{...w.dragg.line,size:2}}}}):t({dragg:{...k,handleType:e},styles:{...w,dragg:{...w.dragg,line:{...w.dragg.line,size:3}}}}),isPremium:o})})]})},IN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,isPremium:t,setIsProModalOpen:n,updateObj:o,device:i})=>{const{styles:a,width:s,isLabel:r,labelTypo:c,labelColors:d,labelPadding:u,isCap:p,capTypo:h,capColors:g,capPadding:m,theme:b,sliderOptions:f,sliderStyle:v}=e,{container:w,dragg:C}=a,{height:j}=f,{pagination:$,navigation:S}=v;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Container","image-compare"),className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","image-compare"),labelPosition:"left",value:s,onChange:e=>o("width",e),units:[Pe(),Ee(),Ae(),Ie()]}),"default"===b&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height:","image-compare"),(0,l.jsx)(_,{})]}),value:w.height[i],onChange:e=>o("styles",e,"container","height",i),units:[Pe(),Ae(),Ie()]}),"slider"===b&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height:","image-compare"),(0,l.jsx)(_,{})]}),value:j[i],onChange:e=>o("sliderOptions",e,"height",i),units:[Pe(),Ae(),Ie()]})]}),r&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Labels","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:c,onChange:e=>o("labelTypo",e),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(On,{value:d,onChange:e=>o("labelColors",e),defaults:{color:"#fff",bg:"#00000080"}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","image-compare"),value:u,onChange:e=>o("labelPadding",e),defaults:{vertical:"10px",horizontal:"15px"}})]})}),p&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:h,onChange:e=>o("capTypo",e),defaults:{fontSize:{desktop:14,tablet:14,mobile:14}}}),(0,l.jsx)(On,{value:g,onChange:e=>o("capColors",e),defaults:{color:"#333",bg:"#f4f4f4"}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","image-compare"),value:m,onChange:e=>o("capPadding",e),defaults:{vertical:"10px",horizontal:"15px"}})]})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Divider","image-compare"),initialOpen:!1,children:[(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Line Size","image-compare"),min:1,max:10,step:1,value:C.line.size,onChange:e=>o("styles",e,"dragg","line","size"),Component:y.RangeControl}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Line Color","image-compare"),value:C.line.bg,onChange:e=>o("styles",e,"dragg","line","bg"),isImage:!1,Component:An}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Handler Color","image-compare"),value:C.handler.color,onChange:e=>o("styles",e,"dragg","handler","color"),Component:Ue}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Icon Color","image-compare"),value:C.icon.color,onChange:e=>o("styles",e,"dragg","icon","color"),isImage:!1,Component:Ue})]}),"slider"===b&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Styles","image-compare"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:MN,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["navigation"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini mt10",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,className:"mt10",labelPosition:"edge",label:(0,x.__)("Container Width","image-compare"),value:S.container.width,onChange:e=>o("sliderStyle",e,"navigation","container","width"),Component:y.__experimentalUnitControl}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,className:"mt10",labelPosition:"edge",label:(0,x.__)("Container Height","image-compare"),value:S.container.height,onChange:e=>o("sliderStyle",e,"navigation","container","height"),Component:y.__experimentalUnitControl})]}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,className:"mt10",labelPosition:"edge",label:(0,x.__)("Icon Size","image-compare"),value:S.icon[e.name].size,onChange:t=>o("sliderStyle",t,"navigation","icon",e.name,"size"),Component:y.__experimentalUnitControl}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Icon Color","image-compare"),value:S.icon[e.name].color,onChange:t=>o("sliderStyle",t,"navigation","icon",e.name,"color"),Component:Ue}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Background","image-compare"),value:S.container[e.name].bg,onChange:t=>o("sliderStyle",t,"navigation","container",e.name,"bg"),Component:An}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Border","image-compare"),value:S.container[e.name].border,onChange:t=>o("sliderStyle",t,"navigation","container",e.name,"border"),Component:y.__experimentalBorderBoxControl}),(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,className:"mt10",label:(0,x.__)("Border Radius","image-compare"),values:S.container[e.name].radius,onChange:t=>o("sliderStyle",t,"navigation","container",e.name,"radius"),Component:k})]})})}),"pagination"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{isPremium:t,setIsProModalOpen:n,label:(0,x.__)("Active Color","image-compare"),value:$.active,onChange:e=>o("sliderStyle",e,"pagination","active"),Component:Ue})})]})})})]})})),ON=({attributes:e,setAttributes:t,isPremium:n,activeIndex:o,setActiveIndex:i})=>{const{alignment:a,beforeImg:s,afterImg:r,theme:c}=e,[d,u]=(0,m.useState)(!1),p=(n,o,...i)=>{t({[n]:be(e[n],o,...i)})},g={isPremium:n,setIsProModalOpen:u};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Ra,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:$N,onSelect:me,children:n=>(0,l.jsxs)(l.Fragment,{children:["general"===n.name&&(0,l.jsx)(BN,{...g,attributes:e,setAttributes:t,updateObj:p,activeIndex:o,setActiveIndex:i}),"style"===n.name&&(0,l.jsx)(IN,{...g,attributes:e,setAttributes:t,updateObj:p})]})})]}),(0,l.jsxs)(jn,{isProModalOpen:d,
454 +setIsProModalOpen:u,block:"Image Comparison",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Theme: ","b-blocks")}),(0,x.__)("Create stunning before & after image comparisons in both single view and slider formats.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Label Position: ","b-blocks")}),(0,x.__)("Customize the label position to suit your needs.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Default Offset: ","b-blocks")}),(0,x.__)("Adjusts the initial position of the slider.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Move Slider On Click: ","b-blocks")}),(0,x.__)("Enable the option to move the slider when the user clicks on it.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Move Slider On Mouse Over: ","b-blocks")}),(0,x.__)("Enable the option to move the slider when the mouse hover over it.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Auto Slide: ","b-blocks")}),(0,x.__)("Activate automatic sliding on the compare images.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Auto Slide Speed: ","b-blocks")}),(0,x.__)("Set the speed of the auto moving slider.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Stop Slider On Mouse Over: ","b-blocks")}),(0,x.__)("Pause the sliding movement when the mouse is over the images.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Line Size: ","b-blocks")}),(0,x.__)("Adjust the line size to your preferred thickness.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Line Color: ","b-blocks")}),(0,x.__)("Choose a desired color for the line.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Handler Color: ","b-blocks")}),(0,x.__)("Choose a desired color for the handler.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Icon Color: ","b-blocks")}),(0,x.__)("Select the icon color from the options provided to match your design.","b-blocks")]})]}),"default"===c&&(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(Ce,{label:(0,x.__)("Edit Before Image:","b-blocks"),value:s,onChange:e=>t({beforeImg:e})}),(0,l.jsx)(Ce,{label:(0,x.__)("Edit After Image:","b-blocks"),value:r,onChange:e=>t({afterImg:e})}),(0,l.jsx)(h.AlignmentToolbar,{value:a,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Image Comparison Alignment"),alignmentControls:[{title:(0,x.__)("Image Comparison in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Image Comparison in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Image Comparison in right","b-blocks"),align:"right",icon:"align-right"}]})]})]})},RN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{beforeImg:a,afterImg:s,isLabel:r,label:c,beforeLabel:d,afterLabel:u,isCap:p,cap:g,orientation:b,theme:f}=t,{url:y,alt:v,title:k}=a||{},{url:w,alt:_,title:C}=s||{},{hAlign:j,vAlign:$}=c,S=bBlocksPremiumChecker,[T,N]=(0,m.useState)(0),M=r&&(0,l.jsx)(h.RichText,{className:`b-blocks-label b-blocks-before-label b-blocks-${b} ${"horizontal"===b?j:$}`,tagName:"div",value:d,onChange:e=>n({beforeLabel:e}),placeholder:(0,x.__)("Before image label","image-compare"),inlineToolbar:!0}),L=r&&(0,l.jsx)(h.RichText,{className:`b-blocks-label b-blocks-after-label b-blocks-${b} ${"horizontal"===b?j:$}`,tagName:"div",value:u,onChange:e=>n({afterLabel:e}),placeholder:(0,x.__)("After image label","image-compare"),inlineToolbar:!0}),P=p&&(0,l.jsx)(h.RichText,{className:"b-blocks-caption",tagName:"div",value:g,onChange:e=>n({cap:e}),placeholder:(0,x.__)("Caption of the image comparison","image-compare"),inlineToolbar:!0});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ON,{attributes:t,setAttributes:n,isPremium:S,attributes:t,setAttributes:n,isPremium:S,activeIndex:T,setActiveIndex:N}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({draggable:!1}),children:[(0,l.jsx)(LN,{attributes:t,id:`block-${o}`}),(()=>{switch(f){case"default":return y&&w?(0,l.jsx)(kN,{afterLabelEl:L,beforeLabelEl:M,captionEl:P,activeIndex:T,setActiveIndex:N,attributes:t,isBackend:!0,backDevice:i}):(0,l.jsxs)("div",{className:"imgPlaceholder",children:[(0,l.jsx)("div",{className:"beforeImg",children:y?(0,l.jsx)("img",{src:y,alt:v||k}):(0,l.jsx)(_e,{label:(0,x.__)("Before Image:","image-compare"),value:a,onChange:({id:e,url:t,alt:o,title:i,caption:a})=>n({beforeImg:{id:e,url:t,alt:o,title:i,caption:a}})})}),(0,l.jsx)("div",{className:"afterImg",children:w?(0,l.jsx)("img",{src:w,alt:_||C}):(0,l.jsx)(_e,{label:(0,x.__)("After Image:","image-compare"),value:s,onChange:({id:e,url:t,alt:o,title:i,caption:a})=>n({afterImg:{id:e,url:t,alt:o,title:i,caption:a}})})})]});case"slider":return(0,l.jsx)(kN,{afterLabelEl:L,beforeLabelEl:M,captionEl:P,activeIndex:T,setActiveIndex:N,attributes:t,isBackend:!0,backDevice:i})}})()]})]})}));Pl(lN.name)&&(0,p.registerBlockType)(lN,{icon:_r,transforms:{from:[{type:"block",blocks:["icb/image-compare"],transform:e=>(0,p.createBlock)("b-blocks/image-comparison",e)},{type:"prefix",prefix:"image-compare",transform:()=>(0,p.createBlock)("b-blocks/image-comparison")}],to:[{type:"block",blocks:["icb/image-compare"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("icb/image-compare",e)}]},edit:RN,save:()=>null});const zN=JSON.parse('{"apiVersion":3,"name":"b-blocks/image-gallery","title":"Image Gallery","description":"Display Multiple Images as Gallery.","category":"bBlocks","keywords":["images","photos","gallery"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"images":{"type":"array","default":[]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"imgPadding":{"type":"object","default":{}},"imgBorder":{"type":"object","default":{}},"imgShadow":{"type":"object","default":{}},"isPreview":{"type":"boolean","default":true},"isCap":{"type":"boolean","default":true},"capAlign":{"type":"string","default":"left"},"capColor":{"type":"string","default":"#333"},"capTitleTypo":{"type":"object","default":{"fontSize":{"desktop":"18px","tablet":"17px","mobile":"16px"}}},"capDescTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fancybox"],"render":"file:./render.php","viewScript":["file:./view.js","fancybox"]}'),DN=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({settings:e,filterImages:t,device:n})=>{const{attributes:{images:o,columns:i,imgPadding:a,imgBorder:s,imgShadow:r,isPreview:c,isCap:d,capAlign:u,capColor:p,capTitleTypo:g,capDescTypo:m},setAttributes:b}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layouts Settings"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:i[n],onChange:e=>{b({columns:{...i,[n]:e}})},min:1,max:9,step:1})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(ad,{label:(0,x.__)("Padding:","b-blocks"),value:a,onChange:e=>b({imgPadding:e})}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:s,onChange:e=>b({imgBorder:e})}),(0,l.jsx)(id,{label:(0,x.__)("Shadow:","b-blocks"),value:r,onChange:e=>b({imgShadow:e}),defaults:{type:"text"},type:"text"}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Preview Image?","b-blocks"),checked:c,
455 +onChange:e=>b({isPreview:e})}),(0,l.jsx)("small",{children:(0,x.__)("Preview will only for frontend!","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Caption","b-blocks"),checked:d,onChange:e=>b({isCap:e})}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:u,onChange:e=>b({capAlign:e}),options:Jt,isIcon:!0})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:p,onChange:e=>b({capColor:e}),defaultColor:"#333"}),(0,l.jsx)(Oa,{label:(0,x.__)("Title Typography:","b-blocks"),value:g,onChange:e=>b({capTitleTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16}}}),(0,l.jsx)(Oa,{label:(0,x.__)("Description Typography:","b-blocks"),value:m,onChange:e=>b({capDescTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16}}})]})]}),0<o.length&&(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(Ce,{label:(0,x.__)("Edit Gallery","b-blocks"),icon:"format-gallery",value:o,onChange:e=>b({images:t(e)}),isMultiple:!0})})]})})),FN=(0,y.withNotices)((e=>{const{attributes:{images:t,columns:n,imgPadding:o,imgBorder:i,imgShadow:a,isCap:s,capAlign:r,capColor:c,capTitleTypo:d,capDescTypo:u},setAttributes:p,clientId:g,isSelected:m,noticeUI:b}=e;let f=[];t.map((e=>f.push(e.url)));const v=e=>e||0!==e.length?e.map((e=>({id:e?.id,url:e?.url,alt:e?.alt,name:e?.name,title:e?.title,sizes:e?.sizes,caption:e?.caption,description:e?.description,link:e?.link}))):[],k=`#block-${g} .imgGalleryWrapper .imgGalleryImgLink`,w=`${k} .imgGalleryImgCaption`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(DN,{settings:e,filterImages:v}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${ps("",d)?.googleFontLink}\n\t\t\t\t${ps("",u)?.googleFontLink}\n\t\t\t\t${ps(`${w} h4`,d)?.styles}\n\t\t\t\t${ps(`${w} p`,u)?.styles}\n\n\t\t\t\t${k} .imgGalleryImg{\n\t\t\t\t\tpadding: ${us(o)};\n\t\t\t\t\t${is(i)}\n\t\t\t\t\tfilter: drop-shadow(${ds(a,"text")})\n\t\t\t\t}\n\t\t\t\t${w}{\n\t\t\t\t\ttext-align: ${r};\n\t\t\t\t\tcolor: ${c};\n\t\t\t\t\tmargin: ${us(o)};\n\t\t\t\t\twidth: calc((100% - 10px) - (${o?.horizontal||"0px"} * 2));\n\t\t\t\t\theight: calc((100% - 10px) - (${o?.vertical||"0px"} * 2));\n\t\t\t\t\tborder-radius: ${i?.radius||"0px"};\n\t\t\t\t}\n\t\t\t`}}),0===t.length?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.Placeholder,{className:"bBlocksImageGalleryUpload",label:(0,x.__)(" Gallery Images","b-blocks"),instructions:(0,x.__)("Select image files from your library.","b-blocks"),icon:"format-gallery",notices:b,children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],accept:"image/*",multiple:!0,value:Array.isArray(t)?t.map((({id:e})=>e)):t.id,onSelect:e=>p({images:v(e)}),render:({open:e})=>(0,l.jsx)(y.Button,{className:"components-button is-primary",label:(0,x.__)("Media Library","b-blocks"),onClick:e,children:(0,x.__)("Media Library","b-blocks")})})})}):(0,l.jsx)("div",{className:`imgGalleryWrapper columns-${n.desktop} columns-tablet-${n.tablet} columns-mobile-${n.mobile}`,children:t.length>0?t.map(((e,n)=>(0,l.jsxs)("a",{className:"imgGalleryImgLink",children:[(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],accept:"image/*",value:e.id,onSelect:e=>{const o=structuredClone(t);o[n]=e,p({images:v(o)})},render:({open:e})=>(0,l.jsx)(y.Dashicon,{className:"imgGalleryEditButton",icon:"plus-alt",onClick:e})}),(0,l.jsx)(y.Dashicon,{className:"imgGalleryImgDeleteButton",onClick:()=>{const e=t.filter(((e,t)=>n!==t));p({images:v(e)})},icon:"trash"}),(0,l.jsx)("img",{src:e.url,alt:e.alt||e.title,className:"imgGalleryImg"}),s&&e.caption&&(0,l.jsx)("div",{className:"imgGalleryImgCaption",children:(0,l.jsxs)("div",{className:"captionContent",children:[(0,l.jsx)("h4",{children:e.caption}),(0,l.jsx)("p",{children:e.description})]})})]},e.id))):null}),m&&0<t.length&&(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],accept:"image/*",multiple:!0,value:t[t.length-1].id,onSelect:e=>{let n=[...t,...e];p({images:v(n)})},render:({open:e})=>(0,l.jsx)(y.Button,{className:"imgGalleryUploadButton",label:(0,x.__)("Add Images","b-blocks"),icon:"plus-alt",onClick:e,children:" Add Images"})})]})]})}));Pl(zN.name)&&(0,p.registerBlockType)(zN,{icon:Cr,edit:FN,save:()=>null})
456 +;const HN=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/image-hotspot","version":"1.0.0","title":"Image Hotspot","category":"bBlocks","description":"Image Hotspot allows you to add interactive hotspots to your images.","keywords":["image hotspot","hotspot","image"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"image":{"type":"object","default":{"url":"","desktop":{"height":"400px","width":"100%"},"tablet":{"height":"400px","width":"100%"},"mobile":{"height":"400px","width":"100%"},"objectFit":"fill"}},"options":{"type":"object","default":{"speed":400,"delay":200}},"preset":{"type":"string","default":"default"},"spots":{"type":"object","default":{"normal":{"color":{"bg":"#8a2be2","icon":"#fff"},"border":{}},"hover":{"color":{"bg":"#8a2be2","icon":"#fff"},"border":{}},"desktop":{"height":"40px","width":"40px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"50px","right":"50px","top":"50px","bottom":"50px"},"iconSize":"12px"},"tablet":{"height":"40px","width":"40px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"50px","right":"50px","top":"50px","bottom":"50px"},"iconSize":"12px"},"mobile":{"height":"40px","width":"40px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"50px","right":"50px","top":"50px","bottom":"50px"},"iconSize":"12px"}}},"tooltip":{"type":"object","default":{"desktop":{"width":"200px","padding":{"left":"5px","right":"5px","top":"5px","bottom":"5px"},"radius":{"left":"3px","right":"3px","top":"3px","bottom":"3px"}},"tablet":{"width":"","padding":{},"radius":{}},"mobile":{"width":"","padding":{},"radius":{}},"typo":{"fontSize":{"desktop":"15px"}},"textColor":"#fff","bgColor":"#8a2be2","border":{"width":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"hotspot":{"type":"array","default":[{"borderColor":"","bgColor":"","spotsSize":"","option":"spot","spotOption":"text","spotText":"+","icon":{"url":{"upload":"","library":""},"type":"library"},"image":"","tooltip":"<p>Tooltip contents</p>","tooltipPosition":"left","position":{"desktop":{"x":0,"y":0},"tablet":{},"mobile":{}},"iconColor":"","iconSize":"12px","spotLink":"","newWindow":false},{"borderColor":"","bgColor":"","spotsSize":"","option":"spot","spotOption":"text","spotText":"+","icon":{"url":{"upload":"","library":""},"type":"library"},"image":"","tooltip":"<p>Tooltip contents</p>","tooltipPosition":"left","position":{"desktop":{"x":30,"y":40},"tablet":{},"mobile":{}},"iconColor":"","iconSize":"12px","spotLink":"","newWindow":false}]},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center-center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),WN=({attributes:e,id:o,isBackend:i=!1})=>{const{image:a,options:s,spots:r,tooltip:c,advanced:d,hotspot:u}=e,p=`#${o} .b-blocks-hotspot-image-wrapper`,h=`${p} .b-blocks-hotspot-image`,g=`${p} .b-blocks-bphb-hotspot-container`,m=`${g} .b-blocks-bphb-hotspot`,b=`${m} .b-blocks-imghp-upload-icon`,f=`${m} .b-blocks-imghp-text-icon`,x=`${m} .b-blocks-tooltip-reader`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
457 +__html:`\n\t\t${ps("",c.typo).googleFontLink}\n\t\t${ps(x,c.typo).styles}\n\t\t${p}{\n\t\t\t${ns("width",a.desktop.width)}\n\t\t\t${ns("height",a.desktop.height)}\n\t\t}\n\t\t${u?.map(((e,t)=>`${g}#b-blocks-bphb-hotspot-container-${t}{\n\t\t\t\t${ns("left",`${e.position.desktop.x}%`)}\n\t\t\t\t${ns("top",`${e.position.desktop.y}%`)}\n\t\t\t}`)).join(" ")}\n\t\t${m} .b-blocks-imghp-library-icon>svg{\n\t\t\t${ns("fill",r.normal.color.icon)}\n\t\t\t${ns("color",r.iconColor)}\n\t\t\t${ns("height",r.desktop.iconSize)}\n\t\t\t${ns("width",r.desktop.iconSize)}\n\t\t}\n\t\t${m}{\n\t\t\t${ns("height",r.desktop.height)}\n\t\t\t${ns("width",r.desktop.width)}\n\t\t\t${ns("border-radius",hs(r.desktop.radius))}\n\t\t\t${ns("background-color",r.normal.color.bg)}\n\t\t\t${ns("padding",hs(r.desktop.padding))}\n\t\t\t${as(r.normal.border)}\n\t\t}\n ${b}{\n ${ns("fill",r.normal.color.icon)}\n\t\t\t${ns("color",r.iconColor)}\n\t\t\t${ns("height",r.desktop.iconSize)}\n\t\t\t${ns("width",r.desktop.iconSize)}\n }\n ${f}{\n ${ns("color",r.normal.color.icon)}\n\t\t\t${ns("font-size",r.desktop.iconSize)}\n }\n\t\t\t${m}.three{\n\t\t\tborder:unset;\n\t\t\t}\n\t\t\t${m}.three>span{\n\t\t\t${as(r.normal.border)}\n\t\t\t}\n\n\t\t\t${m}>svg{\n\t\t\t${ns("color",r.normal.color.icon)}\n\t\t\t${ns("height",r.desktop.iconSize)}\n\t\t\t${ns("width",r.desktop.iconSize)}\n\t\t}\n\t\t${m}>svg path{\n\t\t\t${ns("fill",r.normal.color.icon)}\n\t\t}\n\t\t${m}:hover{\n\t\t\t${ns("background-color",r.hover.color.bg)}\n\t\t\t${as(r.hover.border)}\n\t\t}\n\t\t${m}:hover>span{\n\t\t\t${ns("color",r.hover.color.icon)}\n\t\t}\n\t\t${m}:hover>svg{\n\t\t\t${ns("color",r.hover.color.icon)}\n\t\t}\n\t\t${m}:hover>svg path{\n\t\t\t${ns("fill",r.hover.color.icon)}\n\t\t}\n\t\t${m}:where(span,img){\n\t\t\t${ns("color",r.normal.color.icon)}\n\t\t\t${ns("font-size",r.desktop.iconSize)}\n\t\t\t${as(r.normal.border)}\n\t\t}\n\n\t\t${x}{\n\t\t\ttransition-duration: ${s.speed}ms;\n\t\t\ttransition-delay: ${s.delay}ms;\n\t\t\t${as(c.border)}\n\t\t\t${ns("box-shadow",ls(c?.shadow||[]))}\n\t\t\t${ns("width",c.desktop.width)}\n\t\t\t${ns("background-color",c.bgColor)}\n\t\t\t${ns("padding",hs(c.desktop.padding))}\n\t\t\t${ns("border-radius",hs(c.desktop.radius))}\n\t\t}\n\t\t${x} .b-blocks-bphb-tooltip-content>*{\n\t\t\t\tcolor: ${c.textColor} !important;\n\t\t\t\tmargin:0px;\n\t\t\t}\n\t\t\t${h}{\n\t\t\t${ns("width",a.desktop.width)};\n\t\t\t${ns("height",a.desktop.height)};\n\t\t\t${ns("object-fit",a.objectFit)}\n\t\t\t}\n\t\t${t} {\n\n\t\t${m} .b-blocks-imghp-library-icon>svg{\n\t\t\t${ns("height",r.tablet.iconSize)}\n\t\t\t${ns("width",r.tablet.iconSize)}\n\t\t}\n\t\t${m}{\n\t\t\t${ns("height",r.tablet.height)}\n\t\t\t${ns("width",r.tablet.width)}\n\t\t\t${ns("border-radius",hs(r.tablet.radius))}\n\t\t\t${ns("padding",hs(r.tablet.padding))}\n\t\t}\n ${f}{\n\t\t\t${ns("font-size",r.tablet.iconSize)}\n }\n\t\t${m}>span{\n\t\t\t${ns("font-size",r.tablet.iconSize)}\n\t\t}\n\n\t\t${x}{\n\t\t\t${ns("width",c.tablet.width)}\n\t\t\t${ns("padding",hs(c.tablet.padding))}\n\t\t\t${ns("border-radius",hs(c.tablet.radius))}\n\t\t}\n }\n\t\t${n} {\n\t\t${m} .b-blocks-imghp-library-icon>svg{\n\t\t\t${ns("height",r.mobile.iconSize)}\n\t\t\t${ns("width",r.mobile.iconSize)}\n\t\t}\n\t\t${m}{\n\t\t\t${ns("height",r.mobile.height)}\n\t\t\t${ns("width",r.mobile.width)}\n\t\t\t${ns("border-radius",r.mobile.radius)}\n\t\t\t${ns("padding",hs(r.mobile.padding))}\n\t\t}\n\t\t${m}>span{\n\t\t\t${ns("font-size",r.mobile.iconSize)}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t${ns("font-size",r.mobile.iconSize)}\n\t\t\t}\n\n\t\t${x}{\n\t\t\t${ns("width",c.mobile.width)}\n\t\t\t${ns("padding",hs(c.mobile.padding))}\n\t\t\t${ns("border-radius",hs(c.mobile.radius))}\n\t\t}\n\t}\n\t\t${_s(o,d,i,!1)}\n\t\t`}})},UN=({value:e,onChange:t=()=>{},preset:n,element:o,setActiveIdx:i,index:a,wrapperEl:s,align:r,isSelected:c,...d})=>{const[u,p]=(0,m.useState)(e||{x:0,y:0}),[h,g]=(0,m.useState)({x:0,y:0}),[b,f]=(0,m.useState)(!1),x=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const e=x.current;if(!e||!s)return;const t=(e,t)=>{const n=s.getBoundingClientRect(),o=(e-n.left)/n.width*100,i=(t-n.top)/n.height*100;return{x:Math.min(Math.max(o,0),100),y:Math.min(Math.max(i,0),100)}},n=e=>{f(!0);const n=t(e.clientX,e.clientY);g({x:n.x-u.x,y:n.y-u.y})},o=e=>{if(b){const n=t(e.clientX,e.clientY);p({x:n.x-h.x,y:n.y-h.y})}},i=()=>{f(!1)};return s.addEventListener("mouseup",i),s.addEventListener("mousemove",o),e.addEventListener("mousedown",n),document.addEventListener("mouseup",i),()=>{e.removeEventListener("mousedown",n),s.removeEventListener("mousemove",o),s.removeEventListener("mouseup",i),document.removeEventListener("mouseup",i)}}),[c,b,s,u,o.spotOption,o.tooltipPosition,r]),(0,m.useEffect)((()=>{p(e)}),[e,o.spotOption]),(0,m.useEffect)((()=>{t(u)}),[u,o.spotOption]),(0,l.jsxs)(l.Fragment,{children:["text"===o.spotOption&&(0,l.jsx)("div",{onClick:()=>i(a),onMouseDown:()=>i(a),...d,ref:x,style:{position:"absolute",cursor:"move"},className:"b-blocks-bphb-hotspot-container",id:`b-blocks-bphb-hotspot-container-${a}`,children:(0,l.jsxs)("div",{className:"b-blocks-bphb-hotspot "+("default"===n?"circle":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"),children:[o.tooltip&&(0,l.jsx)("div",{className:`b-blocks-tooltip-reader ${"default"===n?"one":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"} b-blocks-tooltip-${o.tooltipPosition}`,children:(0,l.jsx)("div",{className:"b-blocks-bphb-tooltip-content",dangerouslySetInnerHTML:{__html:o.tooltip}})}),(0,l.jsx)("span",{className:"b-blocks-imghp-text-icon",children:o.spotText})]})}),"icon"===o.spotOption&&(0,l.jsx)("div",{...d,ref:x,onClick:()=>i(a),onMouseDown:()=>i(a),style:{position:"absolute",cursor:"move"},className:"b-blocks-bphb-hotspot-container",id:`b-blocks-bphb-hotspot-container-${a}`,children:(0,l.jsxs)("div",{className:"b-blocks-bphb-hotspot "+("default"===n?"circle":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"),children:[o.tooltip&&(0,l.jsx)("div",{className:`b-blocks-tooltip-reader ${"default"===n?"one":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"} b-blocks-tooltip-${o.tooltipPosition}`,children:(0,l.jsx)("div",{className:"b-blocks-bphb-tooltip-content",dangerouslySetInnerHTML:{__html:o.tooltip}})}),"upload"===o.icon.type&&(0,l.jsx)("span",{className:"b-blocks-imghp-upload-icon",dangerouslySetInnerHTML:{__html:o.icon.url.upload}}),"library"===o.icon.type&&(0,l.jsx)("span",{className:"b-blocks-imghp-library-icon",dangerouslySetInnerHTML:{__html:o.icon.url.library}})]})}),"image"===o.spotOption&&(0,l.jsx)("div",{...d,ref:x,onClick:()=>i(a),onMouseDown:()=>i(a),style:{position:"absolute",cursor:"move"},className:"b-blocks-bphb-hotspot-container",id:`b-blocks-bphb-hotspot-container-${a}`,children:(0,l.jsxs)("div",{className:"b-blocks-bphb-hotspot "+("default"===n?"circle":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"),children:[o.tooltip&&(0,l.jsx)("div",{className:`b-blocks-tooltip-reader ${"default"===n?"one":"themetwo"===n?"two":"themethree"===n?"three":"themefour"===n?"fourth":"fifth"} b-blocks-tooltip-${o.tooltipPosition}`,children:(0,l.jsx)("div",{className:"b-blocks-bphb-tooltip-content",dangerouslySetInnerHTML:{__html:o.tooltip}})}),o.image&&(0,l.jsx)("img",{src:o.image,style:{width:"100%",height:"100%",borderRadius:"inherit",objectFit:"cover"},alt:""})]})})]})},GN=({attributes:e,setAttributes:t,setActiveIdx:n,isSelected:o})=>{const{hotspot:i,image:a,preset:s,align:r}=e,[c,d]=(0,m.useState)(null),u=(0,m.useCallback)((e=>d(e)),[]);return(0,l.jsxs)("div",{ref:u,className:"b-blocks-hotspot-image-wrapper",children:[(0,l.jsx)("img",{src:a?.url||kn,alt:a?.alt||"Hotspot Image",className:"b-blocks-hotspot-image"}),i.map(((e,a)=>(0,l.jsx)(UN,{setActiveIdx:n,preset:s,align:r,isSelected:o,
458 +value:e.position.desktop,wrapperEl:c,element:e,index:a,onChange:e=>t({hotspot:zb(i,(t=>{t[a].position.desktop=e}))})},a)))]})},VN=[{label:"Default",value:"left"},{label:"Left",value:"left"},{label:"Top",value:"top"},{label:"Right",value:"right"},{label:"Bottom",value:"bottom"},{label:"Top Left",value:"topleft"},{label:"Top Right",value:"topright"},{label:"Bottom Left",value:"bottomleft"},{label:"Bottom Right",value:"bottomright"}],qN={desktop:{height:"40px",width:"40px",padding:{left:"0px",right:"0px",top:"0px",bottom:"0px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"12px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#8a2be2",icon:"#fff"},border:{width:"0px"}},hover:{color:{bg:"",icon:"#fff"},border:{}}},YN={desktop:{height:"40px",width:"40px",padding:{left:"0px",right:"0px",top:"0px",bottom:"0px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"5px"},iconSize:"12px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#cd7418",icon:"#fff"},border:{width:"0px"}},hover:{color:{bg:"",icon:"#fff"},border:{}}},KN={desktop:{height:"40px",width:"40px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"12px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#cd18bf",icon:"#fff"},border:{color:"#fff",style:"solid",width:"1px"}},hover:{color:{bg:"",icon:"#fff"},border:{}}},QN={desktop:{height:"40px",width:"40px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"16px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"",icon:"#77cd18"},border:{color:"#77cd18",style:"solid",width:"2px"}},hover:{color:{bg:"",icon:"#77cd18"},border:{color:"#77cd18",style:"solid",width:"2px"}}},ZN={desktop:{height:"40px",width:"100px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"50px",right:"50px",top:"50px",bottom:"50px"},iconSize:"25px"},tablet:{height:"",width:"",padding:{},radius:{},iconSize:""},mobile:{height:"",width:"",padding:{},radius:{},iconSize:""},normal:{color:{bg:"#3cbcd1a3",icon:"#fff"},border:{width:"0px"}},hover:{color:{bg:"",icon:"#fff"},border:{width:"0px"}}},XN=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],JN=[{label:"None",value:""},{label:"Cover",value:"cover"},{label:"Contain",value:"contain"},{label:"Fill",value:"fill"}],eM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,device:n,updateObj:o})=>{const{image:i}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Image","b-blocks"),children:[(0,l.jsx)(we,{label:(0,x.__)("Choose Image","b-blocks"),height:"100%",width:"100%",value:i?.url?{url:i.url}:{url:kn},default:kn,onChange:e=>t({image:{...i,url:e.url}})}),(0,l.jsx)(v,{children:(0,x.__)("Image Fit","b-blocks")}),(0,l.jsx)(Tn,{options:JN,size:"small",value:i.objectFit,onChange:e=>o("image",e,"objectFit")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",isUnitSelectTabbable:!0,value:i[n].height,min:1,max:1e3,onChange:e=>o("image",e,n,"height")})]})})),tM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},bgColor:"#8a2be2",boxShadow:"0px 0px 0px 0px #707070"},nM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#cd7418",boxShadow:"0px 0px 0px 0px #707070"},oM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#cd18bf",boxShadow:"0px 0px 0px 0px #707070"},iM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#77cd18",boxShadow:"0px 0px 0px 0px #707070"},aM={desktop:{width:"200px",padding:{left:"5px",right:"5px",top:"5px",bottom:"5px"},radius:{left:"3px",right:"3px",top:"3px",bottom:"3px"}},tablet:{width:"",padding:{},radius:{}},mobile:{width:"",padding:{},radius:{}},border:{},typo:{fontSize:{desktop:"15px"}},textColor:"#fff",bgColor:"#3cbcd1",boxShadow:"0px 0px 0px 0px #707070"},sM=({attributes:e,setAttributes:t})=>{const{preset:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Presets","b-blocks"),children:[(0,l.jsx)("span",{children:"Templates"}),(0,l.jsx)("div",{className:"presets-container",children:[{value:"default",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/default.png"},{value:"themetwo",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-160416.png"},{value:"themethree",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-160945.png"},{value:"themefour",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-161051.png"},{value:"themefive",img:"https://templates.bplugins.com/wp-content/uploads/2025/03/Screenshot-2025-03-13-161736.png"}].map(((e,o)=>(0,l.jsxs)("div",{onClick:()=>{const n=e.value;t({preset:n,spots:"default"===n?qN:"themetwo"===n?YN:"themethree"===n?KN:"themefour"===n?QN:ZN,tooltip:"default"===n?tM:"themetwo"===n?nM:"themethree"===n?oM:"themefour"===n?iM:aM})},className:"single-preset "+(n===e.value?"active":""),children:[(0,l.jsx)("div",{className:"preset-tooltip-container",children:(0,l.jsxs)("div",{className:"preset-tooltip",children:[(0,l.jsx)("i",{className:"fa-solid fa-caret-down"}),(0,l.jsxs)("span",{children:["Design ",o+1]})]})}),(0,l.jsx)("img",{src:e.img,alt:""})]},o)))})]})},rM=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M292.6 407.78l-120-320a22 22 0 00-41.2 0l-120 320a22 22 0 0041.2 15.44l36.16-96.42a2 2 0 011.87-1.3h122.74a2 2 0 011.87 1.3l36.16 96.42a22 22 0 0041.2-15.44zm-185.84-129l43.37-115.65a2 2 0 013.74 0l43.37 115.67a2 2 0 01-1.87 2.7h-86.74a2 2 0 01-1.87-2.7zM400.77 169.5c-41.72-.3-79.08 23.87-95 61.4a22 22 0 0040.5 17.2c8.88-20.89 29.77-34.44 53.32-34.6 32.32-.22 58.41 26.5 58.41 58.85a1.5 1.5 0 01-1.45 1.5c-21.92.61-47.92 2.07-71.12 4.8-54.75 6.44-87.43 36.29-87.43 79.85 0 23.19 8.76 44 24.67 58.68C337.6 430.93 358 438.5 380 438.5c31 0 57.69-8 77.94-23.22h.06a22 22 0 1044 .19v-143c0-56.18-45-102.56-101.23-102.97zM380 394.5c-17.53 0-38-9.43-38-36 0-10.67 3.83-18.14 12.43-24.23 8.37-5.93 21.2-10.16 36.14-11.92 21.12-2.49 44.82-3.86 65.14-4.47a2 2 0 012 2.1C455 370.1 429.46 394.5 380 394.5z"})}),lM=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 576 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{
459 +d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"})}),cM=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})}),dM=e=>{const{attributes:t,setAttributes:n,arrKey:o,index:i,setActiveIndex:a}=e,s=t[o],r=s[i],{data:c}=$d("bBlocksUtils"),{refetch:d}=jd("b-blocks-enable-svg-mime-type",{_wpnonce:c?.nonce},!1),u=async()=>{Sd(),await d()},p=new Tt,h=(e,t,o=null,r=null)=>{const l=zb(s,(n=>{null!==r?n[i][e][o][r]=t:null!==o?n[i][e][o]=t:n[i][e]=t}));n({hotspot:l}),a&&a(i)};return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",initialTabName:r.option,tabs:[{title:"Spot",name:"spot"},{title:"Tooltip",name:"tooltip"}],onSelect:e=>h("option",e),children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:["spot"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Tn,{options:[{label:"Text",icon:(0,l.jsx)(rM,{}),value:"text"},{label:"Icon",icon:(0,l.jsx)(lM,{}),value:"icon"},{label:"Image",icon:(0,l.jsx)(cM,{}),value:"image"}],value:r?.spotOption,label:"Type",onChange:e=>h("spotOption",e),isIcon:!0}),"text"===r.spotOption&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)("p",{style:{margin:0},children:"Text"}),(0,l.jsx)(y.__experimentalInputControl,{className:"bpl-bphb-hostpot-block",value:r?.spotText,onChange:e=>h("spotText",e)})]}),(0,l.jsx)(v,{children:(0,x.__)("Spot Link","b-blocks")}),(0,l.jsx)(y.__experimentalInputControl,{className:"bpl-bphb-hostpot-block",placeholder:"https://example.com",value:r?.spotLink,onChange:e=>h("spotLink",e)}),(0,l.jsx)(y.CheckboxControl,{label:"Open in new window",className:"mt10",checked:r.newWindow,onChange:e=>h("newWindow",e)})]}),"icon"===r.spotOption&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{label:(0,x.__)("Icon Type","b-blocks"),className:"mt10",options:[{label:"Library",value:"library"},{label:"Upload",value:"upload"}],value:r.icon.type,onChange:e=>h("icon",e,"type")}),(0,l.jsxs)("div",{className:"mt15",children:["library"===r.icon.type&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:r.icon.url.library,onChange:e=>h("icon",e,"url","library")}),"upload"===r.icon.type&&(0,l.jsx)(we,{onClick:u,types:["image/svg+xml"],value:{url:r.icon.url.upload},label:"Upload SVG",onChange:async e=>{const t=e?.url?await p.sanitizeFile(e?.url):"";h("icon",t,"url","upload")},isSvgEnabled:!0})]})]}),"image"===r.spotOption&&(0,l.jsx)("div",{className:"mt15",children:(0,l.jsx)(we,{value:{url:r.image},label:(0,x.__)("Choose Image","b-blocks"),onChange:e=>h("image",e.url)})}),(0,l.jsx)("hr",{}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("X Position","b-blocks"),value:r.position.desktop.x,onChange:e=>h("position",e,"x"),min:0,max:100}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Y Position","b-blocks"),value:r.position.desktop.y,onChange:e=>h("position",e,"y"),min:0,max:100})]}),"tooltip"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(La,{value:r.tooltip,onChange:e=>h("tooltip",e),className:"mt10"}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Position","b-blocks"),className:"mt10",labelPosition:"edge",value:r.tooltipPosition,options:VN,onChange:e=>h("tooltipPosition",e)})]})]})})})},uM=({attributes:e,setAttributes:t,activeIdx:n,setActiveIdx:o,device:i})=>{const a={attributes:e,setAttributes:t,arrKey:"hotspot",activeIndex:n,setActiveIndex:o,device:i},s=Math.floor(91*Math.random()),r=Math.floor(91*Math.random());return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Spots","b-blocks"),children:[(0,l.jsx)(_a,{...a,newItem:(c=s,d=r,{borderColor:"",bgColor:"",spotsSize:"",option:"spot",spotOption:"text",spotText:"+",icon:{url:{upload:"",library:""},type:"library"},image:"",tooltip:"<p>Tooltip contents</p>",tooltipPosition:"left",position:{desktop:{x:c,y:d},tablet:{},mobile:{}},iconColor:"",iconSize:"12px",spotLink:"",newWindow:!1}),itemLabel:"Spot",design:"sortable",ItemSettings:dM}),!1]});var c,d},pM=({attributes:e,updateObj:t})=>{const{options:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Tooltip Options","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)("span",{children:(0,x.__)("Speed (ms)","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{onChange:e=>t("options",e,"speed"),isDragEnabled:!0,isShiftStepEnabled:!0,shiftStep:10,step:1,min:100,value:Number(n.speed)})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)("span",{children:(0,x.__)("Delay (ms)","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{onChange:e=>t("options",e,"delay"),isDragEnabled:!0,isShiftStepEnabled:!0,shiftStep:10,step:1,min:100,value:Number(n.delay)})]})]})},hM=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eM,{...e}),(0,l.jsx)(uM,{...e}),(0,l.jsx)(pM,{...e}),(0,l.jsx)(sM,{...e})]}),gM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{image:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Image","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",isUnitSelectTabbable:!0,value:o[t].width,min:1,max:100,onChange:e=>n("image",e,t,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",isUnitSelectTabbable:!0,value:o[t].height,min:1,max:1e3,onChange:e=>n("image",e,t,"height")})]})})),mM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{spots:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Spots","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:[{label:"PX",value:"px"}],isUnitSelectTabbable:!0,value:o[t].width,min:1,max:700,onChange:e=>n("spots",e,t,"width")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks"),(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[{label:"PX",value:"px"}],isUnitSelectTabbable:!0,value:o[t].height,min:1,max:700,onChange:e=>n("spots",e,t,"height")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[{label:"PX",value:"px"}],isUnitSelectTabbable:!0,value:o[t].iconSize,min:1,max:200,onChange:e=>n("spots",e,t,"iconSize")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].padding,resetValues:{left:"0px",right:"0px",top:"0px",bottom:"0px"},onChange:e=>n("spots",e,t,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{left:"5px",right:"5px",top:"5px",bottom:"5px"},onChange:e=>n("spots",e,t,"radius")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:Me,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:"Text/Icon Color",
460 +value:o[e].color.icon,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:t=>n("spots",t,e,"color","icon")}),(0,l.jsx)(Ue,{label:"Background Color",value:o[e].color.bg,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:t=>n("spots",t,e,"color","bg")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e].border,onChange:t=>n("spots",t,e,"border")})]})})]})})),bM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,device:t,updateObj:n})=>{const{tooltip:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Tooltip","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:[{label:"px",value:"px"}],isUnitSelectTabbable:!0,value:o[t].width,min:1,max:800,onChange:e=>n("tooltip",e,t,"width")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[t].padding,resetValues:{left:"5px",right:"5px",top:"5px",bottom:"5px"},onChange:e=>n("tooltip",e,t,"padding")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:o.textColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>n("tooltip",e,"textColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color","b-blocks"),value:o.bgColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>n("tooltip",e,"bgColor")}),(0,l.jsx)(Oa,{value:o.typo,onChange:e=>n("tooltip",e,"typo")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>n("tooltip",e,"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{left:"3px",right:"3px",top:"3px",bottom:"3px"},onChange:e=>n("tooltip",e,t,"radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:o.shadow,onChange:e=>n("tooltip",e,"shadow")})]})})),fM=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(gM,{...e}),(0,l.jsx)(mM,{...e}),(0,l.jsx)(bM,{...e})]}),xM=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:XN,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(hM,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(fM,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})},yM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,device:a}=e,{image:s}=t,[r,c]=(0,m.useState)(0),d=(0,m.useRef)(null),u=bBlocksPremiumChecker,p=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(xM,{attributes:t,setAttributes:n,activeIdx:r,setActiveIdx:c,updateObj:p,isPremium:u,device:a}),(0,l.jsx)("div",{ref:d,...(0,h.useBlockProps)(),onDragStart:e=>e.stopPropagation(),draggable:!1,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(WN,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(GN,{attributes:t,setAttributes:n,activeIdx:r,setActiveIdx:c,isSelected:i,device:a},`${JSON.stringify(s.width)}-${a}`)]})})]})}));Pl(HN.name)&&(0,p.registerBlockType)(HN,{icon:jr,edit:yM});const vM=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/image-scroller","version":"1.0.0","title":"Image Scroller","category":"bBlocks","description":"A dynamic image scroller that smoothly scrolls images on hover, featuring customizable speed, easing, and options for vertical or horizontal scrolling.","keywords":["scroll","image","image scroller"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"image":{"type":"object","default":{"img":{},"height":{"desktop":"200px","tablet":"","mobile":""}}},"options":{"type":"object","default":{"direction":"vertical","isScrollAuto":true,"duration":1000,"easing":"ease-in-out"}},"style":{"type":"object","default":{}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"mask":{"isMask":false,"shape":{"type":"circle","url":""},"size":{"type":"center center","scale":"100%"},"position":{"type":"center center","x":50,"y":50},"repeat":"no-repeat"},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),kM=({attributes:e,device:t})=>{const{image:n,options:o}=e,{direction:i,isScrollAuto:a}=o,s=(0,m.useRef)(null),r=(0,m.useRef)(null),{device:c}=Cd(),d=t||c;(0,m.useEffect)((()=>{s.current&&r.current&&a&&(s.current?.addEventListener("mouseover",(()=>{"vertical"===i&&Number(r.current.clientHeight)>parseInt(n.height[d])&&(r.current.style.transform=`translateY(-${Number(r.current.clientHeight)-parseInt(n.height[d])}px)`),"horizontal"===i&&Number(r.current.clientWidth)>Number(s.current.clientWidth)&&(r.current.style.transform=`translateX(-${Number(r.current.clientWidth)-Number(s.current.clientWidth)}px)`)})),s.current?.addEventListener("mouseout",(()=>{"vertical"===i&&(r.current.style.transform="translateY(0px)"),"horizontal"===i&&(r.current.style.transform="translateX(0px)")})))
461 +}),[a,r.current]);const u=()=>(0,l.jsx)("div",{ref:s,className:`b-blocks-image-scroller-wrapper ${i} ${a?"":"scrollable"}`,children:(0,l.jsx)("img",{ref:r,className:"b-blocks-image-scroller",src:n.img.url,alt:n.img.alt})});return(0,l.jsx)(u,{})},wM=({attributes:e,id:o,isBackend:i=!1})=>{const{image:a,options:s,advanced:r}=e,{easing:c,duration:d}=s,u=`#${o} .b-blocks-image-scroller-wrapper`,p=`${u} .b-blocks-image-scroller`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${u}{\n\t\t\t${ns("height",a.height.desktop)}\n\t\t}\n\t\t${p}{\n\t\t\ttransition: transform ${d}ms ${c};\n\t\t}\n\t\t${t}{\n\t\t\t${ns("height",a.height.tablet)}\n\t\t}\n\t\t${n}{\n\t\t\t${ns("height",a.height.mobile)}\n\t\t}\n\t\t${_s(o,r,i)}\n\t\t`}})},_M=[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}],CM=[{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"}],jM=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],$M=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,device:o}=e,{image:i,options:a}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(we,{value:i.img,height:"100%",width:"100%",onChange:e=>n({image:be(i,e,"img")})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Container Height","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i.height[o],onChange:e=>n({image:be(i,e,"height",o)})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Scroll Direction","b-blocks"),labelPosition:"edge",className:"mt10",options:_M,value:a.direction,onChange:e=>n({options:be(a,e,"direction")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Auto Scroll","b-blocks"),className:"mt10",value:a.isScrollAuto,checked:a.isScrollAuto,onChange:e=>n({options:be(a,e,"isScrollAuto")})}),a.isScrollAuto&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Scroll Duration (ms)","b-blocks"),className:"mt10",step:50,max:1e4,value:a.duration,onChange:e=>n({options:be(a,e,"duration")})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",className:"mt10",options:CM,value:a.easing,onChange:e=>n({options:be(a,e,"easing")})})]})]})]})})),SM=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Ra,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:jM,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)($M,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})})},TM=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{image:a}=t,s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(SM,{attributes:t,setAttributes:n,isPremium:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(wM,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{children:a.img.url?(0,l.jsx)(kM,{attributes:t,device:i}):(0,l.jsx)(h.MediaPlaceholder,{allowedTypes:["image"],multiple:!1,labels:{title:"Upload Image"},accept:"image/*",addToGallery:!0,onSelect:e=>{n({image:be(a,e,"img")})}})})})]})]})}));Pl(vM.name)&&(0,p.registerBlockType)(vM,{icon:$r,edit:TM});const NM=JSON.parse('{"apiVersion":3,"name":"b-blocks/info-box","title":"Info Box","description":"Display information in box style.","category":"bBlocks","keywords":["information box","info box","message"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"infoBoxAlign":{"type":"string","default":"center"},"textAlign":{"type":"string","default":"center"},"width":{"type":"string","default":"100%"},"background":{"type":"object","default":{"color":"#f1f7ff"}},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"50px"}},"border":{"type":"object","default":{"width":"10px","color":"#fff","radius":"5px"}},"shadow":{"type":"object","default":{"blur":"15px"}},"isIcon":{"type":"boolean","default":true},"icon":{"type":"object","default":{"class":"fa fa-info-circle","fontSize":70,"color":"#146EF5"}},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"title":{"type":"string","selector":"h3.infoBoxTitle","default":"Info Box Title"},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"},"fontWeight":600}},"titleColor":{"type":"string","default":"#333"},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"desc":{"type":"string","selector":"p.infoBoxDescription","default":"This content area describes info box descriptions or details."},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"descColor":{"type":"string","default":"#333"},"descMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isBtn":{"type":"boolean","default":false},"btn":{"type":"string","selector":"a.infoBoxButton","default":"Click Me"},"btnLink":{"type":"string","default":"#"},"isLinkNewTab":{"type":"boolean","default":true},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"btnColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"btnHovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"btnPadding":{"type":"object","default":{"vertical":"8px","horizontal":"15px"}},"btnBorder":{"type":"object","default":{"radius":"5px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),MM=({settings:e})=>{const{attributes:{infoBoxAlign:t,textAlign:n,width:i,background:s,padding:r,border:c,shadow:d,isIcon:u,icon:p,iconMargin:g,titleTypo:m,titleColor:b,titleMargin:f,isDesc:k,descTypo:w,descColor:_,descMargin:C,isBtn:j,btnLink:$,isLinkNewTab:S,btnTypo:T,btnColors:N,btnHovColors:M,btnPadding:L,btnBorder:P},setAttributes:E}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Info Box Settings","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:i,onChange:e=>E({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:s,onChange:e=>E({background:e})}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:r,onChange:e=>E({padding:e}),defaults:{vertical:"50px",horizontal:"50px"}}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:c,onChange:e=>E({border:e}),defaults:{width:"10px",color:"#fff",radius:"5px"}}),(0,l.jsx)(id,{label:(0,x.__)("Shadow:","b-blocks"),value:d,onChange:e=>E({shadow:e}),defaults:{blur:"15px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:u,onChange:e=>E({
462 +isIcon:e})}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Un,{value:p,onChange:e=>E({icon:e}),defaults:{class:"fa fa-info-circle",fontSize:70,color:o}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:g,onChange:e=>E({iconMargin:e}),defaults:{side:4,bottom:"20px"}})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:m,onChange:e=>E({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20},fontWeight:600}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:b,onChange:e=>E({titleColor:e}),defaultColor:"#333"}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:f,onChange:e=>E({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:k,onChange:e=>E({isDesc:e})}),k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Oa,{value:w,onChange:e=>E({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:_,onChange:e=>E({descColor:e}),defaultColor:"#333"}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>E({descMargin:e}),defaults:{side:4,bottom:"15px"}})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Button","b-blocks"),checked:j,onChange:e=>E({isBtn:e})}),j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:$,onChange:e=>E({btnLink:e}),placeholder:(0,x.__)("Button link","b-blocks")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open link in new tab","b-blocks"),checked:S,onChange:e=>E({isLinkNewTab:e})}),(0,l.jsx)(Oa,{value:T,onChange:e=>E({btnTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(On,{value:N,onChange:e=>E({btnColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:M,onChange:e=>E({btnHovColors:e}),defaults:{color:"#fff",bg:a}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:L,onChange:e=>E({btnPadding:e}),defaults:{vertical:"8px",horizontal:"15px"}}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:P,onChange:e=>E({btnBorder:e}),defaults:{radius:"5px"}})]})]})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(h.AlignmentToolbar,{value:t,onChange:e=>E({infoBoxAlign:e}),describedBy:(0,x.__)("Info Box Alignment"),alignmentControls:[{title:(0,x.__)("Info Box in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Info Box in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Info Box in right","b-blocks"),align:"right",icon:"align-right"}]}),(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>E({textAlign:e})})]})]})},LM="bBlocksInfoBox";Pl(NM.name)&&(0,p.registerBlockType)(NM,{icon:Sr,edit:e=>{const{attributes:{infoBoxAlign:t,textAlign:n,width:o,background:i,padding:a,border:s,shadow:r,isIcon:c,icon:d,iconMargin:u,title:p,titleTypo:g,titleColor:m,titleMargin:b,isDesc:f,desc:y,descTypo:v,descColor:k,descMargin:w,isBtn:_,btn:C,btnLink:j,isLinkNewTab:$,btnTypo:S,btnColors:T,btnHovColors:N,btnPadding:M,btnBorder:L},setAttributes:P,clientId:E}=e,A=`#block-${E}`,B=`${A} .${LM}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(MM,{settings:e}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${ps("",g)?.googleFontLink}\n\t\t\t\t${ps("",v)?.googleFontLink}\n\t\t\t\t${ps("",S)?.googleFontLink}\n\t\t\t\t${ps(`${B} .infoBoxTitle`,g)?.styles}\n\t\t\t\t${ps(`${B} .infoBoxDescription`,v)?.styles}\n\t\t\t\t${ps(`${B} .infoBoxButton`,S)?.styles}\n\n\t\t\t\t${A}{\n\t\t\t\t\ttext-align: ${t};\n\t\t\t\t}\n\t\t\t\t${B}{\n\t\t\t\t\ttext-align: ${n};\n\t\t\t\t\twidth: ${["0px","0%","0em"].includes(o)?"auto":o};\n\t\t\t\t\t${os(i)}\n\t\t\t\t\tpadding: ${us(a)};\n\t\t\t\t\t${is(s)}\n\t\t\t\t\tbox-shadow: ${ds(r)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxIcon{\n\t\t\t\t\tmargin: ${us(u)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxIcon i{\n\t\t\t\t\t${rs(d)}\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxTitle{\n\t\t\t\t\tcolor: ${m};\n\t\t\t\t\tmargin: ${us(b)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxDescription{\n\t\t\t\t\tcolor: ${k};\n\t\t\t\t\tmargin: ${us(w)};\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxButton{\n\t\t\t\t\t${ss(T)}\n\t\t\t\t\tpadding: ${us(M)};\n\t\t\t\t\t${is(L)}\n\t\t\t\t}\n\t\t\t\t${B} .infoBoxButton:hover{\n\t\t\t\t\t${ss(N)}\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsxs)("div",{className:LM,children:[c&&d?.class&&(0,l.jsx)("div",{className:"infoBoxIcon",children:(0,l.jsx)("i",{className:d?.class})}),(0,l.jsx)(h.RichText,{className:"infoBoxTitle",tagName:"h3",value:p,onChange:e=>P({title:e}),placeholder:(0,x.__)("Info box title","b-blocks"),inlineToolbar:!0}),f&&(0,l.jsx)(h.RichText,{className:"infoBoxDescription",tagName:"p",value:y,onChange:e=>P({desc:e}),placeholder:(0,x.__)("Info box description","b-blocks"),inlineToolbar:!0}),_&&(0,l.jsx)(h.RichText,{className:"infoBoxButton",tagName:"a",value:C,href:$t(j),target:$?"_blank":"",rel:"noreferrer noopener",onChange:e=>P({btn:e}),placeholder:(0,x.__)("Click Me","b-blocks"),inlineToolbar:!0})]})]})]})},save:()=>null})
463 +;const PM=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/infographic","version":"1.0.0","title":"Infographic Block","category":"bBlocks","description":"Build a circular infographic. Segment circles sit evenly around two decorative rings and reveal their title, divider, text and image inside the center disc on click or hover.","keywords":["infographic","circle","circular","segments","diagram","process","wheel"],"textdomain":"b-blocks","attributes":{"blockId":{"type":"string","default":""},"general":{"type":"object","default":{"desktop":{"alignment":"center"},"tablet":{"alignment":""},"mobile":{"alignment":""},"itemTriggerType":"click"}},"defaults":{"type":"object","default":{"item":"Title 1","itemTitle":"Info Title","itemText":"Select any segment around the circle to reveal its details right here.","image":{"id":null,"url":"","alt":""}}},"button":{"type":"object","default":{"showIcon":true,"showText":true}},"wheel":{"type":"object","default":{"startAngle":"0deg","direction":"clockwise","sweep":"360deg","radiusOffset":"0px","rotateLabels":false,"enableSegmentsType":false,"wedgeGap":"3deg"}},"animation":{"type":"object","default":{"enable":false,"trigger":"load","delay":"0ms","type":"spread","easing":"ease","speed":"500ms","stagger":"","order":"clockwise","rotate":false,"rotateSpeed":"20s","rotateDirection":"clockwise","pauseOnHover":true,"hoverMotion":"none","activePulse":false,"contentType":"fade","contentSpeed":"300ms"}},"elements":{"type":"object","default":{"title":true,"divider":true,"text":true,"image":false}},"items":{"type":"array","default":[{"id":"bBlocksInfographic-item-1","enable":true,"buttonLabel":"Title 1","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120v136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z\'/></svg>","url":""},"title":"Info Title 1","description":"Describe the first part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}},{"id":"bBlocksInfographic-item-2","enable":true,"buttonLabel":"Title 2","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\'/></svg>","url":""},"title":"Info Title 2","description":"Describe the second part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}},{"id":"bBlocksInfographic-item-3","enable":true,"buttonLabel":"Title 3","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM169.8 165.3c-7.9 22.3 3.7 46.8 26 54.6l9.9 3.5c11.1 3.9 18.5 14.4 18.5 26.2s-7.4 22.3-18.5 26.2l-9.9 3.5c-22.3 7.9-33.9 32.3-26 54.6s32.3 33.9 54.6 26l9.9-3.5c11.1-3.9 23.4-.6 31.1 8.3l6.8 7.9c15.4 17.9 42.5 19.9 60.4 4.5s19.9-42.5 4.5-60.4l-6.8-7.9c-7.7-8.9-9.4-21.6-4.2-32.2l4.6-9.4c10.4-21.2 1.6-46.8-19.6-57.2s-46.8-1.6-57.2 19.6l-4.6 9.4c-5.2 10.6-16 17.3-27.8 17.3H209.6c-16.4 0-31-10.4-36.4-25.9l-3.4-9.1z\'/></svg>","url":""},"title":"Info Title 3","description":"Describe the third part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}},{"id":"bBlocksInfographic-item-4","enable":true,"buttonLabel":"Title 4","position":"","buttonIcon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm-24-136V232c0-13.3 10.7-24 24-24s24 10.7 24 24v144c0 13.3-10.7 24-24 24s-24-10.7-24-24zm24-224a32 32 0 1 1 0-64 32 32 0 1 1 0 64z\'/></svg>","url":""},"title":"Info Title 4","description":"Describe the fourth part of your process, service or story in a sentence or two.","image":{"id":null,"url":"","alt":""},"imageHeight":"","imagePosition":"top","link":{"url":"","target":false,"nofollow":false,"title":""},"styles":{"normal":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"hover":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}},"active":{"color":{"label":"","icon":"","title":"","divider":"","desc":""},"background":{},"border":{}}}}]},"icon":{"type":"object","default":{"view":"framed","shape":"circle","desktop":{"size":"20px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":"18px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":"16px","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"color":"","border":{"normal":{},"hover":{}},"transition":"300ms","background":{"type":"solid","color":""},"position":"top","plateColor":"rgba(255, 255, 255, 0.22)"}},"segment":{"type":"object","default":{"normal":{"background":{"type":"solid","color":"#BFA83B"},"color":"#FFFFFF","border":{},"shadow":[]},"hover":{"background":{},"color":"","border":{},"shadow":[]},"active":{"background":{},"color":"","border":{},"shadow":[]},"desktop":{"size":"118px","padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":"96px","padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":"76px","padding":{"top":"","right":"","bottom":"","left":""}},"spacing":"6px","margin":{"top":"","right":"","bottom":"","left":""},"transition":"300ms","shape":"circle","radius":{"top":"","right":"","bottom":"","left":""},"labelTypo":{"fontSize":{"desktop":13,"tablet":12,"mobile":11},"fontWeight":"600"}}},"outerDisc":{"type":"object","default":{"desktop":{"size":"560px","ringGap":"0px"},"tablet":{"size":"460px","ringGap":"0px"},"mobile":{"size":"330px","ringGap":"0px"},"background":{"type":"solid","color":""},"borderColor":"#7E57C2","borderWidth":"2px","borderStyle":"solid","transition":"300ms","shadow":{"normal":[],"hover":[]}}},"innerDisc":{"type":"object","default":{"desktop":{"size":"276px","padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"size":"220px","padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"size":"130px","padding":{"top":"","right":"","bottom":"","left":""}},"background":{"type":"solid","color":"#F2F0E4"},"borderColor":"#3F8F4B","borderWidth":"2px","borderStyle":"solid","contentWidth":"78%","contentGap":"10px","contentAlign":"center","transition":"300ms","shadow":{"normal":[],"hover":[]}}},"content":{"type":"object","default":{"title":{"color":"#1F2937","typo":{"fontSize":{"desktop":34,"tablet":28,"mobile":22},"fontWeight":"700","lineHeight":"1.2"},"tag":"h3"},"text":{"color":"#4B5563","typo":{"fontSize":{"desktop":14,"tablet":13,"mobile":12},"lineHeight":"1.6"}},"divider":{"color":"#BFA83B","width":"60px","height":"3px","style":"solid"},"image":{"desktop":{"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"107px"},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":""},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":""},"fit":"cover"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),EM="b-blocks-infographic",AM=(0,
464 +l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),BM=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),IM=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),OM=[{label:(0,x.__)("Left","b-blocks"),value:"left",icon:AM},{label:(0,x.__)("Center","b-blocks"),value:"center",icon:BM},{label:(0,x.__)("Right","b-blocks"),value:"right",icon:IM}],RM=[{label:(0,x.__)("Click","b-blocks"),value:"click"},{label:(0,x.__)("Hover","b-blocks"),value:"hover"}],zM=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],DM=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Stacked","b-blocks"),value:"stacked"},{label:(0,x.__)("Framed","b-blocks"),value:"framed"}],FM=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"}],HM=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],WM=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"}],UM=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],GM=[{label:(0,x.__)("Clockwise","b-blocks"),value:"clockwise"},{label:(0,x.__)("Anti-clockwise","b-blocks"),value:"anticlockwise"}],VM=[{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Back Out","b-blocks"),value:"back-out"},{label:(0,x.__)("Back In Out","b-blocks"),value:"back-in-out"},{label:(0,x.__)("Elastic","b-blocks"),value:"elastic"}],qM={"back-out":"cubic-bezier(0.34, 1.56, 0.64, 1)","back-in-out":"cubic-bezier(0.68, -0.55, 0.27, 1.55)",elastic:"cubic-bezier(0.5, -0.6, 0.35, 1.7)"},YM=(e="ease")=>qM[e]||e||"ease",KM=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],QM=[{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"}],ZM=(e,t=[])=>{const n=bL(e,0);return 0<n?`transition: ${t.map((e=>`${e} ${n}ms ease`)).join(", ")};`:""},XM=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")},{name:"active",title:(0,x.__)("Active","b-blocks")}],JM=["h1","h2","h3","h4","h5","h6","div","p","span"],eL=JM.map((e=>({label:e.toUpperCase(),value:e}))),tL=(e,t)=>{if("normal"===e)return t;const n=[...XM,...en].find((t=>t.name===e))?.title;return n?`${n} ${t}`:t},nL=[{name:"content",title:(0,x.__)("Content","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],oL=[{label:(0,x.__)("Icon","b-blocks"),value:"icon"},{label:(0,x.__)("Image","b-blocks"),value:"image"}],iL=[{label:(0,x.__)("Spread","b-blocks"),value:"spread"},{label:(0,x.__)("Fade In","b-blocks"),value:"fade"},{label:(0,x.__)("Zoom In","b-blocks"),value:"zoom"},{label:(0,x.__)("Spin In","b-blocks"),value:"spin"},{label:(0,x.__)("Drop In","b-blocks"),value:"drop"},{label:(0,x.__)("Bounce In","b-blocks"),value:"bounce"},{label:(0,x.__)("Flip In","b-blocks"),value:"flip"},{label:(0,x.__)("Blur In","b-blocks"),value:"blur"},{label:(0,x.__)("Swing In","b-blocks"),value:"swing"},{label:(0,x.__)("Roll In","b-blocks"),value:"roll"},{label:(0,x.__)("Unfold","b-blocks"),value:"unfold"}],aL=["fade","blur"],sL=e=>aL.includes(e),rL={spread:"bBlocksInfographicSpread",fade:"bBlocksInfographicFade",zoom:"bBlocksInfographicZoom",spin:"bBlocksInfographicSpin",drop:"bBlocksInfographicDrop",bounce:"bBlocksInfographicBounce",flip:"bBlocksInfographicFlip",blur:"bBlocksInfographicBlur",swing:"bBlocksInfographicSwing",roll:"bBlocksInfographicRoll",unfold:"bBlocksInfographicUnfold"},lL=[{label:(0,x.__)("On page load","b-blocks"),value:"load"},{label:(0,x.__)("When scrolled into view","b-blocks"),value:"scroll"},{label:(0,x.__)("Every time it scrolls into view","b-blocks"),value:"scrollRepeat"}],cL=e=>"scroll"===e||"scrollRepeat"===e,dL=[{label:(0,x.__)("Clockwise","b-blocks"),value:"clockwise"},{label:(0,x.__)("Anti-clockwise","b-blocks"),value:"anticlockwise"},{label:(0,x.__)("From Top Both Ways","b-blocks"),value:"fromTop"},{label:(0,x.__)("From Bottom Both Ways","b-blocks"),value:"fromBottom"},{label:(0,x.__)("Random","b-blocks"),value:"random"}],uL=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Slide Up","b-blocks"),value:"slide-up"},{label:(0,x.__)("Slide Sideways","b-blocks"),value:"slide-side"},{label:(0,x.__)("Zoom","b-blocks"),value:"zoom"},{label:(0,x.__)("Flip","b-blocks"),value:"flip"}],pL=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Grow","b-blocks"),value:"grow"},{label:(0,x.__)("Lift","b-blocks"),value:"lift"},{label:(0,x.__)("Pulse","b-blocks"),value:"pulse"},{label:(0,x.__)("Wobble","b-blocks"),value:"wobble"},{label:(0,x.__)("Rotate","b-blocks"),value:"rotate"}],hL=e=>{let t=2654435761*(e+1)%4294967296;return t^=t>>>15,t},gL=(e=0)=>({value:"ms",label:"ms",default:e}),mL=(e=0)=>({value:"s",label:"s",default:e}),bL=(e,t=500)=>{const n=parseFloat(e);if(isNaN(n))return t;const o=String(e).trim();return/s$/i.test(o)&&!/ms$/i.test(o)?1e3*n:n},fL=(e={},t,n,o)=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},a=i("desktop")??o;if("desktop"===t)return a;const s=i("tablet")??a;return"tablet"===t?s:i("mobile")??s},xL=(e,t="0px")=>{if(null==e||""===e)return t;const n=parseFloat(e);return isNaN(n)?t:/[a-z%]$/i.test(String(e).trim())?String(e).trim():`${n}px`},yL=(e,t)=>`calc(${e/2}px + ${xL(t)} / 2)`,vL=e=>Math.max(Math.floor(e/2),40),kL=(e=0)=>({value:"deg",label:"deg",default:e}),wL=(e=[])=>e.map(((e,t)=>({item:e,index:t}))).filter((({item:e})=>!1!==e?.enable)),_L=(e,t,n={})=>{if(0>=t)return 0
465 +;const o=parseFloat(n.startAngle)||0,i="anticlockwise"===n.direction?-1:1,a=Math.min(Math.abs(parseFloat(n.sweep??360))||360,360);return o+e*(360<=a?a/t:a/Math.max(t-1,1))*i},CL=(e,t,n,o={})=>{const i=parseFloat(e?.position);return isNaN(i)?_L(t,n,o):i},jL=(e=[],t={})=>{const n=Math.max(parseFloat(t.wedgeGap??3)||0,0),o=((e=[],t={})=>wL(e).map((({item:e,index:n},o,i)=>({index:n,angle:CL(e,o,i.length,t)}))))(e,t).map((({index:e,angle:t})=>({index:e,angle:(t%360+360)%360}))),i=o.length;if(!i)return[];const a=[...o].sort(((e,t)=>e.angle-t.angle)),s=a.map(((e,t)=>e.angle-(e=>{if(1===i)return 360;const t=a[e].angle-a[(e-1+i)%i].angle;return 0>=t?t+360:t})(t)/2)),r=[];return a.forEach(((e,t)=>{let o=s[(t+1)%i]-s[t];for(;0>=o;)o+=360;r[e.index]={index:e.index,start:s[t]+n/2,span:Math.max(o-n,0),mid:s[t]+o/2}})),r},$L=(e=[],t)=>e.find((e=>e?.id===t))||null,SL=(e={},t={})=>{const{type:n="spread"}=e,o=rL[n]?n:"spread";return e.enable?t.enableSegmentsType?sL(o)?o:"fade":o:""},TL=(e,t={})=>{const{general:n={},wheel:o={},animation:i={},icon:a={},segment:s={}}=e,r=SL(i,o),l=i.enable&&(!cL(i.trigger)||t.inView),c=l&&!o.enableSegmentsType&&i.rotate;return[EM,"b-blocks-infographic-trigger-"+("hover"===n.itemTriggerType?"hover":"click"),`b-blocks-infographic-icon-view-${a.view||"default"}`,`b-blocks-infographic-icon-shape-${a.shape||"circle"}`,`b-blocks-infographic-segment-shape-${s.shape||"circle"}`,`b-blocks-infographic-icon-pos-${a.position||"top"}`,o.enableSegmentsType?"b-blocks-infographic-has-segments":"",i.enable&&cL(i.trigger)&&!t.inView?"b-blocks-infographic-awaiting-view":"",l?"b-blocks-infographic-has-animation":"",l?`b-blocks-infographic-anim-${r}`:"",c?"b-blocks-infographic-has-rotation":"",c&&"anticlockwise"===i.rotateDirection?"b-blocks-infographic-rotate-reverse":"",c&&i.pauseOnHover?"b-blocks-infographic-pause-on-hover":"",i.enable&&i.hoverMotion&&"none"!==i.hoverMotion?`b-blocks-infographic-hover-motion-${i.hoverMotion}`:"",i.enable&&i.activePulse?"b-blocks-infographic-has-active-pulse":"",i.enable&&i.contentType&&"none"!==i.contentType?`b-blocks-infographic-content-anim-${i.contentType}`:""].filter(Boolean).join(" ")},NL=({buttonIcon:e={},label:t})=>{const{type:n="icon",icon:o="",url:i=""}=e;return"image"===n?i?(0,l.jsx)("span",{className:"b-blocks-infographic-segment-icon",children:(0,l.jsx)("img",{src:i,alt:t||""})}):null:o?(0,l.jsx)("span",{className:"b-blocks-infographic-segment-icon",dangerouslySetInnerHTML:{__html:o}}):null},ML=({image:e={},height:t})=>e?.url?(0,l.jsx)("div",{className:"b-blocks-infographic-center-image",children:(0,l.jsx)("img",{src:e.url,alt:e.alt||"",style:t?{height:xL(t)}:void 0})}):null,LL=({attributes:e,isBackend:t=!1,custom:n={}})=>{const{general:o={},defaults:i={},button:a={},wheel:s={},animation:r={},elements:c={},content:d={}}=e,u=Array.isArray(e?.items)?e.items:[],p=(0,m.useMemo)((()=>wL(u).map((({item:e})=>e))),[u]),{item:h,itemTitle:g,itemText:b,image:f={}}=i,{showIcon:x,showText:y}=a,{itemTriggerType:v}=o,k=SL(r,s),w=r.enable?r.stagger?bL(r.stagger,0):Math.round(.25*bL(r.speed)):0,_=r.enable?bL(r.delay,0):0,C=r.enable&&!s.enableSegmentsType&&r.rotate,j=C?_+Math.max(0,p.length-1)*w+bL(r.speed):0,{title:$,divider:S,text:T,image:N}=c,M=((e=[],t)=>{const n=e.find((e=>e?.buttonLabel===t));return(n||e[0])?.id||""})(p,h),[L,P]=(0,m.useState)(M);(0,m.useEffect)((()=>P(M)),[M]);const E=t?n?.activeIndex:void 0;(0,m.useEffect)((()=>{const e=u[E];e?.id&&P(e.id)}),[E]);const A=e=>{if(!s.rotateLabels)return-e;const t=(e%360+360)%360;return 90<t&&270>t?180:0},B=t&&r.enable?`${k}-${r.easing}-${r.speed}-${r.order}-${r.stagger}-${r.delay}-${r.rotate}`:"",I=(0,m.useRef)(null),[O,R]=(0,m.useState)(t||!cL(r.trigger));(0,m.useEffect)((()=>{if(t||!cL(r.trigger))return void R(!0);const e=I.current;if(!e||"undefined"==typeof IntersectionObserver)return void R(!0);R(!1);const n="scrollRepeat"===r.trigger,o=new IntersectionObserver((([e])=>{e.isIntersecting?(R(!0),!n&&o.disconnect()):n&&R(!1)}),{threshold:.2});return o.observe(e),()=>o.disconnect()}),[t,r.trigger,r.enable]);const z="scrollRepeat"===r.trigger&&O?"in":"out",D=(0,m.useMemo)((()=>((e,t="clockwise")=>{const n=Array.from({length:e},((e,t)=>t));if("anticlockwise"===t)return n.map((t=>e-1-t));if("fromTop"===t)return n.map((t=>Math.min(t,e-t)));if("fromBottom"===t)return n.map((t=>Math.ceil(e/2)-Math.min(t,e-t)));if("random"===t){const e=[...n].sort(((e,t)=>hL(e)-hL(t)));return n.map((t=>e.indexOf(t)))}return n})(p.length,r.order)),[p.length,r.order]),F=(0,m.useMemo)((()=>s.enableSegmentsType?jL(u,s):[]),[s,u]),H=(0,m.useMemo)((()=>wL(u)),[u]),W=$L(u,L)||$L(u,M),U=W?.title||g,G=W?.description||b,V=W?.image?.url?W.image:f,q=u.findIndex((e=>e?.id===W?.id)),Y=W?.image?.url?W?.imageHeight:"",K=W?.imagePosition||"top",Q=e=>{const t=_+(D[e]??e)*w;return C?`${t}ms, ${j}ms`:t?`${t}ms`:""},Z=(e,o)=>{P(e?.id),t&&n?.setActiveIndex&&n.setActiveIndex(o)},X=JM.includes(d?.title?.tag)?d.title.tag:"h3",J=`${r.contentType||"none"}-${r.contentSpeed||""}`,ee=(0,l.jsxs)(l.Fragment,{children:[$&&U&&(0,l.jsx)(X,{className:"b-blocks-infographic-center-title",children:U}),S&&(0,l.jsx)("span",{className:"b-blocks-infographic-center-divider"}),T&&G&&(0,l.jsx)("p",{className:"b-blocks-infographic-center-text",children:G})]});return(0,l.jsx)("div",{className:TL(e,{inView:O}),ref:I,children:(0,l.jsxs)("div",{className:"b-blocks-infographic-circle",children:[(0,l.jsx)("div",{className:"b-blocks-infographic-center-disc","data-item-index":-1<q?q:void 0,children:(0,l.jsxs)("div",{className:"b-blocks-infographic-center-content",children:[N&&"top"===K&&(0,l.jsx)(ML,{image:V,height:Y}),ee,N&&"bottom"===K&&(0,l.jsx)(ML,{image:V,height:Y})]},`${W?.id||"none"}-${J}`)}),H.map((({item:e,index:o},i)=>{const a=!!W&&e?.id===W.id,{url:r="",target:c=!1,nofollow:d=!1,title:u=""}=e?.link||{},p=F[o]||{start:0,span:0,mid:0},h=CL(e,i,H.length,s),g=A(h),m={className:["b-blocks-infographic-segment",a?"active":"",t&&o===n?.activeIndex?"bPlNowEditing":""].filter(Boolean).join(" "),"data-index":o,"data-item-id":e?.id,"aria-pressed":a,style:{"--bbInfographicAngle":`${h}deg`,"--bbInfographicCounter":`${g}deg`,"--bbInfographicCounterEnd":`${s.rotateLabels?g:g-360}deg`,"--bbInfographicMid":`${p.mid}deg`,"--bbInfographicMidCounter":`${A(p.mid)}deg`,...Q(i)?{animationDelay:Q(i)}:{}},onMouseEnter:"hover"===v?()=>Z(e,o):void 0,onFocus:"hover"===v?()=>Z(e,o):void 0,onClick:()=>Z(e,o)},b=(0,l.jsxs)("span",{className:"b-blocks-infographic-segment-inner",children:[x&&(0,l.jsx)(NL,{buttonIcon:e?.buttonIcon,label:e?.buttonLabel}),y&&e?.buttonLabel&&(0,l.jsx)("span",{className:"b-blocks-infographic-segment-label",children:e.buttonLabel})]});return r&&!t?(0,l.jsx)("a",{href:r,title:u||void 0,"aria-label":u||void 0,target:c?"_blank":"_self",rel:"noreferrer noopener"+(d?" nofollow":""),...m,children:b},`${e?.id||o}${B}${z}`):(0,l.jsx)("button",{type:"button",...m,children:b},`${e?.id||o}${B}${z}`)}))]})})},PL=e=>Array.isArray(e)?e.map(PL):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,PL(t)]))):(e=>{if("string"!=typeof e)return e;const t=e.replace(/\/\*|\*\//g,"").replace(/[{};<>\\]/g,"").replace(/[\r\n\t]+/g," "),n=e=>(t.split(e).length-1)%2;return n('"')||n("'")?t.replace(/["']/g,""):t})(e),EL=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:a={}}=e,s=(0,m.useMemo)((()=>PL({...e,advanced:void 0
466 +})),[e]),{general:r={},wheel:c={},animation:d={},icon:u={},segment:p={},outerDisc:h={},innerDisc:g={},content:b={}}=s,f=Array.isArray(s?.items)?s.items:[],{normal:x={},hover:y={},active:v={}}=p,{title:k={},text:w={},divider:_={},image:C={}}=b,j=`#${o} .${EM}`,$=`${j} .b-blocks-infographic-circle`,S=`${$} .b-blocks-infographic-segment`,T=`${$} .b-blocks-infographic-center-disc`,N=`${T} .b-blocks-infographic-center-title`,M=`${T} .b-blocks-infographic-center-text`,L=`${T} .b-blocks-infographic-center-divider`,P=`${S} .b-blocks-infographic-segment-label`,E=`${S} .b-blocks-infographic-segment-inner`,A=`${S} .b-blocks-infographic-segment-icon`,B=`${T} .b-blocks-infographic-center-image img`,I=`${j}:not(.b-blocks-infographic-has-segments) .b-blocks-infographic-circle .b-blocks-infographic-segment`,O=`${j}.b-blocks-infographic-has-segments .b-blocks-infographic-circle .b-blocks-infographic-segment`,R=(e,t)=>xL(e.borderWidth??t),z=R(g,"2px"),D=R(h,"2px"),F=e=>Object.keys(e||{}).length?as(e):"",H=(e,...t)=>{const n=t.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return n?`${e}{ ${n} }`:""},W=g.borderColor||"#3F8F4B",U=h.borderColor||"#7E57C2",G="left: 50%; right: auto;",V=e=>{const{circle:t,outerGap:n,segmentSize:o,iconSize:i,radius:a,disc:s}=(e=>{const t=parseFloat(fL(h,e,"size",560))||560,n=xL(fL(u,e,"size","20px"),"20px"),o=parseFloat(fL(g,e,"size",276))||276,i=parseFloat(h?.[e]?.ringGap)||0,a=t+2*i;return{circle:t,outerGap:i,segmentSize:Math.min(parseFloat(fL(p,e,"size",118))||118,vL(t)),iconSize:n,radius:`calc(${yL(a,D)} + ${xL(c.radiusOffset,"0px")})`,disc:o}})(e),l={tablet:"desktop",mobile:"tablet"}[e],d=fL(r,e,"alignment","center");return`${H(j,l&&d===fL(r,l,"alignment","center")?"":`text-align: ${d};`)}\n\t\t${H($,`width: ${t}px;`,`height: ${t}px;`,`padding: ${n?xL(h[e].ringGap,"0px"):"0px"};`,`background-clip: ${n?"content-box":"border-box"};`)}\n\t\t${H(S,ns("padding",hs(p?.[e]?.padding)))}\n\t\t${c.enableSegmentsType?`${O}{\n\t\t\twidth: ${t}px;\n\t\t\theight: ${t}px;\n\t\t\t${G}\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\t--bbInfographicContentRadius: ${(s/2+t/2)/2}px;\n\t\t}`:`${I}{\n\t\t\twidth: ${o}px;\n\t\t\theight: ${o}px;\n\t\t\t${G}\n\t\t\t--bbInfographicRadius: ${a};\n\t\t\ttransform: translate(-50%, -50%) rotate(var(--bbInfographicAngle, 0deg)) translateY(calc(var(--bbInfographicRadius, 0px) * -1)) rotate(var(--bbInfographicCounter, 0deg));\n\t\t}`}\n\t\t${S} .b-blocks-infographic-segment-icon>svg,\n\t\t${S} .b-blocks-infographic-segment-icon>img{\n\t\t\twidth: ${i};\n\t\t\theight: ${i};\n\t\t}\n\t\t${H(A,ns("padding",hs(u?.[e]?.padding)),ns("border-radius",hs(u?.[e]?.radius)))}\n\t\t${H(B,ns("border-radius",hs(C?.[e]?.radius)),ns("width",xL(C?.[e]?.width,"")),ns("height",xL(C?.[e]?.height,"")))}\n\t\t${H(T,`width: ${s}px;`,`height: ${s}px;`,ns("padding",hs(g?.[e]?.padding)))}`},q=(e,t)=>{const n=os(t?.background),o=F(t?.border),i=ns("box-shadow",ls(t?.shadow)),a=t?.color;return[H(e,n,ns("color",a),o,i),a?`${e} .b-blocks-infographic-segment-icon>svg{ ${ns("fill",a)} }`:""].filter(Boolean).join("\n")},Y=(e,t)=>{const{label:n,icon:o}=t?.color||{},i=os(t?.background),a=F(t?.border);return[i||a?`${e}{ ${i} ${a} }`:"",n?`${e} .b-blocks-infographic-segment-label{ color: ${n}; }`:"",o?`${e} .b-blocks-infographic-segment-icon{ color: ${o}; } ${e} .b-blocks-infographic-segment-icon>svg{ fill: ${o}; }`:""].filter(Boolean).join("\n")},K=(e,t)=>{const{title:n,divider:o,desc:i}=t?.color||{};return[H(`${e} .b-blocks-infographic-center-title`,ns("color",n)),H(`${e} .b-blocks-infographic-center-divider`,ns("border-top-color",o)),H(`${e} .b-blocks-infographic-center-text`,ns("color",i))].filter(Boolean).join("\n")},Q=(0,m.useMemo)((()=>`\n\t\t${ps("",k.typo)?.googleFontLink}\n\t\t${ps("",w.typo)?.googleFontLink}\n\t\t${ps("",p.labelTypo)?.googleFontLink}\n\t\t${ps(N,k.typo)?.styles}\n\t\t${ps(M,w.typo)?.styles}\n\t\t${ps(P,p.labelTypo)?.styles}\n\n\t\t${H(j,...(()=>{const e=SL(d,c);return[`--bbInfographicSpeed: ${bL(d.speed)}ms;`,`--bbInfographicEasing: ${YM(d.easing)};`,ns("--bbInfographicContentSpeed",xL(d.contentSpeed,"")),d.rotate?`--bbInfographicEntranceName: ${rL[e]||"none"};`:"",d.rotate?`--bbInfographicRotateSpeed: ${xL(d.rotateSpeed,"")};`:""]})())}\n\t\t${H(S,ZM(p.transition,["background","color","border-color","box-shadow"]),ns("border-radius",hs(p.radius)))}\n\t\t${q(S,x)}\n\t\t${q(`${S}.active`,v)}\n\t\t${q(`${S}:hover`,y)}\n\t\t${q(`${S}:focus-visible`,y)}\n\t\t${f.map(((e,t)=>{const{normal:n,hover:o,active:i}=e?.styles||{},a=`${S}[data-index='${t}']`,s=`${T}[data-item-index='${t}']`;return[Y(a,n),Y(`${a}.active`,i),Y(`${a}:hover`,o),Y(`${a}:focus-visible`,o),K(s,n),K(`${s}:hover`,o),K(`${s}:active`,i)].filter(Boolean).join("\n")})).filter(Boolean).join("\n")}\n\t\t${H(T,ZM(g.transition,["background","box-shadow"]),os(g.background),`border: ${z} ${g.borderStyle||"solid"} ${W};`,ns("box-shadow",ls(g.shadow?.normal)))}\n\t\t${H(`${T}:hover`,ns("box-shadow",ls(g.shadow?.hover)))}\n\t\t${H(`${T} .b-blocks-infographic-center-content`,ns("width",xL(g.contentWidth,"")),ns("gap",xL(g.contentGap,"")),ns("text-align",g.contentAlign),ns("align-items","left"===g.contentAlign?"flex-start":"right"===g.contentAlign?"flex-end":"center"))}\n\t\t${H($,ZM(h.transition,["background","border-color","box-shadow"]),os(h.background),`border: ${D} ${h.borderStyle||"solid"} ${U};`,ns("box-shadow",ls(h.shadow?.normal)))}\n\t\t${H(`${$}:hover`,ns("box-shadow",ls(h.shadow?.hover)))}\n\t\t${H(N,ns("color",k.color))}\n\t\t${H(M,ns("color",w.color))}\n\t\t${H(L,`width: ${xL(_.width)};`,"height: 0;","background: none;",`border-top: ${xL(_.height)} ${_.style||"solid"} ${_.color||"currentColor"};`)}\n\t\t${H(E,ns("gap",xL(p.spacing,"")),ns("margin",hs(p.margin)))}\n\t\t${H(j,ns("--bbInfographicIconPlate",u.plateColor))}\n\t\t${H(A,ZM(u.transition,["background","color","border-color"]),ns("color",u.color),os(u.background),F(u.border?.normal))}\n\t\t${H(`${S}:hover .b-blocks-infographic-segment-icon`,F(u.border?.hover))}\n\t\t${H(`${A}>svg`,ns("fill",u.color))}\n\t\t${H(B,ns("object-fit",C.fit))}\n\n\t\t${c.enableSegmentsType?jL(f,c).map((e=>`${O}[data-index='${e.index}']{ clip-path: ${(({start:e,span:t})=>{if(0>=t)return"none";const n=Math.max(Math.ceil(t/4),2),o=["50% 50%"];for(let i=0;i<=n;i++){const a=(e+t*i/n)*Math.PI/180;o.push(`${(50+50*Math.sin(a)).toFixed(2)}% ${(50-50*Math.cos(a)).toFixed(2)}%`)}return`polygon(${o.join(", ")})`})(e)}; }`)).join("\n"):""}\n\n\t\t${V("desktop")}\n\n\t\t${t}{\n\t\t\t${V("tablet")}\n\t\t}\n\n\t\t${n}{\n\t\t\t${V("mobile")}\n\t\t}\n\n\t\t${_s(o,a,i,!1)}\n\t\t`),[e,o,i]);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:Q}})},AL=({attributes:e,updateObj:t})=>{const{animation:n={},wheel:o={}}=e,i=(e,n)=>t("animation",e,n),a=o.enableSegmentsType;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Animation","b-blocks"),checked:n.enable,onChange:e=>i(e,"enable"),__nextHasNoMarginBottom:!0}),n.enable&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Trigger","b-blocks"),labelPosition:"edge",value:n.trigger||"load",options:lL,onChange:e=>i(e,"trigger"),help:(0,x.__)("Waiting for the scroll keeps a block below the fold from finishing before anyone reaches it.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Delay","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.delay||"",onChange:e=>i(e,"delay"),units:[gL(),mL()]})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:n.type||"spread",options:(s=a,s?iL.filter((({value:e})=>sL(e))):iL),onChange:e=>i(e,"type"),__nextHasNoMarginBottom:!0}),a&&(0,l.jsx)("small",{children:(0,
467 +x.__)("Segments are placed by a clip-path, which the moving entrances cannot work around — so only the two that fade rather than travel are offered here.","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:n.easing||"ease",options:VM,onChange:e=>i(e,"easing"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.speed||"",onChange:e=>i(e,"speed"),units:[gL(),mL()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Stagger","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.stagger||"",onChange:e=>i(e,"stagger"),units:[gL(),mL()],placeholder:`${Math.round(.25*bL(n.speed))}`})]}),(0,l.jsx)("small",{children:(0,x.__)("The gap between one segment arriving and the next. Zero brings them in together; left empty it scales with the speed.","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Order","b-blocks"),labelPosition:"edge",value:n.order||"clockwise",options:dL,onChange:e=>i(e,"order"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Content Transition","b-blocks"),labelPosition:"edge",value:n.contentType||"none",options:uL,onChange:e=>i(e,"contentType"),help:(0,x.__)("How the centre swaps its title, text and image when a new segment is selected.","b-blocks"),__nextHasNoMarginBottom:!0}),"none"!==n.contentType&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.contentSpeed||"",onChange:e=>i(e,"contentSpeed"),units:[gL(),mL()]})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Hover Motion","b-blocks"),labelPosition:"edge",value:n.hoverMotion||"none",options:pL,onChange:e=>i(e,"hoverMotion"),help:(0,x.__)("Movement on hover, separate from the hover colours in the Style tab.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Pulse Active Segment","b-blocks"),checked:n.activePulse,onChange:e=>i(e,"activePulse"),help:(0,x.__)("A soft, continuous pulse on whichever segment is driving the centre.","b-blocks"),__nextHasNoMarginBottom:!0}),!a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rotate Ring","b-blocks"),checked:n.rotate,onChange:e=>i(e,"rotate"),help:(0,x.__)("Keeps the ring turning once the entrance has finished. Combines with any type above.","b-blocks"),__nextHasNoMarginBottom:!0}),n.rotate&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Rotation Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.rotateSpeed||"",onChange:e=>i(e,"rotateSpeed"),units:[mL(),gL()]})]}),(0,l.jsx)("small",{children:(0,x.__)("One full turn. Seconds rather than milliseconds — anything quick reads as a spin.","b-blocks")}),(0,l.jsx)(v,{className:"mb0 mt10 flex1",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.rotateDirection||"clockwise",onChange:e=>i(e,"rotateDirection"),children:GM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Pause On Hover","b-blocks"),checked:n.pauseOnHover,onChange:e=>i(e,"pauseOnHover"),help:(0,x.__)("A turning segment travels away from the pointer, which makes it hard to click.","b-blocks"),__nextHasNoMarginBottom:!0})]})]})]})]});var s},BL=({attributes:e,updateObj:t})=>{const{button:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:n.showIcon,onChange:e=>t("button",e,"showIcon"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Text","b-blocks"),checked:n.showText,onChange:e=>t("button",e,"showText"),__nextHasNoMarginBottom:!0})]})},IL=({attributes:e,updateObj:t})=>{const{items:n=[],defaults:o={}}=e,i=n.map((e=>({label:e?.buttonLabel||(0,x.__)("(untitled)","b-blocks"),value:e?.buttonLabel||""})));return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Default Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Default Item","b-blocks"),labelPosition:"edge",value:o.item,options:i,onChange:e=>t("defaults",e,"item"),help:(0,x.__)("The item shown in the centre before anything is selected.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Default Title","b-blocks"),value:o.itemTitle,onChange:e=>t("defaults",e,"itemTitle"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Default Text","b-blocks"),value:o.itemText,onChange:e=>t("defaults",e,"itemText"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{children:(0,x.__)("Default Image","b-blocks")}),(0,l.jsx)(we,{value:o.image,height:"90%",width:"90%",onChange:e=>t("defaults",e,"image")}),(0,l.jsx)("small",{children:(0,x.__)("Each is a fallback: it shows only when the active item leaves that field empty.","b-blocks")})]})},OL=({attributes:e,updateObj:t})=>{const{elements:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Title","b-blocks"),checked:n.title,onChange:e=>t("elements",e,"title"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Divider","b-blocks"),checked:n.divider,onChange:e=>t("elements",e,"divider"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Text","b-blocks"),checked:n.text,onChange:e=>t("elements",e,"text"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Image","b-blocks"),checked:n.image,onChange:e=>t("elements",e,"image"),__nextHasNoMarginBottom:!0})]})},RL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{general:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("General","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(v,{className:"mb0 flex1",children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1 small mt5",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o?.[n]?.alignment||"",size:"small",onChange:e=>t("general",e,n,"alignment"),isDeselectable:!0,style:{padding:"2px"},children:OM.map((({label:e,value:t,icon:n})=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e,value:t,icon:n},t)))}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Item Trigger Type","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.itemTriggerType,onChange:e=>t("general",e,"itemTriggerType"),children:RM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]})]})},zL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{icon:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,
468 +x.__)("View","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.view,onChange:e=>t("icon",e,"view"),children:DM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(v,{className:"mt10 flex1",children:(0,x.__)("Shape","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.shape,onChange:e=>t("icon",e,"shape"),children:FM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(v,{className:"mt10 flex1",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.position||"top",onChange:e=>t("icon",e,"position"),children:UM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("icon",e,n,"size"),units:[Pe(),Ae(),Be()]})]})]})},DL=({attributes:e,setAttributes:t,index:n})=>{const{items:o=[],elements:i={},wheel:a={}}=e,{enable:s=!0,buttonLabel:r="",position:c="",buttonIcon:d={},title:u="",description:p="",image:h={},imageHeight:g="107px",imagePosition:m="top",link:b={},styles:f={}}=o?.[n]||{},k=fe(e,t),w=(e,t,...o)=>k("items",t,n,e,...o),_=wL(o),C=_.findIndex((e=>e.index===n)),j=Math.round(_L(-1===C?n:C,_.length||o.length,a));return(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small bBlocksSettingInfographicSettings",activeClass:"activeTab",tabs:nL,children:e=>(0,l.jsxs)(l.Fragment,{children:["content"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Item","b-blocks"),checked:!1!==s,onChange:e=>w("enable",e),help:(0,x.__)("Switched off, the item leaves the ring and the rest re-space themselves.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Button Label","b-blocks"),value:r,onChange:e=>w("buttonLabel",e),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Position","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:c||"",onChange:e=>w("position",e),units:[kL()],placeholder:`${j}`})]}),(0,l.jsx)("small",{children:(0,x.__)("Clockwise from the top. Leave empty to keep this item evenly spaced with the rest.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Button Icon","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:d?.type||"icon",onChange:e=>w("buttonIcon",e,"type"),children:oL.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]}),"image"===d?.type?(0,l.jsx)(we,{className:"mt10",value:{url:d?.url},height:"90%",width:"90%",onChange:e=>w("buttonIcon",e?.url||"","url")}):(0,l.jsx)(Zn,{className:"mt10",value:d?.icon,onChange:e=>w("buttonIcon",e,"icon")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Title","b-blocks"),value:u,onChange:e=>w("title",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Description","b-blocks"),value:p,onChange:e=>w("description",e),__nextHasNoMarginBottom:!0}),(0,l.jsx)(v,{children:(0,x.__)("Image","b-blocks")}),(0,l.jsx)(we,{height:"90%",width:"90%",value:h,onChange:e=>w("image",e)}),!i.image&&(0,l.jsx)("small",{children:(0,x.__)("Nothing will show until Enable Image is switched on in the Elements panel.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Image Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:g||"",onChange:e=>w("imageHeight",e)})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Image Position","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:m,onChange:e=>w("imagePosition",e),children:zM.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))})]}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link","b-blocks"),value:b?.url||"",onChange:e=>w("link",e,"url"),placeholder:(0,x.__)("https://example.com","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link Title","b-blocks"),value:b?.title||"",onChange:e=>w("link",e,"title"),help:(0,x.__)("Accessible name for the link.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open In New Tab","b-blocks"),checked:!!b?.target,onChange:e=>w("link",e,"target"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Add Nofollow","b-blocks"),checked:!!b?.nofollow,onChange:e=>w("link",e,"nofollow"),__nextHasNoMarginBottom:!0})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10 infographicItemsPanelTabPanel",activeClass:"activeTab",tabs:XM,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:tL(e.name,(0,x.__)("Button label color","b-blocks")),value:f?.[e.name]?.color?.label,onChange:t=>w("styles",t,e.name,"color","label")}),(0,l.jsx)(Ue,{className:"mt10",label:tL(e.name,(0,x.__)("Button Icon color","b-blocks")),value:f?.[e.name]?.color?.icon,onChange:t=>w("styles",t,e.name,"color","icon")}),(0,l.jsx)(An,{className:"mt10",label:tL(e.name,(0,x.__)("Button BG Color","b-blocks")),value:f?.[e.name]?.background,onChange:t=>w("styles",t,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{label:tL(e.name,(0,x.__)("Border","b-blocks")),value:f?.[e.name]?.border,onChange:t=>w("styles",t,e.name,"border")}),(0,l.jsx)(Ue,{className:"mt10",label:tL(e.name,(0,x.__)("Title color","b-blocks")),value:f?.[e.name]?.color?.title,onChange:t=>w("styles",t,e.name,"color","title")}),(0,l.jsx)(Ue,{className:"mt10",label:tL(e.name,(0,x.__)("Divider color","b-blocks")),value:f?.[e.name]?.color?.divider,onChange:t=>w("styles",t,e.name,"color","divider")}),(0,l.jsx)(Ue,{className:"mt10",label:tL(e.name,(0,x.__)("Description color","b-blocks")),value:f?.[e.name]?.color?.desc,onChange:t=>w("styles",t,e.name,"color","desc")})]})}),(0,l.jsx)("small",{children:(0,x.__)("Button colours follow the segment. Title, Divider and Description colours apply to the centre while this item is the one showing there — hover and active track the centre disc being hovered and pressed.","b-blocks")})]})]})})},FL=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o})=>{const{items:i=[]}=e,a=(0,m.useMemo)((()=>((e=[])=>{const t=e.length+1;return{enable:!0,id:`${EM}-item-${Date.now().toString(36)}${Math.random().toString(36).slice(2,7)}`,buttonLabel:`Title ${t}`,position:"",buttonIcon:{type:"icon",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm-24-136V232c0-13.3 10.7-24 24-24s24 10.7 24 24v144c0 13.3-10.7 24-24 24s-24-10.7-24-24zm24-224a32 32 0 1 1 0-64 32 32 0 1 1 0 64z'/></svg>",url:""},title:`Info Title ${t}`,description:"Describe this part of your process, service or story in a sentence or two.",image:{id:null,url:"",alt:""},imageHeight:"107px",imagePosition:"top",link:{url:"",target:!1,nofollow:!1,title:""},styles:{normal:{color:{
469 +label:"",icon:""},background:{},border:{}},hover:{color:{label:"",icon:""},background:{},border:{}},active:{color:{label:"",icon:""},background:{},border:{}},titleColor:"",dividerColor:"",descColor:""}}})(i)),[i.length]);return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Segment Items","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,arrKey:"items",minItem:1,ItemSettings:DL,itemLabel:(0,x.__)("Segment","b-blocks"),newItem:a,title:"buttonLabel",design:"sortable"})})},HL=({attributes:e,updateObj:t})=>{const{wheel:n={},items:o=[]}=e,i=wL(o).filter((({item:e})=>!isNaN(parseFloat(e?.position)))),a=(e,o,i,a)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:e}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n[o]||"",onChange:e=>t("wheel",e,o),units:i})]}),a&&(0,l.jsx)("small",{children:a})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Arrangement","b-blocks"),initialOpen:!1,children:[a((0,x.__)("Start Angle","b-blocks"),"startAngle",[kL()]),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",value:n.direction||"clockwise",options:GM,onChange:e=>t("wheel",e,"direction"),__nextHasNoMarginBottom:!0}),a((0,x.__)("Sweep","b-blocks"),"sweep",[kL()],(0,x.__)("360° spreads all the way round. Less than that lays the items along an arc — 180° gives a half circle, with the first and last on the two ends.","b-blocks")),!n.enableSegmentsType&&a((0,x.__)("Radius Offset","b-blocks"),"radiusOffset",[Pe()],(0,x.__)("Moves the segments in or out from the ring they sit on. Negative pulls them inward.","b-blocks")),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rotate Labels","b-blocks"),checked:!!n.rotateLabels,onChange:e=>t("wheel",e,"rotateLabels"),help:(0,x.__)("Off, every label stays upright. On, each one turns to face outward from the centre.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Segments Type","b-blocks"),checked:n.enableSegmentsType,onChange:e=>t("wheel",e,"enableSegmentsType"),help:(0,x.__)("Draws the segments as pie wedges filling the ring instead of circles on it.","b-blocks"),__nextHasNoMarginBottom:!0}),n.enableSegmentsType&&a((0,x.__)("Wedge Gap","b-blocks"),"wedgeGap",[kL()],(0,x.__)("White space between neighbouring wedges.","b-blocks")),0<i.length&&(0,l.jsx)("p",{className:"bPlInspectorInfo",children:(0,x.sprintf)(/* translators: %d: how many segments have their own Position set. */ /* translators: %d: how many segments have their own Position set. */
470 +(0,x._n)("%d segment has its own Position, so Start Angle, Direction and Sweep will not move it. Clear that field to put it back on auto spacing.","%d segments have their own Position, so Start Angle, Direction and Sweep will not move them. Clear those fields to put them back on auto spacing.",i.length,"b-blocks"),i.length)}),(0,l.jsx)("small",{children:(0,x.__)("Start Angle, Direction and Sweep only move items left on auto spacing — an item with its own Position stays put.","b-blocks")})]})},WL=({attributes:e,updateObj:t})=>{const{divider:n={}}=e.content||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Divider","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Style","b-blocks"),labelPosition:"edge",value:n.style||"solid",options:KM,onChange:e=>t("content",e,"divider","style"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Weight","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.height||"",onChange:e=>t("content",e,"divider","height"),units:[Pe(),Ae()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:n.width||"",onChange:e=>t("content",e,"divider","width"),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("content",e,"divider","color"),defaultColor:"#BFA83B"})]})},UL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{icon:o={}}=e,{color:i,background:a={},border:s={}}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i,onChange:e=>t("icon",e,"color")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background Color","b-blocks"),value:a,onChange:e=>t("icon",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Stacked Plate Color","b-blocks"),value:o.plateColor,onChange:e=>t("icon",e,"plateColor"),help:(0,x.__)("Backdrop behind the icon when View is set to Stacked.","b-blocks")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("icon",e,n,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("icon",e,n,"radius")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("icon",e,"transition"),units:[gL(),mL()]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:tL(e.name,(0,x.__)("Border","b-blocks")),value:s?.[e.name],onChange:n=>t("icon",n,"border",e.name)})})]})},GL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{image:o={}}=e.content||{},i=(e,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.[i]||"",onChange:e=>t("content",e,"image",n,i),units:[Pe(),Ee()]})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("content",e,"image",n,"radius")}),i((0,x.__)("Width","b-blocks"),"width"),i((0,x.__)("Height","b-blocks"),"height"),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Type","b-blocks"),labelPosition:"edge",value:o.fit||"cover",options:QM,onChange:e=>t("content",e,"image","fit"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("small",{children:(0,x.__)("Height here is the fallback — an item with its own Image Height wins.","b-blocks")})]})},VL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{innerDisc:o={},outerDisc:i={}}=e,a=parseFloat(i?.[n]?.size)||560;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Inner Disc","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("innerDisc",e,n,"size"),units:[Pe()],max:a})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.background,onChange:e=>t("innerDisc",e,"background"),defaults:{color:"#F2F0E4"}}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("innerDisc",e,n,"padding")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Border Color","b-blocks"),value:o.borderColor,onChange:e=>t("innerDisc",e,"borderColor"),defaultColor:"#3F8F4B"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Border Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.borderWidth||"",onChange:e=>t("innerDisc",e,"borderWidth"),units:[Pe()],max:20})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Border Style","b-blocks"),labelPosition:"edge",value:o.borderStyle||"solid",options:HM,onChange:e=>t("innerDisc",e,"borderStyle"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("small",{children:(0,x.__)("This border is the inner ring.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Content Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.contentWidth||"",onChange:e=>t("innerDisc",e,"contentWidth")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Content Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.contentGap||"",onChange:e=>t("innerDisc",e,"contentGap")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex1",children:(0,x.__)("Content Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.contentAlign||"center",onChange:e=>t("innerDisc",e,"contentAlign"),children:OM.map((({label:e,value:t,icon:n})=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e,value:t,icon:n},t)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("innerDisc",e,"transition"),units:[gL(),mL()]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsx)(yt,{label:tL(e.name,(0,x.__)("Box Shadow","b-blocks")),value:o.shadow?.[e.name],onChange:n=>t("innerDisc",n,"shadow",e.name)})})]})},qL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{outerDisc:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Outer Disc","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,
471 +l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("outerDisc",e,n,"size"),units:[Pe()],max:1e3})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:o.background,onChange:e=>t("outerDisc",e,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Border Color","b-blocks"),value:o.borderColor,onChange:e=>t("outerDisc",e,"borderColor"),defaultColor:"#7E57C2"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Border Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.borderWidth||"",onChange:e=>t("outerDisc",e,"borderWidth"),units:[Pe()],max:20})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Border Style","b-blocks"),labelPosition:"edge",value:o.borderStyle,options:HM,onChange:e=>t("outerDisc",e,"borderStyle"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("small",{children:(0,x.__)("This border is the outer ring — the segments sit centred on it.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Ring Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.ringGap||"",onChange:e=>t("outerDisc",e,n,"ringGap"),units:[Pe()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("outerDisc",e,"transition"),units:[gL(),mL()]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsx)(yt,{label:tL(e.name,(0,x.__)("Box Shadow","b-blocks")),value:o.shadow?.[e.name],onChange:n=>t("outerDisc",n,"shadow",e.name)})})]})},YL=({attributes:e,updateObj:t,device:n="desktop"})=>{const{segment:o={},wheel:i={}}=e,a=!!i.enableSegmentsType,s=parseFloat(fL(e.outerDisc,n,"size",560))||560;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Segment","b-blocks"),initialOpen:!1,children:[!a&&(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Shape","b-blocks"),labelPosition:"edge",value:o.shape||"circle",options:WM,onChange:e=>t("segment",e,"shape"),__nextHasNoMarginBottom:!0}),!a&&(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:o.radius||{},onChange:e=>t("segment",e,"radius")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.padding||{},onChange:e=>t("segment",e,n,"padding")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Content Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.spacing||"",onChange:e=>t("segment",e,"spacing"),units:[Pe(),Ae()]})]}),(0,l.jsx)("small",{children:(0,x.__)("Space between the icon and the label inside a segment.","b-blocks")}),(0,l.jsx)(k,{label:(0,x.__)("Content Margin","b-blocks"),values:o.margin||{},onChange:e=>t("segment",e,"margin")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Transition","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o.transition||"",onChange:e=>t("segment",e,"transition"),units:[gL(),mL()]})]}),!a&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.size||"",onChange:e=>t("segment",e,n,"size"),units:[Pe()],max:vL(s)})]})}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Label Typography","b-blocks"),value:o.labelTypo,onChange:e=>t("segment",e,"labelTypo"),defaults:{fontSize:{desktop:13,tablet:12,mobile:11}}}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:XM,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:tL(e.name,(0,x.__)("Background","b-blocks")),value:o?.[e.name]?.background,onChange:n=>t("segment",n,e.name,"background")}),(0,l.jsx)(Ue,{className:"mt10",label:tL(e.name,(0,x.__)("Text Color","b-blocks")),value:o?.[e.name]?.color,onChange:n=>t("segment",n,e.name,"color"),defaultColor:"#FFFFFF"}),(0,l.jsx)(y.BorderBoxControl,{label:tL(e.name,(0,x.__)("Border","b-blocks")),value:o?.[e.name]?.border,onChange:n=>t("segment",n,e.name,"border")}),(0,l.jsx)(yt,{label:tL(e.name,(0,x.__)("Box Shadow","b-blocks")),value:o?.[e.name]?.shadow,onChange:n=>t("segment",n,e.name,"shadow")})]})})]})},KL=({attributes:e,updateObj:t})=>{const{text:n={}}=e.content||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("content",e,"text","color"),defaultColor:"#4B5563"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("content",e,"text","typo"),defaults:{fontSize:{desktop:14,tablet:13,mobile:12}}})]})},QL=({attributes:e,updateObj:t})=>{const{title:n={}}=e.content||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Heading Tag","b-blocks"),labelPosition:"edge",value:n.tag,options:eL,onChange:e=>t("content",e,"title","tag"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("content",e,"title","color"),defaultColor:"#1F2937"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("content",e,"title","typo"),defaults:{fontSize:{desktop:34,tablet:28,mobile:22}}})]})},ZL=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(qL,{...e}),(0,l.jsx)(YL,{...e}),(0,l.jsx)(UL,{...e}),(0,l.jsx)(VL,{...e}),(0,l.jsx)(QL,{...e}),(0,l.jsx)(WL,{...e}),(0,l.jsx)(KL,{...e}),(0,l.jsx)(GL,{...e})]}),XL=e=>{const{attributes:t,setAttributes:n,updateObj:o,isPremium:i,device:a="desktop"}=e,{general:s={},advanced:r}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:s?.[a]?.alignment,onChange:e=>o("general",e||"",a,"alignment")})}),(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Xt,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(RL,{...e}),(0,l.jsx)(IL,{...e}),(0,l.jsx)(FL,{...e}),(0,l.jsx)(HL,{...e}),(0,l.jsx)(BL,{...e}),(0,l.jsx)(OL,{...e}),(0,l.jsx)(AL,{...e}),(0,l.jsx)(zL,{...e})]}),"style"===t.name&&(0,l.jsx)(ZL,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:r,onChange:e=>n({advanced:e}),isPremium:i})]})})})]})},JL=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i}=t,[a,s]=(0,m.useState)(0),r="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,c=fe(t,n),d=o.slice(0,12);(0,m.useEffect)((()=>{i!==d&&n({blockId:d})}),[d]);const u=`block-${o}`,p=(0,h.useBlockProps)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(XL,{...e,updateObj:c,isPremium:r,activeIndex:a,setActiveIndex:s}),(0,l.jsxs)("div",{...p,children:[(0,l.jsx)(EL,{attributes:t,id:u,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(LL,{attributes:t,isBackend:!0,custom:{activeIndex:a,setActiveIndex:s}})})]})]})}));Pl(PM.name)&&(0,p.registerBlockType)(PM,{icon:Tr,edit:JL,save:()=>null})
472 +;const eP=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/input-field","version":"1.0.0","title":"Input Field","category":"bBlocks","description":"Form Input Field","keywords":["input field","text field","input","form field","field"],"ancestor":["b-blocks/form-builder"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"inputField":{"type":"object","default":{"type":"text","placeholder":"Placeholder...","value":"","icon":"","name":"input"}},"label":{"type":"object","default":{"text":"Input Field Label"}},"options":{"type":"object","default":{"isLabel":true,"isRequired":true,"isIcon":true,"isShowRequiredIcon":true}},"password":{"type":"object","default":{"options":{"isWeek":true,"isStrengthMeter":false,"isStrengthText":false,"isVisibilityIcon":true,"passStrengthText":"default","validationText":"default","isUpperCase":true,"isLowerCase":true,"isNumber":true,"isSpecialChar":true,"minLength":8},"strengthText":{"veryWeak":"Very Weak","weak":"Weak Password","medium":"Medium Password","strong":"Strong Password"}}},"validation":{"type":"object","default":{"errorMessage":{"text":{"missing":"This field is required."},"email":{"missing":"This field is required.","invalid":""},"password":{"missing":"This field is required.","invalid":"","customValidation":""},"url":{"missing":"This Field is required."}}}},"styles":{"type":"object","default":{"inputField":{"typo":{"fontSize":{"desktop":"16px"}},"colors":{"text":"","placeholder":""},"desktop":{"padding":{}},"tablet":{"padding":{}},"mobile":{"padding":{}},"normal":{"border":{},"bg":{},"radius":{"desktop":{},"tablet":{},"mobile":{}},"shadow":{}},"focus":{"border":{},"bg":{},"radius":{"desktop":{},"tablet":{},"mobile":{}},"shadow":{}},"hover":{"border":{},"bg":{},"radius":{"desktop":{},"tablet":{},"mobile":{}},"shadow":{}}},"label":{"typo":{"fontSize":{"desktop":"16px"}},"colors":{"required":"","text":""},"desktop":{"margin":{}},"tablet":{"margin":{}},"mobile":{"margin":{}},"position":"top"},"icon":{"field":{"color":"","desktop":{"size":"","position":{"x":"","y":""}},"tablet":{"size":"","position":{"x":"","y":""}},"mobile":{"size":"","position":{"x":"","y":""}}},"password":{"color":"","desktop":{"size":"","position":{"x":"","y":""}},"tablet":{"size":"","position":{"x":"","y":""}},"mobile":{"size":"","position":{"x":"","y":""}}}},"error":{"text":{"typo":{"fontSize":{"desktop":"14px"}},"color":"#f5222d","bg":{},"desktop":{"margin":{},"padding":{},"border":{},"radius":{}},"tablet":{"margin":{},"padding":{},"border":{},"radius":{}},"mobile":{"margin":{},"padding":{},"border":{},"radius":{}}},"input":{"desktop":{"margin":{},"padding":{},"border":{},"radius":{}},"tablet":{"margin":{},"padding":{},"border":{},"radius":{}},"mobile":{"margin":{},"padding":{},"border":{},"radius":{}}}},"password":{"strength":{"container":{"desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{},"bg":{"color":""}},"meter":{"gap":"","desktop":{"width":"","height":"","margin":{},"padding":{}},"tablet":{"width":"","height":"","margin":{},"padding":{}},"mobile":{"width":"","height":"","margin":{},"padding":{}},"border":{},"radius":{}},"text":{"desktop":{"margin":{},"padding":{}},"tablet":{"margin":{},"padding":{}},"mobile":{"margin":{},"padding":{}},"typography":{"fontSize":{"desktop":"15px"}}},"colors":{"veryWeak":"#f5222d","weak":"#fa8c16","medium":"#fadb14","strong":"#7cb305"}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"providesContext":{"b-blocks/inputClientId":"clientId"},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),tP=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],nP=[{label:(0,x.__)("Text","b-blocks"),value:"text"},{label:(0,x.__)("Email","b-blocks"),value:"email"},{label:(0,x.__)("Password","b-blocks"),value:"password"},{label:(0,x.__)("URL","b-blocks"),value:"url"}],oP=e=>{const{attributes:t,updateObj:n}=e,{options:o}=t,{isLabel:i,isRequired:a,isIcon:s,isShowRequiredIcon:r}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Settings","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Label","b-blocks"),value:i,checked:i,onChange:e=>{n("options",e,"isLabel")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Field Required","b-blocks"),value:a,checked:a,onChange:e=>{n("options",e,"isRequired")}}),a&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Required Icon","b-blocks"),value:r,checked:r,onChange:e=>{n("options",e,"isShowRequiredIcon")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),value:s,checked:s,onChange:e=>{n("options",e,"isIcon")}})]})},iP=e=>{const{attributes:t,updateObj:n}=e,{inputField:o,label:i}=t,{type:a,placeholder:s,value:r,icon:c,name:d}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Field","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label","b-blocks"),value:i.text,onChange:e=>{n("label",e,"text")}}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Type","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",labelPosition:"edge",value:a,options:nP,onChange:e=>{n("inputField",e,"type")}})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Placeholder","b-blocks"),value:s,onChange:e=>{n("inputField",e,"placeholder")}}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Default Value","b-blocks"),value:r,onChange:e=>{n("inputField",e,"value")}}),(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:c,onChange:e=>{n("inputField",e,"icon")}}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Input Custom name attribute","b-blocks"),value:d,onChange:e=>{n("inputField",e,"name")},help:(0,x.__)("This is for the name attributes which is used to submit form data, Name must be unique.","b-blocks")})]})},aP=({attributes:e,updateObj:t})=>{const{validation:n,inputField:o}=e,{type:i}=o,{errorMessage:a}=n;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Validation Message","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Missing Message","b-blocks"),value:a[i].missing,onChange:e=>t("validation",e,"errorMessage",i,"missing"),help:(0,x.__)("","b-blocks")}),["email"].includes(i)&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("Invalid Message","b-blocks"),value:a[i].invalid,onChange:e=>t("validation",e,"errorMessage",i,"invalid"),help:(0,x.__)("","b-blocks")})]})},sP=({attributes:e,updateObj:t})=>{const{password:n,validation:o}=e,{options:i,strengthText:a}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Password Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Password Visibility Icon","b-blocks"),value:i.isVisibilityIcon,checked:i.isVisibilityIcon,onChange:e=>{t("password",e,"options","isVisibilityIcon")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Password Strength Meter","b-blocks"),value:i.isStrengthMeter,checked:i.isStrengthMeter,onChange:e=>{t("password",e,"options","isStrengthMeter")}}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Password Strength Text","b-blocks"),value:i.isStrengthText,checked:i.isStrengthText,onChange:e=>{t("password",e,"options","isStrengthText")}}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Password Strength Text","b-blocks"),labelPosition:"edge",options:[{label:"Default",value:"default"},{label:"Custom",value:"custom"}],value:i.passStrengthText,onChange:e=>{t("password",e,"options","passStrengthText")}}),"custom"===i.passStrengthText&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,
473 +x.__)("Very Weak Password","b-blocks"),value:a.veryWeak,onChange:e=>t("password",e,"strengthText","veryWeak")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Weak Password","b-blocks"),value:a.weak,onChange:e=>t("password",e,"strengthText","weak")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Medium Password","b-blocks"),value:a.medium,onChange:e=>t("password",e,"strengthText","medium")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Strong Password","b-blocks"),value:a.strong,onChange:e=>t("password",e,"strengthText","strong")})]}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable use of week Password","b-blocks"),value:i.isWeek,checked:i.isWeek,onChange:e=>t("password",e,"options","isWeek")}),!i.isWeek&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Validation Text","b-blocks"),options:[{label:"Default",value:"default"},{label:"Custom",value:"custom"}],labelPosition:"edge",value:i.validationText,onChange:e=>t("password",e,"options","validationText")}),"custom"===i.validationText&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Custom Validation Text","b-blocks"),value:o.errorMessage.password.customValidation,onChange:e=>t("validation",e,"errorMessage","password","customValidation")}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Minimum Password Length","b-blocks"),labelPosition:"edge",value:i.minLength,onChange:e=>t("password",e,"options","minLength")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Uppercase Letter","b-blocks"),value:i.isUpperCase,checked:i.isUpperCase,onChange:e=>t("password",e,"options","isUpperCase")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Lowercase Letter","b-blocks"),value:i.isLowerCase,checked:i.isLowerCase,onChange:e=>t("password",e,"options","isLowerCase")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Number","b-blocks"),value:i.isNumber,checked:i.isNumber,onChange:e=>t("password",e,"options","isNumber")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("One Special Character","b-blocks"),value:i.isSpecialChar,checked:i.isSpecialChar,onChange:e=>t("password",e,"options","isSpecialChar")})]})]})},rP=e=>{const{attributes:t}=e,{inputField:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(iP,{...e}),(0,l.jsx)(oP,{...e}),(0,l.jsx)(aP,{...e}),"password"===n.type&&(0,l.jsx)(sP,{...e})]})},lP=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{error:i}=o,[a,s]=(0,m.useState)("text");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Error Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>{s(e)},className:"mt10 mb10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Error Text",value:"text"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Error Input",value:"input"})]}),"text"===a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i.text.color,onChange:e=>t("styles",e,"error","text","color"),defaultColor:"#f5222d"}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i.text.bg,onChange:e=>t("styles",e,"error","text","bg"),isImage:!1}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:i.text.typo,onChange:e=>t("styles",e,"error","text","typo")})]}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[a][n].margin,onChange:e=>t("styles",e,"error",a,n,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[a][n].padding,onChange:e=>t("styles",e,"error",a,n,"padding")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border","b-blocks")," ",(0,l.jsx)(_,{})]}),value:i[a][n].border,onChange:e=>t("styles",e,"error",a,n,"border"),defaultValue:{}}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[a][n].radius,onChange:e=>t("styles",e,"error",a,n,"radius")})]})},cP=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{inputField:i}=o,[a,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Field Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.colors.text,onChange:e=>t("styles",e,"inputField","colors","text")}),(0,l.jsx)(Ue,{label:(0,x.__)("Placeholder Color","b-blocks"),value:i.colors.placeholder,onChange:e=>t("styles",e,"inputField","colors","placeholder")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:i[n].padding,onChange:e=>t("styles",e,"inputField",n,"padding")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:i.typo,onChange:e=>t("styles",e,"inputField","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>{s(e)},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Focus",value:"focus"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[a].bg,onChange:e=>t("styles",e,"inputField",a,"bg"),isImage:!1}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i[a].border,onChange:e=>t("styles",e,"inputField",a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),values:i[a].radius[n],onChange:e=>t("styles",e,"inputField",a,"radius",n)}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:i[a].shadow,onChange:e=>t("styles",e,"inputField",a,"shadow")})]})},dP=({attributes:e,updateObj:t,device:n})=>{const{styles:o,inputField:i,password:a}=e,{icon:s}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)("strong",{children:(0,x.__)("Field Icon","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:s.field.color,onChange:e=>t("styles",e,"icon","field","color")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Icon Size","b-blocks"),value:s.field[n].size,onChange:e=>t("styles",e,"icon","field",n,"size"),defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position X","b-blocks"),value:s.field[n].position.x,onChange:e=>t("styles",e,"icon","field",n,"position","x"),min:-100,max:100,defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position Y","b-blocks"),value:s.field[n].position.y,onChange:e=>t("styles",e,"icon","field",n,"position","y"),min:-100,max:100,defaultValue:""}),"password"===i.type&&a.options.isVisibilityIcon&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("strong",{children:(0,x.__)("Password Visibility Icon","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:s.password.color,onChange:e=>t("styles",e,"icon","password","color")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Icon Size","b-blocks"),value:s.password[n].size,onChange:e=>t("styles",e,"icon","password",n,"size"),defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position X","b-blocks"),value:s.password[n].position.x,onChange:e=>t("styles",e,"icon","password",n,"position","x"),min:-100,max:100,defaultValue:""}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Position Y","b-blocks"),value:s.password[n].position.y,onChange:e=>t("styles",e,"icon","password",n,"position","y"),min:-100,max:100,defaultValue:""})]})]})},uP=(0,l.jsxs)("svg",{id:"Layer_1",height:"512",
474 +viewBox:"0 0 32 32",width:"512",xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",children:[(0,l.jsx)("path",{d:"m27 8h-5v-1a2 2 0 0 1 2-2 1 1 0 0 0 0-2 4 4 0 0 0 -3 1.36 4 4 0 0 0 -3-1.36 1 1 0 0 0 0 2 2 2 0 0 1 2 2v1h-15a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h15v1a2 2 0 0 1 -2 2 1 1 0 1 0 0 2 4 4 0 0 0 3-1.36 4 4 0 0 0 3 1.36 1 1 0 0 0 0-2 2 2 0 0 1 -2-2v-1h5a3 3 0 0 0 3-3v-10a3 3 0 0 0 -3-3zm-22 14a1 1 0 0 1 -1-1v-10a1 1 0 0 1 1-1h15v12zm23-1a1 1 0 0 1 -1 1h-5v-12h5a1 1 0 0 1 1 1z"}),(0,l.jsx)("path",{d:"m11 12h-4a1 1 0 0 0 0 2h1v5a1 1 0 0 0 2 0v-5h1a1 1 0 0 0 0-2z"})]}),pP=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 0C1.22386 0 1 0.223858 1 0.5C1 0.776142 1.22386 1 1.5 1H6V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V1H13.5C13.7761 1 14 0.776142 14 0.5C14 0.223858 13.7761 0 13.5 0H9H6H1.5Z",fill:"currentColor"})}),hP=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 3C9 2.44772 8.55229 2 8 2H7C6.44772 2 6 2.44772 6 3L6 14H1.5C1.22386 14 1 14.2239 1 14.5C1 14.7761 1.22386 15 1.5 15L6 15H9H13.5C13.7761 15 14 14.7761 14 14.5C14 14.2239 13.7761 14 13.5 14H9V3Z",fill:"currentColor"})}),gP=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.499995 0.999995C0.223855 0.999995 -5.58458e-07 1.22385 -5.46388e-07 1.49999L-2.18554e-08 13.4999C-9.78492e-09 13.776 0.223855 13.9999 0.499995 13.9999C0.776136 13.9999 0.999991 13.776 0.999991 13.4999L0.999991 8.99993L12 8.99993C12.5523 8.99993 13 8.55222 13 7.99993L13 6.99994C13 6.44766 12.5523 5.99995 12 5.99995L0.999991 5.99995L0.999991 1.49999C0.999991 1.22385 0.776135 0.999995 0.499995 0.999995Z",fill:"currentColor"})}),mP=()=>(0,l.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.4999 1C14.2237 1 13.9999 1.22386 13.9999 1.5L13.9999 6L2.99988 6C2.44759 6 1.99988 6.44772 1.99988 7L1.99988 8C1.99988 8.55228 2.44759 9 2.99988 9L13.9999 9L13.9999 13.5C13.9999 13.7761 14.2237 14 14.4999 14C14.776 14 14.9999 13.7761 14.9999 13.5L14.9999 9L14.9999 6L14.9999 1.5C14.9999 1.22386 14.776 1 14.4999 1Z",fill:"currentColor"})});function bP(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",version:"1.1",viewBox:"0 0 16 16",...e,xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M8 3c-3.489 0-6.514 2.032-8 5 1.486 2.968 4.511 5 8 5s6.514-2.032 8-5c-1.486-2.968-4.511-5-8-5zM11.945 5.652c0.94 0.6 1.737 1.403 2.335 2.348-0.598 0.946-1.395 1.749-2.335 2.348-1.181 0.753-2.545 1.152-3.944 1.152s-2.763-0.398-3.945-1.152c-0.94-0.6-1.737-1.403-2.335-2.348 0.598-0.946 1.395-1.749 2.335-2.348 0.061-0.039 0.123-0.077 0.185-0.114-0.156 0.427-0.241 0.888-0.241 1.369 0 2.209 1.791 4 4 4s4-1.791 4-4c0-0.481-0.085-0.942-0.241-1.369 0.062 0.037 0.124 0.075 0.185 0.114v0zM8 6.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5 0.672-1.5 1.5-1.5 1.5 0.672 1.5 1.5z"})})}function fP(e){return(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",version:"1.1",viewBox:"0 0 16 16",...e,height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M14.78 0.22c-0.293-0.293-0.768-0.293-1.061 0l-3.159 3.159c-0.812-0.246-1.671-0.378-2.561-0.378-3.489 0-6.514 2.032-8 5 0.643 1.283 1.573 2.391 2.703 3.236l-2.484 2.484c-0.293 0.293-0.293 0.768 0 1.061 0.146 0.146 0.338 0.22 0.53 0.22s0.384-0.073 0.53-0.22l13.5-13.5c0.293-0.293 0.293-0.768 0-1.061zM6.5 5c0.66 0 1.22 0.426 1.421 1.019l-1.902 1.902c-0.592-0.201-1.019-0.761-1.019-1.421 0-0.828 0.672-1.5 1.5-1.5zM1.721 8c0.598-0.946 1.395-1.749 2.335-2.348 0.061-0.039 0.123-0.077 0.185-0.114-0.156 0.427-0.241 0.888-0.241 1.369 0 0.858 0.27 1.652 0.73 2.303l-0.952 0.952c-0.819-0.576-1.519-1.311-2.057-2.162z"}),(0,l.jsx)("path",{d:"M12 6.906c0-0.424-0.066-0.833-0.189-1.217l-5.028 5.028c0.384 0.123 0.793 0.189 1.217 0.189 2.209 0 4-1.791 4-4z"}),(0,l.jsx)("path",{d:"M12.969 4.531l-1.084 1.084c0.020 0.012 0.040 0.024 0.059 0.037 0.94 0.6 1.737 1.403 2.335 2.348-0.598 0.946-1.395 1.749-2.335 2.348-1.181 0.753-2.545 1.152-3.944 1.152-0.604 0-1.202-0.074-1.781-0.219l-1.201 1.201c0.933 0.335 1.937 0.518 2.982 0.518 3.489 0 6.514-2.032 8-5-0.703-1.405-1.752-2.6-3.031-3.469z"})]})}const xP=({attributes:e,updateObj:t,device:n})=>{const{styles:o}=e,{label:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Label Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Label Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.position,onChange:e=>t("styles",e,"label","position"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"top",icon:(0,l.jsx)(pP,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"bottom",icon:(0,l.jsx)(hP,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"left",icon:(0,l.jsx)(gP,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"right",icon:(0,l.jsx)(mP,{})})]})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Label Color","b-blocks"),value:i.colors.text,onChange:e=>t("styles",e,"label","colors","text")}),(0,l.jsx)(Ue,{label:(0,x.__)("Required Color","b-blocks"),value:i.colors.required,onChange:e=>t("styles",e,"label","colors","required")}),(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:i.typo,onChange:e=>t("styles",e,"label","typo")}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:i[n].margin,onChange:e=>t("styles",e,"label",n,"margin")})]})},yP=({attributes:e,updateObj:t,device:n})=>{const[o,i]=(0,m.useState)("container"),{styles:a}=e,{password:s}=a,{strength:r}=s;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Password Styles","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)("strong",{children:(0,x.__)("Colors","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Very Weak Password","b-blocks"),value:r.colors.veryWeak,onChange:e=>t("styles",e,"password","strength","colors","veryWeak"),defaultColor:"#f5222d"}),(0,l.jsx)(Ue,{label:(0,x.__)("Weak Password","b-blocks"),value:r.colors.weak,onChange:e=>t("styles",e,"password","strength","colors","weak"),defaultColor:"#fa8c16"}),(0,l.jsx)(Ue,{label:(0,x.__)("Medium Password","b-blocks"),value:r.colors.medium,onChange:e=>t("styles",e,"password","strength","colors","medium"),defaultColor:"#fadb14"}),(0,l.jsx)(Ue,{label:(0,x.__)("Strong Password","b-blocks"),value:r.colors.strong,onChange:e=>t("styles",e,"password","strength","colors","strong"),defaultColor:"#7cb305"}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>{i(e)},className:"mt10 mb10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Container",value:"container"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Meter",value:"meter"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Text",value:"text"})]}),"meter"===o&&(0,l.jsxs)(y.Flex,{className:"mb10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Meter Gap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:r.meter.gap,
475 +onChange:e=>t("styles",e,"password","strength","meter","gap")})]}),("meter"===o||"container"===o)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:r[o][n].width,onChange:e=>t("styles",e,"password","strength",o,n,"width")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Height","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",value:r[o][n].height,onChange:e=>t("styles",e,"password","strength",o,n,"height")})]})]}),"container"===o&&(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:r.container.bg,onChange:e=>t("styles",e,"password","strength","container","bg"),isImage:!1}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o][n].margin,onChange:e=>t("styles",e,"password","strength",o,n,"margin")}),("meter"===o||"container"===o)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o][n].padding,onChange:e=>t("styles",e,"password","strength",o,n,"padding")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:r[o].border,onChange:e=>t("styles",e,"password","strength",o,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:r[o].radius,onChange:e=>t("styles",e,"password","strength",o,"radius")})]}),"text"===o&&(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:r.text.typography,onChange:e=>t("styles",e,"password","strength","text","typography")})]})},vP=e=>{const{attributes:t}=e,{inputField:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(cP,{...e}),(0,l.jsx)(xP,{...e}),(0,l.jsx)(dP,{...e}),"password"===n.type&&(0,l.jsx)(yP,{...e}),(0,l.jsx)(lP,{...e})]})},kP=e=>{const{isPremium:t}=e,[n,o]=(0,m.useState)(!1),i={isPremium:t,setIsProModalOpen:o};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Ra,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:tP,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(rP,{...e,premiumProps:i})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(vP,{...e})})]})})]}),(0,l.jsx)(qa,{isProModalOpen:n,setIsProModalOpen:o,link:"https://bplugins.com/products/advanced-post-block/#pricing",children:(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Feature: ","b-blocks")}),(0,x.__)("Feature details.","b-blocks")]})})]})},wP=({attributes:e,id:t})=>{const{styles:n}=e,{inputField:o,label:i,icon:a,error:s,password:r}=n,{colors:c,normal:d,hover:u,focus:p}=o,{strength:h}=r,{container:g,meter:m,text:b}=h,f=`#${t}`,x=`${f} .b-blocks-input-field-container`,y=`${x} .b-blocks-input-field-label`,v=`${y} .b-blocks-input-field-required`,k=`${x} .b-blocks-input-field`,w=`${x} .b-blocks-input-field-passStrength-container`,_=`${w} .b-blocks-input-field-passStrengthMeter-container`,C=`${w} .b-blocks-input-field-passStrengthMeterText-container`,j=`${k} .b-blocks-input-field-passVisibilityIcon`,$=`${f} .b-blocks-input-field-error-container .b-blocks-input-field`,S=`${x} .b-blocks-input-field-error-message`,T=`${k} input`,N=`${k} .b-blocks-input-field-icon`,M=e=>{const{bg:t,border:n,shadow:o}=e;return`\n\t\t\t${os(t)}\n\t\t\t${as(n)}\n\t\t\t${ns("box-shadow",ls(o))}\n\t`},L=(e,t="desktop")=>`\n\t\t${ns("width",e[t].width)}\n\t\t${ns("height",e[t].height)}\n\t\t${ns("margin",hs(e[t].margin))}\n\t\t${ns("padding",hs(e[t].padding))}\n\t\t${as(e.border)}\n\t\t${ns("border-radius",hs(e.radius))}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",o.typo).googleFontLink}\n\t\t\t${ps("",i.typo).googleFontLink}\n\t\t\t${ps("",b.typography).googleFontLink}\n\t\t\t${ps("",s.text.typo).googleFontLink}\n\t\t\t\n\t\t\t${ps(T,o.typo).styles}\n\t\t\t${ps(y,i.typo).styles}\n\t\t\t${ps(S,s.text.typo).styles}\n\t\t\t${ps(C,b.typography).styles}\n\n\t\t\t${T}{\n\t\t\t\t${ns("color",c.text)}\n\t\t\t\t${M(d)}\n\t\t\t\t${ns("padding",hs(o.desktop.padding))}\n\t\t\t\t${ns("border-radius",hs(d.radius.desktop))}\n\t\t\t}\n\t\t\t${T}::placeholder{\n\t\t\t\t${ns("color",c.placeholder)}\n\t\t\t}\n\t\t\t${T}:hover{\n\t\t\t\t${M(u)}\n\t\t\t\t${ns("border-radius",hs(u.radius.desktop))}\n\t\t\t}\n\t\t\t${T}:focus{\n\t\t\t\t${M(p)}\n\t\t\t\t${ns("border-radius",hs(p.radius.desktop))}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${ns("color",i.colors.text)}\n\t\t\t\t${ns("margin",hs(i.desktop.margin))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\t${ns("color",i.colors.required)}\n\t\t\t}\n\t\t\t${N}{\n\t\t\t\t${ns("left",jt(a.field.desktop.position.x)?a.field.desktop.position.x+"px":"")}\n\t\t\t\t${ns("top",jt(a.field.desktop.position.y)?a.field.desktop.position.y+"px":"")}\n\t\t\t}\n\t\t\t${N}>svg{\n\t\t\t\t${ns("fill",a.field.color)}\n\t\t\t\t${ns("height",jt(a.field.desktop.size)?a.field.desktop.size+"px":"")}\n\t\t\t\t${ns("width",jt(a.field.desktop.size)?a.field.desktop.size+"px":"")}\n\t\t\t}\n\t\t\t${j}{\n\t\t\t\t${ns("fill",a.password.color)}\n\t\t\t\t${ns("height",jt(a.password.desktop.size)?a.password.desktop.size+"px":"")}\n\t\t\t\t${ns("width",jt(a.password.desktop.size)?a.password.desktop.size+"px":"")}\n\t\t\t\t${ns("right",jt(a.password.desktop.position.x)?a.password.desktop.position.x+"px":"")}\n\t\t\t\t${ns("top",jt(a.password.desktop.position.y)?a.password.desktop.position.y+"px":"")}\n\t\t\t}\n\n\t\t\t${$}>input{\n\t\t\t\t\t${ns("margin",hs(s.input.desktop.margin))}\n\t\t\t\t\t${ns("padding",hs(s.input.desktop.padding))}\n\t\t\t\t\t${as(s.input.desktop.border)}\n\t\t\t\t\t${ns("border-radius",hs(s.input.desktop.radius))}\n\t\t\t}\n\t\t\t\n\t\t\t${S}{\n\t\t\t\t\t${ns("color",s.text.color)}\n\t\t\t\t\t${ns("margin",hs(s.text.desktop.margin))}\n\t\t\t\t\t${ns("padding",hs(s.text.desktop.padding))}\n\t\t\t\t\t${as(s.text.desktop.border)}\n\t\t\t\t\t${ns("border-radius",hs(s.text.desktop.radius))}\n\t\t\t\t\t${os(s.text.bg)}\n\t\t\t}\n\n\t\t\t${w}{\n\t\t\t\t${L(g,"desktop")}\n\t\t\t\t${os(g.bg)}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${ns("gap",m.gap)}\n\t\t\t}\n\n\t\t\t${_} .b-blocks-input-field-passStrengthMeter{\n\t\t\t\t${L(m,"desktop")}\n\t\t\t}\n\t\t\t\n\t\t\t${_}>.veryWeakPass{\n\t\t\t\t\t${ns("background-color",r.strength.colors.veryWeak)}\n\t\t\t}\n\t\t\t${_}>.weakPass{\n\t\t\t\t\t${ns("background-color",r.strength.colors.weak)}\n\t\t\t}\n\t\t\t${_}>.mediumPass{\n\t\t\t\t\t${ns("background-color",r.strength.colors.medium)}\n\t\t\t}\n\t\t\t${_}>.strongPass{\n\t\t\t\t\t${ns("background-color",r.strength.colors.strong)}\n\t\t\t}\n\n\t\t\t${C}{\n\t\t\t\t\t${ns("margin",hs(b.desktop.margin))}\n\t\t\t}\n\n\t\t\t${C}>.veryWeakPass{\n\t\t\t\t\t${ns("color",r.strength.colors.veryWeak)}\n\t\t\t}\n\t\t\t${C}>.weakPass{\n\t\t\t\t\t${ns("color",r.strength.colors.weak)}\n\t\t\t}\n\t\t\t${C}>.mediumPass{\n\t\t\t\t\t${ns("color",r.strength.colors.medium)}\n\t\t\t}\n\t\t\t${C}>.strongPass{\n\t\t\t\t\t${ns("color",r.strength.colors.strong)}\n\t\t\t}\n\n\n\t`}})},_P=e=>{let t=0;return e.length>=6&&(t+=1),/[A-Z]/.test(e)&&(t+=1),/[0-9]/.test(e)&&(t+=1),/[^a-zA-Z0-9]/.test(e)&&(t+=1),t},CP=({value:e})=>{const t=_P(e),n=()=>{switch(t){case 1:return"veryWeakPass";case 2:return"weakPass";case 3:return"mediumPass";case 4:return"strongPass";default:return""}};return(0,l.jsxs)("div",{className:"b-blocks-input-field-passStrengthMeter-container",children:[(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeter ${n()}`}),(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeter ${t>1?n():""}`}),(0,l.jsx)("div",{
476 +className:`b-blocks-input-field-passStrengthMeter ${t>2?n():""}`}),(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeter ${t>3?n():""}`})]})},jP=({value:e,validationText:t,strengthText:n})=>{const o=_P(e),i=["veryWeak","weak","medium","strong"];return o>0&&(0,l.jsx)("div",{className:"b-blocks-input-field-passStrengthMeterText-container",children:(0,l.jsx)("div",{className:`b-blocks-input-field-passStrengthMeterText ${i[o-1]}Pass`,children:(a=o-1,("default"===t?{veryWeak:"Very Weak",weak:"Weak Password",medium:"Medium Password",strong:"Strong Password"}:n)[i[a]])})});var a},$P=({attributes:e})=>{const[t,n]=(0,m.useState)(!1),[o,i]=(0,m.useState)(""),{inputField:a,label:s,styles:r,options:c,validation:d,password:u}=e,{type:p,placeholder:h,value:g,icon:b,name:f}=a,{text:x}=s,{label:y}=r,{position:v}=y,{isLabel:k,isRequired:w,isIcon:_,isShowRequiredIcon:C}=c,{errorMessage:j}=d,{options:$,strengthText:S}=u,{isValid:T,message:N}=((e,t,n={},o,i={},a={})=>{const{options:s={}}=i,{errorMessage:r}=a,[l,c]=(0,m.useState)(""),[d,u]=(0,m.useState)(!1),p=function(e,t=12,n=!1,o=!1,i=!1,a=!1){return!(!e?.length>=t||o&&!/[a-z]/.test(e)&&o||n&&!/[A-Z]/.test(e)&&n||i&&!/[0-9]/.test(e)&&i||a&&!/[^a-zA-Z0-9]/.test(e)&&a)}(e,s?.minLength,s?.isUpperCase,s?.isLowerCase,s?.isNumber,s?.isSpecialChar);return(0,m.useEffect)((()=>{!e&&o?(c(n[t].missing),u(!0)):"email"===t?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e)?(c(""),u(!1)):(c(n.email.invalid),u(!0),e||u(!1)):"password"===t?p||s.isWeek?(c(""),u(!1)):("default"===s.validationText?c(`${s.minLength} characters, Number, Uppercase, Lowercase, Special character`):c(r.password.customValidation),u(!0)):(c(""),u(!1))}),[p,o,t,e]),{message:l,isValid:d}})(o,p,j,w,u,d);return(0,l.jsxs)("div",{"data-iserror":T,className:`b-blocks-input-field-container label-position-${v} b-blocks-input-field-validation-${f}`,children:[x&&k&&(0,l.jsxs)("label",{htmlFor:f,className:"b-blocks-input-field-label",children:[x," ",w&&C&&(0,l.jsx)("span",{className:"b-blocks-input-field-required",children:"*"})," "]}),(0,l.jsxs)("div",{className:"b-blocks-input-field",children:[b&&_&&(0,l.jsx)("span",{className:"b-blocks-input-field-icon",dangerouslySetInnerHTML:{__html:b}}),(0,l.jsx)("input",{onChange:e=>i(e.target.value),type:(e=>"password"===e?t?"text":"password":e)(p),name:f,id:f,placeholder:h,...g&&{value:g},..."email"===p?{noValidate:!0}:{},..."password"===p?{autoComplete:"current-password"}:{}}),"password"===p&&$.isVisibilityIcon&&(t?(0,l.jsx)(bP,{onClick:()=>n(!t),className:"b-blocks-input-field-passVisibilityIcon"}):(0,l.jsx)(fP,{onClick:()=>n(!t),className:"b-blocks-input-field-passVisibilityIcon"}))]}),(0,l.jsx)("span",{className:`b-blocks-input-field-error-message b-blocks-input-field-error-${f}`,children:N}),"password"===p&&($.isStrengthMeter||$.isStrengthText)&&(0,l.jsxs)("div",{className:"b-blocks-input-field-passStrength-container",children:[$.isStrengthMeter&&(0,l.jsx)(CP,{value:o}),$.isStrengthText&&(0,l.jsx)(jP,{value:o,validationText:$.passStrengthText,strengthText:S})]})]})},SP=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=fe(t,n);return(0,m.useEffect)((()=>{n({clientId:o})}),[o]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(kP,{attributes:t,setAttributes:n,isPremium:!1,updateObj:a,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(wP,{attributes:t,id:`block-${o}`}),(0,l.jsx)($P,{attributes:t})]})]})}));(0,p.registerBlockType)(eP,{icon:uP,edit:SP})
477 +;const TP=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/instagram","title":"Instagram Feed","category":"bBlocks","description":"Show an Instagram feed as a responsive gallery, with profile header, captions and a lightbox.","keywords":["instagram","feed","social","gallery","photos"],"textdomain":"b-blocks","supports":{"html":false,"align":["wide","full"]},"attributes":{"blockId":{"type":"string","default":""},"align":{"type":"string","default":""},"source":{"type":"object","default":{"account":"","limit":24,"perPage":12,"cacheMinutes":30}},"elements":{"type":"object","default":{"profile":true,"profilePhoto":true,"profileName":false,"profileBio":false,"followButton":true,"followInFooter":false,"followLabel":"Follow On Instagram","caption":true,"stripHashtags":false,"linkHashtags":true,"captionLength":65,"mediaIcon":true,"loadMore":true,"loadMoreLabel":"Load More","lightbox":true,"linkPosts":true,"openInNewTab":true}},"grid":{"type":"object","default":{"desktop":{"columns":4,"columnGap":"15px","rowGap":"15px","ratio":"1/1"},"tablet":{"columns":2,"columnGap":"","rowGap":"","ratio":""},"mobile":{"columns":1,"columnGap":"","rowGap":"","ratio":""}}},"item":{"type":"object","default":{"hoverEffect":"zoom-in","desktop":{"radius":{"top":"","right":"","bottom":"","left":""},"iconSize":"22px"},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"iconSize":""},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"iconSize":""},"border":{},"shadow":[],"overlayColor":"","iconColor":"#ffffff","iconSize":"22px"}},"caption":{"type":"object","default":{"style":"overlay-center","align":"center","color":"#ffffff","linkColor":"#ffffff","onHover":false,"background":{"color":"#00000099"},"padding":{"desktop":{"top":"12px","right":"12px","bottom":"12px","left":"12px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"typo":{"fontSize":{"desktop":15,"tablet":14,"mobile":13}}}},"profile":{"type":"object","default":{"desktop":{"photoSize":"55px","gap":"12px"},"tablet":{"photoSize":"","gap":""},"mobile":{"photoSize":"","gap":""},"photo":"","photoSize":"55px","gap":"12px","usernameColor":"#146ef5","nameColor":"","nameText":"","bioColor":"","bioText":"","usernameTypo":{"fontSize":{"desktop":18,"tablet":"","mobile":""}},"metaTypo":{"fontSize":{"desktop":14,"tablet":"","mobile":""}}}},"followBtn":{"type":"object","default":{"normal":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"10px","right":"18px","bottom":"10px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"hover":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"typo":{"fontSize":{"desktop":13,"tablet":"","mobile":""}},"padding":{"desktop":{"top":"10px","right":"18px","bottom":"10px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"loadMoreBtn":{"type":"object","default":{"normal":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"10px","right":"22px","bottom":"10px","left":"22px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"hover":{"color":"#ffffff","background":{"color":"#146ef5"},"border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"shadow":[]},"typo":{"fontSize":{"desktop":14,"tablet":"","mobile":""}},"padding":{"desktop":{"top":"10px","right":"22px","bottom":"10px","left":"22px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"radius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"lightbox":{"type":"object","default":{"backdrop":"#000000e6","showCaption":true,"showProfile":true,"showLink":true,"closeColor":"","closeBg":"","closeHoverColor":"","closeHoverBg":"","navColor":"","navBg":"","navHoverColor":"","navHoverBg":""}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"position":{}}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),NP="b-blocks-instagram",MP=e=>e?`https://www.instagram.com/${encodeURIComponent(e)}/`:"https://www.instagram.com/",LP=e=>`https://www.instagram.com/explore/tags/${encodeURIComponent(e)}/`,PP=async(e,t={})=>{const n=window?.bBlocksInstagram||null;if(!n?.ajaxUrl)throw new Error("Instagram endpoint is unavailable.");const o=new FormData;o.append("action",e),o.append("nonce",n.nonce),Object.entries(t).forEach((([e,t])=>o.append(e,t)));const i=await fetch(n.ajaxUrl,{method:"POST",body:o,credentials:"same-origin"}),a=await i.json();if(!a?.success)throw new Error(a?.data||"Could not load the feed.");return a.data},EP=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],AP=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")}],BP=[{label:(0,x.__)("None","b-blocks"),value:"none"},{label:(0,x.__)("Zoom In","b-blocks"),value:"zoom-in"},{label:(0,x.__)("Zoom Out","b-blocks"),value:"zoom-out"},{label:(0,x.__)("Rotate","b-blocks"),value:"rotate"},{label:(0,x.__)("Grayscale","b-blocks"),value:"grayscale"},{label:(0,x.__)("Blur","b-blocks"),value:"blur"},{label:(0,
478 +x.__)("Lift","b-blocks"),value:"lift"},{label:(0,x.__)("Shine","b-blocks"),value:"shine"}],IP=[{label:(0,x.__)("Overlay Top","b-blocks"),value:"overlay-top"},{label:(0,x.__)("Overlay Center","b-blocks"),value:"overlay-center"},{label:(0,x.__)("Overlay Bottom","b-blocks"),value:"overlay-bottom"},{label:(0,x.__)("Below Image","b-blocks"),value:"below"}],OP=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],RP=[{label:(0,x.__)("Square","b-blocks"),value:"1/1"},{label:(0,x.__)("Portrait","b-blocks"),value:"4/5"},{label:(0,x.__)("Landscape","b-blocks"),value:"16/9"},{label:(0,x.__)("Original","b-blocks"),value:"auto"}],zP=(e,t)=>"normal"===e?t:`${e.charAt(0).toUpperCase()}${e.slice(1)} ${t.charAt(0).toLowerCase()}${t.slice(1)}`,DP=(e={},t,n,o="")=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},a=i("desktop")??o;if("desktop"===t)return a;const s=i("tablet")??a;return"tablet"===t?s:i("mobile")??s},FP=(e,t="")=>{if(null==e||""===e)return t;const n=parseFloat(e);return isNaN(n)?t:/[a-z%]$/i.test(String(e).trim())?String(e).trim():`${n}px`},HP=(e="",{stripHashtags:t=!1,captionLength:n=0}={})=>{let o=String(e||"");t&&(o=o.replace(/#[\p{L}\p{N}_]+/gu,"").replace(/\s{2,}/g," ").trim());const i=parseInt(n,10)||0;return 0<i&&o.length>i?`${o.slice(0,i).trimEnd()}…`:o},WP=(e="",t=!0)=>String(e||"").split(/(#[\p{L}\p{N}_]+)/gu).filter((e=>""!==e)).map(((e,n)=>{const o=t&&/^#[\p{L}\p{N}_]+$/u.test(e)?e.slice(1):"";return o?(0,l.jsx)("a",{className:`${NP}-tag`,href:LP(o),target:"_blank",rel:"noreferrer nofollow noopener",children:e},n):(0,l.jsx)("span",{children:e},n)})),UP=(e={})=>e.thumbnail_url||e.media_url||"",GP=({attributes:e,username:t="",isBackend:n=!1})=>{const{elements:o={}}=e;return o.followButton?(0,l.jsx)("a",{className:`${NP}-follow`,href:n?"#":MP(t),target:n?"_self":"_blank",rel:"noreferrer noopener",onClick:e=>{n&&e.preventDefault()},children:o.followLabel||(0,x.__)("Follow On Instagram","b-blocks")}):null},VP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"18",height:"18",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"})}),qP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M34.8 29.7V11c0-2.9-2.3-5.2-5.2-5.2H11c-2.9 0-5.2 2.3-5.2 5.2v18.7c0 2.9 2.3 5.2 5.2 5.2h18.7c2.8-.1 5.1-2.4 5.1-5.2zM39.2 15v16.1c0 4.5-3.7 8.2-8.2 8.2H14.9c-.6 0-.9.7-.5 1.1 1 1.1 2.4 1.8 4.1 1.8h13.4c5.7 0 10.3-4.6 10.3-10.3V18.5c0-1.6-.7-3.1-1.8-4.1-.5-.4-1.2 0-1.2.6z"})}),YP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M5.888 22.5a3.46 3.46 0 0 1-1.721-.46l-.003-.002a3.451 3.451 0 0 1-1.72-2.982V4.943a3.445 3.445 0 0 1 5.163-2.987l12.226 7.059a3.444 3.444 0 0 1-.001 5.967l-12.22 7.056a3.462 3.462 0 0 1-1.724.462Z"})}),KP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"22",height:"22",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),QP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M14.71 15.88 10.83 12l3.88-3.88a.996.996 0 1 0-1.41-1.41L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42z"})}),ZP=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:(0,l.jsx)("path",{d:"M9.29 15.88 13.17 12 9.29 8.12a.996.996 0 1 1 1.41-1.41l4.59 4.59c.39.39.39 1.02 0 1.41L10.7 17.3a.996.996 0 0 1-1.41 0c-.38-.39-.39-1.03 0-1.42z"})}),XP=({attributes:e,feed:t={},index:n,isBackend:o=!1,onOpen:i})=>{const{elements:a={},caption:s={}}=e,{media_type:r="IMAGE",caption:c=""}=t,d=s.style||"overlay-center",u=o?(0,x.__)("Instagram caption preview text with #hashtags","b-blocks"):"",p=c||u,h=a.caption&&p?HP(p,a):"",g=()=>h?(0,l.jsx)("div",{className:`${NP}-caption`,children:(0,l.jsx)("p",{children:WP(h,a.linkHashtags)})}):null,m=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("figure",{className:`${NP}-figure`,children:[(0,l.jsx)("img",{className:`${NP}-image`,src:UP(t),alt:HP(p,{stripHashtags:!0,captionLength:120}),loading:"lazy"}),(0,l.jsx)("span",{className:`${NP}-overlay`}),a.mediaIcon&&"IMAGE"!==r&&(0,l.jsx)("span",{className:`${NP}-type`,children:"VIDEO"===r?YP:qP}),d.startsWith("overlay")&&(0,l.jsx)(g,{})]}),"below"===d&&(0,l.jsx)(g,{})]});return a.lightbox?(0,l.jsx)("div",{className:`${NP}-item`,children:(0,l.jsx)("button",{type:"button",className:`${NP}-open`,onClick:()=>i(n),children:m})}):a.linkPosts&&t.permalink?(0,l.jsx)("div",{className:`${NP}-item`,children:(0,l.jsx)("a",{className:`${NP}-open`,href:t.permalink,target:a.openInNewTab?"_blank":"_self",rel:"noreferrer noopener",children:m})}):(0,l.jsx)("div",{className:`${NP}-item`,children:m})},JP=({attributes:e,user:t={},compact:n=!1})=>{const{elements:o={},profile:i={}}=e,{username:a="",profile_picture_url:s="",name:r="",biography:c=""}=t,d=MP(a),u=r||i.nameText||"",p=c||i.bioText||"",h=s||i.photo||"";return(0,l.jsxs)("div",{className:`${NP}-profile${n?` ${NP}-profile-compact`:""}`,children:[o.profilePhoto&&h&&(0,l.jsx)("a",{className:`${NP}-photo`,href:d,target:"_blank",rel:"noreferrer noopener",children:(0,l.jsx)("img",{src:h,alt:a,loading:"lazy"})}),(0,l.jsxs)("div",{className:`${NP}-identity`,children:[(0,l.jsxs)("a",{className:`${NP}-username`,href:d,target:"_blank",rel:"noreferrer noopener",children:["@",a]}),!n&&o.profileName&&u&&(0,l.jsx)("p",{className:`${NP}-name`,children:u}),!n&&o.profileBio&&p&&(0,l.jsx)("p",{className:`${NP}-bio`,children:p})]})]})},eE=({feed:e})=>{const t=(0,m.useRef)(null),n=e?.children?.data||[],o=e=>{const n=t.current;n&&n.scrollBy({left:e*n.clientWidth,behavior:"smooth"})};return(0,l.jsxs)("div",{className:`${NP}-carousel`,children:[(0,l.jsx)("div",{className:`${NP}-slides`,ref:t,children:n.map((e=>(0,l.jsx)("div",{className:`${NP}-slide`,children:e.thumbnail_url?(0,l.jsx)("video",{controls:!0,poster:e.thumbnail_url,src:e.media_url}):(0,l.jsx)("img",{src:e.media_url,alt:""})},e.id)))}),1<n.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{type:"button",className:`${NP}-nav ${NP}-nav-prev`,onClick:e=>{e.stopPropagation(),o(-1)},"aria-label":(0,x.__)("Previous slide","b-blocks"),children:QP}),(0,l.jsx)("button",{type:"button",className:`${NP}-nav ${NP}-nav-next`,onClick:e=>{e.stopPropagation(),o(1)},"aria-label":(0,x.__)("Next slide","b-blocks"),children:ZP})]})]})},tE=({attributes:e,user:t,feeds:n=[],index:o,blockId:i="",container:a,isBackend:s=!1,onClose:r,onMove:c})=>{const{lightbox:d={},elements:u={}}=e,p=(0,m.useRef)(null),[h,g]=(0,m.useState)(!1),b=n[o],f=(0,
479 +m.useCallback)((e=>{"Escape"===e.key&&r(),"ArrowRight"===e.key&&c(1),"ArrowLeft"===e.key&&c(-1)}),[r,c]);if((0,m.useEffect)((()=>{const e=a?.ownerDocument||document;e.addEventListener("keydown",f);const t=e.body?.style?.overflow;return e.body&&(e.body.style.overflow="hidden"),p.current?.focus(),g(!0),()=>{e.removeEventListener("keydown",f),e.body&&void 0!==t&&(e.body.style.overflow=t)}}),[f,a]),!b)return null;const{media_type:y="IMAGE",media_url:v="",thumbnail_url:k="",caption:w="",permalink:_=""}=b,C=i||"default",j=`\n\t\t.${NP}-lightbox[data-bb-id="${C}"] {\n\t\t\t${d.backdrop?`background: ${d.backdrop} !important;`:""}\n\t\t}\n\t\t.${NP}-lightbox[data-bb-id="${C}"] .${NP}-close {\n\t\t\t${d.closeColor?`color: ${d.closeColor} !important;`:""}\n\t\t\t${d.closeBg?`background: ${d.closeBg} !important;`:""}\n\t\t}\n\t\t.${NP}-lightbox[data-bb-id="${C}"] .${NP}-close svg {\n\t\t\t${d.closeColor?"fill: currentColor !important;":""}\n\t\t}\n\t\t.${NP}-lightbox[data-bb-id="${C}"] .${NP}-close:hover {\n\t\t\t${d.closeHoverColor?`color: ${d.closeHoverColor} !important;`:""}\n\t\t\t${d.closeHoverBg?`background: ${d.closeHoverBg} !important;`:""}\n\t\t}\n\t\t.${NP}-lightbox[data-bb-id="${C}"] .${NP}-nav {\n\t\t\t${d.navColor?`color: ${d.navColor} !important;`:""}\n\t\t\t${d.navBg?`background: ${d.navBg} !important;`:""}\n\t\t}\n\t\t.${NP}-lightbox[data-bb-id="${C}"] .${NP}-nav svg {\n\t\t\t${d.navColor?"fill: currentColor !important;":""}\n\t\t}\n\t\t.${NP}-lightbox[data-bb-id="${C}"] .${NP}-nav:hover {\n\t\t\t${d.navHoverColor?`color: ${d.navHoverColor} !important;`:""}\n\t\t\t${d.navHoverBg?`background: ${d.navHoverBg} !important;`:""}\n\t\t}\n\t`,$=(0,l.jsxs)("div",{className:`${NP}-lightbox${h?" is-open":""}`,"data-bb-id":C,role:"dialog","aria-modal":"true","aria-label":(0,x.__)("Instagram post","b-blocks"),ref:p,tabIndex:-1,onMouseDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation(),e.target===e.currentTarget&&r()},children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:j}}),(0,l.jsx)("button",{type:"button",className:`${NP}-close`,onClick:e=>{e.stopPropagation(),r()},"aria-label":(0,x.__)("Close","b-blocks"),children:KP}),1<n.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{type:"button",className:`${NP}-nav ${NP}-nav-prev`,onClick:e=>{e.stopPropagation(),c(-1)},"aria-label":(0,x.__)("Previous post","b-blocks"),children:QP}),(0,l.jsx)("button",{type:"button",className:`${NP}-nav ${NP}-nav-next`,onClick:e=>{e.stopPropagation(),c(1)},"aria-label":(0,x.__)("Next post","b-blocks"),children:ZP})]}),(0,l.jsxs)("div",{className:`${NP}-dialog`,onClick:e=>e.stopPropagation(),children:[(0,l.jsxs)("div",{className:`${NP}-media`,children:["VIDEO"===y&&(0,l.jsx)("video",{controls:!0,autoPlay:!0,poster:k,src:v}),"CAROUSEL_ALBUM"===y&&(0,l.jsx)(eE,{feed:b}),"IMAGE"===y&&(0,l.jsx)("img",{src:v,alt:""})]}),(0,l.jsxs)("div",{className:`${NP}-details`,children:[d.showProfile&&(0,l.jsx)(JP,{attributes:e,user:t,compact:!0}),d.showCaption&&(w||s)&&(0,l.jsx)("div",{className:`${NP}-full-caption`,children:WP(w||(s?(0,x.__)("Instagram caption preview text with #hashtags","b-blocks"):""),u.linkHashtags)}),d.showLink&&_&&(0,l.jsxs)("a",{className:`${NP}-permalink`,href:_,target:"_blank",rel:"noreferrer nofollow noopener",children:[VP," ",(0,x.__)("View on Instagram","b-blocks")]})]})]})]}),S=a?.ownerDocument?.body||("undefined"!=typeof document?document.body:null);return S?(0,Xn.createPortal)($,S):$},nE=({count:e=12})=>(0,l.jsx)("div",{className:`${NP}-grid`,children:Array.from({length:e},((e,t)=>(0,l.jsx)("div",{className:`${NP}-item ${NP}-skeleton`},t)))}),oE=({attributes:e,id:t="",isBackend:n=!1})=>{const o=(0,m.useRef)(null),{source:i={},elements:a={}}=e,[s,r]=(0,m.useState)({status:"loading",user:{},media:[],error:""}),[c,d]=(0,m.useState)(1),[u,p]=(0,m.useState)(-1),{account:h="",limit:g=24,perPage:b=12,cacheMinutes:f=30}=i;(0,m.useEffect)((()=>{let e=!0;return r((e=>({...e,status:"loading",error:""}))),(({account:e="",limit:t=12,cacheMinutes:n=30})=>PP("bBlocksInstagramFeed",{account:e,limit:t,cache:n}))({account:h,limit:g,cacheMinutes:f}).then((t=>e&&r({status:"ready",user:t?.user||{},media:t?.media||[],error:""}))).catch((t=>e&&r({status:"error",user:{},media:[],error:t.message}))),()=>{e=!1}}),[h,g,f]),(0,m.useEffect)((()=>d(1)),[h,b]);const y={user:s.user,media:s.media},v=parseInt(b,10)||12,k=(0,m.useMemo)((()=>y.media.slice(0,v*c)),[y.media,v,c]),w=y.media.length>k.length,_=(e=>{const{elements:t={},item:n={},caption:o={}}=e;return[NP,`${NP}-hover-${n.hoverEffect||"none"}`,`${NP}-caption-${o.style||"overlay-center"}`,o.onHover&&"below"!==o.style?`${NP}-caption-on-hover`:"",t.caption?`${NP}-has-caption`:"",t.profile?`${NP}-has-profile`:""].filter(Boolean).join(" ")})(e);if("loading"===s.status&&!n)return(0,l.jsx)("div",{className:_,children:(0,l.jsx)(nE,{count:v})});if("error"===s.status&&!n&&!y.media.length)return null;if(!y.media.length)return(0,l.jsx)("div",{className:_,children:(0,l.jsx)("p",{className:`${NP}-notice`,children:s.error||(0,x.__)("No posts to show yet.","b-blocks")})});const C=a.profile||a.followButton&&!a.followInFooter,j=a.loadMore&&w||a.followButton&&a.followInFooter;return(0,l.jsxs)("div",{className:_,ref:o,children:[C&&(0,l.jsxs)("div",{className:`${NP}-header`,children:[a.profile&&(0,l.jsx)(JP,{attributes:e,user:y.user}),!a.followInFooter&&(0,l.jsx)(GP,{attributes:e,username:y.user?.username,isBackend:n})]}),(0,l.jsx)("div",{className:`${NP}-grid`,children:k.map(((t,o)=>(0,l.jsx)(XP,{attributes:e,feed:t,index:o,isBackend:n,onOpen:p},t.id)))}),j&&(0,l.jsxs)("div",{className:`${NP}-footer`,children:[a.loadMore&&w&&(0,l.jsx)("button",{type:"button",className:`${NP}-load-more`,onClick:()=>n?{}:d(c+1),children:a.loadMoreLabel||(0,x.__)("Load More","b-blocks")}),a.followInFooter&&(0,l.jsx)(GP,{attributes:e,username:y.user?.username,isBackend:n})]}),a.lightbox&&-1<u&&(0,l.jsx)(tE,{attributes:e,user:y.user,feeds:k,index:u,blockId:t,container:o.current,isBackend:n,onClose:()=>p(-1),onMove:e=>p((t=>(t+e+k.length)%k.length))})]})},iE=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:a={}}=e,{grid:s={},item:r={},caption:c={},profile:d={},followBtn:u={},loadMoreBtn:p={},lightbox:h={}}=e,g=`#${o} .${NP}`,b=`${g} .${NP}-header`,f=`${g} .${NP}-grid`,x=`${g} .${NP}-item`,y=`${g} .${NP}-figure`,v=`${g} .${NP}-overlay`,k=`${g} .${NP}-type`,w=`${g} .${NP}-caption`,_=`${g} .${NP}-photo`,C=`${g} .${NP}-username`,j=`${g} .${NP}-name, ${g} .${NP}-bio`,$=`${g} .${NP}-follow`,S=`${g} .${NP}-load-more`,T=`.${NP}-lightbox[data-bb-id="${(e=>{if("string"!=typeof e)return e;const t=e.replace(/\/\*|\*\//g,"").replace(/[{};<>\\]/g,"").replace(/[\r\n\t]+/g," "),n=e=>(t.split(e).length-1)%2;return n('"')||n("'")?t.replace(/["']/g,""):t})(o)}"]`,N=(e,...t)=>{const n=t.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return n?`${e}{ ${n} }`:""},M=e=>Object.keys(e||{}).length?as(e):"",L=(e,t)=>e?e.desktop||e.tablet||e.mobile?e[t]||null:"desktop"!==t||void 0===e.top&&void 0===e.right?null:e:null,P=(e,t={},n)=>{const o=L(t.normal?.padding,n)||("desktop"===n?L(t.padding,n):null),i=L(t.normal?.radius,n)||("desktop"===n?L(t.radius,n):null),a=L(t.hover?.padding,n),s=L(t.hover?.radius,n);return`\n\t\t\t${N(e,ns("padding",hs(o)),ns("border-radius",hs(i)))}\n\t\t\t${N(`${e}:hover, ${e}:focus-visible`,ns("padding",hs(a)),ns("border-radius",hs(s)))}\n\t\t`
480 +},E=(e,t={})=>`\n\t\t${N(e,ns("color",t.normal?.color),os(t.normal?.background),M(t.normal?.border),ns("box-shadow",ls(Array.isArray(t.normal?.shadow)?t.normal.shadow:t.shadow||[])))}\n\t\t${N(`${e}:hover, ${e}:focus-visible`,ns("color",t.hover?.color),os(t.hover?.background),M(t.hover?.border),ns("box-shadow",ls(Array.isArray(t.hover?.shadow)?t.hover.shadow:[])))}\n\t\t${P(e,t,"desktop")}\n\t`,A=e=>N(f,ns("grid-template-columns",`repeat(${parseInt(DP(s,e,"columns",4),10)||1}, minmax(0, 1fr))`),ns("column-gap",FP(DP(s,e,"columnGap","15px"),"15px")),ns("row-gap",FP(DP(s,e,"rowGap","15px"),"15px"))),B=e=>`\n\t\t\t${N(x,ns("border-radius",hs(r?.[e]?.radius)))}\n\n\t\t${N(y,ns("aspect-ratio",DP(s,e,"ratio","1/1")))}\n\n\t\t${N(k,ns("font-size",FP(DP(r,e,"iconSize","desktop"===e?r.iconSize||"22px":""),"")))}`,I=e=>`\n\t\t\t${N(b,ns("gap",FP(DP(d,e,"gap","desktop"===e?d.gap||"12px":""),"")))}\n\n\t\t${N(`${_}, ${_} img`,ns("width",FP(DP(d,e,"photoSize","desktop"===e?d.photoSize||"55px":""),"")),ns("height",FP(DP(d,e,"photoSize","desktop"===e?d.photoSize||"55px":""),"")))}`,O=e=>N(w,ns("padding",hs(L(c.padding,e)))),R=(0,m.useMemo)((()=>`\n\t\t${ps("",c.typo)?.googleFontLink}\n\t\t${ps("",d.usernameTypo)?.googleFontLink}\n\t\t${ps("",d.metaTypo)?.googleFontLink}\n\t\t${ps("",u.typo)?.googleFontLink}\n\t\t${ps("",p.typo)?.googleFontLink}\n\t\t${ps(w,c.typo)?.styles}\n\t\t${ps(C,d.usernameTypo)?.styles}\n\t\t${ps(j,d.metaTypo)?.styles}\n\t\t${ps($,u.typo)?.styles}\n\t\t${ps(S,p.typo)?.styles}\n\n\t\t${N(x,M(r.border),ns("box-shadow",ls(Array.isArray(r.shadow)?r.shadow:r.shadow?.normal)))}\n\t\t${r.shadow?.hover?N(`${x}:hover`,ns("box-shadow",ls(r.shadow.hover))):""}\n\n\t\t${N(v,ns("background",r.overlayColor))}\n\t\t${N(k,ns("color",r.iconColor))}\n\n\t\t${N(w,ns("color",c.color),ns("text-align",c.align),ns("padding",hs(L(c.padding,"desktop"))),os(c.background))}\n\t\t${N(`${w} a`,ns("color",c.linkColor))}\n\n\t\t${N(C,ns("color",d.usernameColor))}\n\t\t${N(`${g} .${NP}-name`,ns("color",d.nameColor))}\n\t\t${N(`${g} .${NP}-bio`,ns("color",d.bioColor))}\n\n\t\t${E($,u)}\n\t\t${E(S,p)}\n\n\t\t${N(T,ns("background",h.backdrop))}\n\t\t${N(`${T} .${NP}-close`,ns("color",h.closeColor),ns("background",h.closeBg))}\n\t\t${N(`${T} .${NP}-close svg`,ns("fill",h.closeColor))}\n\t\t${N(`${T} .${NP}-close:hover`,ns("color",h.closeHoverColor),ns("background",h.closeHoverBg))}\n\t\t${N(`${T} .${NP}-close:hover svg`,ns("fill",h.closeHoverColor))}\n\t\t${N(`${T} .${NP}-nav`,ns("color",h.navColor),ns("background",h.navBg))}\n\t\t${N(`${T} .${NP}-nav svg`,ns("fill",h.navColor))}\n\t\t${N(`${T} .${NP}-nav:hover`,ns("color",h.navHoverColor),ns("background",h.navHoverBg))}\n\t\t${N(`${T} .${NP}-nav:hover svg`,ns("fill",h.navHoverColor))}\n\n\t\t${A("desktop")}\n\t\t${B("desktop")}\n\t\t${I("desktop")}\n\n\t\t${t}{\n\t\t\t${A("tablet")}\n\t\t\t${B("tablet")}\n\t\t\t${I("tablet")}\n\t\t\t${O("tablet")}\n\t\t\t${P($,u,"tablet")}\n\t\t\t${P(S,p,"tablet")}\n\t\t}\n\n\t\t${n}{\n\t\t\t${A("mobile")}\n\t\t\t${B("mobile")}\n\t\t\t${I("mobile")}\n\t\t\t${O("mobile")}\n\t\t\t${P($,u,"mobile")}\n\t\t\t${P(S,p,"mobile")}\n\t\t}\n\n\t\t${_s(o,a,i,!1)}\n\t\t`),[e,o,i]);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:R}})},aE=({attributes:e,updateObj:t,instagramKey:n=""})=>{const{source:o={}}=e,[i,a]=(0,m.useState)(Boolean(n)),[s,r]=(0,m.useState)(n?"":"loading");return(0,m.useEffect)((()=>{let e=!0;return n?(a(!0),void r("")):(PP("bBlocksInstagramGetAccount").then((t=>e&&(a(Boolean(t?.hasToken)),r("")))).catch((t=>e&&r(t.message))),()=>{e=!1})}),[n]),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Account","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Posts To Fetch","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{value:o.limit,onChange:e=>t("source",parseInt(e,10)||1,"limit"),min:1,max:100})]}),(0,l.jsx)("small",{children:(0,x.__)("How many posts are pulled from Instagram and cached. The grid shows them a page at a time.","b-blocks")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Cache (minutes)","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{value:o.cacheMinutes,onChange:e=>t("source",parseInt(e,10)||0,"cacheMinutes"),min:0,max:10080})]}),(0,l.jsx)("small",{children:(0,x.__)("Zero fetches on every page load, which Instagram rate-limits. Thirty minutes suits most feeds.","b-blocks")}),(0,l.jsx)(y.Button,{className:"mt10",variant:"secondary",onClick:()=>{r("clearing"),PP("bBlocksInstagramClearCache").then((()=>r("cleared"))).catch((e=>r(e.message)))},disabled:"clearing"===s,children:"clearing"===s?(0,x.__)("Clearing…","b-blocks"):(0,x.__)("Clear Cached Feed","b-blocks")}),"cleared"===s&&(0,l.jsx)("small",{children:(0,x.__)("Cache cleared. Reload the editor to see the new posts.","b-blocks")})]})},sE=({attributes:e,updateObj:t})=>{const{elements:n={},source:o={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Follow Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Follow Button","b-blocks"),checked:n.followButton,onChange:e=>t("elements",e,"followButton")}),n.followButton&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Label","b-blocks"),value:n.followLabel||"",onChange:e=>t("elements",e,"followLabel")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Place Below The Grid","b-blocks"),checked:n.followInFooter,onChange:e=>t("elements",e,"followInFooter"),help:(0,x.__)("Off, it sits beside the profile above the grid.","b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Load More","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Load More","b-blocks"),checked:n.loadMore,onChange:e=>t("elements",e,"loadMore")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Posts Per Page","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",value:o.perPage,onChange:e=>t("source",parseInt(e,10)||1,"perPage"),min:1,max:100})]}),(0,l.jsx)("small",{children:(0,x.__)("With Load More off, only this many posts are ever shown.","b-blocks")}),n.loadMore&&(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Label","b-blocks"),value:n.loadMoreLabel||"",onChange:e=>t("elements",e,"loadMoreLabel")})]})]})},rE=({attributes:e,updateObj:t})=>{const{elements:n={},caption:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Caption","b-blocks"),checked:n.caption,onChange:e=>t("elements",e,"caption")}),n.caption&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0 mt10",children:(0,x.__)("Placement","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o.style||"overlay-center",onChange:e=>t("caption",e,"style"),children:IP.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),"below"!==o.style&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show on Hover Only","b-blocks"),checked:o.onHover,onChange:e=>t("caption",e,"onHover")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Caption Length","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{className:"flex1",value:n.captionLength,onChange:e=>t("elements",parseInt(e,10)||0,"captionLength"),min:0})]}),(0,l.jsx)("small",{children:(0,x.__)("Zero shows the whole caption.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Remove Hashtags","b-blocks"),checked:n.stripHashtags,onChange:e=>t("elements",e,"stripHashtags")}),!n.stripHashtags&&(0,
481 +l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Link Hashtags","b-blocks"),checked:n.linkHashtags,onChange:e=>t("elements",e,"linkHashtags"),help:(0,x.__)("Each hashtag opens its Instagram tag page.","b-blocks")})]})]})},lE=({attributes:e,updateObj:t,device:n="desktop"})=>{const{grid:o={}}=e,i=(e,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.[i]||"",onChange:e=>t("grid",e,n,i),units:[Pe(),Ee(),Ae(),Be()]})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Grid","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(v,{className:"mb0",children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:parseInt(o?.[n]?.columns,10)||1,onChange:e=>t("grid",e,n,"columns"),min:1,max:8}),i((0,x.__)("Column Gap","b-blocks"),"columnGap"),i((0,x.__)("Row Gap","b-blocks"),"rowGap"),(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Tile Shape","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{value:o?.[n]?.ratio??("desktop"===n?"1/1":""),options:"desktop"===n?RP:[{label:(0,x.__)("Inherit","b-blocks"),value:""},...RP],onChange:e=>t("grid",e,n,"ratio")}),(0,l.jsx)("small",{children:(0,x.__)("Original keeps each post at its own proportions, so rows will not line up.","b-blocks")})]})},cE=({attributes:e,updateObj:t})=>{const{elements:n={},lightbox:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Interaction","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open In Lightbox","b-blocks"),checked:n.lightbox,onChange:e=>t("elements",e,"lightbox"),help:(0,x.__)("Off, a tile links straight to the post on Instagram.","b-blocks")}),n.lightbox?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Profile In Lightbox","b-blocks"),checked:o.showProfile,onChange:e=>t("lightbox",e,"showProfile")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Caption In Lightbox","b-blocks"),checked:o.showCaption,onChange:e=>t("lightbox",e,"showCaption")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Instagram Link","b-blocks"),checked:o.showLink,onChange:e=>t("lightbox",e,"showLink")})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Link To Instagram","b-blocks"),checked:n.linkPosts,onChange:e=>t("elements",e,"linkPosts")}),n.linkPosts&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open In New Tab","b-blocks"),checked:n.openInNewTab,onChange:e=>t("elements",e,"openInNewTab")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Video & Album Icon","b-blocks"),checked:n.mediaIcon,onChange:e=>t("elements",e,"mediaIcon"),help:(0,x.__)("Marks which tiles are reels or multi-photo posts.","b-blocks")})]})},dE=({attributes:e,updateObj:t})=>{const{elements:n={},profile:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Profile","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Profile","b-blocks"),checked:n.profile,onChange:e=>t("elements",e,"profile")}),n.profile&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Photo","b-blocks"),checked:n.profilePhoto,onChange:e=>t("elements",e,"profilePhoto")}),n.profilePhoto&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Fallback Photo","b-blocks")}),(0,l.jsx)(ve,{value:o.photo,types:["image"],onChange:e=>t("profile",e,"photo"),placeholder:(0,x.__)("Upload Profile Picture","b-blocks")}),(0,l.jsx)("small",{children:(0,x.__)("Used only when Instagram returns no picture for the account.","b-blocks")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Name","b-blocks"),checked:n.profileName,onChange:e=>t("elements",e,"profileName")}),n.profileName&&(0,l.jsx)(y.TextControl,{className:"mt10",value:o.nameText||"",onChange:e=>t("profile",e,"nameText"),placeholder:(0,x.__)("Display name","b-blocks"),help:(0,x.__)("Shown only when the account itself returns no name.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Biography","b-blocks"),checked:n.profileBio,onChange:e=>t("elements",e,"profileBio")}),n.profileBio&&(0,l.jsx)(y.TextControl,{className:"mt10",value:o.bioText||"",onChange:e=>t("profile",e,"bioText"),placeholder:(0,x.__)("Short bio","b-blocks"),help:(0,x.__)("Shown only when the account itself returns no biography.","b-blocks")})]})]})},uE=({attributes:e,updateObj:t,group:n,title:o,size:i=14,device:a="desktop"})=>{const s=e?.[n]||{},r=(e,t)=>{const n=s?.[e]||{},o=n?.[t]??("normal"===e?s?.[t]:void 0);return void 0!==o?.[a]?o[a]:"desktop"!==a||!o||void 0===o.top&&void 0===o.right?{}:o},c=(e,o,i)=>{const r=s?.[e]?.[o]||("normal"===e?s?.[o]:void 0);!r||void 0!==r.desktop||void 0===r.top&&void 0===r.right?t(n,i,e,o,a):t(n,{desktop:"desktop"===a?i:r,tablet:"tablet"===a?i:{top:"",right:"",bottom:"",left:""},mobile:"mobile"===a?i:{top:"",right:"",bottom:"",left:""}},e,o)};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:o,initialOpen:!1,children:[(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typo,onChange:e=>t(n,e,"typo"),defaults:{fontSize:{desktop:i}}}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:AP,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:zP(e.name,(0,x.__)("Color","b-blocks")),value:s?.[e.name]?.color,onChange:o=>t(n,o,e.name,"color")}),(0,l.jsx)(An,{className:"mt10",label:zP(e.name,(0,x.__)("Background","b-blocks")),value:s?.[e.name]?.background,onChange:o=>t(n,o,e.name,"background")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:zP(e.name,(0,x.__)("Border","b-blocks")),value:s?.[e.name]?.border,onChange:o=>t(n,o,e.name,"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[zP(e.name,(0,x.__)("Padding","b-blocks"))," ",(0,l.jsx)(_,{})]}),values:r(e.name,"padding"),onChange:t=>c(e.name,"padding",t)}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[zP(e.name,(0,x.__)("Border Radius","b-blocks"))," ",(0,l.jsx)(_,{})]}),values:r(e.name,"radius"),onChange:t=>c(e.name,"radius",t)}),(0,l.jsx)(yt,{className:"mt10",label:zP(e.name,(0,x.__)("Box Shadow","b-blocks")),value:s?.[e.name]?.shadow||("normal"===e.name?s?.shadow:[])||[],onChange:o=>t(n,o,e.name,"shadow")})]})})]})},pE=({attributes:e,updateObj:t,device:n="desktop"})=>{const{elements:o={},caption:i={}}=e;return o.caption?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:i.color,onChange:e=>t("caption",e,"color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hashtag Color","b-blocks"),value:i.linkColor,onChange:e=>t("caption",e,"linkColor")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:i.background,onChange:e=>t("caption",e,"background")}),(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.align||"",onChange:e=>t("caption",e,"align"),children:OP.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:(()=>{const e=i?.padding;return void 0!==e?.[n]?e[n]:"desktop"!==n||!e||void 0===e.top&&void 0===e.right?{}:e})(),onChange:e=>{const o=i?.padding;!o||void 0!==o.desktop||void 0===o.top&&void 0===o.right?t("caption",e,"padding",n):t("caption",{desktop:"desktop"===n?e:o,tablet:"tablet"===n?e:{top:"",right:"",bottom:"",left:""},mobile:"mobile"===n?e:{top:"",
482 +right:"",bottom:"",left:""}},"padding")}}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typo,onChange:e=>t("caption",e,"typo"),defaults:{fontSize:{desktop:15}}})]}):null},hE=({attributes:e,updateObj:t,device:n="desktop"})=>{const{item:o={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Item","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Hover Effect","b-blocks"),labelPosition:"edge",value:o.hoverEffect||"none",options:BP,onChange:e=>t("item",e,"hoverEffect")}),(0,l.jsx)(k,{label:(0,l.jsxs)(l.Fragment,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o?.[n]?.radius||{},onChange:e=>t("item",e,n,"radius")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Overlay","b-blocks"),value:o.overlayColor,onChange:e=>t("item",e,"overlayColor")}),(0,l.jsx)("small",{children:(0,x.__)("A tint drawn over the photo while the pointer is on it.","b-blocks")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("item",e,"border")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:o.shadow,onChange:e=>t("item",e,"shadow")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Media Icon Color","b-blocks"),value:o.iconColor,onChange:e=>t("item",e,"iconColor")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Media Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:o?.[n]?.iconSize??("desktop"===n&&o.iconSize||""),onChange:e=>t("item",e,n,"iconSize"),units:[Pe(),Ae(),Be()]})]})]})},gE=({attributes:e,updateObj:t})=>{const{elements:n={},lightbox:o={}}=e;return n.lightbox?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lightbox","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Backdrop","b-blocks"),value:o.backdrop,onChange:e=>t("lightbox",e,"backdrop")}),(0,l.jsx)("small",{children:(0,x.__)("A translucent colour keeps the page visible behind the post.","b-blocks")}),(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Close Button","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:AP,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:zP(e.name,(0,x.__)("Icon Color","b-blocks")),value:"normal"===e.name?o.closeColor:o.closeHoverColor,onChange:n=>t("lightbox",n,"normal"===e.name?"closeColor":"closeHoverColor")}),(0,l.jsx)(Ue,{className:"mt10",label:zP(e.name,(0,x.__)("Background Color","b-blocks")),value:"normal"===e.name?o.closeBg:o.closeHoverBg,onChange:n=>t("lightbox",n,"normal"===e.name?"closeBg":"closeHoverBg")})]})}),(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Navigation Buttons (Prev / Next)","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:AP,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:zP(e.name,(0,x.__)("Icon Color","b-blocks")),value:"normal"===e.name?o.navColor:o.navHoverColor,onChange:n=>t("lightbox",n,"normal"===e.name?"navColor":"navHoverColor")}),(0,l.jsx)(Ue,{className:"mt10",label:zP(e.name,(0,x.__)("Background Color","b-blocks")),value:"normal"===e.name?o.navBg:o.navHoverBg,onChange:n=>t("lightbox",n,"normal"===e.name?"navBg":"navHoverBg")})]})})]}):null},mE=({attributes:e,updateObj:t,device:n="desktop"})=>{const{elements:o={},profile:i={}}=e;return o.profile?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Profile","b-blocks"),initialOpen:!1,children:[o.profilePhoto&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Photo Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",isUnitSelectTabbable:!0,value:i?.[n]?.photoSize??("desktop"===n&&i.photoSize||""),onChange:e=>t("profile",e,n,"photoSize"),units:[Pe(),Ae(),Be()]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Header Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",isUnitSelectTabbable:!0,value:i?.[n]?.gap??("desktop"===n&&i.gap||""),onChange:e=>t("profile",e,n,"gap"),units:[Pe(),Ee(),Ae(),Be()]})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Username Color","b-blocks"),value:i.usernameColor,onChange:e=>t("profile",e,"usernameColor")}),o.profileName&&(0,l.jsx)(Ue,{label:(0,x.__)("Name Color","b-blocks"),value:i.nameColor,onChange:e=>t("profile",e,"nameColor")}),o.profileBio&&(0,l.jsx)(Ue,{label:(0,x.__)("Biography Color","b-blocks"),value:i.bioColor,onChange:e=>t("profile",e,"bioColor")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Username Typography","b-blocks"),value:i.usernameTypo,onChange:e=>t("profile",e,"usernameTypo"),defaults:{fontSize:{desktop:18}}}),(o.profileName||o.profileBio)&&(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Name & Bio Typography","b-blocks"),value:i.metaTypo,onChange:e=>t("profile",e,"metaTypo"),defaults:{fontSize:{desktop:14}}})]}):null},bE=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hE,{...e}),(0,l.jsx)(pE,{...e}),(0,l.jsx)(mE,{...e}),e.attributes?.elements?.followButton&&(0,l.jsx)(uE,{...e,group:"followBtn",title:(0,x.__)("Follow Button","b-blocks"),size:13}),e.attributes?.elements?.loadMore&&(0,l.jsx)(uE,{...e,group:"loadMoreBtn",title:(0,x.__)("Load More Button","b-blocks"),size:14}),(0,l.jsx)(gE,{...e})]}),fE=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:EP,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(aE,{...e}),(0,l.jsx)(lE,{...e}),(0,l.jsx)(dE,{...e}),(0,l.jsx)(rE,{...e}),(0,l.jsx)(sE,{...e}),(0,l.jsx)(cE,{...e})]}),"style"===t.name&&(0,l.jsx)(bE,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},xE=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i}=t,a="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,s=fe(t,n),r=window.bBlocksCursorDataConfig?.nonce,{data:c,isLoading:d}=jd("bblocks_api_keys",{_wpnonce:r},!0),[u,p]=(0,m.useState)("");(0,m.useEffect)((()=>{p(c?.instagram?.key||"")}),[c,d]);const g=o.slice(0,12);(0,m.useEffect)((()=>{i!==g&&n({blockId:g})}),[g]);const b=`block-${o}`,f=(0,h.useBlockProps)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(fE,{...e,updateObj:s,isPremium:a,instagramKey:u}),(0,l.jsxs)("div",{...f,children:[(0,l.jsx)(iE,{attributes:t,id:b,isBackend:!0}),!d&&!u&&(0,l.jsxs)(ja,{status:"warning",isIcon:!1,className:"mb10",children:[(0,x.__)("Add your Instagram Access Token in ","b-blocks"),(0,l.jsx)("a",{href:vn,target:"_blank",rel:"noopener noreferrer",children:(0,x.__)("Dashboard → Settings → API Integrations","b-blocks")}),(0,x.__)(" to load your feed.","b-blocks")]}),(0,l.jsx)("div",{children:(0,l.jsx)(oE,{attributes:t,id:b,isBackend:!0})})]})]})}));(0,p.registerBlockType)(TP,{icon:ml,edit:xE,save:()=>null})
483 +;const yE=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/interactive-checklist","title":"Interactive Checklist","category":"bBlocks","description":"A titled checklist of tickable items that visitors can check off, with their progress remembered in the browser via localStorage, an optional live completion indicator, and a reset button. Works without JavaScript using native checkbox inputs.","keywords":["checklist","todo","to-do","task list","tick list","interactive checklist","progress checklist","setup checklist","steps","tasks"],"textdomain":"b-blocks","attributes":{"heading":{"type":"object","default":{"text":"Your Checklist","tag":"h3","color":"#1a1a1a","typography":{"fontSize":{"desktop":"20px","tablet":"","mobile":""},"fontWeight":700},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""}}},"items":{"type":"array","default":[{"id":"item-1","label":"First item","checked":false},{"id":"item-2","label":"Second item","checked":false},{"id":"item-3","label":"Third item","checked":false}]},"checkbox":{"type":"object","default":{"style":"square","size":"20px","accent":"#4f46e5","checkColor":"#ffffff"}},"item":{"type":"object","default":{"color":"#1a1a1a","typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":400},"gap":"12px","strike":false}},"progress":{"type":"object","default":{"show":true,"typography":{"fontSize":{"desktop":"12px","tablet":"","mobile":""},"fontWeight":600},"height":"6px","trackBg":{"type":"solid","color":""},"fillBg":{"type":"solid","color":""}}},"reset":{"type":"object","default":{"show":true}},"persistKey":{"type":"string","default":""},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"24px","right":"28px","bottom":"24px","left":"28px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"12px","right":"12px","bottom":"12px","left":"12px"},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"color":"#e5e7eb","style":"solid","width":"1px"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),vE=({attributes:e,id:t,isBackend:n=!1})=>{const{heading:o={},checkbox:i={},item:a={},progress:s={},advanced:r}=e,c=i.accent||"#4f46e5",d=i.size||"20px",u=s.typography?.fontSize?.desktop||"12px",p=`#${t} .bBlocks-interactive-checklist-wrapper`,h=`${p} .bBlocks-interactive-checklist-heading`,g=`${p} .bBlocks-interactive-checklist-progress-text`,m=`${p} .bBlocks-interactive-checklist-progress-track`,b=`${p} .bBlocks-interactive-checklist-progress-fill`,f=`${p} .bBlocks-interactive-checklist-list`,x=`${p} .bBlocks-interactive-checklist-item`,y=`${p} .bBlocks-interactive-checklist-label`,v=`${p} .bBlocks-interactive-checklist-checkbox`,k=`${p} .bBlocks-interactive-checklist-box`,w=`${p} .bBlocks-interactive-checklist-reset`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",o.typography).googleFontLink}\n\t\t\t${ps("",a.typography).googleFontLink}\n\t\t\t${p}{\n\t\t\t\t${ns("color",a.color)}\n\t\t\t}\n\t\t\t${ps(h,o.typography).styles}\n\t\t\t${h}{\n\t\t\t\t${ns("color",o.color)}\n\t\t\t\t${os(o.bg)}\n\t\t\t\t${as(o.border)}\n\t\t\t\t${ns("border-radius",hs(o.borderRadius))}\n\t\t\t\t${ns("padding",hs(o.padding))}\n\t\t\t}\n\t\t\t${ps("",s.typography).googleFontLink}\n\t\t\t${ps(g,s.typography).styles}\n\t\t\t${m}{\n\t\t\t\t${ns("height",s.height)}\n\t\t\t\t${os(s.trackBg)}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\t${s.fillBg?.color||s.fillBg?.gradient||s.fillBg?.image?.url?os(s.fillBg):`background: ${c};`}\n\t\t\t}\n\t\t\t${f}{ gap: ${a.gap||"12px"}; }\n\t\t\t${ps(y,a.typography).styles}\n\t\t\t${y}{\n\t\t\t\t${ns("color",a.color)}\n\t\t\t\tpadding-left: calc(${d} + 12px);\n\t\t\t}\n\t\t\t${v}{ width: ${d}; height: ${d}; }\n\t\t\t${k}{\n\t\t\t\twidth: ${d};\n\t\t\t\theight: ${d};\n\t\t\t\tborder-color: ${c};\n\t\t\t}\n\t\t\t${k}::after{\n\t\t\t\t${ns("background-color",i.checkColor)}\n\t\t\t}\n\t\t\t${v}:checked + .bBlocks-interactive-checklist-box,\n\t\t\t${x}.is-checked .bBlocks-interactive-checklist-box{\n\t\t\t\tbackground: ${c};\n\t\t\t\tborder-color: ${c};\n\t\t\t}\n\t\t\t${v}:focus-visible + .bBlocks-interactive-checklist-box{\n\t\t\t\toutline: 2px solid ${c};\n\t\t\t\toutline-offset: 2px;\n\t\t\t}\n\t\t\t${w}{\n\t\t\t\tcolor: ${c};\n\t\t\t\tfont-size: ${u};\n\t\t\t}\n\t\t\t${w}:focus-visible{ outline: 2px solid ${c}; }\n\t\t\t${_s(t,r,n,!1)}\n\t\t\t`}})},kE=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],wE=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],_E=[{label:(0,x.__)("H2","b-blocks"),value:"h2"},{label:(0,x.__)("H3","b-blocks"),value:"h3"},{label:(0,x.__)("H4","b-blocks"),value:"h4"}],CE=[{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Round","b-blocks"),value:"round"}],jE=((0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),e=>{const{attributes:t,updateObj:n,index:o}=e,i=t.items[o]||{};return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Label","b-blocks"),value:i.label||"",onChange:e=>n("items",e,o,"label"),placeholder:(0,x.__)("Checklist item","b-blocks"),__nextHasNoMarginBottom:!0})})}),$E=({attributes:e,setAttributes:t,updateObj:n})=>{const{heading:o={},progress:i={},reset:a={},item:s={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Heading text","b-blocks"),value:o.text||"",onChange:e=>n("heading",e,"text"),placeholder:(0,x.__)("Your Checklist","b-blocks"),help:(0,x.__)("Leave empty to hide the heading.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{
484 +className:"flex2",children:(0,x.__)("Heading tag","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:o.tag||"h3",options:_E,onChange:e=>n("heading",e,"tag"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show progress line","b-blocks"),checked:!1!==i.show,onChange:e=>n("progress",e,"show"),help:(0,x.__)('Live "N of M complete" indicator and progress bar.',"b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show reset button","b-blocks"),checked:!1!==a.show,onChange:e=>n("reset",e,"show"),help:(0,x.__)("Lets visitors clear their saved progress.","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Checklist items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mb10",label:(0,x.__)("Strike checked items","b-blocks"),checked:!!s.strike,onChange:e=>n("item",e,"strike"),help:(0,x.__)("Line-through and dim items once checked.","b-blocks")}),(0,l.jsx)(_a,{attributes:e,setAttributes:t,updateObj:n,newItem:{id:`item-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,label:(0,x.__)("New item","b-blocks"),checked:!1},design:"sortable",itemLabel:"Item",arrKey:"items",title:"label",ItemSettings:jE})]})]})},SE={top:"",right:"",bottom:"",left:""},TE=({attributes:e,updateObj:t})=>{const{heading:n={},checkbox:o={},item:i={},progress:a={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Heading","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:n.color||"#1a1a1a",onChange:e=>t("heading",e,"color"),defaultColor:"#1a1a1a"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typography||{},onChange:e=>t("heading",e,"typography")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:n.bg,onChange:e=>t("heading",e,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:n.border,onChange:e=>t("heading",e||{},"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),units:kE,values:n.borderRadius,resetValues:SE,onChange:e=>t("heading",e,"borderRadius")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),units:kE,values:n.padding,resetValues:SE,onChange:e=>t("heading",e,"padding")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Checkbox","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:o.style||"square",options:CE,onChange:e=>t("checkbox",e,"style")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",units:kE,isUnitSelectTabbable:!0,value:o.size||"20px",onChange:e=>t("checkbox",e,"size")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Accent color:","b-blocks"),value:o.accent,onChange:e=>t("checkbox",e,"accent"),defaultColor:"#4f46e5"}),(0,l.jsx)(Ue,{label:(0,x.__)("Check mark color:","b-blocks"),value:o.checkColor,onChange:e=>t("checkbox",e,"checkColor"),defaultColor:"#ffffff"})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text color:","b-blocks"),value:i.color||"#1a1a1a",onChange:e=>t("item",e,"color"),defaultColor:"#1a1a1a"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typography||{},onChange:e=>t("item",e,"typography")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Gap between items","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",units:kE,isUnitSelectTabbable:!0,value:i.gap,onChange:e=>t("item",e,"gap")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Progress","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:a.typography||{},defaults:{fontSize:{desktop:"12px"}},onChange:e=>t("progress",e,"typography")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Track Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",units:kE,isUnitSelectTabbable:!0,value:a.height||"6px",onChange:e=>t("progress",e,"height")})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Track Background","b-blocks"),value:a.trackBg,onChange:e=>t("progress",e,"trackBg")}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Progress Fill Background","b-blocks"),value:a.fillBg,onChange:e=>t("progress",e,"fillBg")})]})]})},NE=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:wE,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)($E,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(TE,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},ME="bBlocks-interactive-checklist",LE=["h2","h3","h4"],PE=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{heading:a={},items:s=[],checkbox:r={},item:c={},progress:d={},reset:u={},persistKey:p}=t,g=bBlocksPremiumChecker,b=fe(t,n),[f,v]=(0,m.useState)({});(0,m.useEffect)((()=>{p||n({persistKey:`cl-${o.slice(0,8)}`})}),[p,o,n]);const k="round"===r.style?"round":"square",w=!0===c.strike,_=LE.includes(a.tag)?a.tag:"h3",C=s.length,j=s.filter((e=>e&&f[e.id])).length,$=C>0?Math.round(j/C*100):0,S=[`${ME}-wrapper`,`${ME}-checkbox-${k}`,w?`${ME}-has-strike`:""].filter(Boolean).join(" "),T=(e,t)=>{if(t<0||t>=s.length)return;const o=s.slice(),[i]=o.splice(e,1);o.splice(t,0,i),n({items:o})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(NE,{attributes:t,setAttributes:n,updateObj:b,isPremium:g,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(vE,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:S,children:[(0,l.jsx)(h.RichText,{tagName:_,className:`${ME}-heading`,value:a.text||"",onChange:e=>b("heading",e,"text"),placeholder:(0,x.__)("Your Checklist","b-blocks"),allowedFormats:["core/bold","core/italic"]}),!1!==d.show&&C>0&&(0,l.jsxs)("div",{className:`${ME}-progress`,children:[(0,l.jsx)("p",{className:`${ME}-progress-text`,children:(0,x.sprintf)(/* translators: 1: done, 2: total */ /* translators: 1: done, 2: total */(0,x.__)("%1$s of %2$s complete","b-blocks"),j,C)}),(0,l.jsx)("div",{className:`${ME}-progress-track`,"aria-hidden":"true",children:(0,l.jsx)("span",{className:`${ME}-progress-fill`,style:{width:`${$}%`}})})]}),0===C?(0,l.jsx)("p",{className:`${ME}-empty`,children:(0,x.__)("No checklist items yet. Add the first one from the sidebar.","b-blocks")}):(0,l.jsx)("ul",{className:`${ME}-list`,children:s.map(((e,t)=>{const o=!(!e||!f[e.id]);return(0,l.jsx)("li",{className:`${ME}-item ${o?"is-checked":""}`,children:(0,l.jsxs)("div",{className:`${ME}-label`,children:[(0,l.jsx)("input",{type:"checkbox",className:`${ME}-checkbox`,checked:o,onChange:()=>{},onClick:t=>{var n;t.stopPropagation(),n=e.id,v((e=>({...e,[n]:!e[n]})))}}),(0,l.jsx)("span",{className:`${ME}-box`,"aria-hidden":"true"}),(0,l.jsx)(h.RichText,{tagName:"span",className:`${ME}-text`,value:e&&e.label||"",onChange:e=>{return o=t,i="label",a=e,void n({items:s.map(((e,t)=>t===o?{...e||{},[i]:a}:e))});var o,i,a},placeholder:(0,x.__)("Checklist item","b-blocks"),allowedFormats:[]}),(0,l.jsxs)("div",{className:`${ME}-editor-item-actions`,children:[(0,l.jsx)(y.Button,{variant:"tertiary",
485 +size:"small",icon:"arrow-up-alt2",label:(0,x.__)("Move item up","b-blocks"),onClick:()=>T(t,t-1),disabled:0===t}),(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-down-alt2",label:(0,x.__)("Move item down","b-blocks"),onClick:()=>T(t,t+1),disabled:t===s.length-1}),(0,l.jsx)(y.Button,{variant:"tertiary",isDestructive:!0,size:"small",icon:"trash",label:(0,x.__)("Remove item","b-blocks"),onClick:()=>{return e=t,n({items:s.filter(((t,n)=>n!==e))});var e}})]})]})},e&&e.id||t)}))}),!1!==u.show&&C>0&&(0,l.jsx)("button",{type:"button",className:`${ME}-reset`,disabled:!0,children:(0,x.__)("Reset progress","b-blocks")})]})})]})]})}));Pl(yE.name)&&(0,p.registerBlockType)(yE,{icon:nl,edit:PE,save:()=>null});const EE=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/key-takeaways","title":"Key Takeaways","category":"bBlocks","description":"A titled summary card listing the most important points of an article as a checkmark, numbered, or bullet list. Built for the blog \\"Key Takeaways\\" / \\"TL;DR\\" pattern with heading, accent color, icon, and full typography controls.","keywords":["key takeaways","takeaways","summary","tldr","tl;dr","highlights","key points","summary box","styled box","notification box"],"textdomain":"b-blocks","attributes":{"heading":{"type":"object","default":{"text":"Key Takeaways","tag":"h3","color":"#F4F7FF","bg":{"type":"solid","color":"#0d6efd"},"typography":{"fontSize":{"desktop":"18px","tablet":"","mobile":""},"fontWeight":700},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"border":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}}}},"list":{"type":"object","default":{"style":"check","showIcon":true,"gap":"10px"}},"items":{"type":"array","default":[{"text":"Summarize your first key point here.","icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\\"/></svg>"},{"text":"Add the second takeaway readers should remember.","icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\\"/></svg>"},{"text":"Close with a final actionable insight.","icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\\"/></svg>"}]},"icon":{"type":"object","default":{"color":"#000000","size":"18px","border":{},"bg":{"type":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}}}},"item":{"type":"object","default":{"color":"#1e293b","bg":{"type":"solid","color":""},"typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":400},"border":{},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"left":"","right":"","top":"","bottom":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),AE=(e,t,n)=>{if(e){if(e[t]&&void 0!==e[t][n])return e[t][n];if("radius"===n){if(e[t]&&void 0!==e[t].borderRadius)return e[t].borderRadius;if(void 0!==e.radius)return e.radius;if(void 0!==e.borderRadius)return e.borderRadius}return void 0!==e[n]?e[n]:void 0}},BE=({attributes:e,id:o,isBackend:i=!1})=>{const{heading:a={},list:s={},icon:r={},item:c={},advanced:d}=e,u=r.color||"#ffffff",p=r.size||"18px",h=c.typography?.fontSize?.desktop||"16px",g=`#${o} .bBlocks-key-takeaways-wrapper`,m=`${g} .bBlocks-key-takeaways-heading`,b=`${g} .bBlocks-key-takeaways-list`,f=`${g} .bBlocks-key-takeaways-item`,x=`${g} .bBlocks-key-takeaways-icon`,y=`${g} .bBlocks-key-takeaways-num`,v=`${g} .bBlocks-key-takeaways-bullet`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
486 +__html:`\n\t\t\t${ps("",a.typography).googleFontLink}\n\t\t\t${ps("",c.typography).googleFontLink}\n\t\t\t${ps(m,a.typography).styles}\n\t\t\t${m}{\n\t\t\t\t${ns("color",a.color)}\n\t\t\t\t${os(a.bg)}\n\t\t\t\t${ns("padding",hs(AE(a,"desktop","padding")))}\n\t\t\t\t${ns("margin",hs(AE(a,"desktop","margin")))}\n\t\t\t\t${as(a.border)}\n\t\t\t\t${ns("border-radius",hs(AE(a,"desktop","radius")))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\t${ns("gap","number"==typeof s.gap?`${s.gap}px`:s.gap||"10px")}\n\t\t\t}\n\t\t\t${ps(f,c.typography).styles}\n\t\t\t${f}{\n\t\t\t\t${ns("color",c.color)}\n\t\t\t\t${os(c.bg)}\n\t\t\t\t${ns("padding",hs(AE(c,"desktop","padding")))}\n\t\t\t\t${ns("margin",hs(AE(c,"desktop","margin")))}\n\t\t\t\t${as(c.border)}\n\t\t\t\t${ns("border-radius",hs(AE(c,"desktop","radius")))}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\tcolor: ${u};\n\t\t\t\tfont-size: ${p};\n\t\t\t\tmin-height: calc(${h} * 1.5);\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${ns("padding",hs(AE(r,"desktop","padding")))}\n\t\t\t\t${ns("margin",hs(AE(r,"desktop","margin")))}\n\t\t\t\t${as(r.border)}\n\t\t\t\t${ns("border-radius",hs(AE(r,"desktop","radius")))}\n\t\t\t}\n\t\t\t${x}>svg{\n\t\t\t\t${ns("height",r.size)}\n\t\t\t\t${ns("width",r.size)}\n\t\t\t\t${ns("fill",u)}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\twidth: calc(${p} + 10px);\n\t\t\t\theight: calc(${p} + 10px);\n\t\t\t\tcolor: ${u};\n\t\t\t\tfont-size: calc(${p} * 0.8);\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${as(r.border)}\n\t\t\t\t${ns("border-radius",hs(AE(r,"desktop","radius")))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\twidth: calc(${p} * 0.45);\n\t\t\t\theight: calc(${p} * 0.45);\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${as(r.border)}\n\t\t\t\t${ns("border-radius",hs(AE(r,"desktop","radius")))}\n\t\t\t}\n\t\t\t${t}{\n\t\t\t\t${m}{\n\t\t\t\t\t${ns("padding",hs(AE(a,"tablet","padding")))}\n\t\t\t\t\t${ns("margin",hs(AE(a,"tablet","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(AE(a,"tablet","radius")))}\n\t\t\t\t}\n\t\t\t\t${f}{\n\t\t\t\t\t${ns("padding",hs(AE(c,"tablet","padding")))}\n\t\t\t\t\t${ns("margin",hs(AE(c,"tablet","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(AE(c,"tablet","radius")))}\n\t\t\t\t}\n\t\t\t\t${x}{\n\t\t\t\t\t${ns("padding",hs(AE(r,"tablet","padding")))}\n\t\t\t\t\t${ns("margin",hs(AE(r,"tablet","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(AE(r,"tablet","radius")))}\n\t\t\t\t}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${m}{\n\t\t\t\t\t${ns("padding",hs(AE(a,"mobile","padding")))}\n\t\t\t\t\t${ns("margin",hs(AE(a,"mobile","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(AE(a,"mobile","radius")))}\n\t\t\t\t}\n\t\t\t\t${f}{\n\t\t\t\t\t${ns("padding",hs(AE(c,"mobile","padding")))}\n\t\t\t\t\t${ns("margin",hs(AE(c,"mobile","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(AE(c,"mobile","radius")))}\n\t\t\t\t}\n\t\t\t\t${x}{\n\t\t\t\t\t${ns("padding",hs(AE(r,"mobile","padding")))}\n\t\t\t\t\t${ns("margin",hs(AE(r,"mobile","margin")))}\n\t\t\t\t\t${ns("border-radius",hs(AE(r,"mobile","radius")))}\n\t\t\t\t}\n\t\t\t}\n\t\t\t${_s(o,d,i,!1)}\n\t\t\t`}})},IE=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],OE=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],RE=[{label:(0,x.__)("H2","b-blocks"),value:"h2"},{label:(0,x.__)("H3","b-blocks"),value:"h3"},{label:(0,x.__)("H4","b-blocks"),value:"h4"}],zE=[{label:(0,x.__)("Checkmark icons","b-blocks"),value:"check"},{label:(0,x.__)("Numbered (1 2 3 …)","b-blocks"),value:"numbered"},{label:(0,x.__)("Plain bullet","b-blocks"),value:"bullet"}],DE=((0,x.__)("Regular (400)","b-blocks"),(0,x.__)("Medium (500)","b-blocks"),(0,x.__)("Semibold (600)","b-blocks"),(0,x.__)("Bold (700)","b-blocks"),(0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),e=>{const{attributes:t,updateObj:n,index:o}=e,i=t.items[o]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Takeaway text","b-blocks"),value:i.text||"",onChange:e=>n("items",e,o,"text"),placeholder:(0,x.__)("Summarize a key point…","b-blocks"),rows:2,__nextHasNoMarginBottom:!0}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon","b-blocks"),value:i.icon,onChange:e=>n("items",e,o,"icon")})]})}),FE=({attributes:e,setAttributes:t,updateObj:n})=>{const{heading:o={},list:i={}}=e,a=i.style||"check",s=!1!==i.showIcon,r={text:(0,x.__)("New takeaway","b-blocks"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>'};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Heading text","b-blocks"),value:o.text||"",onChange:e=>n("heading",e,"text"),placeholder:(0,x.__)("Key Takeaways","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Heading tag","b-blocks"),value:o.tag||"h3",labelPosition:"edge",options:RE,onChange:e=>n("heading",e,"tag"),help:(0,x.__)("Pick a level that fits the surrounding document outline.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("List style","b-blocks"),value:a,options:zE,onChange:e=>n("list",e,"style"),help:(0,x.__)("Checkmark and bullet render a <ul>; numbered renders a semantic <ol>.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show icon / number prefix","b-blocks"),checked:s,onChange:e=>n("list",e,"showIcon")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Takeaway items","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,updateObj:n,newItem:r,design:"sortable",itemLabel:"Takeaway",arrKey:"items",title:"text",ItemSettings:DE})})]})},HE={top:"",right:"",bottom:"",left:""},WE=({attrKey:e,value:t={},updateObj:n,device:o})=>{const{bg:i={},border:a={}}=t,s=o||"desktop",r=t[s]?.padding||t.padding||{},c=t[s]?.margin||t.margin||{},d=t[s]?.radius||t[s]?.borderRadius||t.radius||t.borderRadius||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:i,onChange:t=>n(e,t,"bg")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),units:IE,values:r,resetValues:HE,onChange:t=>n(e,t,s,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),units:IE,values:c,resetValues:HE,onChange:t=>n(e,t,s,"margin")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:a,onChange:t=>n(e,t||{},"border")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks"),(0,l.jsx)(_,{})]}),units:IE,values:d,resetValues:HE,onChange:t=>n(e,t,s,"radius")})]})},UE=({attributes:e,updateObj:t,device:n})=>{const{heading:o={},list:i={},icon:a={},item:s={}}=e,r=!1!==i.showIcon;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Heading","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text color:","b-blocks"),value:o.color||"#1e293b",onChange:e=>t("heading",e,"color"),defaultColor:"#1e293b"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:o.typography,onChange:e=>t("heading",e,"typography")}),(0,l.jsx)(WE,{attrKey:"heading",value:o,updateObj:t,device:n})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Takeaway Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text color:","b-blocks"),value:s.color||"#1e293b",onChange:e=>t("item",e,"color"),defaultColor:"#1e293b"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),
487 +value:s.typography,onChange:e=>t("item",e,"typography")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Items Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:IE,isUnitSelectTabbable:!0,value:"number"==typeof i.gap?`${i.gap}px`:i.gap||"10px",onChange:e=>t("list",e,"gap")})]}),(0,l.jsx)(WE,{attrKey:"item",value:s,updateObj:t,device:n})]}),r&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon / number color:","b-blocks"),value:a.color||"#ffffff",onChange:e=>t("icon",e,"color"),defaultColor:"#ffffff"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Icon / number size","b-blocks"),labelPosition:"edge",units:IE,isUnitSelectTabbable:!0,value:a.size||"18px",onChange:e=>t("icon",e,"size")}),(0,l.jsx)(WE,{attrKey:"icon",value:a,updateObj:t,device:n})]})]})},GE=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:OE,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(FE,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(UE,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},VE=["h2","h3","h4"],qE=["check","numbered","bullet"],YE=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{heading:a={},list:s={},items:r=[]}=t,c=bBlocksPremiumChecker,d=fe(t,n),u=qE.includes(s.style)?s.style:"check",p=VE.includes(a.tag)?a.tag:"h3",g="numbered"===u?"ol":"ul",m=!1!==s.showIcon,b=["bBlocks-key-takeaways-wrapper",`bBlocks-key-takeaways-style-${u}`].filter(Boolean).join(" "),f=(e,t)=>{if(t<0||t>=r.length)return;const o=r.slice(),[i]=o.splice(e,1);o.splice(t,0,i),n({items:o})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(GE,{attributes:t,setAttributes:n,updateObj:d,isPremium:c,device:i}),(0,l.jsx)("div",{...(0,h.useBlockProps)(),children:(0,l.jsxs)("div",{children:[(0,l.jsx)(BE,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsxs)("div",{className:b,role:"region",children:[(0,l.jsx)(h.RichText,{tagName:p,className:"bBlocks-key-takeaways-heading",value:a.text||"",onChange:e=>d("heading",e,"text"),placeholder:(0,x.__)("Key Takeaways","b-blocks"),allowedFormats:["core/bold","core/italic"]}),(0,l.jsx)("div",{className:"bBlocks-key-takeaways-body",children:0===r.length?(0,l.jsx)("p",{className:"bBlocks-key-takeaways-empty",children:(0,x.__)("No takeaways yet. Add the first one from the sidebar.","b-blocks")}):(0,l.jsx)(g,{className:"bBlocks-key-takeaways-list",role:"list",children:r.map(((e,t)=>(0,l.jsxs)("li",{className:"bBlocks-key-takeaways-item",children:[m&&"check"===u&&(0,l.jsx)("span",{className:"bBlocks-key-takeaways-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:e&&e.icon||""}}),m&&"numbered"===u&&(0,l.jsx)("span",{className:"bBlocks-key-takeaways-num","aria-hidden":"true"}),m&&"bullet"===u&&(0,l.jsx)("span",{className:"bBlocks-key-takeaways-bullet","aria-hidden":"true"}),(0,l.jsx)(h.RichText,{tagName:"span",className:"bBlocks-key-takeaways-text",value:e&&e.text||"",onChange:e=>{return o=t,i="text",a=e,void n({items:r.map(((e,t)=>t===o?{...e||{},[i]:a}:e))});var o,i,a},placeholder:(0,x.__)("Takeaway text","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]}),(0,l.jsxs)("div",{className:"bBlocks-key-takeaways-editor-item-actions",children:[(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-up-alt2",label:(0,x.__)("Move item up","b-blocks"),onClick:()=>f(t,t-1),disabled:0===t}),(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-down-alt2",label:(0,x.__)("Move item down","b-blocks"),onClick:()=>f(t,t+1),disabled:t===r.length-1}),(0,l.jsx)(y.Button,{variant:"tertiary",isDestructive:!0,size:"small",icon:"trash",label:(0,x.__)("Remove item","b-blocks"),onClick:()=>{return e=t,n({items:r.filter(((t,n)=>n!==e))});var e}})]})]},e&&e._key||t)))})})]})]})})]})}));Pl(EE.name)&&(0,p.registerBlockType)(EE,{icon:tl,edit:YE,save:()=>null});const KE=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/logo-slider","version":"1.0.0","title":"Logo Slider","category":"bBlocks","description":"Logo sliders are often used on websites and blogs to showcase a company\'s clients, partners, or sponsors.","keywords":["slider","logo","carousel","logo slider"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"options":{"type":"object","default":{"autoplay":true,"direction":"rightToLeft","speed":1000,"delay":1000,"loop":true,"logoView":{"desktop":4,"tablet":3,"mobile":2},"space":{"desktop":30,"tablet":25,"mobile":15},"navigation":true,"pagination":true,"dynamicPagination":false,"isCaptionVisible":false,"easing":"","isPauseOnHover":false}},"sliderStyles":{"type":"object","default":{"logo":{"hover":"none","border":{"color":"#000","width":"0px","style":"none"},"radius":{},"height":"130px","width":"100%","logoFitOption":"cover","padding":{"top":"","right":"","bottom":"","left":""}},"caption":{"hover":"visible","color":{"text":"#fff","bg":"#000"}}}},"logo":{"type":"array","default":[]},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"25px","right":"30px","bottom":"25px","left":"30px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),QE=({attributes:e,id:t,isBackend:n=!1})=>{
488 +const{sliderStyles:o,advanced:i}=e,{caption:a}=o,s=`#${t} .b-blocks-logo-slider-main-wrapper .b-blocks-logo-slider-wrapper`,r=`${s} .b-blocks-losl-logo`,c=`${s} .b-blocks-logo-slider-block-caption`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n ${s}{\n ${ns("height",o.logo.height)}\n ${ns("width",o.logo.width)}\n ${as(o.logo.border)}\n ${ns("padding",hs(o?.logo?.padding))}\n ${ns("border-radius",hs(o.logo.radius))}\n }\n ${r}{\n ${ns("object-fit",o.logo.logoFitOption)}\n ${ns("border-radius",hs(o.logo.radius))}\n }\n ${c}{\n ${ns("color",a.color.text)}\n ${ns("background-color",a.color.bg)}\n }\n ${_s(`${t}>div`,i,n)}\n `}})},ZE=function({setAttributes:e,attributes:t,activeIndex:n,setActiveIndex:o}){const{logo:i}=t;return(0,l.jsxs)(h.BlockControls,{children:[i.length>0&&(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{onSelect:t=>e({logo:t}),allowedTypes:["image/*"],value:i?.map((e=>e?.id)),render:({open:e})=>(0,l.jsx)("button",{onClick:e,children:"Add new logo"}),gallery:!0,multiple:!0})}),i?.length>0&&(0,l.jsxs)(y.ToolbarGroup,{children:[(0,l.jsx)(y.ToolbarItem,{disabled:0===n,icon:"arrow-left-alt2",onClick:()=>{const t=[...i],a=t.splice(n,1);t.splice(Number(n)-1,0,a[0]),e({logo:t}),o((e=>--e))},as:y.Button}),(0,l.jsx)(y.ToolbarItem,{disabled:n===i.length-1,icon:"arrow-right-alt2",onClick:()=>{const t=[...i],a=t.splice(n,1);t.splice(Number(n)+1,0,a[0]),e({logo:t}),o((e=>++e))},as:y.Button})]})]})},XE=[{label:"Default",value:""},{label:"Contain",value:"contain"},{label:"Cover",value:"cover"},{label:"Fill",value:"fill"},{label:"Scale Down",value:"scale-down"},{label:"Initial",value:"initial"},{label:"Inherit",value:"inherit"}],JE=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],eA=[{label:(0,x.__)("Default","b-blocks"),value:""},{label:(0,x.__)("Linear","b-blocks"),value:"linear"},{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Step Start","b-blocks"),value:"step-start"},{label:(0,x.__)("Step End","b-blocks"),value:"step-end"}],tA=({attributes:e,setAttributes:t,index:n})=>{const{logo:o}=e,i=o[n],a=(n,o,...i)=>{t({[n]:be(e[n],o,...i)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(we,{width:"100%",height:"100%",label:(0,x.__)("Choose Logo","b-blocks"),value:i?.url?i:{url:kn},onChange:e=>a("logo",e,n)}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Alt","b-blocks"),value:i?.alt,onChange:e=>a("logo",e,n,"alt")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Caption","b-blocks"),value:i?.caption,onChange:e=>a("logo",e,n,"caption")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link","b-blocks"),type:"url",value:i?.anchor,onChange:e=>a("logo",e,n,"anchor")})]})},nA=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o})=>(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Logo","b-blocks"),initialOpen:!0,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o,newItem:{url:"",caption:"",alt:""},design:"sortable",itemLabel:"Logo",arrKey:"logo",ItemSettings:tA})}),oA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,device:n})=>{const{options:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Autoplay","b-blocks"),checked:o.autoplay,value:o.autoplay,onChange:e=>t("options",e,"autoplay")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Slide Direction","b-blocks"),labelPosition:"edge",value:o.direction,options:[{value:"rightToLeft",label:"Right to Left"},{value:"leftToRight",label:"Left to Right"}],onChange:e=>t("options",e,"direction")}),o.autoplay&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pause On Hover","b-blocks"),checked:o?.isPauseOnHover,value:o?.isPauseOnHover,onChange:e=>t("options",e,"isPauseOnHover")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Easing","b-blocks"),labelPosition:"edge",value:o.easing,options:eA,onChange:e=>t("options",e,"easing")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Show Navigation","b-blocks"),checked:o.navigation,onChange:e=>t("options",e,"navigation")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Show Pagination","b-blocks"),checked:o.pagination,onChange:e=>t("options",e,"pagination")}),o.pagination&&(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Dynamic Pagination","b-blocks"),checked:o.dynamicPagination,onChange:e=>t("options",e,"dynamicPagination")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Infinite Loop","b-blocks"),checked:o.loop,onChange:e=>t("options",e,"loop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10 mb10",label:(0,x.__)("Show Logo Caption","b-blocks"),checked:o.isCaptionVisible,onChange:e=>t("options",e,"isCaptionVisible")}),(0,l.jsx)(y.RangeControl,{className:"mt10 mb10",label:(0,x.__)("Slider Speed (ms)","b-blocks"),value:o.speed,step:.05,onChange:e=>t("options",e,"speed"),min:0,max:1e4}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Slider Delay Speed (ms)","b-blocks"),value:o.delay,step:.05,onChange:e=>t("options",e,"delay"),min:0,max:1e4}),(0,l.jsx)(y.RangeControl,{className:"mt10 mb10",label:(0,l.jsxs)(y.Flex,{children:["Logos Per View ",(0,l.jsx)(_,{})]}),value:o.logoView[n],onChange:e=>t("options",e,"logoView",n),step:1,min:1,max:20})]})})),iA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(nA,{...e}),(0,l.jsx)(oA,{...e})]}),aA=function({attributes:e,updateObj:t}){const{sliderStyles:n}=e,{caption:o}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Logo Caption","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Caption Visibility","b-blocks"),value:o.hover,options:[{value:"visible",label:"Always Visible"},{value:"hover",label:"Visible on Hover"}],onChange:e=>t("sliderStyles",e,"caption","hover")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color.text,onChange:e=>t("sliderStyles",e,"caption","color","text")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:o.color.bg,onChange:e=>t("sliderStyles",e,"caption","color","bg")})]})},sA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((function({attributes:e,setAttributes:t,updateObj:n,device:o}){const{sliderStyles:i,options:a}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Logo Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Height","b-blocks"),value:i.logo.height,onChange:e=>n("sliderStyles",e,"logo","height"),max:i.logo.height.includes("%")?100:1e3,min:0}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Width","b-blocks"),value:i.logo.width,onChange:e=>n("sliderStyles",e,"logo","width"),max:i.logo.width.includes("%")?100:1e3,min:0}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:["Column Gap ",(0,l.jsx)(_,{})]}),value:a.space[o],onChange:e=>n("options",e,"space",o),step:1,min:1,max:200}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i?.logo?.padding,onChange:e=>n("sliderStyles",e,"logo","padding")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Logo Fit Options","b-blocks"),value:i.logo.logoFitOption,options:XE,
489 +onChange:e=>n("sliderStyles",e,"logo","logoFitOption")}),(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Logo Hover Style","b-blocks"),value:i.logo.hover,options:[{value:"",label:"None"},{value:"logo-grayScale",label:"GrayScale"},{value:"zoomIn",label:"Zoom In"},{value:"zoomOut",label:"Zoom Out"}],onChange:e=>n("sliderStyles",e,"logo","hover")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i.logo.border,onChange:e=>n("sliderStyles",e,"logo","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i.logo.radius,onChange:e=>n("sliderStyles",e,"logo","radius")})]}),a.isCaptionVisible&&(0,l.jsx)(aA,{attributes:e,setAttributes:t,updateObj:n})]})})),rA=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(sA,{...e})}),lA=e=>{const{attributes:t,setAttributes:n,updateObj:o,activeIndex:i,setActiveIndex:a,isPremium:s}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:JE,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(iA,{attributes:t,setAttributes:n,updateObj:o,activeIndex:i,setActiveIndex:a})}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(rA,{attributes:t,setAttributes:n,updateObj:o})}),"advanced"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:t.advanced,onChange:e=>n({advanced:e}),isPremium:s})})]})})]})})};function cA(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 20 20",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})})}function dA(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 448 512",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"})})}const uA=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:o})=>{const{options:i,logo:a,sliderStyles:s}=e,{caption:r}=s,c={...i.pagination&&{"--b-blocks-logo-slider-slide-margin":"20px"},"--swiper-wrapper-transition-timing-function":i?.easing};return(0,l.jsx)("div",{className:"b-blocks-logo-slider-main-wrapper",style:c,children:(0,l.jsx)(Ux,{effect:i.effect,modules:[If,Of,Pf,Af,Bf],spaceBetween:50,slidesPerView:3,autoplay:!!i.autoplay&&{delay:i.delay,reverseDirection:"rightToLeft"!==i.direction,pauseOnMouseEnter:i?.isPauseOnHover},navigation:!!i.navigation&&{clickable:!0},draggable:!1,loop:Boolean(i.loop),speed:i.speed,autoHeight:!0,pagination:!!i.pagination&&{clickable:!0,dynamicBullets:i.dynamicPagination},breakpoints:{1024:{slidesPerView:i.logoView.desktop,spaceBetween:i.space.desktop},640:{slidesPerView:i.logoView.tablet,spaceBetween:i.space.tablet},0:{slidesPerView:i.logoView.mobile,spaceBetween:i.space.mobile}},children:a&&a.map(((e,c)=>(0,l.jsx)(Gx,{children:(0,l.jsx)("div",{style:{border:n===c?"2px solid #007CBA":"none",borderRadius:n===c?"4px":"none"},children:(0,l.jsx)("div",{className:"b-blocks-logo-slider-wrapper",children:(0,l.jsxs)("div",{className:"b-blocks-slider-logo-wrapper",onClick:()=>o(c),children:[(0,l.jsx)(dA,{onClick:()=>t({logo:a.filter(((e,t)=>t!==c))}),className:"b-blocks-logo-slider-block-delete-btn"}),(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image/*"],value:a[c]?.id?[a[c]?.id]:[],onSelect:e=>t(a.splice(c,1,e)),render:({open:e})=>(0,l.jsx)("div",{onClick:e,className:"b-blocks-b-blocks-losl-replace-plus-icon",children:(0,l.jsx)(cA,{className:"b-blocks-losl-replace-plus-icon"})}),multiple:!1})}),(0,l.jsx)("img",{className:`b-blocks-losl-logo ${s.logo.hover} `,src:e?.url||kn,alt:e?.alt}),e?.url&&(0,l.jsx)("div",{className:`b-blocks-logo-slider-block-caption ${"hover"===r.hover?"b-blocks-caption-hover":""} ${i.isCaptionVisible?"":"hidden"}`,children:(0,l.jsx)(h.RichText,{tagName:"span",value:e?.caption,allowedFormats:["core/bold","core/italic","core/link"],placeholder:"Write caption...",onChange:e=>t({logo:a?.map(((t,n)=>n===c?{...t,caption:e}:t))})})})]})})})},c)))})})},pA=(0,w.compose)((0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}})),(0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}}))))((e=>{const{attributes:t,setAttributes:n,clientId:o,selectBlock:i,device:a}=e,{logo:s,options:r}=t,[c,d]=(0,m.useState)(0),u=fe(t,n),p=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(lA,{attributes:t,setAttributes:n,updateObj:u,activeIndex:c,setActiveIndex:d,isPremium:p}),(0,l.jsx)(ZE,{setAttributes:n,attributes:t,activeIndex:c,setActiveIndex:d,updateObj:u}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),onClick:()=>i(o),children:[(0,l.jsx)(QE,{attributes:t,id:`block-${o}`,isBackend:!0}),s.length>0?(0,l.jsx)("div",{children:(0,l.jsx)(uA,{attributes:t,setAttributes:n,activeIndex:c,setActiveIndex:d},`${a}-${JSON.stringify(s?.length)}-${JSON.stringify(r)}-${JSON.stringify(r?.logoView)}`)}):(0,l.jsx)("div",{className:"b-blocks-logo-slider-media-upload-placeholder",children:(0,l.jsxs)(h.MediaUploadCheck,{children:[(0,l.jsx)("h4",{className:"b-blocks-logo-slider-media-upload-title",children:"Upload Logo(s)"}),(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],multiple:!0,gallery:!0,value:s.map((e=>e.id)),onSelect:e=>n({logo:e}),render:({open:e})=>(0,l.jsx)(Bn,{onClick:e,variant:"primary",children:"Media Library"})})]})})]})]})}));Pl(KE.name)&&(0,p.registerBlockType)(KE,{icon:Nr,edit:pA})
490 +;const hA=JSON.parse('{"apiVersion":3,"name":"b-blocks/lottie-player","title":"Lottie Player","description":"Lottie player for display lottie files.","category":"bBlocks","keywords":["lottie player","json player","lottie animation"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"playerAlign":{"type":"string","default":"center"},"file":{"type":"string","default":"https://assets4.lottiefiles.com/datafiles/zc3XRzudyWE36ZBJr7PIkkqq0PFIrIBgp4ojqShI/newAnimation.json"},"isControls":{"type":"boolean","default":true},"isAutoplay":{"type":"boolean","default":true},"isLoop":{"type":"boolean","default":true},"isHover":{"type":"boolean","default":false},"mode":{"type":"string","default":"normal"},"direction":{"type":"number","default":1},"count":{"type":"number","default":0},"speed":{"type":"number","default":1},"intermission":{"type":"number","default":0},"link":{"type":"string","default":""},"isLinkInNewTab":{"type":"boolean","default":false},"interactivity":{"type":"string","default":"noInteractivity"},"interactivityMode":{"type":"string","default":""},"interactivityContainer":{"type":"string","default":".wp-block-b-blocks-lottie-player"},"interactivityActions":{"type":"array","default":[]},"width":{"type":"string","default":""},"background":{"type":"string","default":"#0000"},"controlsHeight":{"type":"string","default":"35px"},"controlsBG":{"type":"string","default":"#0000"},"controlsIconColor":{"type":"string","default":"#146EF5"},"controlsIconHoverColor":{"type":"string","default":"#FF7A00"},"controlsIconActiveColor":{"type":"string","default":"#FF7A00"},"controlsTrackColor":{"type":"string","default":"#FF7A00"},"controlsThumbColor":{"type":"string","default":"#146EF5"},"isCap":{"type":"boolean","default":false},"caption":{"type":"string","default":"","selector":".bBlocksLottiePlayer .caption"},"capAlign":{"type":"string","default":"center"},"capColors":{"type":"object","default":{"color":"#333"}},"capTypo":{"type":"object","default":{"fontSize":{"desktop":{"desktop":"14px"}}}},"capPadding":{"type":"object","default":{"vertical":"5px","horizontal":"10px"}},"capMargin":{"type":"object","default":{"side":4,"top":"5px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","dotLottiePlayer","lottieInteractivity"]}'),gA=[{label:(0,x.__)("Normal","b-blocks"),value:"normal",icon:(0,x.__)("Normal","b-blocks")},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce",icon:(0,x.__)("Bounce","b-blocks")}],mA=[{label:(0,x.__)("Forward","b-blocks"),value:1,icon:(0,x.__)("Forward","b-blocks")},{label:(0,x.__)("Backward","b-blocks"),value:-1,icon:(0,x.__)("Backward","b-blocks")}],bA=[{label:(0,x.__)("No Interactivity","b-blocks"),value:"noInteractivity"},{label:(0,x.__)("Sync with scroll","b-blocks"),value:"syncWithScroll"},{label:(0,x.__)("Scroll relative to container","b-blocks"),value:"scrollRelativeToContainer"},{label:(0,x.__)("Scroll with offset","b-blocks"),value:"scrollWithOffset"},{label:(0,x.__)("Sync animation with cursor position","b-blocks"),value:"syncAnimationWithCursorPosition"},{label:(0,x.__)("Sync animation with cursor horizontal movement","b-blocks"),value:"syncAnimationWithCursorHorizontalMovement"},{label:(0,x.__)("Play animation on click","b-blocks"),value:"playAnimationOnClick"},{label:(0,x.__)("Play animation when visible","b-blocks"),value:"playAnimationWhenVisible"}],fA=((0,x.__)("Scroll","b-blocks"),(0,x.__)("Cursor","b-blocks"),(0,x.__)("Chain","b-blocks"),(0,x.__)("Seek","b-blocks"),(0,x.__)("Play","b-blocks"),(0,x.__)("Stop","b-blocks"),(0,x.__)("Loop","b-blocks"),(e,t,n,o)=>{t&&e?.setAttribute(n,o),!t&&e?.removeAttribute(n,o)}),xA=(e,t)=>({noInteractivity:[],syncWithScroll:[{visibility:[0,1],type:"seek",frames:[0,t]}],scrollRelativeToContainer:[{visibility:[0,1],type:"seek",frames:[0,t]}],scrollWithOffset:[{visibility:[0,.3],type:"stop",frames:[0]},{visibility:[.3,1],type:"seek",frames:[0,t]}],syncAnimationWithCursorPosition:[{position:{x:[0,1],y:[0,1]},type:"seek",frames:[0,t]}],syncAnimationWithCursorHorizontalMovement:[{position:{x:[0,1],y:[-1,2]},type:"seek",frames:[0,t]}],playAnimationOnClick:[{type:"click",forceFlag:!1}],toggleAnimation:[{type:"toggle"}],playAnimationWhenVisible:[{visibility:[.5,1],type:"play"}]}[e]),yA=({attributes:e,setAttributes:t,fileFrameSize:n,isPremium:i})=>{const{playerAlign:s,file:r,isControls:c,isAutoplay:d,isLoop:u,isHover:p,mode:g,direction:b=1,count:f,speed:k,intermission:w,link:_,isLinkInNewTab:C=!1,interactivity:j="noInteractivity",interactivityContainer:$=".wp-block-b-blocks-lottie-player",interactivityActions:S=[],width:T,background:N,controlsHeight:M,controlsBG:L,controlsIconColor:P,controlsIconHoverColor:E,controlsIconActiveColor:A,controlsTrackColor:B,controlsThumbColor:I,isCap:O=!1,caption:R="",capAlign:z="center",capTypo:D={},capColors:F={color:"#333"},capPadding:H={},capMargin:W={}}=e,[U,G]=(0,m.useState)(!1),V={isPremium:i,setIsProModalOpen:G},q={className:"bPlPanelBody",initialOpen:!1};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/lottie-player"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Player","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Lottie file url:","b-blocks")}),i?(0,l.jsx)(ve,{value:r,types:["application/json"],onChange:e=>t({file:e}),placeholder:(0,x.__)("Enter lottie file url","b-blocks")}):(0,l.jsx)(y.TextControl,{value:r,onChange:e=>t({file:e})}),(0,l.jsx)("small",{children:(0,x.__)("Support only .json or .lottie file!","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Controls","b-blocks"),checked:c,onChange:e=>t({isControls:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Autoplay","b-blocks"),checked:d,onChange:e=>t({isAutoplay:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Loop","b-blocks"),checked:u,onChange:e=>t({isLoop:e})}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Enable Hover","b-blocks"),checked:p,onChange:e=>t({isHover:e}),...V,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Mode:","b-blocks"),value:g,onChange:e=>t({mode:e}),options:gA,...V,Component:Tn}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Direction:","b-blocks"),value:b,onChange:e=>t({direction:parseInt(e)}),options:mA,...V,Component:Tn}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Count (Set 0 to infinite):","b-blocks"),value:f,onChange:e=>t({count:e}),min:0,max:50,step:1,...V,Component:y.RangeControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Speed:","b-blocks"),value:k,onChange:e=>t({speed:e}),min:.01,max:20,step:.01,...V,Component:y.RangeControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Interval (s):","b-blocks"),value:w,onChange:e=>t({intermission:e}),min:0,max:20,step:.01,...V,Component:y.RangeControl}),(0,l.jsx)(v,{children:(0,x.__)("Link the player:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:_,onChange:e=>t({link:e})}),(0,l.jsx)("small",{children:(0,x.__)("If you want to link the player, enter the link here. Otherwise, leave as blank.","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Open link in a new tab","b-blocks"),checked:C,onChange:e=>t({isLinkInNewTab:e}),...V,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Interactivity","b-blocks"),...q,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Interactivity:","b-blocks"),value:j,onChange:e=>t({interactivity:e,
491 +interactivityMode:["syncWithScroll","scrollRelativeToContainer","scrollWithOffset","playAnimationWhenVisible"].includes(e)?"scroll":["syncAnimationWithCursorPosition","syncAnimationWithCursorHorizontalMovement","playAnimationOnClick","toggleAnimation"].includes(e)?"cursor":"",interactivityContainer:"scrollRelativeToContainer"===e?".wp-block-lpb-lottie-player":$,interactivityActions:xA(e,n)}),options:bA,...V,Component:y.SelectControl}),(0,l.jsx)("small",{children:(0,x.__)("Upload file first then change interactivity option.","b-blocks")}),(0,l.jsx)("br",{}),(0,l.jsx)("small",{children:(0,x.__)("Interactivity will not working in backend(editor).","b-blocks")}),"scrollRelativeToContainer"===j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Container Selector","b-blocks")}),(0,l.jsx)(y.TextControl,{value:$,onChange:e=>t({interactivityContainer:e})}),(0,l.jsx)("small",{children:(0,x.__)("Enter container selector. Ex: if id enter '#id', if class '.class' or if tag 'tag name'","b-blocks")})]}),"scrollWithOffset"===j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt20",label:(0,x.__)("Offset (%)","b-blocks"),labelPosition:"left",value:100*S?.[0]?.visibility?.[1],onChange:e=>t({interactivityActions:zb(S,(t=>{t[0].visibility[1]=parseFloat(e)/100,t[1].visibility[0]=parseFloat(e)/100}))})}),(0,l.jsx)("small",{children:(0,x.__)(`Scroll animation when lottie player reached at ${100*S?.[0]?.visibility?.[1]} % of viewport`,"b-blocks")})]}),"playAnimationWhenVisible"===j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt20",label:(0,x.__)("Offset (%)","b-blocks"),labelPosition:"left",value:100*S?.[0]?.visibility?.[0],onChange:e=>((e,n,o,i=null)=>{const a=zb(S,(t=>{null!==i?t[e][n][i]=o:t[e][n]=o}));t({interactivityActions:a})})(0,"visibility",parseFloat(e)/100,0)}),(0,l.jsx)("small",{children:(0,x.__)(`Play animation when lottie player reached at ${100*S?.[0]?.visibility?.[0]} % of viewport`,"b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Caption","b-blocks"),...q,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Show Caption","b-blocks"),checked:O,onChange:e=>t({isCap:e}),...V,Component:y.ToggleControl}),O&&(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Text:","b-blocks"),value:R,onChange:e=>t({caption:e}),...V,Component:y.TextControl})]})]}),"style"==e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Player","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:T,onChange:e=>t({width:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:N,onChange:e=>t({background:e}),defaultColor:"#0000"})]}),c&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Controls","b-blocks"),...q,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:M,onChange:e=>t({controlsHeight:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:L,onChange:e=>t({controlsBG:e}),defaultColor:"#0000"}),(0,l.jsx)(Ue,{label:(0,x.__)("Icons Color:","b-blocks"),value:P,onChange:e=>t({controlsIconColor:e}),defaultColor:o}),(0,l.jsx)(Ue,{label:(0,x.__)("Icons Hover Color:","b-blocks"),value:E,onChange:e=>t({controlsIconHoverColor:e}),defaultColor:a}),(0,l.jsx)(Ue,{label:(0,x.__)("Icons Active Color:","b-blocks"),value:A,onChange:e=>t({controlsIconActiveColor:e}),defaultColor:a}),(0,l.jsx)(Ue,{label:(0,x.__)("Track Color:","b-blocks"),value:B,onChange:e=>t({controlsTrackColor:e}),defaultColor:a}),(0,l.jsx)(Ue,{label:(0,x.__)("Thumb Color:","b-blocks"),value:I,onChange:e=>t({controlsThumbColor:e}),defaultColor:o})]}),O&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Caption","b-blocks"),...q,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Text Align:","b-blocks"),value:z,onChange:e=>t({capAlign:e}),options:Jt,isIcon:!0,size:i?"medium":"small",...V,Component:Tn}),(0,l.jsx)(Ya,{label:(0,x.__)("Typography:","b-blocks"),value:D,onChange:e=>t({capTypo:e}),defaults:{fontSize:{desktop:14,tablet:14,mobile:14}},...V,Component:Oa}),(0,l.jsx)(Ya,{label:(0,x.__)("Colors:","b-blocks"),value:F,onChange:e=>t({capColors:e}),...V,Component:On}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:H,onChange:e=>t({capPadding:e}),defaults:{vertical:"10px",horizontal:"10px"},...V,Component:ad}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:W,onChange:e=>t({capMargin:e}),defaults:{side:4,top:"5px"},...V,Component:ad})]})]})]})})}),(0,l.jsxs)(jn,{isProModalOpen:U,setIsProModalOpen:G,block:"Lottie Player",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Upload File ","b-blocks")}),(0,x.__)("Upload Lottie JSON files from the media library.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Hover ","b-blocks")}),(0,x.__)("Play the Lottie animation on mouseover.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Mode ","b-blocks")}),(0,x.__)("Choose between normal and bounce modes.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Direction ","b-blocks")}),(0,x.__)("Set the animation direction to forward or backward.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Count ","b-blocks")}),(0,x.__)("Specify how many times the animation will play.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Speed ","b-blocks")}),(0,x.__)("Adjust the player speed.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Interval ","b-blocks")}),(0,x.__)("Set the autoplay interval.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Link Tab ","b-blocks")}),(0,x.__)("Option to open the link in a new tab.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Interactivity ","b-blocks")}),(0,x.__)("Define interactivity options to determine when and where the animation will play.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Caption ","b-blocks")}),(0,x.__)("Add a caption for the Lottie player.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Caption Style ","b-blocks")}),(0,x.__)("Style the caption, including text alignment, typography, text and background colors, padding, and margin.","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:s,onChange:e=>t({playerAlign:e}),describedBy:(0,x.__)("Player Alignment"),alignmentControls:[{title:(0,x.__)("Player in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Player in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Player in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},vA="bBlocksLottiePlayer",kA=({attributes:e,id:t})=>{const{playerAlign:n,link:o,width:i,controlsHeight:a,controlsBG:s,controlsIconColor:r,controlsIconHoverColor:c,controlsIconActiveColor:d,controlsTrackColor:u,controlsThumbColor:p,capAlign:h="center",capTypo:g={},capColors:m={color:"#333"},capPadding:b={},capMargin:f={}}=e,x=`#${t} .${vA}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
492 +__html:`\n\t\t${ps("",g)?.googleFontLink}\n\t\t${ps(`${x} .caption`,g)?.styles}\n\n\t\t${x}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${x} dotlottie-player{\n\t\t\twidth: ${i};\n\t\t\tcursor: ${o?"pointer":"auto"};\n\t\t\t--lottie-player-toolbar-height: ${a};\n\t\t\t--lottie-player-toolbar-background-color: ${s};\n\t\t\t--lottie-player-toolbar-icon-color: ${r};\n\t\t\t--lottie-player-toolbar-icon-hover-color: ${c};\n\t\t\t--lottie-player-toolbar-icon-active-color: ${d};\n\t\t\t--lottie-player-seeker-track-color: ${u};\n\t\t\t--lottie-player-seeker-thumb-color: ${p};\n\t\t}\n\t\t${x} .caption{\n\t\t\twidth: ${i};\n\t\t\ttext-align: ${h};\n\t\t\t${ss(m)};\n\t\t\tpadding: ${us(b)};\n\t\t\tmargin: ${us(f)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},wA=(0,m.forwardRef)((({attributes:e},t)=>{const{file:n,isControls:o,isAutoplay:i,isLoop:a,isHover:s,mode:r,direction:c=1,count:d,speed:u,intermission:p,background:h}=e;return(0,m.useEffect)((()=>{if(t?.current){const e=!!a&&(!(0<d)||d);fA(t?.current,o,"controls",""),fA(t?.current,i,"autoplay",""),fA(t?.current,a,"loop",e),fA(t?.current,s,"hover","")}}),[t]),(0,l.jsx)("dotlottie-player",{ref:t,src:n,autoplay:!0,loop:!0,mode:r,speed:u,direction:c,intermission:1e3*p,background:h,debug:!0})}));Pl(hA.name)&&(0,p.registerBlockType)(hA,{icon:Mr,transforms:{from:[{type:"block",blocks:["lpb/lottie-player"],transform:e=>(0,p.createBlock)("b-blocks/lottie-player",e)},{type:"prefix",prefix:"lottie",transform:()=>(0,p.createBlock)("b-blocks/lottie-player")}],to:[{type:"block",blocks:["lpb/lottie-player"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("lpb/lottie-player",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{file:i,isControls:a,isAutoplay:s,isLoop:r,isHover:c,mode:d,direction:u=1,count:p,speed:g,intermission:b,background:f,isCap:x=!1,caption:y=""}=t,v=bBlocksPremiumChecker,k=(0,m.useRef)(null),[w,_]=(0,m.useState)(0),C=e=>{e.addEventListener("ready",(()=>{const{animationData:t}=e.getLottie()||{};_(Math.round(t?.op||100))}))},j=`block-${o}`,$=document.querySelector(`#${j} .${vA} .lottieHolder`);return(0,m.useEffect)((()=>{$&&($.innerHTML="");const e=!!r&&(!(0<p)||p),t=document.createElement("dotlottie-player");fA(t,i,"src",i),fA(t,a,"controls",""),fA(t,s,"autoplay",""),fA(t,r,"loop",e),fA(t,c,"hover",""),fA(t,d,"mode",d),fA(t,g,"speed",g),fA(t,!0,"direction",u),fA(t,b,"intermission",1e3*b),fA(t,f,"background",f),fA(t,!0,"debug"),$&&$.appendChild(t),C(t)}),[i,a,s,r,c,d,u,p,g,b,f]),(0,m.useEffect)((()=>{const e=k?.current;C(e)}),[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(yA,{attributes:t,setAttributes:n,fileFrameSize:w,isPremium:v}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(kA,{attributes:t,id:j}),(0,l.jsxs)("div",{className:vA,children:[(0,l.jsx)("span",{className:"lottieHolder",children:(0,l.jsx)(wA,{ref:k,attributes:t})}),x&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)("span",{className:"caption",children:y})]})]})]})]})},save:()=>null});const _A=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/list","version":"1.0.0","title":"List","category":"bBlocks","description":"A customizable list block with support for icons, custom markers, and flexible layouts.","keywords":["list","list block"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"desktop":{"type":"vertical","verticalAlign":"flex-start","horizontalAlign":"flex-start"},"tablet":{"type":"","verticalAlign":"","horizontalAlign":""},"mobile":{"type":"","verticalAlign":"","horizontalAlign":""}}},"items":{"type":"array","default":[{"text":"List Item","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z\'/></svg>","link":"","newWindow":false,"textColor":"","markerColor":""}]},"marker":{"type":"object","default":{"markerType":"","position":"","align":"","icon":"","emoji":"👉"}},"styles":{"type":"object","default":{"lists":{"color":"","bg":"","typography":{"fontSize":{"desktop":"20px","tablet":"","mobile":""}},"desktop":{"gap":{"horizontal":"","vertical":""}},"tablet":{"gap":{"horizontal":"","vertical":""}},"mobile":{"gap":{"horizontal":"","vertical":""}}},"divider":{"style":"solid","weight":"5px","width":"100px","color":"#000","isEnabled":false},"marker":{"color":"","size":"","iconSize":"","bg":"","gap":"10px","desktop":{"padding":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"tablet":{"padding":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"mobile":{"padding":{"top":"","bottom":"","left":"","right":""},"radius":{"top":"","bottom":"","left":"","right":""}},"border":{}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),CA=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],jA=[{label:"None",value:""},{label:"Icon",value:"icon"},{label:"Disc",value:"disc"},{label:"Square",value:"square"},{label:"Emoji",value:"emoji"}],$A=[{label:"None",value:""},{label:"Solid",value:"solid"},{label:"Double",value:"double"},{label:"Dashed",value:"dashed"},{label:"Dotted",value:"dotted"}],SA=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),TA=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),NA=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{
493 +d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),MA=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0-17.7-14.3-32-32-32L32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32zm0 256c0-17.7-14.3-32-32-32L32 288c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 192c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32zM448 448c0-17.7-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32z"})}),LA=e=>{const{attributes:t,updateObj:n,index:o}=e,{items:i}=t,a=i[o];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Text","b-blocks"),value:a.text,onChange:e=>n("items",e,o,"text")}),(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon","b-blocks"),value:a.icon,onChange:e=>n("items",e,o,"icon")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Link","b-blocks"),value:a.link,onChange:e=>n("items",e,o,"link")}),(0,l.jsx)(y.CheckboxControl,{label:(0,x.__)("Open in new window","b-blocks"),checked:a.newWindow,onChange:e=>n("items",e,o,"newWindow")})]})},PA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,updateObj:t,setAttributes:n,device:o})=>{const{layout:i,items:a}=e,s={text:`List Item ${a.length+1}`,icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z'/></svg>",link:"",newWindow:!1,textColor:"",markerColor:""};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lists Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(v,{className:"mb0",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Layout","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i[o].type,onChange:e=>{t("layout",e,o,"type")},className:"mt10",children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"vertical"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"horizontal"})]}),"vertical"===i[o].type&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",gap:5,children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i[o].verticalAlign,onChange:e=>t("layout",e,o,"verticalAlign"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:SA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:TA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:" flex-end",icon:NA})]})]}),"horizontal"===i[o].type&&(0,l.jsxs)("div",{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt5",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i[o].horizontalAlign,onChange:e=>t("layout",e,o,"horizontalAlign"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:SA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:TA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:NA}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Justify",value:"space-between",icon:MA})]})]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lists","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:n,newItem:s,design:"sortable",itemLabel:"List",arrKey:"items",title:"text",ItemSettings:LA,updateObj:t})})]})})),EA=e=>{const{attributes:t,updateObj:n}=e,{marker:o}=t,{markerType:i}=o,a=e=>(0,x.__)(e,"b-blocks");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Marker","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1 mt0",children:a("Marker Type")}),(0,l.jsx)(y.SelectControl,{className:"flex1",options:jA,value:i,onChange:e=>n("marker",e,"markerType")})]}),"emoji"===i&&(0,l.jsx)(y.TextControl,{label:a("Emoji"),value:o.emoji,onChange:e=>n("marker",e,"emoji")})]})},AA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(PA,{...e}),(0,l.jsx)(EA,{...e})]}),BA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n}=e,{styles:o,layout:i}=t,{divider:a}=o;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Divider","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Divider","b-blocks"),checked:a.isEnabled,onChange:e=>n("styles",e,"divider","isEnabled")}),a.isEnabled&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Style","b-blocks")}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:a.style,options:$A,onChange:e=>n("styles",e,"divider","style")})]}),(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Weight","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.weight,labelPosition:"edge",onChange:e=>n("styles",e,"divider","weight")})]}),"vertical"===i?.desktop.type&&(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.width,labelPosition:"edge",onChange:e=>n("styles",e,"divider","width")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color,onChange:e=>n("styles",e,"divider","color")})]})]})})),IA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{lists:a}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Lists Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color,onChange:e=>n("styles",e,"lists","color")}),(0,l.jsx)(Oa,{value:a.typography,onChange:e=>n("styles",e,"lists","typography")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Space Between","b-blocks")," ",(0,l.jsx)(_,{})]}),
494 +labelPosition:"edge",value:a[o].gap.horizontal,onChange:e=>n("styles",e,"lists",o,"gap","horizontal")})]})})),OA=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,marker:a}=t,{markerType:s}=a,{marker:r}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Marker Style","b-blocks"),initialOpen:!1,children:["emoji"!==s&&(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r.color,onChange:e=>n("styles",e,"marker","color")}),"icon"!==s&&"emoji"!==s&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Marker Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.size,onChange:e=>n("styles",e,"marker","size")})]}),("icon"===s||"emoji"===s)&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Icon/Emoji Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.iconSize,onChange:e=>n("styles",e,"marker","iconSize")})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mt0 flex1",children:(0,x.__)("Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:r.gap,onChange:e=>n("styles",e,"marker","gap")})]}),"icon"===s&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:r.bg,onChange:e=>n("styles",e,"marker","bg"),isImage:!1}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o].padding,onChange:e=>n("styles",e,"marker",o,"padding")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:r.border,onChange:e=>n("styles",e,"marker","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:r[o].radius,onChange:e=>n("styles",e,"marker",o,"radius")})]})]})})),RA=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(IA,{...e}),(0,l.jsx)(BA,{...e}),(0,l.jsx)(OA,{...e})]}),zA=e=>{const{attributes:t,setAttributes:n}=e,{items:o}=t,i={text:`List Item ${o.length+1}`,icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z'/></svg>",link:"",newWindow:!1,textColor:"",markerColor:""};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",initialTabName:"general",activeClass:"activeTab",tabs:CA,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(AA,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(RA,{...e})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New List","b-blocks"),onClick:()=>n({items:[...o,i]}),children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})})})]})},DA=({attributes:e,id:o})=>{const{layout:i,styles:a}=e,{lists:s,divider:r,marker:c}=a,d=`#${o} .bBlocksListMainWrapper .bBlocksListContainer`,u=`${d} .bBlocksListItem`,p=`${u} .bBlocksListItemText`,h=`${d} .bBlocksListItemDivider`,g=`${u} .bBlocksListMarkerIcon`,m=`${u} .bBlocksListMarkerEmoji`,b=`${u} .bBlocksListMarker`,f=e=>"vertical"===i[e].type?"flex-direction:column;":"horizontal"===i[e].type?"flex-direction:row;":"",x=e=>("vertical"===i[e].type?ns("align-items",i[e].verticalAlign):"")+("horizontal"===i[e].type?ns("justify-content",i[e].horizontalAlign):""),y=e=>("horizontal"===i[e].type?`${ns("border-right-style",r.style)}\n\t\t\t${ns("border-right-width",r.weight)}\n\t\t\t${ns("border-right-color",r.color)}`:"")+("vertical"===i[e].type?`${ns("border-bottom-style",r.style)}\n\t\t\t${ns("border-bottom-width",r.weight)}\n\t\t\t${ns("border-bottom-color",r.color)} \n\t\t\t${ns("width",r.width)}`:"");return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${ps("",s.typography).googleFontLink}\n\t\t${ps(p,s.typography).styles}\n\n\t\t${d}{\n\t\t\t${f("desktop")}\n\t\t\t${x("desktop")}\n\t\t\t${ns("gap",s.desktop.gap.horizontal)}\n\t\t}\n\t\t${u}{\n\t\t\t${ns("gap",c.gap)}\n\t\t}\n\t\t${p}{\n\t\t\t${ns("color",s.color)}\n\t\t}\n\t\t${h}{\n\t\t\t${y("desktop")}\n\t\t}\n\t\t\n\t\t${g}{\n\t\t\t${os(c.bg)}\n\t\t\t${ns("padding",hs(c.desktop.padding))}\n\t\t\t${ns("border-radius",hs(c.desktop.radius))}\n\t\t\t${as(c.border)}\n\t\t}\n\n\t\t${g}>svg{\n\t\t\t${ns("fill",c.color)}\n\t\t\t${ns("width",c.iconSize)}\n\t\t\t${ns("height",c.iconSize)}\n\t\t}\n\n\t\t${m}{\n\t\t\t${ns("font-size",c.iconSize)}\n\t\t}\n\n\t\t${b}{\n\t\t\t${ns("background",c.color)}\n\t\t\t${ns("height",c.size)}\n\t\t\t${ns("width",c.size)}\n\t\t}\n\n\t\t${t}{\n\t\t\t${d}{\n\t\t\t\t${f("tablet")}\n\t\t\t\t${x("tablet")}\n\t\t\t\t${ns("gap",s.tablet.gap.horizontal)}\n\t\t\t}\n\n\t\t\t${h}{\n\t\t\t\t${y("tablet")}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${ns("padding",hs(c.tablet.padding))}\n\t\t\t\t${ns("border-radius",hs(c.tablet.radius))}\n\t\t\t}\n\n\t\t}\n\n\t\t${n}{\n\t\t\t${d}{\n\t\t\t\t${f("mobile")}\n\t\t\t\t${x("mobile")}\n\t\t\t\t${ns("gap",s.mobile.gap.horizontal)}\n\t\t\t}\n\n\t\t\t${h}{\n\t\t\t\t${y("mobile")}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${ns("padding",hs(c.mobile.padding))}\n\t\t\t\t${ns("border-radius",hs(c.mobile.radius))}\n\t\t\t}\n\n\t\t}\n\n\t`}})},FA=({attributes:e,updateObj:t})=>{const{items:n=[],marker:o,styles:i}=e,{divider:a}=i,{markerType:s}=o,r=e=>{switch(s){case"emoji":return(0,l.jsx)("span",{className:"bBlocksListMarkerEmoji",children:o.emoji});case"icon":return e?(0,l.jsx)("span",{className:"bBlocksListMarkerIcon",dangerouslySetInnerHTML:{__html:e}}):null;case"disc":return(0,l.jsx)("span",{className:"bBlocksListMarkerDisc bBlocksListMarker"});case"square":return(0,l.jsx)("span",{className:"bBlocksListMarkerSquare bBlocksListMarker"});default:return null}};return(0,l.jsx)("div",{className:"bBlocksListMainWrapper",children:(0,l.jsx)("div",{className:"bBlocksListContainer",children:n.length>0&&n.map(((e,o)=>(0,l.jsxs)(m.Fragment,{children:[(0,l.jsxs)("a",{className:"bBlocksListItem",rel:"noopener noreferrer",children:[r(e.icon),(0,l.jsx)(h.RichText,{className:"bBlocksListItemText",tagName:"span",placeholder:"Write your list text",value:e.text,onChange:e=>t("items",e,o,"text")})," "]}),o<n.length-1&&a.isEnabled&&(0,l.jsx)("div",{className:"bBlocksListItemDivider"})]},o)))})})};Pl(_A.name)&&(0,p.registerBlockType)(_A,{icon:el,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(zA,{attributes:t,setAttributes:n,updateObj:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(DA,{attributes:t,id:`block-${o}`}),(0,l.jsx)(FA,{attributes:t,updateObj:i})]})]})}})
495 +;const HA=JSON.parse('{"apiVersion":3,"name":"b-blocks/mailto","title":"Mail To","description":"Mail with a single click.","category":"bBlocks","keywords":["Send mail","Mail us","Email sending"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"mailtoAlign":{"type":"string","default":"center"},"receiverMail":{"type":"string","default":""},"style":{"type":"string","default":"default"},"btn":{"type":"string","selector":"a.mailtoButton span","default":"Send E-mail"},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"22px","tablet":"20px","mobile":"18px"},"fontWeight":600}},"btnColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"btnHovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"btnPadding":{"type":"object","default":{"vertical":"18px","horizontal":"45px"}},"btnBorder":{"type":"object","default":{"radius":"50px"}},"icon":{"type":"object","default":{"class":"fa fa-paper-plane"}},"iconPosition":{"type":"string","default":"left"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":["file:./view.js","mailtoui"]}'),WA=[{label:"Default",value:"default"},{label:"Style 1",value:"style1"},{label:"Style 2",value:"style2"},{label:"Style 3",value:"style3"}],UA=({settings:e})=>{const{attributes:{mailtoAlign:t,receiverMail:n,style:i,btnTypo:s,btnColors:r,btnHovColors:c,btnPadding:d,btnBorder:u,icon:p,iconPosition:g},setAttributes:m}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:pn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Mail Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("E-mail Address:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:n,onChange:e=>m({receiverMail:e}),placeholder:(0,x.__)("Email Address","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,onChange:e=>{m({style:e}),"default"===e&&m({btnColors:{color:"#fff",bg:o,styles:`color: #fff; background: ${o};`},btnHovColors:{color:"#fff",bg:a,styles:`color: #fff; background: ${a};`},iconPosition:"left"}),"style1"===e&&m({btnColors:{color:"#fff",bg:o,styles:`color: #fff; background: ${o};`},btnHovColors:{color:"#fff",bg:a,styles:`color: #fff; background: ${a};`},iconPosition:"right"}),"style2"===e&&m({btnColors:{color:"#fff",bg:"#57d0ff",styles:"color: #fff; background: #57d0ff;"},btnHovColors:{color:"#fff",bg:"#50e38b",styles:"color: #fff; background: #50e38b;"},iconPosition:"left"}),"style3"===e&&m({btnColors:{color:"#fff",bg:"#57d0ff",styles:"color: #fff; background: #57d0ff;"},btnHovColors:{color:"#fff",bg:"#50e38b",styles:"color: #fff; background: #50e38b;"},iconPosition:"right"})},options:WA})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:s,onChange:e=>m({btnTypo:e}),defaults:{fontSize:{desktop:22,tablet:20,mobile:18},fontWeight:600}}),(0,l.jsx)(On,{value:r,onChange:e=>m({btnColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:c,onChange:e=>m({btnHovColors:e}),defaults:{color:"#fff",bg:a}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:d,onChange:e=>m({btnPadding:e}),defaults:{vertical:"18px",horizontal:"45px"}}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:u,onChange:e=>m({btnBorder:e}),defaults:{radius:"50px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Un,{value:p,onChange:e=>m({icon:e}),defaults:{class:"fa fa-paper-plane"},isSize:!1,isColor:!1}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Position:","b-blocks")}),(0,l.jsx)(Tn,{value:g,onChange:e=>m({iconPosition:e}),options:[{label:"Left",value:"left",icon:"LEFT"},{label:"Right",value:"right",icon:"RIGHT"}]})]})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:t,onChange:e=>m({mailtoAlign:e}),describedBy:(0,x.__)("Mail Button Alignment"),alignmentControls:[{title:(0,x.__)("Mail Button in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Mail Button in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Mail Button in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},GA="bBlocksMailto";Pl(HA.name)&&(0,p.registerBlockType)(HA,{icon:Lr,edit:e=>{const{attributes:{mailtoAlign:t,btn:n,btnTypo:o,btnColors:i,btnHovColors:a,btnPadding:s,btnBorder:r,icon:c,iconPosition:d},setAttributes:u,clientId:p}=e,g=`#block-${p} .${GA}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(UA,{settings:e}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${ps("",o)?.googleFontLink}\n\t\t\t\t${ps(`${g} a.mailtoButton`,o)?.styles}\n\n\t\t\t\t${g}{\n\t\t\t\t\ttext-align: ${t};\n\t\t\t\t}\n\t\t\t\t${g} a.mailtoButton{\n\t\t\t\t\t${ss(i)}\n\t\t\t\t\tpadding: ${us(s)};\n\t\t\t\t\t${is(r)}\n\t\t\t\t\tbox-shadow: 0px 5px 20px 0px ${i?.bg};\n\t\t\t\t}\n\t\t\t\t${g} a.mailtoButton:hover{\n\t\t\t\t\t${ss(a)}\n\t\t\t\t\tbox-shadow: 0px 5px 20px 0px ${a?.bg};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsx)("div",{className:GA,children:(0,l.jsxs)("a",{href:"#",className:"mailtoui mailtoButton",children:["left"===d&&c?.class&&(0,l.jsx)("i",{className:c?.class}),(0,l.jsx)(h.RichText,{tagName:"span",value:n,onChange:e=>u({btn:e}),placeholder:(0,x.__)("Send E-mail","b-blocks"),inlineToolbar:!0}),"right"===d&&c?.class&&(0,l.jsx)("i",{className:c?.class})]})})]})]})},save:()=>null})
496 +;const VA=JSON.parse('{"apiVersion":3,"name":"b-blocks/media-text-section","title":"Media & Text Section","description":"A two-panel image/video beside rich content section with sticky media, image effects, per-panel styling, and responsive stacking.","category":"bBlocks","keywords":["media text","image text","split content","feature section","two column"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"full"},"layout":{"type":"object","default":{"desktop":{"direction":"row","alignItems":"center"},"tablet":{"direction":"","alignItems":""},"mobile":{"direction":"","alignItems":""}}},"styles":{"type":"object","default":{"layout":{"desktop":{"ratio":{"media":"50%","content":"50%","splitRatio":"50-50"},"gap":"20px"},"tablet":{"ratio":{"media":"","content":"","splitRatio":""},"gap":""},"mobile":{"ratio":{"media":"","content":"","splitRatio":""},"gap":""}},"media":{"image":{"objFit":"contain"},"video":{"objFit":"contain"},"shadow":{},"overlay":{"bg":{},"opacity":0.5,"isOverlay":false},"bg":{},"border":{},"radius":{"left":"","right":"","top":"","bottom":""},"desktop":{"padding":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"left":"","right":"","top":"","bottom":""}}},"content":{"bg":{},"desktop":{"padding":{"left":"","right":"","top":"","bottom":""},"radius":{"left":"","right":"","top":"","bottom":""}},"tablet":{"padding":{"left":"","right":"","top":"","bottom":""},"radius":{"left":"","right":"","top":"","bottom":""}},"mobile":{"padding":{"left":"","right":"","top":"","bottom":""},"radius":{"left":"","right":"","top":"","bottom":""}},"border":{},"shadow":{}}}},"media":{"type":"object","default":{"mediaType":"image","image":{},"video":{"url":"","poster":{},"autoplay":false,"loop":true,"muted":true,"controls":true,"allowDownload":false,"allowFullscreen":true,"allowPip":true,"controlsOnHover":false},"stickyMedia":false}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":""},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":""},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":""}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true,"customClassName":true},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),qA=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"})]}),YA=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"})]}),KA=e=>(0,l.jsxs)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,l.jsx)("path",{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"})]}),QA=[{label:"30 / 70",value:"30-70"},{label:"40 / 60",value:"40-60"},{label:"50 / 50",value:"50-50"},{label:"60 / 40",value:"60-40"},{label:"70 / 30",value:"70-30"},{label:"Custom",value:"custom"}],ZA=e=>{const{attributes:t,updateObj:n,device:o}=e,{layout:i,styles:a,media:s}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Direction","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.direction,onChange:e=>n("layout",e,o,"direction"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row",value:"row",icon:(0,l.jsx)(y.Dashicon,{icon:"align-pull-left"})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Row Reverse",value:"row-reverse",icon:(0,l.jsx)(y.Dashicon,{icon:"align-pull-right"})})]})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Alignment","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",size:"small",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o]?.alignItems,onChange:e=>n("layout",e,o,"alignItems"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Top",value:"flex-start",icon:(0,l.jsx)(qA,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:(0,l.jsx)(YA,{})}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Bottom",value:"flex-end",icon:(0,l.jsx)(KA,{})})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:a.layout[o]?.gap,onChange:e=>n("styles",e,"layout",o,"gap")})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Split Ratio","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",help:(0,x.__)("Media / content column widths.","b-blocks"),value:a.layout[o]?.ratio?.splitRatio,options:QA,onChange:e=>{n("styles","30-70"===e?{media:"30%",content:"70%",splitRatio:e}:"40-60"===e?{media:"40%",content:"60%",splitRatio:e}:"50-50"===e?{media:"50%",content:"50%",splitRatio:e}:"60-40"===e?{media:"60%",content:"40%",splitRatio:e}:"70-30"===e?{media:"70%",content:"30%",splitRatio:e}:{...a.layout[o]?.ratio,splitRatio:e
497 +},"layout",o,"ratio")},__nextHasNoMarginBottom:!0}),"custom"===a.layout[o]?.ratio?.splitRatio&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Media Width","b-blocks"),className:"flex1",value:a.layout[o]?.ratio.media,onChange:e=>n("styles",e,"layout",o,"ratio","media")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Content Width","b-blocks"),className:"flex1",value:a.layout[o]?.ratio.content,onChange:e=>n("styles",e,"layout",o,"ratio","content")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Media","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex1",children:(0,x.__)("Media Type","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:s.mediaType,onChange:e=>n("media",e,"mediaType"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Image",value:"image"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Video",value:"video"})]})]}),(0,l.jsx)("br",{}),"image"===s.mediaType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(we,{height:"100%",width:"100%",value:s.image,onChange:e=>n("media",e,"image")}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"flex1 mt10",children:(0,x.__)("Object Fit","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a.media.image.objFit,onChange:e=>n("styles",e,"media","image","objFit"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Cover",value:"cover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Contain",value:"contain"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Fill",value:"fill"})]})]})]}),"video"===s.mediaType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ve,{placeholder:(0,x.__)("Enter Video URL","b-blocks"),value:s.video?.url,onChange:e=>n("media",e,"video","url"),types:["video/*"]}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Video Poster","b-blocks")}),(0,l.jsx)(we,{height:"100%",width:"100%",value:s.video?.poster,onChange:e=>n("media",e,"video","poster")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Autoplay","b-blocks"),checked:!!s.video?.autoplay,onChange:e=>n("media",e,"video","autoplay")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Loop","b-blocks"),checked:!1!==s.video?.loop,onChange:e=>n("media",e,"video","loop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Muted","b-blocks"),checked:!1!==s.video?.muted,onChange:e=>n("media",e,"video","muted")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Controls Bar","b-blocks"),checked:!1!==s.video?.controls,onChange:e=>n("media",e,"video","controls")}),!1!==s.video?.controls&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show controls on hover","b-blocks"),checked:!!s.video?.controlsOnHover,onChange:e=>n("media",e,"video","controlsOnHover")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Allow Download","b-blocks"),checked:!!s.video?.allowDownload,onChange:e=>n("media",e,"video","allowDownload")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Allow Fullscreen","b-blocks"),checked:!1!==s.video?.allowFullscreen,onChange:e=>n("media",e,"video","allowFullscreen")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Allow Picture-in-Picture","b-blocks"),checked:!1!==s.video?.allowPip,onChange:e=>n("media",e,"video","allowPip")}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"flex1 mt10",children:(0,x.__)("Object Fit","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:a.media.video?.objFit,onChange:e=>n("styles",e,"media","video","objFit"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Cover",value:"cover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Contain",value:"contain"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Fill",value:"fill"})]})]})]})]})]})},XA=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{content:a}=i;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})," "]}),values:a[o].padding,onChange:e=>n("styles",e,"content",o,"padding")}),(0,l.jsx)(An,{value:a.bg,onChange:e=>n("styles",e,"content","bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>n("styles",e,"content","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})," "]}),values:a[o].radius,onChange:e=>n("styles",e,"content",o,"radius")}),(0,l.jsx)(yt,{value:a.shadow,onChange:e=>n("styles",e,"content","shadow")})]})})},JA=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{media:a}=i;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Media","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:a[o].padding,onChange:e=>n("styles",e,"media",o,"padding")}),(0,l.jsx)(An,{value:a.bg,onChange:e=>n("styles",e,"media","bg")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:a.border,onChange:e=>n("styles",e,"media","border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:a.radius,onChange:e=>n("styles",e,"media","radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:a.shadow,onChange:e=>n("styles",e,"media","shadow")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Overlay","b-blocks"),checked:a.overlay.isOverlay,onChange:e=>n("styles",e,"media","overlay","isOverlay")}),a.overlay.isOverlay&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Overlay Color","b-blocks"),value:a.overlay.bg,onChange:e=>n("styles",e,"media","overlay","bg")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Opacity","b-blocks"),value:"number"==typeof a.overlay.opacity?a.overlay.opacity:parseFloat(a.overlay.opacity)||.5,onChange:e=>n("styles",e,"media","overlay","opacity"),min:0,max:1,step:.1})]})]})})},eB=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(JA,{...e}),(0,l.jsx)(XA,{...e})]}),tB=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:JE,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ZA,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(eB,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e})})})]})})})})},nB=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:a,styles:s,media:r,advanced:c}=e,d=`#${o} .b-blocks-media-text-section-wrapper`,u=`${d} .b-blocks-media-text-section-media`,p=`${d} .b-blocks-media-text-section-content`,h=`${u} .b-blocks-media-text-section-media-el`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
498 +__html:`\n ${d}{\n ${ns("flex-direction",a.desktop.direction)}\n ${ns("align-items",a.desktop.alignItems)}\n ${ns("gap",s.layout.desktop.gap)}\n }\n\n ${u}{\n position:relative;\n ${ns("width",s.layout.desktop.ratio.media)}\n ${ns("padding",hs(s.media.desktop.padding))}\n ${as(s.media.border)}\n ${ns("border-radius",hs(s.media.radius))}\n ${os(s.media.bg)}\n ${ns("box-shadow",ls(s.media.shadow))}\n }\n\n ${s.media.overlay.isOverlay?`${u}::before{\n content:'';\n position:absolute;\n inset:0;\n pointer-events:none;\n z-index:2;\n ${os(s.media.overlay.bg)}\n ${ns("opacity",s.media.overlay.opacity)}\n }`:""}\n\n ${p}{\n ${ns("width",s.layout.desktop.ratio.content)}\n ${ns("padding",hs(s.content.desktop.padding))}\n ${os(s.content.bg)}\n ${as(s.content.border)}\n ${ns("border-radius",hs(s.content.desktop.radius))}\n ${ns("box-shadow",ls(s.content.shadow))}\n }\n\n ${h}{\n position:relative;\n z-index:3;\n pointer-events:auto;\n ${ns("object-fit","image"===r?.mediaType?s.media.image?.objFit:s.media.video?.objFit)}\n }\n\n ${u}.has-controls-on-hover video::-webkit-media-controls-panel {\n opacity: 0;\n transition: opacity 0.25s ease-in-out;\n }\n ${u}.has-controls-on-hover:hover video::-webkit-media-controls-panel,\n ${u}.has-controls-on-hover:focus-within video::-webkit-media-controls-panel,\n ${u}.has-controls-on-hover video:focus::-webkit-media-controls-panel,\n ${u}.has-controls-on-hover video:active::-webkit-media-controls-panel {\n opacity: 1 !important;\n }\n\n ${t}{\n ${d}{\n ${ns("flex-direction",a.tablet.direction)}\n ${ns("align-items",a.tablet.alignItems)}\n ${ns("gap",s.layout.tablet.gap)}\n }\n\n ${u}{\n ${ns("width",s.layout.tablet.ratio.media)}\n ${ns("padding",hs(s.media.tablet.padding))}\n }\n\n ${p}{\n ${ns("width",s.layout.tablet.ratio.content)}\n ${ns("padding",hs(s.content.tablet.padding))}\n }\n }\n\n ${n}{\n ${d}{\n ${ns("flex-direction",a.mobile.direction)}\n ${ns("align-items",a.mobile.alignItems)}\n ${ns("gap",s.layout.mobile.gap)}\n }\n\n ${u}{\n ${ns("width",s.layout.mobile.ratio.media)}\n ${ns("padding",hs(s.media.mobile.padding))}\n }\n\n ${p}{\n ${ns("width",s.layout.mobile.ratio.content)}\n ${ns("padding",hs(s.content.mobile.padding))}\n ${ns("border-radius",hs(s.content.mobile.radius))}\n }\n }\n\n ${_s(o,c,i)}\n\n `}})},oB=(e={})=>{const t=[];return e.allowDownload||t.push("nodownload"),!1===e.allowFullscreen&&t.push("nofullscreen"),!1===e.allowPip&&t.push("noremoteplayback"),t.length?t.join(" "):void 0},iB=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{media:a}=t,s=(0,f.useSelect)((e=>e("core/block-editor").getBlocks(o).length>0),[o]),r=fe(t,n),c=(0,Qa.useRef)(null),d="video"===a?.mediaType,u=d?!!a?.video?.url:!!a?.image?.url;return(0,Qa.useEffect)((()=>{if(d&&c.current){const e=c.current;e.muted=!1!==a?.video?.muted,a?.video?.autoplay?e.play().catch((()=>{})):e.pause();const t=e=>{e.stopPropagation()};return e.addEventListener("pointerdown",t,!0),e.addEventListener("mousedown",t,!0),e.addEventListener("touchstart",t,!0),()=>{e.removeEventListener("pointerdown",t,!0),e.removeEventListener("mousedown",t,!0),e.removeEventListener("touchstart",t,!0)}}}),[d,a?.video?.url,a?.video?.autoplay,a?.video?.muted]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tB,{setAttributes:n,attributes:t,updateObj:r,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(nB,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"b-blocks-media-text-section-wrapper",children:[(0,l.jsx)("div",{className:"b-blocks-media-text-section-media "+(a?.video?.controlsOnHover?"has-controls-on-hover":""),children:u?"video"===a?.mediaType?(0,l.jsx)("video",{ref:c,className:"b-blocks-media-text-section-media-el",src:a?.video?.url,poster:a?.video?.poster?.url||"",autoPlay:!!a?.video?.autoplay,loop:!1!==a?.video?.loop,muted:!1!==a?.video?.muted,controls:!1!==a?.video?.controls,controlsList:oB(a?.video),disablePictureInPicture:!1===a?.video?.allowPip,playsInline:!0,onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation()}):(0,l.jsx)("img",{className:"b-blocks-media-text-section-media-el",src:a?.image?.url,alt:a?.image?.alt||""}):(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{onSelect:e=>{d?r("media",{...a?.video,id:e.id,url:e.url},"video"):r("media",{...a?.image,id:e.id,url:e.url,alt:e.alt||""},"image")},allowedTypes:d?["video"]:["image"],value:d?a?.video?.id:a?.image?.id,render:({open:e})=>(0,l.jsxs)("div",{className:"b-blocks-media-text-section-media-el--placeholder",onClick:e,children:[(0,l.jsx)(y.Dashicon,{icon:d?"format-video":"format-image",style:{fontSize:36,width:36,height:36,marginBottom:8}}),(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:d?(0,x.__)("Select or Upload Video","b-blocks"):(0,x.__)("Select or Upload Image","b-blocks")})}),(0,l.jsx)("span",{style:{fontSize:12,opacity:.8,marginTop:4},children:(0,x.__)("Click to open Media Library","b-blocks")})]})})})}),(0,l.jsx)("div",{className:"b-blocks-media-text-section-content",children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:void 0,template:[["core/heading",{level:2,placeholder:(0,x.__)("Section heading…","b-blocks")}],["core/paragraph",{placeholder:(0,x.__)("Add your content here…","b-blocks")}]],templateLock:!1,renderAppender:s?void 0:h.InnerBlocks.ButtonBlockAppender})})]})})]})]})}));Pl(VA.name)&&(0,p.registerBlockType)(VA,{icon:wl,edit:iB,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})})
499 +;const aB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/navigation","version":"1.0.0","title":"bBlocks Navigation","category":"bBlocks","description":"Display navigation in your website with stunning & organized appearance.","keywords":["navbar","navigation","menu","menubar"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"orientation":"is-horizontal","preset":"preset-1","alignment":"left","verticalAlignment":"left","isWrapMultipleLine":true,"isOpenOnClick":true,"isMenuIcon":true}},"hamburger":{"type":"object","default":{"buttonType":"icon","displayMenu":"mobile","button":{"size":{"desktop":30,"tablet":"","mobile":""},"color":"","padding":{"desktop":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"tablet":{},"mobile":{}}},"container":{"background":{"color":"#fff"},"padding":{"desktop":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"tablet":{},"mobile":{}}},"items":{"typo":{"fontWeight":600,"fontVariant":"600"},"padding":{"desktop":{"top":"15px","right":"15px","bottom":"15px","left":"15px"},"tablet":{},"mobile":{}},"border":{},"borderRadius":{},"colors":{"normal":{"text":"","bg":""},"hover":{"text":"","bg":""}}},"closeButton":{"color":"","alignment":"right"}}},"styles":{"type":"object","default":{"typo":{"fontWeight":600},"padding":{"desktop":{"top":"20px","right":"20px","bottom":"20px","left":"20px"},"tablet":{},"mobile":{}},"margin":{"desktop":{},"tablet":{},"mobile":{}},"colors":{"normal":{"normal":"#52555d","hover":""},"active":{"normal":"","hover":""}}}},"dropdownStyles":{"type":"object","default":{"container":{"width":{"desktop":200,"tablet":"","mobile":""},"background":{},"padding":{"desktop":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"tablet":{},"mobile":{}},"border":{},"borderRadius":{},"shadow":{}},"menuItems":{"typo":{"fontWeight":600},"padding":{"desktop":{"top":"10px","right":"10px","bottom":"10px","left":"10px"},"tablet":{},"mobile":{}},"colors":{"transition":"","normal":{"normal":"","hover":""},"active":{"normal":"","hover":""}}}}},"caret":{"type":"object","default":{"size":{"desktop":15,"tablet":"","mobile":""},"color":{"normal":"#475467","hover":"#101828"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"5px","right":"5px","bottom":"5px","left":"5px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"18px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"rgba(255, 255, 255, 1)","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","lodash","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","react","react-dom","lodash"]}'),sB=[{label:"Horizontal",value:"is-horizontal"},{label:"Vertical",value:"is-vertical"}],rB=[{label:"Left",value:"left",icon:Db},{label:"Center",value:"center",icon:Fb},{label:"Right",value:"right",icon:Hb},{label:"Justify",value:"justify",icon:Wb}],lB=[{label:"Left",value:"left",icon:Db},{label:"Center",value:"center",icon:Fb},{label:"Right",value:"right",icon:Hb}],cB=[{label:"Text",value:"text",icon:"Text"},{label:"Icon",value:"icon",icon:"Icon"}],dB=[{value:"never",label:"OFF",icon:"OFF"},{value:"mobile",label:"MOBILE",icon:"MOBILE"},{value:"always",label:"ALWAYS",icon:"ALWAYS"}],uB=e=>{const{attributes:t,updateObj:n}=e,{layout:o,hamburger:i}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Orientation","b-blocks"),labelPosition:"left",value:o.orientation,onChange:e=>n("layout",e,"orientation"),options:sB}),"is-horizontal"===o.orientation&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Allow wrap to multiple lines","b-blocks"),checked:o.isWrapMultipleLine,onChange:e=>n("layout",e,"isWrapMultipleLine")}),(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),value:o.alignment,onChange:e=>n("layout",e,"alignment"),options:rB,isIcon:!0,size:"small"})]}),"is-vertical"===o.orientation&&(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),value:o.verticalAlignment,onChange:e=>n("layout",e,"verticalAlignment"),options:lB,isIcon:!0})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Dropdown / Sub Menus","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open on Click","b-blocks"),checked:o.isOpenOnClick,onChange:e=>n("layout",e,"isOpenOnClick")}),!o.isOpenOnClick&&(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show arrow(caret icon)","b-blocks"),checked:o.isMenuIcon,onChange:e=>n("layout",e,"isMenuIcon")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hamburger Menu","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Tn,{label:(0,x.__)("Button Type","b-blocks"),value:i.buttonType,onChange:e=>n("hamburger",e,"buttonType"),options:cB,isTextIcon:!0}),(0,l.jsx)(v,{children:(0,x.__)("Display Hamburger Menu","b-blocks")}),(0,l.jsx)(Tn,{value:i.displayMenu,onChange:e=>n("hamburger",e,"displayMenu"),isTextIcon:!0,options:dB})]})]})},pB=({attributes:e,updateObj:t,device:n})=>{const{dropdownStyles:o}=e,{container:i,menuItems:a}=o,{width:s,background:r,padding:c,border:d,borderRadius:u,shadow:p}=i||{},{padding:h,typo:g,colors:m}=a;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Dropdown / Sub Menus","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:[{title:"Container",name:"container"},{title:"Items",name:"items"}],children:e=>(0,l.jsxs)(l.Fragment,{children:["container"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.PanelRow,{children:[(0,x.__)("Min Width (PX)","b-blocks"),(0,l.jsx)(_,{})]}),value:s[n],onChange:e=>t("dropdownStyles",e,"container","width",n),min:100,max:600}),(0,l.jsx)(An,{className:"mt20 mb20",isImage:!1,value:r,onChange:e=>t("dropdownStyles",e,"container","background")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:c[n],onChange:e=>t("dropdownStyles",e,"container","padding",n)}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt20 mb20",label:(0,x.__)("Border","b-blocks"),value:d,onChange:e=>t("dropdownStyles",e,"container","border")}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:u,onChange:e=>t("dropdownStyles",e,"container","borderRadius")}),(0,l.jsx)(yt,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:p,onChange:e=>t("dropdownStyles",e,"container","shadow")})]}),"items"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:h[n],
500 +onChange:e=>t("dropdownStyles",e,"menuItems","padding",n)}),(0,l.jsx)(Oa,{className:"mt20",value:g,onChange:e=>t("dropdownStyles",e,"menuItems","typo")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Active",name:"active"}],children:({name:e})=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:n})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text","b-blocks"),value:m[e][n],onChange:o=>t("dropdownStyles",o,"menuItems","colors",e,n)}),"normal"===e&&"hover"===n&&(0,l.jsx)(y.RangeControl,{className:"mt20",label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.1})]})})})})]})]})})})},hB=({attributes:e,updateObj:t,device:n})=>{const{hamburger:o}=e,{button:i,container:a,items:s,closeButton:r}=o;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hamburger Menu","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:[{title:"Button",name:"button"},{title:"Container",name:"container"},{title:"Items",name:"items"},{title:"Close Icon",name:"close"}],children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:["button"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{className:"mt10 mb20",label:(0,l.jsxs)(y.PanelRow,{children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),value:i.size[n],onChange:e=>t("hamburger",e,"button","size",n)}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:i.padding[n],onChange:e=>t("hamburger",e,"button","padding",n)}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color","b-blocks"),value:i.color,onChange:e=>t("hamburger",e,"button","color")})]}),"container"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:a.padding[n],onChange:e=>t("hamburger",e,"container","padding",n)}),(0,l.jsx)(An,{className:"mt20",value:a.background,onChange:e=>t("hamburger",e,"container","background")})]}),"items"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:s.padding[n],onChange:e=>t("hamburger",e,"items","padding",n)}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt20 mb20",label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("hamburger",e,"items","border")}),(0,l.jsx)(k,{label:(0,x.__)("Border Radius","b-blocks"),values:s.borderRadius,resetValues:{left:"0px",right:"0px",top:"0px",bottom:"0px"},onChange:e=>t("hamburger",e,"items","borderRadius")}),(0,l.jsx)(Oa,{className:"mt20",value:s.typo,onChange:e=>t("hamburger",e,"items","typo")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text Color","b-blocks"),value:s.colors[e].text,onChange:n=>t("hamburger",n,"items","colors",e,"text")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Background Color","b-blocks"),value:s.colors[e].bg,onChange:n=>t("hamburger",n,"items","colors",e,"bg")})]})})]}),"close"===e&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:r.color,onChange:e=>t("hamburger",e,"closeButton","color")}),(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Alignment","b-blocks"),options:[{label:"Left",value:"left",icon:Db},{label:"Center",value:"center",icon:Fb},{label:"Right",value:"right",icon:Hb}],value:r.alignment,onChange:e=>t("hamburger",e,"closeButton","alignment"),isIcon:!0})]})]})})})},gB=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,device:n,updateObj:o}=e,{styles:i,caret:a}=t,{padding:s,margin:r,typo:c,colors:d}=i;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation Link/Item","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:s[n],onChange:e=>o("styles",e,"padding",n)}),(0,l.jsx)("br",{}),(0,l.jsx)("br",{}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{justify:"space-between",children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:r[n],onChange:e=>o("styles",e,"margin",n)}),(0,l.jsx)(Oa,{className:"mt20",value:c,onChange:e=>o("styles",e,"typo")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Active",name:"active"}],children:({name:e})=>(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:t})=>(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text","b-blocks"),value:d[e][t],onChange:n=>o("styles",n,"colors",e,t)})})})]}),(0,l.jsx)(pB,{...e}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Caret","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.RangeControl,{label:(0,l.jsxs)(y.PanelRow,{children:[(0,x.__)("Size","b-blocks"),(0,l.jsx)(_,{})]}),value:a.size[n],onChange:e=>o("caret",e,"size",n),min:0,max:100}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt20",activeClass:"activeTab",tabs:[{title:"Normal",name:"normal"},{title:"Hover",name:"hover"}],children:({name:e})=>(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:a.color[e],onChange:t=>o("caret",t,"color",e)})})]}),(0,l.jsx)(hB,{...e})]})})),mB=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,[a,s]=(0,m.useState)(!1),r={isPremium:o,setIsProModalOpen:s},c=(e,o,...i)=>{n({[e]:be(t[e],o,...i)})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Xt,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(uB,{...e,premiumProps:r,updateObj:c}),"style"===t.name&&(0,l.jsx)(gB,{...e,updateObj:c}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,isPremium:o,onChange:e=>n({advanced:e}),enabled:{dimension:["padding","margin"],background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],visibility:["zIndex","overflow"],responsive:!0,css:!0}})]})})}),(0,l.jsx)(qa,{isProModalOpen:a,setIsProModalOpen:s,link:yn,children:(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Feature: ","b-blocks")}),(0,x.__)("Feature details.","b-blocks")]})})]})},bB="bBlocksNavigation",fB=(e,t,n=!1)=>{const{styles:o,dropdownStyles:i,caret:a,hamburger:s,advanced:r}=e,{padding:l,margin:c,typo:d,colors:u}=o,{container:p,menuItems:h}=i,g=`#${t} .${bB} .wp-block-navigation`,m=` ${g} .wp-block-navigation__container .wp-block-navigation-item`,b=`${m} .wp-block-navigation__submenu-container`,f=`${b} .wp-block-navigation-item`,x=`${m} .wp-block-navigation__submenu-icon`,y=`${g} .wp-block-navigation__responsive-container-open`,v=`${g} .is-menu-open`,k=`${v} .wp-block-navigation__container .wp-block-navigation-item .wp-block-navigation-item__content`,w=`${v} .components-button.wp-block-navigation__responsive-container-close`,_=`${m}.current-menu-item`,C=`${f} a[aria-current='page']`
501 +;return`\n\t\t${Cs(t,r,n)}\n\t\t${ps("",d)?.googleFontLink}\n\t\t${ps("",h.typo)?.googleFontLink}\n\t\t${ps("",s.items.typo)?.googleFontLink}\n\n\t\t${ps(m,d)?.styles}\n\t\t${m}{\n\t\t\tpadding:${hs(l?.desktop)};\n\t\t\tmargin:${hs(c?.desktop)};\n\t\t\tcolor:${u.normal.normal};\n\t\t\ttransition:all 0.3s ease-in-out;\n\t\t}\n\t\t${m}:hover{\n\t\t\tcolor: ${u.normal.hover};\n\t\t}\n\t\t${b}{\n\t\t\t${ns("min-width",jt(p.width.desktop)?`${p.width.desktop}px !important`:"")}\n\t\t\t${os(p.background)}\n\t\t\tpadding:${hs(p.padding.desktop)};\n\t\t\t${as(p.border)}\n\t\t\tborder-radius:${hs(p.borderRadius)};\n\t\t\tbox-shadow:${ls(p.shadow)};\n\t\t}\n\t\t${ps(f,h.typo).styles}\n\t\t${f}{\n\t\t\t${ns("padding",hs(h.padding.desktop))}\n\t\t\t${ns("color",h.colors.normal.normal)}\n\t\t\ttransition:all ${h.colors.transition||.3}s;\n\t\t}\n\t\t${f}:hover{\n\t\t\t${ns("color",h.colors.normal.hover)}\n\t\t}\n\t\t${x}{\n\t\t\t${ns("width",jt(a.size.desktop)?a.size.desktop+"px !important":"")}\n\t\t\t${ns("height",jt(a.size.desktop)?a.size.desktop+"px !important":"")}\n\t\t\t${ns("color",a.color.normal)}\n\t\t\ttransition: all ${h.colors.transition||.3}s ease-in-out;\n\t\t}\n\t\t${m}:hover .wp-block-navigation__submenu-icon{\n\t\t\tcolor: ${a.color.hover} !important;\n\t\t}\n\t\t${_}{\n\t\t\t${ns("color",u.active.normal)}\n\t\t\ttransition:all 0.2s ease-in-out;\n\t\t}\n\t\t${_}:hover{\n\t\t\t${ns("color",u.active.hover)}\n\t\t}\n\t\t${C}{\n\t\t\t${ns("color",h.colors.active.normal)}\n\t\t\ttransition:all ${h.colors.transition||.2}s ease-in-out;\n\t\t}\n\t\t${C}:hover{\n\t\t\t${ns("color",h.colors.active.hover)}\n\t\t}\n\t\t${y} svg{\n\t\t\theight: ${s.button.size.desktop}px;\n\t\t\twidth: ${s.button.size.desktop}px;\n\t\t\tfill: ${s.button.color};\n\t\t}\n\t\t${y}{\n\t\t\t${ns("padding",hs(s.button.padding.desktop))}\n\t\t}\n\t\t${v}{\n\t\t\t${ns("padding",hs(s.container.padding.desktop))}\n\t\t\t${os(s.container.background)}\n\t\t}\n\n\t\t${ps(k,s.items.typo).styles}\n\t\t${k}{\n\t\t\t${ns("background",s.items.colors.normal.bg)}\n\t\t\t${ns("color",s.items.colors.normal.text)}\n\t\t\t${ns("padding",hs(s.items.padding.desktop))}\n\t\t\t${as(s.items.border)}\n\t\t\t${ns("border-radius",hs(s.items.borderRadius))}\n\t\t\ttransition: all 0.3s ease-in-out;\n\t\t}\n\t\t${k}:hover{\n\t\t\tbackground:${s.items.colors.hover.bg} !important;\n\t\t\tcolor:${s.items.colors.hover.text} !important;\n\t\t}\n\t\t${w}{\n\t\t\tcolor:${s.closeButton?.color};\n\t\t\t${"right"===s.closeButton.alignment?"right:0;":"left"===s.closeButton.alignment?"left:0px;":"left:50%;"}\n\t\t}\n\t\t@media only screen and (min-width:641px) and (max-width: 1024px){\n\t\t\t${m}{\n\t\t\t\t${ns("padding",hs(l?.tablet))}\n\t\t\t\t${ns("margin",hs(c?.tablet))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\tmin-width:${p.width.tablet}px !important;\n\t\t\t\t${ns("padding",hs(p.padding.tablet))}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${ns("padding",hs(h.padding.tablet))}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${ns("width",jt(a.size.tablet)?a.size.tablet+"px !important":"")}\n\t\t\t\t${ns("height",jt(a.size.tablet)?a.size.tablet+"px !important":"")}\n\t\t\t}\n\t\t\t${y} svg{\n\t\t\t\theight:${s.button.size.tablet}px;\n\t\t\t\twidth:${s.button.size.tablet}px;\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${ns("padding",hs(s.button.padding.tablet))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\t${ns("padding",hs(s.container.padding.tablet))}\n\t\t\t}\n\t\t\t${k}{\n\t\t\t\t${ns("padding",hs(s.items.padding.tablet))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px){\n\t\t\t${m}{\n\t\t\t\t${ns("padding",hs(l?.mobile))}\n\t\t\t\t${ns("margin",hs(c?.mobile))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\tmin-width:${p.width.mobile}px !important;\n\t\t\t\t${ns("padding",hs(p.padding.mobile))}\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${ns("padding",hs(h.padding.mobile))}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${ns("width",jt(a.size.mobile)?a.size.mobile+"px !important":"")}\n\t\t\t\t${ns("height",jt(a.size.mobile)?a.size.mobile+"px !important":"")}\n\t\t\t}\n\t\t\t${y} svg{\n\t\t\t\theight:${s.button.size.mobile}px;\n\t\t\t\twidth:${s.button.size.mobile}px;\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${ns("padding",hs(s.button.padding.mobile))}\n\t\t\t}\n\t\t\t${v}{\n\t\t\t\t${ns("padding",hs(s.container.padding.mobile))}\n\t\t\t}\n\t\t\t${k}{\n\t\t\t\t${ns("padding",hs(s.items.padding.mobile))}\n\t\t\t}\n\t\t}\n\t`},xB=(0,w.createHigherOrderComponent)((e=>t=>{const{name:n,clientId:o,isSelected:i}=t;if(n&&"core/navigation"!=n)return(0,l.jsx)(e,{...t});const a=(0,f.select)("core/block-editor").getBlockParents(o);let s,r=!1;return a.map((e=>{const t=(0,f.select)("core/block-editor").getBlock(e);t&&"b-blocks/navigation"==t.name&&(r=!0)})),r&&i?(setTimeout((()=>{if(s=document.querySelector(".block-editor-block-inspector"),s){let e=s.querySelector(".block-editor-block-inspector__tabs");if(e){let t=e.querySelectorAll("[aria-label='Settings'], [aria-label='Styles']");t&&t.forEach((e=>{e.style.display="none"}))}}}),200),s?(setTimeout((()=>{let e=s.children;s.querySelector(".block-editor-block-inspector__tabs").querySelectorAll("[aria-label='Settings'], [aria-label='Styles']").forEach((e=>{e.style.display="none"}));for(let t=0;t<=e.length-1;t++){let n=e[t].classList.contains("block-editor-block-card"),o=e[t].classList.contains("block-editor-block-inspector__tabs"),i=e[t].children;if(!n&&!o)for(let e=0;e<=i.length-1;e++)i[e].querySelector(".wp-block-navigation__navigation-selector")||(i[e].style.display="none")}}),200),(0,l.jsx)(e,{...t})):(0,l.jsx)(e,{...t})):(s=document.querySelector(".block-editor-block-inspector"),s&&setTimeout((()=>{const e=s.querySelector(".block-editor-block-card");e&&(e.style.display="block");let t=s.children;for(let e=0;e<=t.length-1;e++){let n=t[e].children;for(let e=0;e<=n.length-1;e++)n[e].style.display="block"}}),200),(0,l.jsx)(e,{...t}))}),"withInspectorControl");wp.hooks.addFilter("editor.BlockEdit","b-blocks/navigation",xB);const yB=({attributes:e,clientId:t})=>{const{layout:n,hamburger:o}=e,{orientation:i,isWrapMultipleLine:a}=n,{displayMenu:s}=o,r=(0,m.useRef)(),c=(0,f.select)("core/block-editor").getBlocksByClientId(t)[0],{updateBlockAttributes:d}=(0,f.dispatch)("core/block-editor");(0,m.useEffect)((()=>{c?.innerBlocks&&c?.innerBlocks.forEach((e=>{d(e.clientId,{openSubmenusOnClick:n.isOpenOnClick,showSubmenuIcon:n.isMenuIcon,overlayMenu:o.displayMenu,hasIcon:"icon"===o.buttonType,icon:"icon"===o.buttonType?"handle":"text"})}))}),[n.isOpenOnClick,n.isMenuIcon,o.displayMenu,o.buttonType,c]);const u=`${i} ${s} ${a?"":"no-wrap"} ${"is-vertical"===n.orientation?"vertical-align-"+n.verticalAlignment:"horizontal-align-"+n.alignment}`;return(0,l.jsx)("div",{className:`${bB} ${u}`,children:(0,l.jsx)(h.InnerBlocks,{templateLock:!1,ref:r,template:[["core/navigation",{className:"bPl-navigation"}]],allowedBlocks:["core/navigation"],renderAppender:(0,f.select)("core/block-editor").getBlock(t)?.innerBlocks.length<1&&h.InnerBlocks.ButtonBlockAppender})})};Pl(aB.name)&&(0,p.registerBlockType)(aB,{icon:Er,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,[i,a]=(0,m.useState)(0),s=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(mB,{attributes:t,setAttributes:n,isPremium:s,activeIndex:i,setActiveIndex:a,clientId:o}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{children:fB(t,`block-${o}`,!0)}),(0,l.jsx)("div",{children:(0,l.jsx)(yB,{...e})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})})
502 +;const vB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/news-ticker","version":"0.1.0","title":"News Ticker","category":"bBlocks","textdomain":"b-blocks","description":"Display a scrolling news ticker with posts from any post type","example":{},"attributes":{"postType":{"type":"string","default":"post"},"selectedCategories":{"type":"array","default":[]},"selectedPosts":{"type":"array","default":[]},"selectAllCategories":{"type":"boolean","default":false},"speed":{"type":"number","default":50},"enableClick":{"type":"boolean","default":true},"textColor":{"type":"string","default":"#ffffff"},"backgroundColor":{"type":"string","default":"#667eea"},"fontSize":{"type":"number","default":15},"fontWeight":{"type":"string","default":"400"},"fontFamily":{"type":"string","default":""},"headingText":{"type":"string","default":"News:"}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}');Pl(vB.name)&&(0,p.registerBlockType)(vB,{icon:Kr,edit:function({attributes:e,setAttributes:t}){const{postType:n,selectedCategories:o,selectedPosts:i,selectAllCategories:a,speed:s,enableClick:r,textColor:c,backgroundColor:d,fontSize:u,fontWeight:p,fontFamily:g,headingText:m}=e,[b,v]=(0,Qa.useState)([]),[k,w]=(0,Qa.useState)(!1),_=(0,f.useSelect)((e=>{const{getPostTypes:t}=e(wp.coreData.store),n=t({per_page:-1});return n?.filter((e=>e.viewable))||[]}),[]),C=(0,f.useSelect)((e=>{if(!n)return[];const{getTaxonomies:t}=e(wp.coreData.store);return(t({per_page:-1})||[]).filter((e=>e.types.includes(n)&&e.visibility.publicly_queryable))}),[n]),j=(0,f.useSelect)((e=>{if(!n||0===C.length)return[];const{getEntityRecords:t}=e(wp.coreData.store);return t("taxonomy",C[0].slug,{per_page:-1})||[]}),[n,C]),{posts:$,isResolving:S}=(0,f.useSelect)((e=>{if(!n)return{posts:[],isResolving:!1};const{getEntityRecords:t,isResolving:i}=e(wp.coreData.store),a={per_page:-1,status:"publish",orderby:"date",order:"desc"};return o.length>0&&C.length>0&&(a[C[0].rest_base]=o),{posts:t("postType",n,a)||[],isResolving:i("getEntityRecords",["postType",n,a])}}),[n,o,C]);(0,Qa.useEffect)((()=>{S?w(!0):(v($),w(!1))}),[$,S]);const T=a&&o.length>0?b:b.filter((e=>i.includes(e.id))),N=_.map((e=>({label:e.name,value:e.slug}))),M=[{name:(0,x.__)("Small","b-blocks"),size:12,slug:"small"},{name:(0,x.__)("Normal","b-blocks"),size:15,slug:"normal"},{name:(0,x.__)("Medium","b-blocks"),size:18,slug:"medium"},{name:(0,x.__)("Large","b-blocks"),size:22,slug:"large"},{name:(0,x.__)("Extra Large","b-blocks"),size:28,slug:"extra-large"}],L={backgroundColor:d,color:c,fontSize:u+"px",fontWeight:p,fontFamily:g||void 0},P="page"===n,E=j.length>0&&!P;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Ticker Settings","b-blocks"),children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Ticker Heading Text","b-blocks"),value:m,onChange:e=>t({headingText:e}),help:(0,x.__)("Customize the heading text that appears on the ticker label","b-blocks"),placeholder:(0,x.__)("News:","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Post Type","b-blocks"),value:n,options:N,onChange:e=>{t({postType:e,selectedCategories:[],selectedPosts:[],selectAllCategories:!1})}}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Scrolling Speed","b-blocks"),value:s,onChange:e=>t({speed:e}),min:10,max:100,help:(0,x.__)("Lower values are slower, higher values are faster","b-blocks")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Click to Post","b-blocks"),checked:r,onChange:e=>t({enableClick:e}),help:(0,x.__)("Allow users to click on ticker items to visit the post","b-blocks")})]}),(0,l.jsx)(h.PanelColorSettings,{title:(0,x.__)("Color Settings","b-blocks"),colorSettings:[{value:c,onChange:e=>t({textColor:e||"#ffffff"}),label:(0,x.__)("Text Color","b-blocks")},{value:d,onChange:e=>t({backgroundColor:e||"#667eea"}),label:(0,x.__)("Background Color","b-blocks")}]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Typography","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.FontSizePicker,{fontSizes:M,value:u,onChange:e=>t({fontSize:e||15})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Font Weight","b-blocks"),value:p,options:[{label:(0,x.__)("Thin (100)","b-blocks"),value:"100"},{label:(0,x.__)("Extra Light (200)","b-blocks"),value:"200"},{label:(0,x.__)("Light (300)","b-blocks"),value:"300"},{label:(0,x.__)("Normal (400)","b-blocks"),value:"400"},{label:(0,x.__)("Medium (500)","b-blocks"),value:"500"},{label:(0,x.__)("Semi Bold (600)","b-blocks"),value:"600"},{label:(0,x.__)("Bold (700)","b-blocks"),value:"700"},{label:(0,x.__)("Extra Bold (800)","b-blocks"),value:"800"},{label:(0,x.__)("Black (900)","b-blocks"),value:"900"}],onChange:e=>t({fontWeight:e})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Font Family","b-blocks"),value:g,options:[{label:(0,x.__)("Default","b-blocks"),value:""},{label:"Arial",value:"Arial, sans-serif"},{label:"Helvetica",value:"Helvetica, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Times New Roman",value:'"Times New Roman", serif'},{label:"Courier New",value:'"Courier New", monospace'},{label:"Verdana",value:"Verdana, sans-serif"},{label:"Trebuchet MS",value:'"Trebuchet MS", sans-serif'}],onChange:e=>t({fontFamily:e})})]}),E&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Filter by Category","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Select all entry of the following Category","b-blocks"),checked:a,onChange:e=>{t({selectAllCategories:e,selectedPosts:e?[]:i})},help:a?(0,x.__)("All posts from selected categories will be shown. Individual post selection is disabled.","b-blocks"):(0,x.__)("Select categories to filter posts, then choose individual posts below.","b-blocks")}),(0,l.jsx)("div",{style:{maxHeight:"200px",overflowY:"auto",marginTop:"16px",paddingTop:"8px",borderTop:"1px solid #ddd"},children:j.map((e=>(0,l.jsx)(y.CheckboxControl,{label:e.name,checked:o.includes(e.id),onChange:()=>(e=>{const n=o.includes(e)?o.filter((t=>t!==e)):[...o,e];t({selectedCategories:n,selectedPosts:a?[]:i})})(e.id)},e.id)))})]}),!a&&(0,l.jsx)(y.PanelBody,{title:P?(0,x.__)("Select Pages","b-blocks"):(0,x.__)("Select Posts","b-blocks"),initialOpen:!0,children:k?(0,l.jsx)(y.Spinner,{}):0===b.length?(0,l.jsx)("p",{children:P?(0,x.__)("No pages found.","b-blocks"):(0,x.__)("No posts found for this post type and category selection.","b-blocks")}):(0,l.jsx)("div",{style:{maxHeight:"400px",overflowY:"auto"},children:b.map((e=>(0,l.jsx)(y.CheckboxControl,{label:e.title.rendered||(0,x.__)("(no title)","b-blocks"),checked:i.includes(e.id),onChange:()=>(e=>{const n=i.includes(e)?i.filter((t=>t!==e)):[...i,e];t({selectedPosts:n})})(e.id)},e.id)))})}),a&&o.length>0&&(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Preview","b-blocks"),initialOpen:!1,children:(0,l.jsxs)("p",{className:"components-base-control__help",children:[(0,x.__)("All posts from the selected categories will be displayed in the ticker.","b-blocks")," ",b.length>0&&(0,l.jsxs)("strong",{children:[b.length," ",1===b.length?(0,x.__)("post found","b-blocks"):(0,x.__)("posts found","b-blocks")]})]})})]}),(0,l.jsx)("div",{...(0,h.useBlockProps)({style:L}),children:0===T.length?(0,l.jsx)(y.Placeholder,{icon:"slides",label:(0,x.__)("News Ticker","b-blocks"),instructions:P?(0,x.__)("Select pages from the sidebar to display in the ticker.","b-blocks"):a?(0,x.__)("Select categories from the sidebar to display all posts in the ticker.","b-blocks"):(0,x.__)("Select posts from the sidebar to display in the ticker.","b-blocks")}):(0,l.jsxs)("div",{className:"news-ticker-wrapper",children:[(0,l.jsx)("div",{className:"news-ticker-label",style:{backgroundColor:"rgba(0, 0, 0, 0.2)",color:c},children:m||(0,x.__)("News:","b-blocks")}),(0,l.jsx)("div",{className:"news-ticker-content",children:(0,l.jsx)("div",{className:"news-ticker-items",children:T.map((e=>(0,
503 +l.jsx)("span",{className:"news-ticker-item",style:{color:c,fontSize:u+"px",fontWeight:p,fontFamily:g||void 0},children:e.title.rendered||(0,x.__)("(no title)","b-blocks")},e.id)))})})]})})]})}});const kB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/off-canvas","title":"Off-Canvas Drawer","description":"A slide-in drawer panel triggered by a button. Compose any blocks inside. Accessible focus trap, Escape to close, backdrop dismissal, and reduced-motion aware.","category":"bBlocks","keywords":["off-canvas","drawer","side panel","mobile menu","slide-in"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"trigger":{"type":"object","default":{"label":"Open Menu","showIcon":true,"iconPosition":"left","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 24 24\'><path fill=\'currentColor\' d=\'M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z\' /></svg>","iconStyle":{"color":"","size":{"desktop":"18px","tablet":"","mobile":""},"gap":"8px"},"align":"left","typo":{"fontSize":{"desktop":"15px","tablet":null,"mobile":null}},"transition":200,"normal":{"bg":{"type":"solid","color":"#1e1e1e"},"color":"#ffffff","border":{},"padding":{"desktop":{"top":"10px","right":"18px","bottom":"10px","left":"18px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{},"color":"","border":{},"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"borderRadius":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}}},"drawer":{"type":"object","default":{"side":"left","width":{"desktop":"320px","tablet":"","mobile":"85vw"},"height":{"desktop":"","tablet":"","mobile":""},"bg":{"type":"solid","color":"#ffffff"},"padding":{"desktop":{"top":"24px","right":"24px","bottom":"24px","left":"24px"},"tablet":{},"mobile":{}},"border":{},"borderRadius":{"desktop":{},"tablet":{},"mobile":{}}}},"overlay":{"type":"object","default":{"show":true,"color":"rgba(0,0,0,0.5)"}},"options":{"type":"object","default":{"closeLabel":"Close","triggerEvent":"click"}},"transition":{"type":"object","default":{"type":"default","duration":400,"easing":"ease"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),wB=(e,t)=>"string"==typeof e?e:e?.[t]||"mobile"===t&&e?.tablet||e?.desktop,_B=({attributes:e,id:o,isBackend:i=!1})=>{const{trigger:a={},drawer:s={},overlay:r={},transition:c={}}=e,d=`#${o}`,u=`${d} .b-blocks-off-canvas-trigger`,p=`${d} .b-blocks-off-canvas-icon`,h=`${d} .b-blocks-off-canvas-panel, ${d} .b-blocks-off-canvas-editor-preview`,g=`${d} .b-blocks-off-canvas-overlay`,m=a.iconStyle||{},b=(e,t,n)=>ns(e,hs(t?.[n])),f=!1===r.show?"transparent":r.color||"rgba(0,0,0,0.5)",x=e=>`\n\t\t${d}{\n\t\t\t${ns("text-align",a.align)}\n\t\t\t--b-blocks-off-canvas-duration: ${parseInt(c.duration,10)||0}ms;\n\t\t\t--b-blocks-off-canvas-easing: ${c.easing||"ease"};\n\t\t\t${ns("--b-blocks-off-canvas-width",wB(s.width,e))}\n\t\t}\n\t\t${u}{\n\t\t\t${b("padding",a.normal?.padding,e)}\n\t\t\t${b("border-radius",a.normal?.borderRadius,e)}\n\t\t}\n\t\t${u}:hover{\n\t\t\t${b("padding",a.hover?.padding,e)}\n\t\t\t${b("border-radius",a.hover?.borderRadius,e)}\n\t\t}\n\t\t${p}{\n\t\t\t${ns("width",wB(m.size,e))}\n\t\t\t${ns("height",wB(m.size,e))}\n\t\t}\n\t\t${h}{\n\t\t\t${b("padding",s.padding,e)}\n\t\t\t${b("border-radius",s.borderRadius,e)}\n\t\t\t${wB(s.height,e)?`${ns("height",wB(s.height,e))} bottom: auto;`:""}\n\t\t}\n\t`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",a.typo).googleFontLink}\n\n\t\t\t${d}{\n\t\t\t\t--b-blocks-off-canvas-overlay: ${f};\n\t\t\t}\n\n\t\t\t${p}{\n\t\t\t\t${ns("color",m.color)}\n\t\t\t}\n\t\t\t${p} svg{\n\t\t\t\t${ns("fill",m.color)}\n\t\t\t}\n\n\t\t\t${u}{\n\t\t\t\t${ns("gap",m.gap)}\n\t\t\t\t${os(a.normal?.bg)}\n\t\t\t\t${ns("color",a.normal?.color)}\n\t\t\t\t${is(a.normal?.border)}\n\t\t\t\ttransition: all ${parseInt(a.transition,10)||0}ms ease;\n\t\t\t}\n\t\t\t${u}:hover{\n\t\t\t\t${os(a.hover?.bg)}\n\t\t\t\t${ns("color",a.hover?.color)}\n\t\t\t\t${is(a.hover?.border)}\n\t\t\t}\n\t\t\t${ps(u,a.typo).styles}\n\n\t\t\t${h}{\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${is(s.border)}\n\t\t\t}\n\n\t\t\t${g}.is-open{\n\t\t\t\t${ns("background-color",f)}\n\t\t\t}\n\n\t\t\t${i?`${d} .b-blocks-off-canvas-editor-preview{ ${ns("width",wB(s.width,"desktop"))} max-width: 100%; }`:""}\n\n\t\t\t${x("desktop")}\n\t\t\t${t}{ ${x("tablet")} }\n\t\t\t${n}{ ${x("mobile")} }\n\n\t\t\t@media (prefers-reduced-motion: reduce){ ${d}{ --b-blocks-off-canvas-duration: 0ms; } }\n\t\t\t`}})},CB=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"},{label:"vw",value:"vw"}],jB={top:"",right:"",bottom:"",left:""},$B=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],SB=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],TB=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],NB=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Slide","b-blocks"),value:"slide"},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Push","b-blocks"),value:"push"},{label:(0,x.__)("Reveal","b-blocks"),value:"reveal"},{label:(0,x.__)("Zoom","b-blocks"),value:"zoom"},{label:(0,x.__)("Flip","b-blocks"),value:"flip"},{label:(0,x.__)("Bounce","b-blocks"),value:"bounce"}],MB=[{label:(0,x.__)("Click","b-blocks"),value:"click"},{label:(0,x.__)("Hover","b-blocks"),value:"hover"},{label:(0,x.__)("Page Load","b-blocks"),value:"load"}],LB=[{label:(0,x.__)("Ease","b-blocks"),value:"ease"},{label:(0,x.__)("Ease In","b-blocks"),value:"ease-in"},{label:(0,x.__)("Ease Out","b-blocks"),value:"ease-out"},{label:(0,x.__)("Ease In Out","b-blocks"),value:"ease-in-out"},{label:(0,x.__)("Linear","b-blocks"),value:"linear"}],PB=({drawer:e={},overlay:t={},updateObj:n,device:o="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Drawer","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Drawer Side","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:e.side||"left",onChange:e=>n("drawer",e,"side"),children:SB.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Drawer Width","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.width?.[o],units:CB,onChange:e=>n("drawer",e,"width",o),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Drawer Height","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:e.height?.[o],units:CB,onChange:e=>n("drawer",e,"height",o),placeholder:(0,x.__)("Full","b-blocks"),__next40pxDefaultSize:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Overlay","b-blocks"),checked:!1!==t.show,
504 +onChange:e=>n("overlay",!!e,"show")})]}),EB=({trigger:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Trigger Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Trigger Label","b-blocks"),value:e.label||"",onChange:e=>t("trigger",e,"label"),placeholder:(0,x.__)("Open Menu","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Trigger Icon","b-blocks"),checked:e.showIcon,onChange:e=>t("trigger",e,"showIcon")}),!1!==e.showIcon&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:e.icon,onChange:e=>t("trigger",e,"icon")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon Position","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:e.iconPosition,onChange:e=>t("trigger",e,"iconPosition"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Left","b-blocks"),value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Right","b-blocks"),value:"right"})]})]})]}),(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Trigger Alignment","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:e.align,onChange:e=>t("trigger",e,"align"),children:TB.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),AB=({transition:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Transition","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Transition Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:e.type||"default",options:NB,onChange:e=>t("transition",e,"type"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Duration (ms)","b-blocks"),value:e.duration,onChange:e=>t("transition",e,"duration"),min:0,max:2e3,step:50,__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Easing:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:e.easing||"ease",options:LB,onChange:e=>t("transition",e,"easing"),__nextHasNoMarginBottom:!0})]})]}),BB=({options:e={},updateObj:t})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{children:(0,x.__)("Trigger Event","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:e.triggerEvent||"click",onChange:e=>t("options",e||"click","triggerEvent"),children:MB.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Close Button Label","b-blocks"),help:(0,x.__)("Used as the close button’s screen-reader label.","b-blocks"),value:e.closeLabel||"",onChange:e=>t("options",e,"closeLabel"),placeholder:(0,x.__)("Close","b-blocks"),__nextHasNoMarginBottom:!0})]}),IB=({attributes:e,updateObj:t,device:n="desktop"})=>{const{trigger:o={},drawer:i={},overlay:a={},options:s={},transition:r={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(PB,{drawer:i,overlay:a,updateObj:t,device:n}),(0,l.jsx)(EB,{trigger:o,updateObj:t}),(0,l.jsx)(AB,{transition:r,updateObj:t}),(0,l.jsx)(BB,{options:s,updateObj:t})]})},OB=({trigger:e={},updateObj:t,device:n="desktop"})=>{const[o,i]=(0,m.useState)("normal"),a="hover"===o,s=e[o]||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Trigger Button","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:e.typo,onChange:e=>t("trigger",e,"typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10 flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:o,onChange:e=>i(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:s.bg,onChange:e=>t("trigger",e,o,"bg")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Text / Icon Color:","b-blocks"),value:s.color,onChange:e=>t("trigger",e,o,"color"),defaultColor:a?"":"#ffffff"}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:s.border,onChange:e=>t("trigger",e,o,"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:CB,values:s.padding?.[n],resetValues:jB,onChange:e=>t("trigger",e,o,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:CB,values:s.borderRadius?.[n],resetValues:jB,onChange:e=>t("trigger",e,o,"borderRadius",n)}),"hover"===o&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition (ms)","b-blocks"),value:e.transition,onChange:e=>t("trigger",e,"transition"),min:0,max:2e3,step:50,help:(0,x.__)("Hover animation speed.","b-blocks"),__nextHasNoMarginBottom:!0})]})},RB=({trigger:e={},updateObj:t,device:n="desktop"})=>{const o=e.iconStyle||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Trigger Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:o.color,onChange:e=>t("trigger",e,"iconStyle","color")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,l.jsxs)(y.Flex,{justify:"flex-start",gap:0,children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o.size?.[n],units:CB,onChange:e=>t("trigger",e,"iconStyle","size",n),__next40pxDefaultSize:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon / Label Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:o.gap,units:CB,onChange:e=>t("trigger",e,"iconStyle","gap"),__next40pxDefaultSize:!0})]})]})},zB=({drawer:e={},updateObj:t,device:n="desktop"})=>(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Drawer Panel","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:e.bg,onChange:e=>t("drawer",e,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:CB,values:e.padding?.[n],resetValues:jB,onChange:e=>t("drawer",e,"padding",n)}),(0,l.jsx)(y.BorderControl,{label:(0,x.__)("Border","b-blocks"),value:e.border,onChange:e=>t("drawer",e||{},"border"),withSlider:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{justify:"flex-start",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:CB,values:e.borderRadius?.[n],resetValues:jB,onChange:e=>t("drawer",e,"borderRadius",n)})]}),DB=({overlay:e={},updateObj:t})=>!1===e.show?null:(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Overlay","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Ue,{label:(0,x.__)("Overlay Color:","b-blocks"),value:e.color,onChange:e=>t("overlay",e,"color"),defaultColor:"rgba(0,0,0,0.5)"})}),FB=({attributes:e,updateObj:t,device:n="desktop"})=>{const{trigger:o={},drawer:i={},overlay:a={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(OB,{trigger:o,updateObj:t,device:n}),!1!==o.showIcon&&(0,l.jsx)(RB,{trigger:o,updateObj:t,device:n}),(0,l.jsx)(zB,{drawer:i,updateObj:t,device:n}),(0,
505 +l.jsx)(DB,{overlay:a,updateObj:t})]})},HB=e=>(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:$B,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(IB,{...e}),"style"===t.name&&(0,l.jsx)(FB,{...e})]})})]}),WB=(0,f.withSelect)(((e,{clientId:t})=>{const{getDeviceType:n}=e("core/editor"),{getBlocks:o}=e("core/block-editor");return{device:n()?.toLowerCase(),innerBlocks:o(t)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,innerBlocks:i}=e,{trigger:a={},drawer:s={},options:r={}}=t,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,d=fe(t,n),u=(0,h.useBlockProps)({id:`block-${o}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(HB,{...e,updateObj:d,isPremium:c}),(0,l.jsxs)("div",{...u,children:[(0,l.jsx)(_B,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsxs)("button",{type:"button",className:"b-blocks-off-canvas-trigger","aria-disabled":"true",tabIndex:-1,children:[!1!==a.showIcon&&a.icon&&"right"!==a.iconPosition&&(0,l.jsx)("span",{className:"b-blocks-off-canvas-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:a.icon}}),a.label&&(0,l.jsx)("span",{className:"b-blocks-off-canvas-trigger-label",children:a.label}),!1!==a.showIcon&&a.icon&&"right"===a.iconPosition&&(0,l.jsx)("span",{className:"b-blocks-off-canvas-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:a.icon}})]}),(0,l.jsxs)("div",{className:"b-blocks-off-canvas-editor-preview-wrap","data-side":s.side,children:[(0,l.jsxs)("div",{className:"b-blocks-off-canvas-editor-preview-header",children:[(0,l.jsx)("span",{className:"b-blocks-off-canvas-editor-preview-label",children:(0,x.__)("Drawer content (editor preview)","b-blocks")}),(0,l.jsx)("span",{className:"b-blocks-off-canvas-editor-preview-hint",children:(0,x.__)("Hidden until the trigger is clicked on the frontend.","b-blocks")})]}),(0,l.jsxs)("div",{className:"b-blocks-off-canvas-editor-preview",children:[(0,l.jsx)("button",{type:"button",className:"b-blocks-off-canvas-editor-close","aria-label":r.closeLabel,tabIndex:-1,children:(0,l.jsx)("span",{"aria-hidden":"true",children:"×"})}),(0,l.jsx)("div",{className:"b-blocks-off-canvas-editor-content bBlocksOffCanvasInnerBlocksContent",children:(0,l.jsx)(h.InnerBlocks,{renderAppender:()=>i?.length?(0,l.jsx)(h.InnerBlocks.DefaultBlockAppender,{}):(0,l.jsx)(h.InnerBlocks.ButtonBlockAppender,{})})})]})]})]})]})}));Pl(kB.name)&&(0,p.registerBlockType)(kB,{icon:dl,edit:WB,save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})})
506 +;const UB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/one-page-navigation","title":"One Page Navigation","category":"bBlocks","description":"A floating scroll-spy navigation for one-page sites: links to on-page sections, highlights the one in view and smooth-scrolls to it.","keywords":["navigation","scroll spy","one page","anchor","menu"],"textdomain":"b-blocks","supports":{"html":false,"align":false,"multiple":true},"attributes":{"blockId":{"type":"string","default":""},"layout":{"type":"object","default":{"preset":"glassBullseye","desktop":{"position":"right","verticalAlign":"center","offsetX":"","offsetY":""},"tablet":{"position":"","verticalAlign":"","offsetX":"","offsetY":""},"mobile":{"position":"","verticalAlign":"","offsetX":"","offsetY":""}}},"items":{"type":"array","default":[{"id":"opn-overview","label":"Overview","sectionId":"overview","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 576 512\'><path d=\'M575 236.9 308.5 26.6a33 33 0 0 0-41 0L1 236.9a12 12 0 0 0-2 16.9l21 26.6a12 12 0 0 0 16.9 2L64 260.5V464a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V352h64v112a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V260.5l27.1 21.9a12 12 0 0 0 16.9-2l21-26.6a12 12 0 0 0-2-16.9z\'/></svg>","img":{"url":"","id":""},"svg":""}},{"id":"opn-features","label":"Features","sectionId":"features","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M264.5 5.2a24 24 0 0 0-17 0L28.7 84.5a16 16 0 0 0 0 30l218.8 79.3a24 24 0 0 0 17 0l218.8-79.3a16 16 0 0 0 0-30zm219 175.1-58.3-21.1-140.4 50.9a56 56 0 0 1-39.6 0L104.8 159.2l-58.3 21.1a16 16 0 0 0 0 30l218.8 79.3a24 24 0 0 0 17 0l218.8-79.3a16 16 0 0 0 0-30zm0 116.6-58.1-21-140.6 51a56 56 0 0 1-39.6 0l-140.6-51-58.1 21a16 16 0 0 0 0 30l218.8 79.3a24 24 0 0 0 17 0l218.8-79.3a16 16 0 0 0 0-30z\'/></svg>","img":{"url":"","id":""},"svg":""}},{"id":"opn-pricing","label":"Pricing","sectionId":"pricing","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M0 80v149.5a48 48 0 0 0 14 33.9l195 195a48 48 0 0 0 67.9 0l131-131a48 48 0 0 0 0-67.9l-195-195A48 48 0 0 0 179.5 32H48A48 48 0 0 0 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 0 1 0-64z\'/></svg>","img":{"url":"","id":""},"svg":""}},{"id":"opn-faq","label":"FAQ","sectionId":"faq","icon":{"type":"icon","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M256 8a248 248 0 1 0 0 496 248 248 0 0 0 0-496zm0 400a32 32 0 1 1 0-64 32 32 0 0 1 0 64zm53.9-197.2-29.9 19v18.2a16 16 0 0 1-16 16h-16a16 16 0 0 1-16-16v-27.3a16 16 0 0 1 7.4-13.5l40.9-26c5.6-3.5 8.9-9.5 8.9-16 0-10.5-8.5-19-19-19h-35.6c-7.4 0-14.2 4.2-17.5 10.9l-3.5 7a16 16 0 0 1-21.5 7.2l-14.3-7.2a16 16 0 0 1-7.2-21.5l3.5-7A83 83 0 0 1 234.6 96h35.6c37.1 0 67.3 30.2 67.3 67.3 0 23-11.7 44.1-31.1 56.5z\'/></svg>","img":{"url":"","id":""},"svg":""}}]},"behavior":{"type":"object","default":{"scrollSpy":true,"smoothScroll":true,"hideMissingSections":true,"scrollSpeed":600,"desktop":{"scrollOffset":"80px"},"tablet":{"scrollOffset":""},"mobile":{"scrollOffset":""}}},"item":{"type":"object","default":{"normal":{"color":"","background":{},"markerColor":"","ringColor":"","border":{},"shadow":[]},"hover":{"color":"","background":{},"markerColor":"","ringColor":"","border":{},"shadow":[]},"active":{"color":"","background":{},"markerColor":"","ringColor":"","border":{},"shadow":[]},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"","ringSize":"","spacing":"18px"},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"","ringSize":"","spacing":""},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":"","height":"","ringSize":"","spacing":""}}},"marker":{"type":"object","default":{"desktop":{"size":""},"tablet":{"size":""},"mobile":{"size":""}}},"media":{"type":"object","default":{"showIcon":false,"color":"","hoverColor":"","activeColor":"","desktop":{"size":"","width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""},"objectFit":"cover"},"tablet":{"size":"","width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""},"objectFit":""},"mobile":{"size":"","width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""},"objectFit":""}}},"label":{"type":"object","default":{"tooltipBackground":{},"tooltipText":"","border":{},"typo":{"fontSize":{"desktop":13,"tablet":"","mobile":""}},"desktop":{"gap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"gap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"gap":"","padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}}},"line":{"type":"object","default":{"color":"","progressColor":"","desktop":{"thickness":""},"tablet":{"thickness":""},"mobile":{"thickness":""}}},"number":{"type":"object","default":{"normal":{"color":""},"hover":{"color":""},"active":{"color":""},"typo":{"fontSize":{"desktop":15,"tablet":"","mobile":""}}}},"bubble":{"type":"object","default":{"desktop":{"iconPosition":"auto","x":"32px","y":"0px"},"tablet":{"iconPosition":"","x":"","y":""},"mobile":{"iconPosition":"","x":"","y":""}}},"animation":{"type":"object","default":{"pulse":false,"style":"pulseRing","speed":""}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"position":{}}}},"example":{"attributes":{"layout":{"preset":"glassBullseye","desktop":{"position":"right","verticalAlign":"center"}}}},"editorScript":"file:../index.js","viewScript":"file:./view.js","render":"file:./render.php","style":"file:./view.css","version":"1.0.41"}'),GB="b-blocks-one-page-navigation",VB=()=>`opn-${Math.random().toString(36).slice(2,9)}`,qB=[{name:"general",title:"General"},{name:"style",title:"Style"},{name:"advanced",title:"Advanced"}],YB=[{label:"Glass Bullseye",value:"glassBullseye"},{label:"Magnetic Bubble",value:"magneticBubble"},{label:"Numbered Steps",value:"numberedSteps"},{label:"Expandable Pills",value:"expandablePills"},{label:"Stacked Cards",value:"stackedCards"},{label:"Side Rail",value:"sideRail"}],KB=[{label:"Left",value:"left"},{label:"Right",value:"right"}],QB=[{label:"Top",value:"top"},{label:"Center",value:"center"},{label:"Bottom",value:"bottom"}],ZB=[{label:"Pulse Ring",value:"pulseRing"},{label:"Radar",value:"radar"},{label:"Breathing Glow",value:"breathingGlow"},{label:"Heartbeat",value:"heartbeat"}],XB=[{label:"None",value:"none"},{label:"Library",
507 +value:"icon"},{label:"Image",value:"image"},{label:"SVG",value:"svg"}],JB=["image"],eI=["image/svg+xml"],tI=[{label:"Contain",value:"contain"},{label:"Cover",value:"cover"},{label:"Fill",value:"fill"},{label:"None",value:"none"}],nI=[{label:"Auto",value:"auto"},{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],oI=(e={},t="desktop")=>{const n=e?.bubble||{},o=hI(n,t,"iconPosition",n.iconPosition||"auto");if("inside"===o||"center"===o)return"center";const i="outside"===o?n.side||"auto":o;return"left"===i||"right"===i?i:"left"===bI(e.layout||{},t,"position","right")?"right":"left"},iI={glassBullseye:["marker","item","media","animation","label","line"],magneticBubble:["marker","item","media","animation","label","line","bubble"],numberedSteps:["marker","item","number","media","line","label"],expandablePills:["marker","item","media","label"],stackedCards:["marker","item","media","label","line"],sideRail:["marker","item","media","label","line"]},aI=["magneticBubble","expandablePills","stackedCards"],sI=e=>!aI.includes(e),rI=["expandablePills","stackedCards"],lI=e=>!rI.includes(e),cI=(e={})=>"numberedSteps"===(e?.layout?.preset||"glassBullseye")&&!e?.media?.showIcon,dI=["sideRail"],uI=(e={})=>!sI(e?.layout?.preset||"glassBullseye")||!!e?.media?.showIcon,pI=(e,t)=>(iI[e]||iI.glassBullseye).includes(t),hI=(e={},t,n,o="")=>{const i=t=>{const o=e?.[t]?.[n];return null==o||""===o?void 0:o},a=i("desktop")??o;if("desktop"===t)return a;const s=i("tablet")??a;return"tablet"===t?s:i("mobile")??s},gI=(e="")=>String(e||"").trim().replace(/^#+/,""),mI=e=>String(e+1).padStart(2,"0"),bI=(e={},t,n,o)=>hI(e,t,n,e[n]||o),fI=e=>{const{layout:t={}}=e;return`${GB}-pos-${bI(t,"desktop","position","right")} ${GB}-align-${bI(t,"desktop","verticalAlign","center")}`},xI=e=>{const{layout:t={},animation:n={}}=e,o=t.preset||"glassBullseye",i=n.pulse&&pI(o,"animation"),a=sI(o)&&e?.media?.showIcon;return[GB,`${GB}-preset-${o}`,i?`${GB}-pulse-${n.style||"pulseRing"}`:"","magneticBubble"===o&&"center"!==oI(e)?`${GB}-bubble-outside ${GB}-bubble-${oI(e)}`:"",a?"is-icon-visible":""].filter(Boolean).join(" ")},yI={expandablePills:"link",stackedCards:"link"},vI=e=>"link"===yI[e],kI=e=>vI(e),wI=["magneticBubble","numberedSteps","stackedCards"],_I=e=>wI.includes(e),CI=e=>"glassBullseye"===(e||"glassBullseye"),jI={glassBullseye:{normal:{color:"#9aa0ae"},hover:{color:"#4b33f5"},active:{color:"#4b33f5"}},magneticBubble:{normal:{color:"#9aa0ae",background:"#ffffff",border:{width:"2px",style:"solid",color:"#e3e6ef"}},hover:{color:"#4b33f5",background:"#4b33f51a",markerColor:"#ffffff"},active:{color:"#4b33f5",background:"#4b33f5",markerColor:"#ffffff"}},numberedSteps:{normal:{color:"#9aa0ae",background:"#ffffff",border:{width:"2px",style:"solid",color:"#e3e6ef"}},hover:{color:"#4b33f5",background:"#4b33f51a",border:{width:"2px",style:"solid",color:"#4b33f5"}},active:{color:"#4b33f5",background:"#4b33f5",markerColor:"#ffffff",border:{width:"2px",style:"solid",color:"#4b33f5"}}},expandablePills:{normal:{color:"#1e2230"},hover:{color:"#4b33f5",background:"#4b33f51a"},active:{color:"#ffffff",background:"#4b33f5"}},stackedCards:{normal:{color:"#1e2230",background:"#ffffff",border:{width:"1px",style:"solid",color:"#e3e6ef"}},hover:{color:"#4b33f5",background:"#f4f5fa"},active:{color:"#ffffff",background:"#4b33f5",border:{width:"1px",style:"solid",color:"#4b33f5"}}},sideRail:{normal:{color:"#9aa0ae",background:"#9aa0ae"},hover:{background:"#4b33f5"},active:{background:"#4b33f5"}}},$I=(e={},t,n=!1)=>{const{item:o={},line:i={},layout:a={}}=e,s=a.preset||"glassBullseye",r=o?.[t]||{},l=n&&(jI[s]||{})[t]||{},c=e=>e&&("object"!=typeof e||Object.keys(e).length),d=(e,t)=>c(r[e])?r[e]:(n?l[e]:null)||t;return{color:d("color",""),background:d("background",{}),markerColor:d("markerColor",""),border:(()=>{if(c(r.border))return r.border;const e=i.color||i?.desktop?.thickness;return n&&e?{width:i?.desktop?.thickness||l.border?.width||"",style:"solid",color:i.color||l.border?.color||""}:(n?l.border:null)||{}})()}},SI=(e={},t)=>e?.[t]?.color||"",TI=(e={},t,n)=>{const o=t=>{const o=e?.[t]?.[n];return"string"==typeof o?o?{top:o,right:o,bottom:o,left:o}:void 0:o&&Object.values(o).some((e=>""!==e&&null!=e))?o:void 0},i=o("desktop")??{};if("desktop"===t)return i;const a=o("tablet")??i;return"tablet"===t?a:o("mobile")??a},NI=e=>"string"==typeof e?{type:"solid",color:e}:e||{},MI=(e="")=>String(e).replace(/<[^>]*>/g," ").replace(/&nbsp;|&#160;/g," ").replace(/&amp;/g,"&").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),LI='h1, h2, h3, h4, h5, h6, .sectionHeadingTitle, [role="heading"]',PI=e=>{const t=new Map;return e?(e.querySelectorAll(LI).forEach((e=>{const n=MI(e.textContent);n&&!t.has(n)&&t.set(n,(e=>{const t=e.closest('section, article, .wp-block-group, .wp-block-cover, [id^="bBlocks"], [data-block]');return t&&1===t.querySelectorAll(LI).length?t:e})(e))})),t):t},EI=(e,t,n)=>{const o=gI(t);if(!e||!o)return null;const i=e.getElementById(o);if(i)return i;const a=MI(o);return a&&(n||PI(e)).get(a)||null};class AI{constructor(e,{updateHash:t=!0,manageFocus:n=!0,preview:o=!1}={}){this.nav=e,this.doc=e.ownerDocument,this.win=this.doc.defaultView||window,this.updateHash=t,this.manageFocus=n,this.preview=o,this.items=Array.from(e.querySelectorAll(`.${GB}-item`)),this.bubble=e.querySelector(`.${GB}-bubble`),this.offset=parseInt(e.dataset.offset,10)||0,this.speed=parseInt(e.dataset.speed,10)||0,this.smooth="1"===e.dataset.smooth,this.spy="1"===e.dataset.spy,this.hideMissing="1"===e.dataset.hideMissing,this.scroller=null,this.active=-1,this.raf=0,this.scrollRaf=0,this.resizeRaf=0,this.listeners=[],this.targets=new Map,this.headings=new Map,this.sync(),this.bindClicks(),this.observe(),this.watchDOM(),this.onScroll()}findScroller(){const e=this.items.map((e=>this.target(e))).find(Boolean)||this.nav;let t=e?.parentElement,n=null;for(;t&&t!==this.doc.body&&t!==this.doc.documentElement;){const e=this.win.getComputedStyle(t);/(auto|scroll|overlay)/.test(e.overflowY)&&t.scrollHeight>t.clientHeight+1&&(n=t),t=t.parentElement}return n}view(){const e=this.scroller;return e?{top:e.scrollTop,height:e.clientHeight,edge:e.getBoundingClientRect().top,extent:e.scrollHeight}:{top:this.win.scrollY,height:this.win.innerHeight,edge:0,extent:Math.max(this.doc.documentElement?.scrollHeight||0,this.doc.body?.scrollHeight||0)}}topOf(e){return e.getBoundingClientRect().top-this.view().edge}scrollToY(e){this.scroller?this.scroller.scrollTop=e:this.win.scrollTo(this.win.scrollX,e)}currentOffset(){const e=this.win.innerWidth||0,t=e=>{const t=parseFloat(this.nav.dataset[e]);return isNaN(t)?null:t},n=640>=e?t("offsetMobile"):null,o=1024>=e?t("offsetTablet"):null;return n??o??this.offset}target(e){if(this.targets.has(e))return this.targets.get(e);const t=EI(this.doc,e.dataset.target,this.headings);return this.targets.set(e,t),t}sync(){this.targets=new Map,this.headings=PI(this.doc),this.scroller=this.findScroller();const e=this.items.filter((e=>!this.target(e))),t=e.length===this.items.length,n=this.hideMissing&&!t;this.items.forEach((t=>{const o=n&&e.includes(t);t.hidden=o;const i=t.querySelector(`.${GB}-link`);i&&(i.tabIndex=o?-1:0)})),t&&e.length&&!this.warned&&(this.warned=!0)}bindClicks(){this.items.forEach(((e,t)=>{const n=e.querySelector(`.${GB}-link`);if(!n)return;const o=n=>{this.boxOf(e)&&(n.preventDefault(),this.scrollTo(this.target(e),t))};n.addEventListener("click",o),this.listeners.push((()=>n.removeEventListener("click",o)))}))}scrollTo(e,t){const n=this.currentOffset(),o=Math.max(0,this.view().top+this.topOf(e)-n),i=()=>{if(!this.manageFocus)return;const t=e.hasAttribute("tabindex"),n=e.style.outline;t||(e.setAttribute("tabindex","-1"),e.style.outline="none"),e.focus({preventScroll:!0}),t||e.addEventListener("blur",(()=>{e.removeAttribute("tabindex"),e.style.outline=n}),{once:!0})};if(this.setActive(t),
508 +this.updateHash&&e.id&&this.win.history?.replaceState&&this.win.history.replaceState(null,"",`#${e.id}`),!this.smooth||(a=this.win,a.matchMedia?.("(prefers-reduced-motion: reduce)").matches)||!this.speed)return this.scrollToY(o),void i();var a;this.win.cancelAnimationFrame(this.raf);const s=this.view().top,r=this.win.performance.now(),l=e=>{const t=Math.min(1,(e-r)/this.speed);var n;this.scrollToY(s+(o-s)*(.5>(n=t)?4*n*n*n:1-Math.pow(-2*n+2,3)/2)),1>t?this.raf=this.win.requestAnimationFrame(l):i()};this.raf=this.win.requestAnimationFrame(l)}setActive(e){e!==this.active&&(this.active=e,this.paint(),this.items.forEach(((t,n)=>{const o=t.querySelector(`.${GB}-link`);t.classList.toggle("is-active",n===e),o&&(n===e?o.setAttribute("aria-current","true"):o.removeAttribute("aria-current"))})),this.moveBubble())}moveBubble(){if(!this.bubble)return;const e=this.items[this.active];if(!e||e.hidden)return void(this.bubble.style.opacity="0");this.bubble.style.opacity="0.2";const t=this.nav.querySelector(`.${GB}-list`),n=t&&"row"===this.win.getComputedStyle(t).flexDirection;this.bubble.style.transform=n?`translateX(${e.offsetLeft+e.offsetWidth/2}px)`:`translateY(${e.offsetTop+e.offsetHeight/2}px)`}rootMargin(){const e=this.currentOffset();return`-${e}px 0px -${Math.max(0,this.view().height-e-1)}px 0px`}boxOf(e){if(e.hidden)return null;const t=this.target(e);return t&&t.getClientRects().length?{top:this.topOf(t)}:null}currentIndex(){const e=this.currentOffset();let t=-1,n=-1/0;if(this.items.forEach(((o,i)=>{const a=this.boxOf(o);a&&a.top<=e&&a.top>n&&(n=a.top,t=i)})),-1===t){const e=this.view().height/2;return this.items.some(((n,o)=>{const i=this.boxOf(n);return!(!i||i.top>=e||(t=o,0))})),-1===t?this.firstIndex():t}if(!this.atEnd())return t;let o=t;return this.items.forEach(((e,n)=>{if(n<=t)return;const i=this.boxOf(e);i&&i.top<this.view().height&&(o=n)})),o}firstIndex(){if(!this.preview)return-1;const e=this.items.findIndex((e=>!e.hidden));return 0>e?-1:e}atEnd(){const{top:e,height:t,extent:n}=this.view();return n>t+1&&e+t>=n-2}observe(){this.spy&&this.win.IntersectionObserver&&(this.margin=this.rootMargin(),this.observer=new this.win.IntersectionObserver((()=>this.setActive(this.currentIndex())),{root:this.scroller,rootMargin:this.margin,threshold:0}),this.items.forEach((e=>{const t=this.target(e);t&&this.observer.observe(t)})))}paint(){const e=this.currentOffset();this.items.forEach(((t,n)=>{const o=-1!==this.active&&n<this.active;t.classList.toggle("is-passed",o);const i=t.querySelector(`.${GB}-ring-bar`);if(!i)return;if(n!==this.active)return i.style.strokeDashoffset=o?"0":"100",void(i.style.opacity=o?"1":"0");const a=this.target(t);if(!a)return;const s=e-this.topOf(a),r=Math.min(1,Math.max(0,s/(a.offsetHeight||1)));i.style.strokeDashoffset=String(100-100*r),i.style.opacity=0<r?"1":"0"}))}onScroll(){const e=()=>{this.scrollRaf=0,this.spy&&this.setActive(this.currentIndex()),this.paint()},t=()=>{this.scrollRaf||(this.scrollRaf=this.win.requestAnimationFrame(e))},n=()=>{this.resizeRaf||(this.resizeRaf=this.win.requestAnimationFrame((()=>{this.resizeRaf=0,this.relayout()})))},o=this.scroller||this.win;o.addEventListener("scroll",t,{passive:!0}),this.win.addEventListener("resize",n,{passive:!0}),this.listeners.push((()=>{o.removeEventListener("scroll",t),this.win.removeEventListener("resize",n)})),e()}relayout(){this.observer&&this.margin!==this.rootMargin()&&(this.observer.disconnect(),this.observe()),this.moveBubble(),this.paint()}watchDOM(){if(!this.win.MutationObserver)return;let e=0;this.mutation=new this.win.MutationObserver((()=>{this.win.cancelAnimationFrame(e),e=this.win.requestAnimationFrame((()=>{this.sync(),this.observer?.disconnect(),this.observe(),this.moveBubble()}))})),this.mutation.observe(this.doc.body,{childList:!0,subtree:!0,characterData:!0})}destroy(){this.win.cancelAnimationFrame(this.raf),this.win.cancelAnimationFrame(this.scrollRaf),this.win.cancelAnimationFrame(this.resizeRaf),this.observer?.disconnect(),this.mutation?.disconnect(),this.listeners.forEach((e=>e())),this.listeners=[]}}const BI=({icon:e={},label:t})=>{const{type:n="icon",icon:o="",img:i={},url:a="",alt:s="",svg:r=""}=e;if("none"===n)return null;if("image"===n){const e="string"==typeof i?{url:i}:i||{},n=e.url||a;return n?(0,l.jsx)("span",{className:`${GB}-icon is-image`,children:(0,l.jsx)("img",{src:n,alt:e.alt||s||t||""})}):null}const c="svg"===n?r:o;return c?(0,l.jsx)("span",{className:`${GB}-icon is-${"svg"===n?"svg":"icon"}`,dangerouslySetInnerHTML:{__html:c}}):null},II=()=>(0,l.jsxs)("svg",{className:`${GB}-ring`,viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,l.jsx)("circle",{className:`${GB}-ring-track`,cx:"12",cy:"12",r:"9"}),(0,l.jsx)("circle",{className:`${GB}-ring-bar`,cx:"12",cy:"12",r:"9",pathLength:"100"})]}),OI=(0,m.forwardRef)((({attributes:e,isBackend:t=!1},n=null)=>{const{items:o=[],layout:i={},behavior:a={},media:s={}}=e,r=i.preset||"glassBullseye",c=!lI(r),d="numberedSteps"===r&&!s.showIcon;return(0,l.jsxs)("div",{ref:n,className:xI(e),role:"navigation","aria-label":"Page sections","data-preset":r,"data-spy":a.scrollSpy?"1":"0","data-smooth":a.smoothScroll?"1":"0","data-hide-missing":a.hideMissingSections?"1":"0","data-speed":parseInt(a.scrollSpeed,10)||0,"data-offset":parseInt(a?.desktop?.scrollOffset,10)||0,"data-offset-tablet":a?.tablet?.scrollOffset??"","data-offset-mobile":a?.mobile?.scrollOffset??"",children:["magneticBubble"===r&&(0,l.jsx)("span",{className:`${GB}-bubble`,"aria-hidden":"true"}),(0,l.jsx)("ul",{className:`${GB}-list`,children:o.map(((e,n)=>{const o=gI(e.sectionId),i=o?`#${o}`:void 0,a=t?"button":"a";return(0,l.jsxs)("li",{className:`${GB}-item${o?"":" is-unlinked"}`,"data-target":o,children:[(0,l.jsxs)(a,{className:`${GB}-link`,...t?{type:"button"}:{href:i},"aria-label":e.label||void 0,children:[(0,l.jsxs)("span",{className:`${GB}-marker`,children:[d&&(0,l.jsx)("span",{className:`${GB}-number`,children:mI(n)}),!d&&(0,l.jsx)(BI,{icon:e.icon,label:e.label}),"glassBullseye"===r&&(0,l.jsx)(II,{})]}),(0,l.jsx)("span",{className:c?`${GB}-label`:`${GB}-label ${GB}-tooltip`,children:e.label})]}),t&&!o&&(0,l.jsx)("span",{className:`${GB}-warning`,children:"No section chosen — this item is hidden on the front end."})]},e.id||n)}))})]})}));OI.displayName="OnePageNavigation";const RI=OI,zI=(e,t)=>e?`calc(${e} * ${t})`:"",DI=({attributes:e,id:o,isBackend:i=!1})=>{const{advanced:a={},layout:s={},marker:r={},item:c={},media:d={},label:u={},line:p={},bubble:h={},number:g={},animation:m={}}=e,b=s.preset||"glassBullseye",f=`#${o}`,x=`${f} .${GB}`,y=`${x} .${GB}-list`,v=`${x} .${GB}-link`,k=`${x} .is-active .${GB}-link`,w=`${x} .${GB}-marker`,_=`${x} .is-active .${GB}-marker`,C=`${v}:hover .${GB}-marker`,j=`${x} .${GB}-label`,$=`${x} .${GB}-tooltip`,S=`${x} .${GB}-number`,T=`${x} .${GB}-icon`,N=sI(b)&&d.showIcon?"::before":"",M=`${T}.is-icon, ${T}.is-svg`,L=`${T}.is-image`,P=`${x} .${GB}-bubble`,E=`${x} .${GB}-ring circle`,A=`${x} .${GB}-ring-track`,B=(e,t)=>t.replace(/\s+/g," ").trim()?`${e}{ ${t} }`:"",I=vI(b),O=I?v:w,R=I?`${v}:hover`:C,z=I?k:`${_}${"magneticBubble"===b?"::before":""}`,D={item:c,line:p,layout:s},F={normal:$I(D,"normal"),hover:$I(D,"hover"),active:$I(D,"active")},H=e=>!!(e?.width||e?.top||e?.right||e?.bottom||e?.left),W=e=>_I(b)&&H(e)?as(e):"",U=e=>Array.isArray(e)&&e.length?e.map((e=>ds(e))).join(", "):"",G=e=>e?.color||("string"==typeof e?e:""),V=e=>os(NI(e)).trim(),q={glassBullseye:`\n\t\t\t${B(`${x} .${GB}-ring-bar`,ns("stroke",p.progressColor))}\n\t\t\t${B(`${x} .is-passed .${GB}-link`,ns("color",F.active.color))}\n\t\t`,magneticBubble:`\n\t\t\t${B(`${y}::before`,ns("background",p.color))}\n\t\t\t${B(w,ns("border-color",p.color))}\n\t\t\t${B(_,"background: none; border-color: transparent;")}\n\t\t\t${B(P,ns("background",G(F.active.background)))}\n\t\t`,
509 +numberedSteps:`\n\t\t\t${B(`${y}::before`,ns("background",p.color))}\n\t\t\t${B(w,ns("border-color",p.color))}\n\t\t\t${B(C,ns("border-color",F.hover.color))}\n\t\t\t${B(_,ns("border-color",G(F.active.background)))}\n\t\t`,expandablePills:"",stackedCards:`\n\t\t\t${B(v,ns("border-color",p.color))}\n\t\t\t${B(k,ns("border-color",G(F.active.background)))}\n\t\t`,sideRail:`\n\t\t\t${B(`${y}::before`,ns("background",p.color))}\n\t\t`},Y=I?"":N,K=`\n\t\t${B(v,ns("color",F.normal.color))}\n\t\t${B(`${O}${Y}`,V(F.normal.background))}\n\t\t${B(w,ns("color",F.normal.markerColor))}\n\n\t\t${B(`${v}:hover`,ns("color",F.hover.color))}\n\t\t${B(`${R}${Y}`,V(F.hover.background))}\n\t\t${B(C,ns("color",F.hover.markerColor))}\n\n\t\t${B(k,ns("color",F.active.color))}\n\t\t${B(`${z}${Y}`,V(F.active.background))}\n\t\t${B(_,ns("color",F.active.markerColor))}\n\t\t${B(`${x} .is-active .${GB}-number, ${x} .is-active .${GB}-icon`,ns("color",F.active.markerColor))}\n\n\t\t${CI(b)?`\n\t\t\t${B(A,ns("stroke",c?.normal?.ringColor))}\n\t\t\t${B(`${v}:hover .${GB}-ring-track`,ns("stroke",c?.hover?.ringColor))}\n\t\t\t${B(`${x} .is-active .${GB}-ring-track`,ns("stroke",c?.active?.ringColor))}\n\t\t`:""}\n\n\t\t${B(`${O}${Y}`,ns("box-shadow",U(c?.normal?.shadow)))}\n\t\t${B(`${R}${Y}`,ns("box-shadow",U(c?.hover?.shadow)))}\n\t\t${B(`${z}${Y}`,ns("box-shadow",U(c?.active?.shadow)))}\n\t`,Q=G(F.active.background)||F.active.color,Z={pulseRing:B(`${_}::after`,ns("border-color",Q)),radar:B(`${_}::after`,ns("background",Q)),breathingGlow:B(`${_}::after`,ns("color",Q)),heartbeat:""},X=e=>{const t="mobile"===e?"12px":"24px",n=hI(s,e,"offsetX","")||t,o=hI(s,e,"offsetY","")||t,i=bI(s,e,"position","right"),a=bI(s,e,"verticalAlign","center"),r="left"===i?"left: calc(100% + 12px); right: auto;":"right: calc(100% + 12px); left: auto;";return`\n\t\t\t${B(f,`${"left"===i?`left: ${n}; right: auto;`:`right: ${n}; left: auto;`} ${"top"===a?`top: ${o}; bottom: auto; transform: none;`:"bottom"===a?`bottom: ${o}; top: auto; transform: none;`:"top: 50%; bottom: auto; transform: translateY(-50%);"}`)}\n\t\t\t${B($,r)}\n\t\t`},J=t=>{const n=r?.[t]?.size,o=p?.[t]?.thickness,i=c?.[t]?.spacing,a=c?.[t]?.width||n,s={glassBullseye:`\n\t\t\t\t${B(w,`\n\t\t\t\t\t${ns("width",n)}\n\t\t\t\t\t${ns("height",n)}\n\t\t\t\t`)}\n\t\t\t`,magneticBubble:`\n\t\t\t\t${B(`${y}::before`,`\n\t\t\t\t\t${ns("left",zI(a,.5))}\n\t\t\t\t\t${ns("width",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(w,`\n\t\t\t\t\t${ns("width",n)}\n\t\t\t\t\t${ns("height",n)}\n\t\t\t\t\t${ns("border-width",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(`${_}::before`,ns("inset",zI(n,-.285)))}\n\t\t\t\t${B(P,`\n\t\t\t\t\t${ns("left",zI(a,.5))}\n\t\t\t\t\t${ns("width",zI(n,2))}\n\t\t\t\t\t${ns("height",zI(n,2))}\n\t\t\t\t\t${n?`margin: ${zI(n,-1)} 0 0 ${zI(n,-1)};`:""}\n\t\t\t\t`)}\n\t\t\t\t${(()=>{const n=h?.[t]||{};if("desktop"!==t&&!n.iconPosition&&!n.x&&!n.y)return"";const o=oI(e,t),i=hI(h,t,"x","0px"),a=hI(h,t,"y","0px");return`\n\t\t\t\t${B(`${x} .${GB}-icon`,"center"===o?"transform: none;":`transform: translate(${"left"===o?`calc(${i} * -1)`:i}, ${a});`)}\n\t\t\t\t${B(`${x} .is-active .${GB}-icon`,ns("color","center"===o?F.active.markerColor:F.active.color))}\n\t\t\t`})()}\n\t\t\t`,numberedSteps:`\n\t\t\t\t${B(`${y}::before`,`\n\t\t\t\t\t${ns("left",zI(a,.5))}\n\t\t\t\t\t${ns("width",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(w,`\n\t\t\t\t\t${ns("width",n)}\n\t\t\t\t\t${ns("border-width",o)}\n\t\t\t\t`)}\n\t\t\t`,expandablePills:B(w,`\n\t\t\t\t${ns("width",n)}\n\t\t\t\t${ns("height",n)}\n\t\t\t`),stackedCards:`\n\t\t\t\t${B(w,`\n\t\t\t\t\t${ns("width",n)}\n\t\t\t\t\t${ns("height",n)}\n\t\t\t\t`)}\n\t\t\t\t${B(v,ns("border-width",o))}\n\t\t\t`,sideRail:`\n\t\t\t\t${B(`${y}::before`,ns("width",o))}\n\t\t\t\t${B(`${w}${N}`,`\n\t\t\t\t\t${ns("width",n)}\n\t\t\t\t\t${ns("height",o)}\n\t\t\t\t`)}\n\t\t\t\t${B(`${C}${N}`,ns("width",zI(n,1.25)))}\n\t\t\t\t${B(`${_}${N}`,ns("width",zI(n,1.5)))}\n\t\t\t`};return`\n\t\t\t${B(y,ns("gap",i))}\n\t\t\t${B(v,lI(b)?"":ns("gap",u?.[t]?.gap))}\n\t\t\t${B($,lI(b)?ns("border-radius",hs(u?.[t]?.radius)):"")}\n\t\t\t${B(j,ns("padding",hs(u?.[t]?.padding)))}\n\t\t\t${s[b]||""}\n\t\t`},ee=`\n\t\t${B(M,ns("color",d.color))}\n\t\t${B(`${M} svg, ${M} svg path`,ns("fill",d.color))}\n\t\t${B(`${v}:hover .${GB}-icon.is-icon, ${v}:hover .${GB}-icon.is-svg`,ns("color",d.hoverColor))}\n\t\t${B(`${v}:hover .${GB}-icon.is-icon svg path, ${v}:hover .${GB}-icon.is-svg svg path`,ns("fill",d.hoverColor))}\n\t\t${B(`${x} .is-active .${GB}-icon.is-icon, ${x} .is-active .${GB}-icon.is-svg`,ns("color",d.activeColor))}\n\t\t${B(`${x} .is-active .${GB}-icon.is-icon svg path, ${x} .is-active .${GB}-icon.is-svg svg path`,ns("fill",d.activeColor))}\n\t`,te=e=>{const t=c?.[e]||{},n=t.width;return`\n\t\t\t${B(O,`\n\t\t\t\t${kI(b)?ns("padding",hs(t.padding)):""}\n\t\t\t\t${ns("border-radius",hs(t.radius))}\n\t\t\t\t${ns("width",n)}\n\t\t\t\t${ns("min-width",n)}\n\t\t\t\t${ns("height",t.height)}\n\t\t\t`)}\n\t\t\t${CI(b)?B(E,ns("stroke-width",t.ringSize)):""}\n\t\t`},ne=e=>{const t=d?.[e]?.size,n=d?.[e]?.width,o=d?.[e]?.height,i=hs(d?.[e]?.radius),a=d?.[e]?.objectFit||("desktop"===e?d.objectFit:"");return`\n\t\t\t${B(M,`\n\t\t\t\t${ns("width",t)}\n\t\t\t\t${ns("height",t)}\n\t\t\t`)}\n\t\t\t${B(L,`\n\t\t\t\t${ns("width",n)}\n\t\t\t\t${ns("height",o)}\n\t\t\t\t${ns("border-radius",i)}\n\t\t\t`)}\n\t\t\t${B(`${L} img`,(e=>"contain"===e?"width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;":e?`width: 100%; height: 100%; ${ns("object-fit",e)}`:"")(a))}\n\t\t`},oe=m.pulse&&pI(b,"animation"),ie=oe?B(`${_}::after`,ns("animation-duration",m.speed)):"",ae=`\n\t\t${ps("",u.typo)?.googleFontLink}\n\t\t${ps("",g.typo)?.googleFontLink}\n\t\t${ps(j,u.typo)?.styles}\n\t\t${ps(S,g.typo)?.styles}\n\n\t\t${B($,`\n\t\t\t${V(u.tooltipBackground)}\n\t\t\t${ns("color",u.tooltipText)}\n\t\t\t${se=u.border,lI(b)&&H(se)?as(se):""}\n\t\t`)}\n\t\t${q[b]||""}\n\t\t${K}\n\t\t${cI(e)?`\n\t\t${B(S,ns("color",SI(g,"normal")))}\n\t\t${B(`${v}:hover .${GB}-number`,ns("color",SI(g,"hover")))}\n\t\t${B(`${x} .is-active .${GB}-number`,ns("color",SI(g,"active")))}\n\t`:""}\n\t\t${uI(e)?ee:""}\n\t\t${oe?Z[m.style]??Z.pulseRing:""}\n\t\t${ie}\n\n\t\t${X("desktop")}\n\t\t${J("desktop")}\n\t\t${te("desktop")}\n\t\t${uI(e)?ne("desktop"):""}\n\n\t\t${t}{\n\t\t\t${X("tablet")}\n\t\t\t${J("tablet")}\n\t\t\t${te("tablet")}\n\t\t\t\t${uI(e)?ne("tablet"):""}\n\t\t}\n\n\t\t${n}{\n\t\t\t${X("mobile")}\n\t\t\t${J("mobile")}\n\t\t\t${te("mobile")}\n\t\t\t\t${uI(e)?ne("mobile"):""}\n\t\t}\n\n\t\t${B(O,W(F.normal.border))}\n\t\t${B(R,W(F.hover.border))}\n\t\t${B(z,W(F.active.border))}\n\n\t\t${_s(o,a,i,!1)}\n\n\t\t`;var se,re;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:(re=ae,re.replace(/[^{}]+\{\s*\}/g,"").replace(/[^{}]+\{\s*\}/g,""))}})},FI=({attributes:e,updateObj:t})=>{const{animation:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Animation","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Active Pulse","b-blocks"),checked:n.pulse,onChange:e=>t("animation",e,"pulse")}),n.pulse&&(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Pulse Style","b-blocks"),value:n.style||"pulseRing",options:ZB,onChange:e=>t("animation",e,"style"),__nextHasNoMarginBottom:!0}),n.pulse&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0 mt10",children:(0,x.__)("Speed","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{value:n.speed,onChange:e=>t("animation",void 0===e?"":e,"speed"),units:[{label:"s",value:"s"},{label:"ms",value:"ms"}],__next40pxDefaultSize:!0})]})]})},HI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{layout:o={},behavior:i={}}=e,a=bI(o,n,"verticalAlign","center"),s=(e,i)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt10",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:hI(o,n,i,""),onChange:e=>t("layout",void 0===e?"":e,n,i),__next40pxDefaultSize:!0})]});return(0,
510 +l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Behavior","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Scroll Spy","b-blocks"),checked:i.scrollSpy,onChange:e=>t("behavior",e,"scrollSpy"),help:(0,x.__)("Highlights the item whose section is currently in view.","b-blocks")}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Smooth Scroll","b-blocks"),checked:i.smoothScroll,onChange:e=>t("behavior",e,"smoothScroll"),help:(0,x.__)("Off, a click jumps straight to the section.","b-blocks")}),(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:bI(o,n,"position","right"),onChange:e=>t("layout",e,n,"position"),children:KB.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Vertical Align","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:bI(o,n,"verticalAlign","center"),onChange:e=>t("layout",e,n,"verticalAlign"),children:QB.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),s((0,x.__)("Horizontal Offset","b-blocks"),"offsetX"),"center"!==a&&s((0,x.__)("Vertical Offset","b-blocks"),"offsetY"),((e,o,{units:a,help:s}={})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt10",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:hI(i,n,o,""),onChange:e=>t("behavior",void 0===e?"":e,n,o),units:a,help:s,__next40pxDefaultSize:!0})]}))((0,x.__)("Scroll Offset","b-blocks"),"scrollOffset",{units:[{label:"px",value:"px"}],help:(0,x.__)("Keeps the target clear of a sticky header.","b-blocks")}),(0,l.jsx)(v,{className:"mb0 mt10",children:(0,x.__)("Scroll Speed","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:parseInt(i.scrollSpeed,10)||0,onChange:e=>t("behavior",void 0===e?600:e,"scrollSpeed"),min:0,max:2e3,step:50,allowReset:!0,resetFallbackValue:600,help:(0,x.__)("How long the scroll takes. Higher = slower.","b-blocks"),__nextHasNoMarginBottom:!0})]})},WI=({attributes:e,setAttributes:t,index:n})=>{const{items:o=[]}=e,i=o[n]||{},a=i.icon||{},{data:s}=$d("bBlocksUtils"),{refetch:r}=jd("b-blocks-enable-svg-mime-type",{_wpnonce:s?.nonce},!1),c=new Tt,d=(e,...i)=>t({items:be(o,e,n,...i)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0",children:(0,x.__)("Icon Type","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a.type||"icon",onChange:e=>d(e,"icon","type"),children:XB.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),"icon"===(a.type||"icon")&&(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon Library","b-blocks"),value:a.icon,onChange:e=>d(e,"icon","icon")}),"image"===a.type&&(0,l.jsx)(we,{height:"90%",width:"90%",className:"mt10",label:(0,x.__)("Upload Image","b-blocks"),types:JB,value:a.img,onChange:e=>d(e||{},"icon","img")}),"image"===a.type&&(0,l.jsx)("small",{children:(0,x.__)("Recommended: PNG, JPEG, WebP, GIF or AVIF.","b-blocks")}),"svg"===a.type&&(0,l.jsx)(we,{className:"mt10",label:(0,x.__)("Upload SVG","b-blocks"),types:eI,onClick:async()=>(Sd(),r()),value:{url:a.svg},onChange:async e=>d(e?.url?await c.sanitizeFile(e.url):"","icon","svg"),isSvgEnabled:!0}),"svg"===a.type&&(0,l.jsx)("small",{children:(0,x.__)("Recommended: image/svg+xml. The file is sanitised on upload.","b-blocks")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Label","b-blocks"),value:i.label||"",onChange:e=>d(e,"label"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Section ID","b-blocks"),value:i.sectionId||"",onChange:e=>d(gI(e),"sectionId"),help:(0,x.__)("The section's ID, or the heading of the section to scroll to. Without the # symbol.","b-blocks"),__nextHasNoMarginBottom:!0})]})},UI=e=>{const{attributes:t,setAttributes:n,updateObj:o}=e,{behavior:i={},items:a=[]}=t,[s,r]=(0,m.useState)(0),c=(0,m.useCallback)((e=>{const t=a[e]||{};n({items:[...a.slice(0,e+1),{...t,id:VB()},...a.slice(e+1)]}),r(e+1)}),[JSON.stringify(a)]),d={id:VB(),label:(0,x.__)("New Section","b-blocks"),sectionId:"",icon:{type:"icon",icon:"",img:{url:"",id:""},svg:""}};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Navigation Items","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(_a,{attributes:t,setAttributes:n,activeIndex:s,setActiveIndex:r,arrKey:"items",minItem:1,ItemSettings:WI,itemLabel:(0,x.__)("Item","b-blocks"),newItem:d,handleCopy:c,title:"label",design:"sortable"}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Hide items with missing sections","b-blocks"),checked:i.hideMissingSections,onChange:e=>o("behavior",e,"hideMissingSections"),help:(0,x.__)("Auto-hide items whose section is not on the page.","b-blocks")})]})},GI=({attributes:e,setAttributes:t})=>{const{layout:n={},animation:o={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Choose A Style","b-blocks"),value:n.preset||"glassBullseye",options:YB,onChange:e=>t({layout:{...n,preset:e},animation:{...o,pulse:"magneticBubble"===e}}),help:(0,x.__)("Pick how the navigation menu looks on your page.","b-blocks"),__nextHasNoMarginBottom:!0})})},VI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{bubble:o={}}=e,i="center"!==oI(e,n),a=(e,i)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt10",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{value:hI(o,n,i,""),onChange:e=>t("bubble",void 0===e?"":e,n,i),__next40pxDefaultSize:!0})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Bubble","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(v,{className:"mb0",children:[(0,x.__)("Icon Position","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:hI(o,n,"iconPosition",o.iconPosition||"auto"),onChange:e=>t("bubble",e,n,"iconPosition"),children:nI.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),(0,l.jsx)("small",{children:(0,x.__)("Center keeps the icon in the node. Auto lifts it out away from the edge the block sits on.","b-blocks")}),i&&(0,l.jsxs)(l.Fragment,{children:[a((0,x.__)("Icon Horizontal Offset","b-blocks"),"x"),a((0,x.__)("Icon Vertical Offset","b-blocks"),"y")]})]})},qI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{item:o={},number:i={},layout:a={}}=e,[s,r]=(0,m.useState)("normal"),c=$I(e,s,!0),d=_I(a.preset||"glassBullseye"),u=((e={})=>!cI(e)&&(!dI.includes(e?.layout?.preset||"glassBullseye")||uI(e)))(e),p=CI(a.preset),h=kI(a.preset||"glassBullseye"),g=cI(e),b=(e,i)=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:hI(o,n,i,""),onChange:e=>t("item",void 0===e?"":e,n,i),__next40pxDefaultSize:!0})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Item","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>r(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Active","b-blocks"),value:"active"})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:c.color,onChange:e=>t("item",e,s,"color")
511 +}),(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background","b-blocks"),value:NI(c.background),onChange:e=>t("item",e,s,"background")}),u&&(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Marker Color","b-blocks"),value:c.markerColor,onChange:e=>t("item",e,s,"markerColor"),help:(0,x.__)("The icon or number inside the marker. Icon / Image sets a drawn icon on its own.","b-blocks")}),g&&(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Number Color","b-blocks"),value:SI(i,s),onChange:e=>t("number",e,s,"color")}),p&&(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Ring Color","b-blocks"),value:o?.[s]?.ringColor,onChange:e=>t("item",e,s,"ringColor"),help:(0,x.__)("The circle around the marker. Its filled part is Line / Track ▸ Progress Color.","b-blocks")}),d&&(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt20",label:(0,x.__)("Border","b-blocks"),value:c.border,onChange:e=>t("item",e,s,"border"),__next40pxDefaultSize:!0}),(0,l.jsx)(yt,{className:"mt20",label:(0,x.__)("Shadow","b-blocks"),value:o?.[s]?.shadow,onChange:e=>t("item",e,s,"shadow")}),h&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(v,{className:"mb0 mt20",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:TI(o,n,"padding"),onChange:e=>t("item",e,n,"padding")})]}),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:TI(o,n,"radius"),onChange:e=>t("item",e,n,"radius")}),p&&b((0,x.__)("Ring Size","b-blocks"),"ringSize"),b((0,x.__)("Spacing","b-blocks"),"spacing"),b((0,x.__)("Width","b-blocks"),"width"),b((0,x.__)("Height","b-blocks"),"height")]})},YI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{label:o={},layout:i={}}=e,a=lI(i.preset||"glassBullseye");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:a?(0,x.__)("Label / Tooltip","b-blocks"):(0,x.__)("Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:o.typo,onChange:e=>t("label",e,"typo"),defaults:{fontSize:{desktop:13}}}),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:TI(o,n,"padding"),onChange:e=>t("label",e,n,"padding")}),!a&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:hI(o,n,"gap",""),onChange:e=>t("label",void 0===e?"":e,n,"gap"),__next40pxDefaultSize:!0})]}),a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Tooltip Background","b-blocks"),value:NI(o.tooltipBackground),onChange:e=>t("label",e,"tooltipBackground")}),(0,l.jsx)(Ue,{label:(0,x.__)("Tooltip Text","b-blocks"),value:o.tooltipText,onChange:e=>t("label",e,"tooltipText")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("label",e,"border"),__next40pxDefaultSize:!0}),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:TI(o,n,"radius"),onChange:e=>t("label",e,n,"radius")})]})]})},KI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{line:o={},layout:i={}}=e,a=CI(i.preset);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Line / Track","b-blocks"),initialOpen:!1,children:[!a&&(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:o.color,onChange:e=>t("line",e,"color")}),a&&(0,l.jsx)(Ue,{label:(0,x.__)("Progress Color","b-blocks"),value:o.progressColor,onChange:e=>t("line",e,"progressColor")}),!a&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Thickness","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:hI(o,n,"thickness",""),onChange:e=>t("line",void 0===e?"":e,n,"thickness"),__next40pxDefaultSize:!0})]})]})},QI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{marker:o={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Marker","b-blocks"),initialOpen:!1,children:(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:hI(o,n,"size",""),onChange:e=>t("marker",void 0===e?"":e,n,"size"),__next40pxDefaultSize:!0})]})})},ZI=({attributes:e,updateObj:t,device:n="desktop"})=>{const{media:o={},layout:i={},items:a=[]}=e,s=sI(i.preset||"glassBullseye"),r=uI(e),c=((e=[])=>e.some((e=>"image"===e?.icon?.type)))(a),d=(e,i,{help:a}={})=>(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2",children:[e," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:hI(o,n,i,""),onChange:e=>t("media",void 0===e?"":e,n,i),help:a,__next40pxDefaultSize:!0})]});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon / Image","b-blocks"),initialOpen:!1,children:[s&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:!!o.showIcon,onChange:e=>t("media",e,"showIcon")}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0",children:(0,x.__)("Icon","b-blocks")}),d((0,x.__)("Size","b-blocks"),"size"),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Color","b-blocks"),value:o.color,onChange:e=>t("media",e,"color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color","b-blocks"),value:o.hoverColor,onChange:e=>t("media",e,"hoverColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Active Color","b-blocks"),value:o.activeColor,onChange:e=>t("media",e,"activeColor")})]}),c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mb0 mt20",children:(0,x.__)("Image","b-blocks")}),d((0,x.__)("Width","b-blocks"),"width"),d((0,x.__)("Height","b-blocks"),"height"),(0,l.jsxs)(v,{className:"mb0 mt10",children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(k,{values:TI(o,n,"radius"),onChange:e=>t("media",e,n,"radius")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2",children:[(0,x.__)("Object Fit","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{className:"flex1",value:hI(o,n,"objectFit","contain"),options:tI,onChange:e=>t("media",e,n,"objectFit"),__nextHasNoMarginBottom:!0})]})]})]})},XI=({attributes:e,updateObj:t})=>{const{number:n={}}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Number","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("number",e,"typo"),defaults:{fontSize:{desktop:15}}})})},JI=e=>{const t=e.attributes?.layout?.preset||"glassBullseye",n=e=>pI(t,e);return(0,l.jsxs)(l.Fragment,{children:[n("marker")&&(0,l.jsx)(QI,{...e}),n("item")&&(0,l.jsx)(qI,{...e}),(0,l.jsx)(ZI,{...e}),n("number")&&cI(e.attributes)&&(0,l.jsx)(XI,{...e}),n("label")&&(0,l.jsx)(YI,{...e}),n("line")&&(0,l.jsx)(KI,{...e}),n("bubble")&&(0,l.jsx)(VI,{...e})]})},eO=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i,layout:a={}}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:qB,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(GI,{...e}),(0,l.jsx)(UI,{...e}),(0,l.jsx)(HI,{...e}),pI(a.preset||"glassBullseye","animation")&&(0,l.jsx)(FI,{...e})]}),"style"===t.name&&(0,l.jsx)(JI,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},tO=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{blockId:i,layout:a={},items:s=[]}=t,r="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,c=fe(t,n),d=(0,m.useRef)(null),u=((e=[],t)=>{const[n,o]=(0,m.useState)(""),i=e.map((e=>gI(e.sectionId))).join("|");return(0,m.useEffect)((()=>{
512 +const e=t?.current?.ownerDocument;if(!e)return;const n=e.defaultView||window;let a=0;const s=()=>{const t=PI(e),n=i.split("|").reduce(((n,o,i)=>(o&&!EI(e,o,t)&&n.push(i),n)),[]).join(",");o((e=>e===n?e:n))};s();const r=new n.MutationObserver((()=>{a||(a=setTimeout((()=>{a=0,s()}),500))}));return r.observe(e.body,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["id"]}),()=>{clearTimeout(a),r.disconnect()}}),[i,t]),(0,m.useMemo)((()=>n?n.split(",").map(Number):[]),[n])})(s,d),p=o.slice(0,12);var g,b;(0,m.useEffect)((()=>{i!==p&&n({blockId:p})}),[p]),g=d,b=JSON.stringify([s.map((e=>e.sectionId)),a.preset,a.desktop,t.behavior]),(0,m.useEffect)((()=>{const e=g?.current;if(!e)return;const t=new AI(e,{updateHash:!1,manageFocus:!1,preview:!0});return()=>t.destroy()}),[g,b]);const f=`block-${o}`,x=(0,h.useBlockProps)({className:fI(t)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eO,{...e,updateObj:c,isPremium:r,unresolved:u}),(0,l.jsxs)("div",{...x,children:[(0,l.jsx)(DI,{attributes:t,id:f,isBackend:!0}),(0,l.jsx)(RI,{ref:d,attributes:t,isBackend:!0})]})]})}));Pl(UB.name)&&(0,p.registerBlockType)(UB,{icon:Pr,edit:tO,save:()=>null});const nO=JSON.parse('{"apiVersion":3,"name":"b-blocks/posts","title":"Posts","description":"Display blog posts.","category":"bBlocks","keywords":["Show Posts","Blog Posts","Category Posts"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"layout":{"type":"string","default":"grid"},"subLayout":{"type":"string","default":"default"},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"number","default":15},"rowGap":{"type":"number","default":15},"isContentEqualHight":{"type":"boolean","default":true},"sliderHeight":{"type":"string","default":"350px"},"content":{"type":"object","default":{"height":"auto"}},"postType":{"type":"string","default":"post"},"selectedTaxonomies":{"type":"object","default":{}},"selectedCategories":{"type":"array","default":[]},"selectedTags":{"type":"array","default":[]},"isPostsPerPageAll":{"type":"boolean","default":false},"postsPerPage":{"type":"number","default":12},"postsOrderBy":{"type":"string","default":"date"},"postsOrder":{"type":"string","default":"desc"},"postsOffset":{"type":"number","default":0},"postsInclude":{"type":"array","default":[]},"postsExclude":{"type":"array","default":[]},"isExcludeCurrent":{"type":"boolean","default":false},"isPagination":{"type":"boolean","default":false},"paginationCurrentPage":{"type":"number","default":1},"paginationPrevLabel":{"type":"string","default":"Prev"},"paginationNextLabel":{"type":"string","default":"Next"},"paginationColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"paginationHovColors":{"type":"object","default":{"color":"#fff","bg":"#070127"}},"paginationPadding":{"type":"object","default":{"vertical":"8px","horizontal":"15px"}},"paginationSpacing":{"type":"string","default":"15px"},"contentAlign":{"type":"string","default":"left"},"contentBG":{"type":"object","default":{"color":""}},"contentPadding":{"type":"object","default":{"vertical":"20px","horizontal":"25px"}},"border":{"type":"object","default":{"width":"1px","color":"#0c0d3c1a","radius":"5px"}},"sliderIsLoop":{"type":"boolean","default":true},"sliderIsTouchMove":{"type":"boolean","default":false},"sliderIsAutoplay":{"type":"boolean","default":true},"sliderAutoplayOptions":{"type":"object","default":{"delay":1.5}},"sliderSpeed":{"type":"number","default":1.5},"sliderEffect":{"type":"string","default":"slide"},"sliderIsPage":{"type":"boolean","default":true},"sliderIsPageClickable":{"type":"boolean","default":true},"sliderIsPageDynamic":{"type":"boolean","default":true},"sliderPageColor":{"type":"string","default":"#146EF5"},"sliderPageWidth":{"type":"string","default":"15px"},"sliderPageHeight":{"type":"string","default":"15px"},"sliderPageBorder":{"type":"object","default":{"radius":"50%"}},"sliderIsPrevNext":{"type":"boolean","default":true},"sliderPrevNextColor":{"type":"string","default":"#146EF5"},"tickerDirection":{"type":"string","default":"up"},"tickerSpeed":{"type":"string","default":"slow"},"tickerInterval":{"type":"number","default":2000},"tickerHeight":{"type":"string","default":"0px"},"tickerVisible":{"type":"number","default":3},"tickerIsMousePause":{"type":"boolean","default":true},"elementsSort":{"type":"array","default":["title","meta"]},"isFImg":{"type":"boolean","default":true},"fImgSize":{"type":"string","default":"full"},"fImgFitting":{"type":"string","default":"cover"},"isFImgLink":{"type":"boolean","default":false},"isTitle":{"type":"boolean","default":true},"isTitleLink":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontFamily":"Roboto","fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"},"googleFontLink":"https://fonts.googleapis.com/css2?family=Roboto&display=swap"}},"titleColor":{"type":"string","default":""},"titleMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isMeta":{"type":"boolean","default":true},"isMetaAuthor":{"type":"boolean","default":true},"isMetaAuthorLink":{"type":"boolean","default":true},"metaAuthorIcon":{"type":"string","default":""},"isMetaDate":{"type":"boolean","default":true},"metaDateFormat":{"type":"string","default":"M j, Y"},"metaDateIcon":{"type":"string","default":""},"isMetaCategory":{"type":"boolean","default":true},"metaCategoryIn":{"type":"string","default":"content"},"metaCategoryIcon":{"type":"string","default":""},"metaTaxonomies":{"type":"object","default":{"selected":[]}},"isMetaReadTime":{"type":"boolean","default":false},"metaReadTimeIcon":{"type":"string","default":""},"isMetaReadTimeSec":{"type":"boolean","default":false},"metaReadTimeLabel":{"type":"string","default":"Min read"},"isMetaComment":{"type":"boolean","default":false},"metaCommentIcon":{"type":"string","default":""},"metaTypo":{"type":"object","default":{"fontSize":{"desktop":"13px"},"textTransform":"uppercase"}},"metaTextColor":{"type":"string","default":""},"metaLinkColor":{"type":"string","default":"#146EF5"},"metaIconColor":{"type":"string","default":""},"metaColorsOnImage":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"metaMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isExcerpt":{"type":"boolean","default":true},"isExcerptFromContent":{"type":"boolean","default":false},"isEllipsisOnExcerpt":{"type":"boolean","default":false},"excerptLength":{"type":"number","default":25},"excerptAlign":{"type":"string","default":"justify"},"excerptTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"excerptColor":{"type":"string","default":""},"excerptMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isReadMore":{"type":"boolean","default":true},"readMorePosition":{"type":"string","default":"auto"},"readMoreLabel":{"type":"string","default":"Read More"},"isLinkNewTab":{"type":"boolean","default":false},"readMoreAlign":{"type":"string","default":"left"},"readMoreTypo":{"type":"object","default":{"fontSize":{"desktop":"14px"},"textTransform":"uppercase","fontWeight":600}},"readMoreColors":{"type":"object","default":{"color":"#fff","bg":"#146EF5"}},"readMoreHovColors":{"type":"object","default":{"color":"#fff","bg":"#FF7A00"}},"readMorePadding":{"type":"object","default":{"vertical":"12px","horizontal":"35px"}},"readMoreBorder":{"type":"object","default":{"radius":"3px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","dashicons"],"render":"file:./render.php","viewScript":["file:./view.js","wp-util"]}'),oO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 271.673 271.673",children:[(0,l.jsx)("path",{
513 +d:"M114.939,0H10.449C4.678,0,0,4.678,0,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449V10.449C125.388,4.678,120.71,0,114.939,0z"}),(0,l.jsx)("path",{d:"M261.224,0h-104.49c-5.771,0-10.449,4.678-10.449,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449V10.449C271.673,4.678,266.995,0,261.224,0z"}),(0,l.jsx)("path",{d:"M114.939,146.286H10.449C4.678,146.286,0,150.964,0,156.735v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449v-104.49C125.388,150.964,120.71,146.286,114.939,146.286z"}),(0,l.jsx)("path",{d:"M261.224,146.286h-104.49c-5.771,0-10.449,4.678-10.449,10.449v104.49c0,5.771,4.678,10.449,10.449,10.449h104.49 c5.771,0,10.449-4.678,10.449-10.449v-104.49C271.673,150.964,266.995,146.286,261.224,146.286z"})]}),iO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 500 500",children:[(0,l.jsx)("path",{d:"M0 0L220 0L220 500L0 500L0 0Z"}),(0,l.jsx)("path",{d:"M280 280L500 280L500 500L280 500L280 280Z"}),(0,l.jsx)("path",{d:"M280 0L370 0L370 220L280 220L280 0Z"}),(0,l.jsx)("path",{d:"M410 0L500 0L500 220L410 220L410 0Z"})]}),aO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 48 48",children:[(0,l.jsx)("rect",{height:"29.498",width:"21.07",y:"-0.033"}),(0,l.jsx)("rect",{height:"29.498",width:"21.07",x:"26.93",y:"18.535"}),(0,l.jsx)("rect",{height:"13.695",width:"21.07",x:"26.93",y:"-0.033"}),(0,l.jsx)("rect",{height:"13.695",width:"21.07",y:"34.338"})]}),sO=(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{cx:"7",cy:"18",r:"1"}),(0,l.jsx)("path",{d:"m7.707 12.293c.391.391.391 1.023 0 1.414-.195.195-.451.293-.707.293s-.512-.098-.707-.293l-3-3c-.391-.391-.391-1.023 0-1.414l3-3c.391-.391 1.023-.391 1.414 0s.391 1.023 0 1.414l-2.293 2.293z"}),(0,l.jsx)("circle",{cx:"12",cy:"18",r:"1"}),(0,l.jsx)("circle",{cx:"17",cy:"18",r:"1"}),(0,l.jsx)("path",{d:"m20.707 10.707-3 3c-.195.195-.451.293-.707.293s-.512-.098-.707-.293c-.391-.391-.391-1.023 0-1.414l2.293-2.293-2.293-2.293c-.391-.391-.391-1.023 0-1.414s1.023-.391 1.414 0l3 3c.391.391.391 1.023 0 1.414z"}),(0,l.jsx)("path",{d:"m21 24h-18c-1.654 0-3-1.346-3-3v-18c0-1.654 1.346-3 3-3h18c1.654 0 3 1.346 3 3v18c0 1.654-1.346 3-3 3zm-18-22c-.552 0-1 .449-1 1v18c0 .551.448 1 1 1h18c.552 0 1-.449 1-1v-18c0-.551-.448-1-1-1z"})]}),rO=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 512 512",style:{transform:"rotate(90deg)"},children:(0,l.jsx)("path",{d:"M0,45.3v421.4h512V45.3H0z M482.1,436.8H29.9V76h452.1V436.8z M140.2,327.3l-70.9-70.9l70.9-70.9l21.3,21.3 l-49.6,49.6l49.6,49.6L140.2,327.3z M350.5,306l49.6-49.6l-49.6-49.6l21.3-21.3l70.9,70.9l-70.9,70.9L350.5,306z"})}),lO=[{label:(0,x.__)("Grid","b-blocks"),value:"grid",icon:oO},{label:(0,x.__)("Grid 1","b-blocks"),value:"grid1",icon:iO},{label:(0,x.__)("Masonry","b-blocks"),value:"masonry",icon:aO},{label:(0,x.__)("Slider","b-blocks"),value:"slider",icon:sO},{label:(0,x.__)("Ticker","b-blocks"),value:"ticker",icon:rO}],cO=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Title Meta","b-blocks"),value:"title-meta"},{label:(0,x.__)("Left Image","b-blocks"),value:"left-image"},{label:(0,x.__)("Right Image","b-blocks"),value:"right-image"},{label:(0,x.__)("Overlay Content","b-blocks"),value:"overlay-content"},{label:(0,x.__)("Overlay Content Hover","b-blocks"),value:"overlay-content-hover"},{label:(0,x.__)("Overlay Box","b-blocks"),value:"overlay-box"},{label:(0,x.__)("Overlay Content Box","b-blocks"),value:"overlay-content-box"},{label:(0,x.__)("Overlay Half Content","b-blocks"),value:"overlay-half-content"}],dO=[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Fill Available Space","b-blocks"),value:"fill"}],uO=[{label:(0,x.__)("Content","b-blocks"),value:"content"},{label:(0,x.__)("Image","b-blocks"),value:"image"}],pO=[{label:(0,x.__)("Slide","b-blocks"),value:"slide"},{label:(0,x.__)("Fade","b-blocks"),value:"fade"},{label:(0,x.__)("Creative","b-blocks"),value:"creative"}],hO=[{label:(0,x.__)("Up","b-blocks"),value:"up"},{label:(0,x.__)("Down","b-blocks"),value:"down"}],gO=[{label:(0,x.__)("Author","b-blocks"),value:"author"},{label:(0,x.__)("Title","b-blocks"),value:"title"},{label:(0,x.__)("Date","b-blocks"),value:"date"},{label:(0,x.__)("Last Modified","b-blocks"),value:"modified"}],mO=[{label:(0,x.__)("Ascending","b-blocks"),value:"asc"},{label:(0,x.__)("Descending","b-blocks"),value:"desc"}],bO=[{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"}],fO=((0,x.__)("Left","b-blocks"),(0,x.__)("Center","b-blocks"),(0,x.__)("Right","b-blocks"),(0,x.__)("Justify","b-blocks"),[{label:(0,x.__)("01/15/2022","b-blocks"),value:"m/d/Y"},{label:(0,x.__)("15/01/2022","b-blocks"),value:"d/m/Y"},{label:(0,x.__)("January 15, 2022","b-blocks"),value:"F d, Y"},{label:(0,x.__)("Jan 15, 2022","b-blocks"),value:"M d, Y"},{label:(0,x.__)("15th Jan, 2022","b-blocks"),value:"dS M, Y"},{label:(0,x.__)("15th January, 2022","b-blocks"),value:"dS F, Y"},{label:(0,x.__)("Custom","b-blocks"),value:"custom"}]),xO=[{label:(0,x.__)("Auto","b-blocks"),value:"auto"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],yO=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"elements",title:(0,x.__)("Elements","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],vO=e=>e?.trim().split(",").map((e=>e?parseInt(e):e)),kO=e=>e?.filter((e=>e&&!isNaN(e))),wO=e=>e?(e?.replace(/(<([^>]+)>)/gi,"").split(/\s+/)||[]).length:0,_O=e=>(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:e}}),CO=({[t]:__,...e},t)=>e,jO=(e,t)=>e?.map((e=>e.id))?.filter((e=>-1!==t.indexOf(e))),$O=(...e)=>e.reduce(((e,t)=>("string"==typeof t?e.push(t):"object"==typeof t&&Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e)),[]).join(" "),SO=(e=[],t)=>{switch(t){case"true":return e?.filter((e=>e.password));case"false":return e?.filter((e=>!e.password));default:return e}},TO=({attributes:e,setAttributes:t,premiumProps:n})=>{const{tickerDirection:o,tickerSpeed:i,tickerInterval:a,tickerHeight:s,tickerVisible:r,tickerIsMousePause:c}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Ticker Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Direction:","b-blocks"),value:o,onChange:e=>t({tickerDirection:e}),options:hO,...n,Component:Tn}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Speed:","b-blocks"),value:i,onChange:e=>t({tickerSpeed:e}),...n,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Values: slow, medium, fast or any value in milliseconds.","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Interval:","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({tickerInterval:parseInt(e)}),...n,Component:y.__experimentalNumberControl}),(0,l.jsx)("small",{children:(0,x.__)("Values: time in milliseconds.","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({tickerHeight:e}),units:[Pe(),Ae()],...n,Component:y.__experimentalUnitControl}),(0,l.jsx)("small",{children:(0,x.__)("Keep height 0, to auto height.","b-blocks")}),"0px"===s||"0em"===s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Post Visible:","b-blocks"),value:r,onChange:e=>t({tickerVisible:e}),min:0,max:12,step:1,beforeIcon:"visibility",...n,Component:y.RangeControl}),(0,l.jsx)("small",{children:(0,x.__)("0 to display all","b-blocks")})]}):"",(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Ticker Mouse Pause","b-blocks"),checked:c,onChange:e=>t({tickerIsMousePause:e}),...n,Component:y.ToggleControl})]})},NO=({attributes:e,setAttributes:t})=>{
514 +const{sliderIsLoop:n,sliderIsTouchMove:o,sliderIsAutoplay:i,sliderAutoplayOptions:a,sliderSpeed:s,sliderEffect:r,sliderIsPage:c,sliderIsPageClickable:d,sliderIsPageDynamic:u,sliderIsPrevNext:p}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Loop","b-blocks"),checked:n,onChange:e=>t({sliderIsLoop:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Touch Move","b-blocks"),checked:o,onChange:e=>t({sliderIsTouchMove:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Autoplay","b-blocks"),checked:i,onChange:e=>t({sliderIsAutoplay:e})}),i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Autoplay Delay (s):","content-slider-block")}),(0,l.jsx)(y.RangeControl,{value:a.delay,onChange:e=>t({sliderAutoplayOptions:{...a,delay:e}}),min:0,max:10,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Smaller delay value will be autoplay faster","content-slider-block")})]}),(0,l.jsx)(v,{children:(0,x.__)("Speed (s):","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:s,onChange:e=>t({sliderSpeed:e}),min:0,max:10,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Smaller speed & delay value will be slide faster","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Effect:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:r,onChange:e=>t({sliderEffect:e}),options:pO})]}),(0,l.jsx)("small",{children:(0,x.__)("To work fade & creative effects properly, set single column per view","b-blocks")}),(0,l.jsx)(v,{children:(0,l.jsx)("strong",{children:(0,x.__)("Pagination:","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Pagination","b-blocks"),checked:c,onChange:e=>t({sliderIsPage:e})}),c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Clickable","b-blocks"),checked:d,onChange:e=>t({sliderIsPageClickable:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Dynamic Bullets","b-blocks"),checked:u,onChange:e=>t({sliderIsPageDynamic:e})})]}),(0,l.jsx)(v,{children:(0,l.jsx)("strong",{children:(0,x.__)("Preview Next Button:","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Preview Next Button","b-blocks"),checked:p,onChange:e=>t({sliderIsPrevNext:e})})]})},MO=({attributes:e,setAttributes:t,premiumProps:n})=>{const{isPagination:i,paginationPrevLabel:a,paginationNextLabel:s,paginationColors:r,paginationHovColors:c,paginationPadding:d,paginationSpacing:u}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pagination","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Show Pagination","b-blocks"),checked:i,onChange:e=>t({isPagination:e}),...n,Component:y.ToggleControl}),(0,l.jsx)("small",{children:(0,x.__)("Pagination will not work if, 'Show All Posts' is enable","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Previous Label:","b-blocks"),value:a,onChange:e=>t({paginationPrevLabel:e}),...n,Component:y.TextControl}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Next Label:","b-blocks"),value:s,onChange:e=>t({paginationNextLabel:e}),...n,Component:y.TextControl}),(0,l.jsx)(Ya,{label:(0,x.__)("Colors:","b-blocks"),value:r,onChange:e=>t({paginationColors:e}),defaults:{color:"#fff",bg:o},...n,Component:On}),(0,l.jsx)(Ya,{label:(0,x.__)("Active & Hover Colors:","b-blocks"),value:c,onChange:e=>t({paginationHovColors:e}),defaults:{color:"#fff",bg:"#070127"},...n,Component:On}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:d,onChange:e=>t({paginationPadding:e}),defaults:{vertical:"8px",horizontal:"15px"},...n,Component:ad}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Space Between:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({paginationSpacing:e}),units:[Pe(),Ae()],...n,Component:y.__experimentalUnitControl})]})},LO=(0,f.withSelect)(((e,{attributes:t})=>{const{getPostTypes:n,getTaxonomies:o,getEntityRecords:i}=e("core"),{getDeviceType:a,getCurrentPostType:s,getCurrentPostId:r}=e("core/editor"),{postType:l}=t,c=o({per_page:-1});return{device:a()?.toLowerCase(),postTypes:n({per_page:-1})?.filter((e=>!["apb","attachment","nav_menu_item"].includes(e.slug)&&!e.slug.startsWith("wp_")))?.map((({name:e,slug:t})=>({label:e,value:t}))),currentPostType:s(),currentPostId:r(),allTaxonomies:"post"===l?c?.filter((e=>e.types.includes("post"))).filter((e=>"category"!==e.slug&&"post_tag"!==e.slug)):c?.filter((e=>e.types.includes(l))),getTaxonomy:e=>i("taxonomy",e,{per_page:-1})}}))((({attributes:e,setAttributes:t,premiumProps:n,postTypes:i,currentPostType:s,allTaxonomies:r,getTaxonomy:c,device:d})=>{const{layout:u,subLayout:p,columns:h,columnGap:g,rowGap:m,isContentEqualHight:b,sliderHeight:f,content:k,postType:w,selectedTaxonomies:C,selectedCategories:j,selectedTags:$,isPostsPerPageAll:S,postsPerPage:T,postsOrderBy:N,postsOrder:M,postsOffset:L,postsInclude:P,postsExclude:E,isExcludeCurrent:A}=e,B="grid"===u,I="grid1"===u,O="slider"===u,R="ticker"===u,z={attributes:e,setAttributes:t,premiumProps:n};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/advanced-post-block"}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(Ka,{value:u,onChange:e=>{t({layout:e,subLayout:["slider","ticker"].includes(e)&&["default","title-meta"].includes(p)||"ticker"===e&&"overlay-half-content"===p?"left-image":p,columns:["slider","ticker"].includes(e)?{...h,desktop:2}:h})},options:lO,isTextIcon:!0,proValues:["grid1"],...n}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Sub Layout:","b-blocks")}),(0,l.jsx)(Za,{value:p,onChange:e=>{t({subLayout:e}),"default"===e||"title-meta"===e||"left-image"===e||"right-image"===e?t({contentBG:{color:""},titleColor:o,metaCategoryIn:"image",metaTextColor:"",metaLinkColor:a,metaIconColor:o,excerptColor:""}):"overlay-content"===e||"overlay-content-hover"===e||"overlay-box"===e||"overlay-content-box"===e?t({contentBG:{color:"#000000b3"},titleColor:"#e7f0fe",metaCategoryIn:"content",metaTextColor:"#fff",metaLinkColor:"#b6d2fc",metaIconColor:"#e7f0fe",excerptColor:"#fff"}):"overlay-half-content"===e&&t({contentBG:{type:"gradient",gradient:"linear-gradient(0deg, #000000bf 0%, #0000 100%)"},titleColor:"#fff",metaCategoryIn:"content",metaTextColor:"#fff",metaLinkColor:"#b6d2fc",metaIconColor:"#e7f0fe",excerptColor:"#fff"}),t("left-image"===e||"right-image"===e?{columns:{...h,desktop:2}}:{columns:{...h,desktop:3}}),t("overlay-box"===e||"overlay-content-box"===e?{contentAlign:"center"}:{contentAlign:"left"})},options:I?cO.filter((e=>!["left-image","right-image"].includes(e.value))):O?cO.filter((e=>!["default","title-meta"].includes(e.value))):R?cO.filter((e=>!["overlay-half-content"].includes(e.value))):cO,proValues:["overlay-content-box","overlay-half-content"],...n})]}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when sub layout will be changed.","b-blocks")}),!I&&!R&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:h[d],onChange:e=>{t({columns:{...h,[d]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"})]}),!R&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Column Gap:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:g,onChange:e=>t({columnGap:e}),min:0,max:100,step:1,beforeIcon:"arrow-right-alt"})]}),!O&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Row Gap:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:m,onChange:e=>t({rowGap:e}),min:0,max:150,step:1,beforeIcon:"arrow-down-alt"})]}),(B||I)&&(0,
515 +l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Post Equal Height","b-blocks"),checked:b,onChange:e=>t({isContentEqualHight:e})}),O&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Slider Min Height:","b-blocks"),labelPosition:"left",value:f,onChange:e=>t({sliderHeight:e}),units:[Pe(),Ae(),Oe()]}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Content/Texts Height:","b-blocks"),labelPosition:"left",value:k?.height,onChange:e=>t({content:{...k,height:e}}),options:dO,...n,Component:y.SelectControl})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Posts Query","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Post Type:","b-blocks")}),(0,l.jsx)(Za,{value:w,onChange:e=>t({postType:e,selectedTaxonomies:[]}),options:i,proValues:["page"],...n})]}),"post"===w&&c("category")?.length?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Select Categories:","b-blocks")}),(0,l.jsx)(Sa,{value:jO(c("category"),j).map((e=>e.toString())),onChange:e=>t({selectedCategories:e.map((e=>parseInt(e)))}),options:c("category").map((e=>({label:e.name,value:e.id.toString()})))})]}):null,"post"===w&&c("post_tag")?.length?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Select Tags:","b-blocks"),value:jO(c("post_tag"),$).map((e=>e.toString())),onChange:e=>t({selectedTags:e.map((e=>parseInt(e)))}),options:c("post_tag").map((e=>({label:e.name,value:e.id.toString()}))),...n,Component:Sa})}):null,r?.length?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Select Taxonomies for filter:","b-blocks")}),r.map((e=>{const o=Object.keys(C).includes(e.slug);return(0,l.jsx)(Ya,{label:e.name,checked:o,onChange:n=>t({selectedTaxonomies:n?{...C,[e.slug]:[]}:CO(C,e.slug)}),...n,Component:y.CheckboxControl},e.slug)}))]}):null,r?.length&&Object.keys(C)?.length?Object.keys(C).map((e=>c(e)?.length?(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)(`Select ${r?.find((t=>t.slug===e))?.name}:`,"b-blocks"),value:jO(c(e),C[e]).map((e=>e.toString())),onChange:n=>t({selectedTaxonomies:{...C,[e]:n.map((e=>parseInt(e)))}}),options:c(e).map((e=>({label:e.name,value:e.id.toString()}))),...n,Component:Sa},e):null)):null,(0,l.jsx)(v,{children:(0,x.__)("Post Per Page:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:T,onChange:e=>t({postsPerPage:e,isPostsPerPageAll:-1===e}),min:-1,max:36,step:1}),(0,l.jsx)("small",{children:(0,x.__)("To show all posts set -1","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Post Order By:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:N,onChange:e=>t({postsOrderBy:e}),options:gO})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Post Order:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:M,onChange:e=>t({postsOrder:e}),options:mO})]}),!S&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Post Offset:","b-blocks"),labelPosition:"left",value:L,onChange:e=>t({postsOffset:parseInt(e)}),min:0,...n,Component:y.__experimentalNumberControl}),(0,l.jsx)("small",{children:(0,x.__)("`Post Offset` will not work if `Post Per Page` is -1","b-blocks")})]}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Include Posts:","b-blocks"),value:P?.join(","),onChange:e=>t({postsInclude:vO(e)}),...n,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter the posts id by coma separated Ex: `23,45,16`","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Exclude Posts:","b-blocks"),value:E?.join(","),onChange:e=>t({postsExclude:vO(e)}),...n,Component:y.TextControl}),(0,l.jsx)("small",{children:(0,x.__)("Enter the posts id by coma separated Ex: `23,45,16`","b-blocks")}),s===w&&(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Exclude Current Post","b-blocks"),checked:A,onChange:e=>t({isExcludeCurrent:e}),...n,Component:y.ToggleControl})]}),O||R||S?"":(0,l.jsx)(MO,{...z}),O&&(0,l.jsx)(NO,{...z}),R&&(0,l.jsx)(TO,{...z})]})})),PO=(0,f.withSelect)((e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes?.map((e=>({label:e.name,value:e.slug})))})))((({attributes:e,setAttributes:t,premiumProps:n,taxOfPostType:o,updateObj:i,imageSizes:a})=>{const{elementsSort:s,isFImg:r,fImgSize:c,fImgFitting:d,isFImgLink:u,isTitle:p,isTitleLink:h,isMeta:g,isMetaAuthor:b,isMetaAuthorLink:f,metaAuthorIcon:k,isMetaDate:w,metaDateFormat:_,metaDateIcon:C,isMetaCategory:j,metaCategoryIn:$,metaCategoryIcon:S,metaTaxonomies:T={},isMetaReadTime:N,metaReadTimeIcon:M,isMetaReadTimeSec:L,metaReadTimeLabel:P,isMetaComment:E,metaCommentIcon:A,isExcerpt:B,isExcerptFromContent:I,isEllipsisOnExcerpt:O,excerptLength:R,isReadMore:z,readMorePosition:D,readMoreLabel:F,isLinkNewTab:H}=e,[W,U]=(0,m.useState)(fO.find((e=>e.value===_))?.value||"custom");return(0,l.jsxs)(l.Fragment,{children:[p&&g&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),children:(0,l.jsx)(Ya,{label:(0,x.__)("Sort Element:"),value:s,onChange:e=>t({elementsSort:e}),...n,Component:Ma})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Feature Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Feature Image","b-blocks"),checked:r,onChange:e=>t({isFImg:e})}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Size:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({fImgSize:e}),options:a,...n,Component:y.SelectControl}),(0,l.jsx)(y.SelectControl,{className:"mt20",label:(0,x.__)("Fitting:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({fImgFitting:e}),options:bO}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Link","b-blocks"),checked:u,onChange:e=>t({isFImgLink:e})})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:p,onChange:e=>t({isTitle:e})}),p&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Title Link","b-blocks"),checked:h,onChange:e=>t({isTitleLink:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta Data","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Meta Data","b-blocks"),checked:g,onChange:e=>t({isMeta:e})}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Author","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Author","b-blocks"),checked:b,onChange:e=>t({isMetaAuthor:e})}),b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Author Link","b-blocks"),checked:f,onChange:e=>t({isMetaAuthorLink:e}),...n,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Author Icon:","b-blocks"),value:k,types:["image"],onChange:e=>t({metaAuthorIcon:e}),placeholder:(0,x.__)("Enter Author Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Date","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Date","b-blocks"),checked:w,onChange:e=>t({isMetaDate:e})}),w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt10",children:(0,x.__)("Date Format:","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"gap15",children:[(0,l.jsx)(Ya,{value:W,onChange:e=>{U(e),t({metaDateFormat:"custom"==e?"Y-m-d":e})},options:fO,...n,Component:y.SelectControl}),"custom"===W&&(0,l.jsx)(Ya,{value:_,onChange:e=>t({metaDateFormat:e}),...n,Component:y.TextControl})]}),"custom"===W&&(0,l.jsxs)("small",{children:[(0,x.__)("Documentation on date formatting in ","b-blocks")," ",(0,l.jsx)("a",{href:"https://wordpress.org/support/article/formatting-date-and-time/",target:"_blank",rel:"noreferrer","aria-label":"Documentation on Date Formatting",children:"here"}),"."]
516 +}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Date Icon:","b-blocks"),value:C,types:["image"],onChange:e=>t({metaDateIcon:e}),placeholder:(0,x.__)("Enter Date Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Category","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Category","b-blocks"),checked:j,onChange:e=>t({isMetaCategory:e})}),j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Tn,{label:(0,x.__)("Category In:","b-blocks"),value:$,onChange:e=>t({metaCategoryIn:e}),options:uO}),"content"===$&&(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Category Icon:","b-blocks"),value:S,types:["image"],onChange:e=>t({metaCategoryIcon:e}),placeholder:(0,x.__)("Enter Category Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Taxonomies","b-blocks")})}),o?.map(((e,o)=>{const{selected:a=[]}=T,{name:s,slug:r}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:o?"mt20":"",label:(0,x.__)(`Show ${s} Taxonomy`,"b-blocks"),checked:a?.includes(r),onChange:e=>{const n={...T};e?n[r]={}:delete n[r],n.selected=e?[...a,r]:a?.filter((e=>e!==r)),t({metaTaxonomies:n})},...n,Component:y.ToggleControl},r),a?.includes(r)&&(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)(`${s} Icon:`,"b-blocks"),value:T?.[r]?.icon,types:["image"],onChange:e=>i("metaTaxonomies",r,e,"icon"),placeholder:(0,x.__)(`Enter ${s} Icon URL`,"b-blocks"),...n,Component:ve})]})})),(0,l.jsx)("hr",{}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Reading Time","b-blocks")})}),(0,l.jsx)(Ya,{label:(0,x.__)("Show Reading Time","b-blocks"),checked:N,onChange:e=>t({isMetaReadTime:e}),...n,Component:y.ToggleControl}),(N||!n?.isPremium)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("small",{children:(0,x.__)("Reading Time will be displayed if the post has content!","b-blocks")}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show Reading Time Seconds","b-blocks"),checked:L,onChange:e=>t({isMetaReadTimeSec:e}),...n,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Reading Time Label:","b-blocks"),value:P,onChange:e=>t({metaReadTimeLabel:e}),placeholder:(0,x.__)("Reading Time Label"),...n,Component:y.TextControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Reading Time Icon:","b-blocks"),value:M,types:["image"],onChange:e=>t({metaReadTimeIcon:e}),placeholder:(0,x.__)("Enter Reading Time Icon URL","b-blocks"),...n,Component:ve})]}),(0,l.jsx)("hr",{}),(0,l.jsx)(v,{className:"mb10",children:(0,l.jsx)("strong",{children:(0,x.__)("Comment","b-blocks")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Comment","b-blocks"),checked:E,onChange:e=>t({isMetaComment:e})}),E&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("small",{children:(0,x.__)("Comment Count will be displayed if the comment status is open!","b-blocks")}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Comment Icon:","b-blocks"),value:A,types:["image"],onChange:e=>t({metaCommentIcon:e}),placeholder:(0,x.__)("Enter Comment Icon URL","b-blocks"),...n,Component:ve})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Excerpt","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Excerpt","b-blocks"),checked:B,onChange:e=>t({isExcerpt:e})}),B&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt15",label:(0,x.__)("Show Excerpt from Content","b-blocks"),checked:I,onChange:e=>t({isExcerptFromContent:e})}),(0,l.jsx)(Ya,{className:"mt15",label:(0,x.__)("Show Ellipsis","b-blocks"),checked:O,onChange:e=>t({isEllipsisOnExcerpt:e}),...n,Component:y.ToggleControl}),(0,l.jsx)(v,{className:"mt15",children:(0,x.__)("Excerpt Length:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:R,onChange:e=>t({excerptLength:e}),min:-1,max:120,step:1}),(0,l.jsx)("small",{children:(0,x.__)("Set -1 to show all the "+(I?"content":"excerpt"),"b-blocks")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Read More","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Read More","b-blocks"),checked:z,onChange:e=>t({isReadMore:e})}),z&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Position:","b-blocks"),labelPosition:"left",value:D,onChange:e=>t({readMorePosition:e}),options:xO,...n,Component:y.SelectControl}),(0,l.jsx)("small",{children:(0,x.__)("For the bottom position, select 'Fill Available Space' option for the 'Content/Texts Height' from General->Layout","b-blocks")}),(0,l.jsx)(v,{children:(0,x.__)("Read More Label:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:F,onChange:e=>t({readMoreLabel:""===e?"Read More":e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open link in new tab","b-blocks"),checked:H,onChange:e=>t({isLinkNewTab:e})})]})]})]})})),EO=({attributes:e,setAttributes:t})=>{const{layout:n,contentAlign:i,contentBG:s,contentPadding:r,border:c,sliderIsPage:d,sliderPageColor:u,sliderPageWidth:p,sliderPageHeight:h,sliderPageBorder:g,sliderIsPrevNext:m,sliderPrevNextColor:b,isTitle:f,titleTypo:k,titleColor:w,titleMargin:_,isMeta:C,metaCategoryIn:j,metaTypo:$,metaTextColor:S,metaLinkColor:T,metaIconColor:N,metaColorsOnImage:M,metaMargin:L,isExcerpt:P,excerptAlign:E,excerptTypo:A,excerptColor:B,excerptMargin:I,isReadMore:O,readMoreAlign:R,readMoreTypo:z,readMoreColors:D,readMoreHovColors:F,readMorePadding:H,readMoreBorder:W}=e,U="slider"===n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:i,onChange:e=>t({contentAlign:e}),options:Jt,isIcon:!0})]}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:s,onChange:e=>t({contentBG:e}),defaults:{color:""}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:r,onChange:e=>t({contentPadding:e}),defaults:{vertical:"20px",horizontal:"25px"}}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:c,onChange:e=>t({border:e}),defaults:{width:"1px",color:"#0c0d3c1a",radius:"5px"}})]}),U&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider Options","b-blocks"),initialOpen:!1,children:[d&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Pagination Bullets Color:","b-blocks"),value:u,onChange:e=>t({sliderPageColor:e}),defaultColor:o}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Width:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({sliderPageWidth:e}),units:[Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Height:","b-blocks"),labelPosition:"left",value:h,onChange:e=>t({sliderPageHeight:e}),units:[Pe(),Ae()]}),(0,l.jsx)(ed,{label:(0,x.__)("Pagination Border:","b-blocks"),value:g,onChange:e=>t({sliderPageBorder:e}),defaults:{radius:"50%"}})]}),m&&(0,l.jsx)(Ue,{label:(0,x.__)("Preview Next Button Color:","b-blocks"),value:b,onChange:e=>t({sliderPrevNextColor:e}),defaultColor:o})]}),f&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:k,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:w,onChange:e=>t({titleColor:e}),defaultColor:o}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:_,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"15px"}})]}),C&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Meta Data","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:$,onChange:e=>t({metaTypo:e}),defaults:{fontSize:{desktop:13,tablet:13,mobile:13},textTransform:"uppercase"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),
517 +value:S,onChange:e=>t({metaTextColor:e}),defaultColor:""}),(0,l.jsx)(Ue,{label:(0,x.__)("Link Color:","b-blocks"),value:T,onChange:e=>t({metaLinkColor:e}),defaultColor:o}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:N,onChange:e=>t({metaIconColor:e}),defaultColor:""}),"image"===j&&(0,l.jsx)(On,{label:(0,x.__)("Category Colors On Image:","b-blocks"),value:M,onChange:e=>t({metaColorsOnImage:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:L,onChange:e=>t({metaMargin:e}),defaults:{side:4,bottom:"15px"}})]}),P&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Excerpt","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:E,onChange:e=>t({excerptAlign:e}),options:Jt,isIcon:!0})]}),(0,l.jsx)(Oa,{value:A,onChange:e=>t({excerptTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:B,onChange:e=>t({excerptColor:e}),defaultColor:""}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:I,onChange:e=>t({excerptMargin:e}),defaults:{side:4,bottom:"10px"}})]}),O&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Read More","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Align:","b-blocks")}),(0,l.jsx)(Tn,{value:R,onChange:e=>t({readMoreAlign:e}),options:Jt.filter((e=>"justify"!==e.value)),isIcon:!0})]}),(0,l.jsx)(Oa,{value:z,onChange:e=>t({readMoreTypo:e}),defaults:{fontSize:{desktop:14,tablet:14,mobile:14},textTransform:"uppercase",fontWeight:600}}),(0,l.jsx)(On,{value:D,onChange:e=>t({readMoreColors:e}),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Hover Colors:","b-blocks"),value:F,onChange:e=>t({readMoreHovColors:e}),defaults:{color:"#fff",bg:a}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:H,onChange:e=>t({readMorePadding:e}),defaults:{vertical:"12px",horizontal:"35px"}}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:W,onChange:e=>t({readMoreBorder:e}),defaults:{radius:"3px"}})]})]})},AO=({attributes:e,setAttributes:t,isPremium:n,posts:o,taxOfPostType:i})=>{const{contentAlign:a}=e,[s,r]=(0,m.useState)(!1),c=o?.length,d=(n,o,i,a)=>{const s=zb(e[n],(e=>{a?e[o][a]=i:e[o]=i}));t({[n]:s})},u={attributes:e,setAttributes:t,premiumProps:{isPremium:n,setIsProModalOpen:r}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:yO,onSelect:()=>me(),children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsx)(LO,{...u}),"elements"===e.name&&(0,l.jsx)(PO,{...u,taxOfPostType:i,updateObj:d}),"style"===e.name&&c&&(0,l.jsx)(EO,{...u})]})})}),(0,l.jsxs)(jn,{isProModalOpen:s,setIsProModalOpen:r,block:"Posts",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Layouts: ","b-blocks")}),(0,x.__)("Checkout more layouts and sub layouts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Display Pages: ","b-blocks")}),(0,x.__)("Effortlessly showcase pages, just like you do with posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Tag Filter: ","b-blocks")}),(0,x.__)("Post filter by tags (only for default post).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Custom Taxonomy Filter: ","b-blocks")}),(0,x.__)("Custom Taxonomy filter for post and custom posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Post Offset: ","b-blocks")}),(0,x.__)("Offset to exclude first N posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Include or Exclude Posts: ","b-blocks")}),(0,x.__)("Include or Exclude the posts by ids.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Exclude Current Post: ","b-blocks")}),(0,x.__)("If you use this block in a post and that post type is selected post then you can exclude the post.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Pagination: ","b-blocks")}),(0,x.__)("Add custom pagination bottom of the posts.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Sort Elements: ","b-blocks")}),(0,x.__)("Sort the title and meta elements.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Meta Data Icon: ","b-blocks")}),(0,x.__)("Custom icon for meta data.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Meta Author Link Toggle: ","b-blocks")}),(0,x.__)("Show meta author with or without link.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Taxonomies in Meta: ","b-blocks")}),(0,x.__)("Display taxonomies within the meta data, including tags.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Reading Time: ","b-blocks")}),(0,x.__)("Show post reading time in meta area.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Excerpt from Content: ","b-blocks")}),(0,x.__)("Show excerpt from main content.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Ticker Layout Options: ","b-blocks")}),(0,x.__)("Options for ticker post layout.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Feature Image Size: ","b-blocks")}),(0,x.__)("Options to set feature image size.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Read More Position: ","b-blocks")}),(0,x.__)("Options to set the position fo Read More button.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Shortcode: ","b-blocks")}),(0,x.__)("Shortcode option to use anywhere.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Update Post Query: ","b-blocks")}),(0,x.__)("Update Post Query using b_blocks_posts_query filter.","b-blocks")]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:a,onChange:e=>t({contentAlign:e})})})]})},BO="bBlocksPosts",IO=()=>(0,l.jsxs)("h3",{className:`${BO}Loading`,children:[(0,l.jsx)(y.Spinner,{})," ",(0,x.__)("Loading...","b-blocks")]}),OO=()=>(0,l.jsx)("h3",{className:`${BO}NotFound`,children:(0,x.__)("No posts found!! Please update the query or add some posts","b-blocks")}),RO=({attributes:e,id:t})=>{const{columnGap:n,rowGap:o,isContentEqualHight:i,sliderHeight:a,paginationColors:s,paginationHovColors:r,paginationPadding:c,paginationSpacing:d,fImgFitting:u="cover",contentAlign:p,contentBG:h,contentPadding:g,border:m,sliderPageColor:b,sliderPageWidth:f,sliderPageHeight:x,sliderPageBorder:y,sliderPrevNextColor:v,titleTypo:k,titleColor:w,titleMargin:_,metaTypo:C,metaTextColor:j,metaLinkColor:$,metaIconColor:S,metaColorsOnImage:T,metaMargin:N,excerptAlign:M,excerptTypo:L,excerptColor:P,excerptMargin:E,readMoreAlign:A,readMoreTypo:B,readMoreColors:I,readMoreHovColors:O,readMorePadding:R,readMoreBorder:z}=e,D=`#${t}`,F=`${D} .${BO}Article`,H=`${D} .${BO}LayoutSlider`,W=`${F} .${BO}ElReadMore`,U=`${F} .${BO}ElTitle`,G=`${F} .${BO}ElMeta`,V=`${D} .${BO}Pagination`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
518 +__html:`\n\t\t${ps("",k)?.googleFontLink}\n\t\t${ps("",C)?.googleFontLink}\n\t\t${ps("",L)?.googleFontLink}\n\t\t${ps("",B)?.googleFontLink}\n\t\t${ps(`${U}, ${U} a`,k)?.styles}\n\t\t${ps(`${G}, ${G} *, ${F} .${BO}ElThumbCats`,C)?.styles}\n\t\t${ps(`${F} .${BO}ElExcerpt`,L)?.styles}\n\t\t${ps(`${W} a`,B)?.styles}\n\n\t\t${V} .${BO}PagePrev,\n\t\t${V} .${BO}PageNumber,\n\t\t${V} .${BO}PageNext{\n\t\t\tfont-size: 15px;\n\t\t\t${ss(s)}\n\t\t\tpadding: ${us(c)};\n\t\t\tmargin: 0 calc( ${d} / 2 );\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${V} .${BO}PagePrev,\n\t\t\t${V} .${BO}PageNumber,\n\t\t\t${V} .${BO}PageNext{\n\t\t\t\tfont-size: 12px;\n\t\t\t\tpadding: ${us(c)?.split(" ").map((e=>`calc( ${e} / 2 )`)).join(" ")};\n\t\t\t\tmargin: 0 calc( ${d} / 4 );\n\t\t\t}\n\t\t}\n\t\t${V} .${BO}PagePrev:hover,\n\t\t${V} .${BO}PageNumber:hover,\n\t\t${V} .${BO}PageNext:hover,\n\t\t${V} .${BO}PageActive{\n\t\t\t${ss(r)}\n\t\t}\n\n\t\t${F}{\n\t\t\t${is(m)}\n\t\t}\n\t\t${D} .${BO}SLDefault,\n\t\t${D} .${BO}SLSideImage{\n\t\t\ttext-align: ${p};\n\t\t\t${os(h)}\n\t\t}\n\n\t\t${F} .${BO}ElTexts{\n\t\t\tpadding: ${us(g)};\n\t\t}\n\t\t${D} .${BO}SLOverlay .${BO}ElTexts{\n\t\t\t${os(h)}\n\t\t\talign-items: ${"left"===p?"flex-start":"right"===p?"flex-end":"center"===p?"center":""}\n\t\t}\n\n\t\t${U}, ${U} a{\n\t\t\ttext-align: ${p};\n\t\t\tcolor: ${w};\n\t\t}\n\t\t${U}{\n\t\t\tmargin: ${us(_)};\n\t\t}\n\t\t${G}{\n\t\t\tjustify-content: ${"left"===p?"flex-start":"right"===p?"flex-end":"center"};\n\t\t\tcolor: ${j};\n\t\t\tmargin: ${us(N)};\n\t\t}\n\t\t${G} a{\n\t\t\tcolor: ${$};\n\t\t}\n\t\t${G} .dashicons{\n\t\t\tcolor: ${S};\n\t\t}\n\t\t${F} .${BO}ElThumb img, ${F}.${BO}SLOverlay img{\n\t\t\tobject-fit: ${u};\n\t\t}\n\t\t${F} .${BO}ElThumbCats a{\n\t\t\t${ss(T)}\n\t\t}\n\t\t${F} .${BO}ElExcerpt{\n\t\t\ttext-align: ${M};\n\t\t\tcolor: ${P};\n\t\t\tmargin: ${us(E)};\n\t\t}\n\t\t${W}{\n\t\t\ttext-align: ${A};\n\t\t}\n\t\t${W} a{\n\t\t\t${ss(I)}\n\t\t\tpadding: ${us(R)};\n\t\t\t${is(z)}\n\t\t}\n\t\t${W} a:hover{\n\t\t\t${ss(O)}\n\t\t}\n\n\t\t${D} .${BO}LayoutGrid,\n\t\t${D} .${BO}LayoutGrid1{\n\t\t\tgrid-gap: ${o}px ${n}px;\n\t\t\talign-items: ${!1===i?"start":"initial"};\n\t\t}\n\n\t\t${H},\n\t\t${H} .swiper-slide article{\n\t\t\tmin-height: ${a};\n\t\t}\n\t\t${H} .swiper-pagination .swiper-pagination-bullet{\n\t\t\tbackground: ${b};\n\t\t\twidth: ${f};\n\t\t\theight: ${x};\n\t\t\t${is(y)}\n\t\t}\n\t\t${H} .swiper-button-prev,\n\t\t${H} .swiper-button-next{\n\t\t\tcolor: ${v};\n\t\t}\n\t`.replace(/\s+/g," ")}})},zO=({post:e,attributes:t})=>{const{link:n,thumbnail:{url:o,alt:i},categories:a}=e,{isFImg:s,isFImgLink:r,isMeta:c,isMetaCategory:d,metaCategoryIn:u,isLinkNewTab:p}=t;return s&&o?(0,l.jsxs)("figure",{className:`${BO}ElThumb`,children:[r?(0,l.jsx)("a",{href:n,target:p?"_blank":"_self",rel:"noreferrer","aria-label":i,children:(0,l.jsx)("img",{src:o,alt:i})}):(0,l.jsx)("img",{src:o,alt:i}),c&&d&&"image"===u&&a.space&&(0,l.jsx)("div",{className:`${BO}ElThumbCats`,dangerouslySetInnerHTML:{__html:a.space}})]}):null},DO=({post:e,attributes:t})=>{const{author:n}=e,{name:o,link:i}=n||{},{isMetaAuthor:a,isMetaAuthorLink:s=!0,metaAuthorIcon:r}=t;return a&&o?(0,l.jsxs)("span",{children:[r?(0,l.jsx)("img",{src:r,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-admin-users"}),s?(0,l.jsx)("a",{href:i,target:"_blank",rel:"noreferrer","aria-label":o,children:o}):(0,l.jsx)("span",{children:o})]}):null},FO=({post:e,attributes:t})=>{const{date:n}=e,{isMetaDate:o,metaDateIcon:i}=t;return o&&n?(0,l.jsxs)("span",{children:[i?(0,l.jsx)("img",{src:i,alt:"Date"}):(0,l.jsx)("span",{className:"dashicons dashicons-calendar-alt"}),(0,l.jsx)("span",{children:n})]}):null},HO=({post:e,attributes:t})=>{const{categories:n}=e,{isMetaCategory:o,metaCategoryIn:i,metaCategoryIcon:a}=t;return o&&"content"===i&&n.coma?(0,l.jsxs)("span",{children:[a?(0,l.jsx)("img",{src:a,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-category"}),_O(n.coma)]}):null},WO=({post:e,attributes:t})=>{const{taxonomies:n={}}=e,{metaTaxonomies:o={}}=t,{selected:i=[]}=o;return i.map((e=>{const t=n[e],i=o[e]?.icon,a=i?(0,l.jsx)("img",{src:i,alt:e}):(0,l.jsx)("span",{className:"dashicons "+("post_tag"===e?"dashicons-tag":"dashicons-category")});return t?(0,l.jsxs)("span",{children:[a,_O(t?.split("a><a")?.join("a>, <a"))]},e):null}))},UO=({post:e,attributes:t})=>{const{readTime:n,content:o}=e,{isMetaReadTime:i,metaReadTimeIcon:a,isMetaReadTimeSec:s,metaReadTimeLabel:r}=t,c=s?`${n?.min}:${n?.sec}`:n?.min;return i&&o?(0,l.jsxs)("span",{children:[a?(0,l.jsx)("img",{src:a,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-clock"}),(0,l.jsxs)("span",{children:[c," ",r]})]}):null},GO=({post:e,attributes:t})=>{const{link:n,title:o,commentCount:i,commentStatus:a}=e,{isMetaComment:s,metaCommentIcon:r}=t;return s&&"open"===a?(0,l.jsxs)("span",{children:[r?(0,l.jsx)("img",{src:r,alt:"Author"}):(0,l.jsx)("span",{className:"dashicons dashicons-admin-comments"}),(0,l.jsx)("a",{href:`${n}/#comments`,target:"_blank",rel:"noreferrer","aria-label":`Comments of ${o}`,children:i})]}):null},VO=({post:e,attributes:t})=>{const{isMeta:n}=t;return n&&(0,l.jsxs)("div",{className:`${BO}ElMeta`,children:[(0,l.jsx)(DO,{post:e,attributes:t}),(0,l.jsx)(FO,{post:e,attributes:t}),(0,l.jsx)(HO,{post:e,attributes:t}),(0,l.jsx)(WO,{post:e,attributes:t}),(0,l.jsx)(UO,{post:e,attributes:t}),(0,l.jsx)(GO,{post:e,attributes:t})]})},qO=({post:e,attributes:t})=>{const{link:n,title:o}=e,{isTitle:i,isTitleLink:a,isLinkNewTab:s}=t;return i?(0,l.jsx)(l.Fragment,{children:a?(0,l.jsx)("h3",{className:`${BO}ElTitle`,children:(0,l.jsx)("a",{href:n,target:s?"_blank":"_self",rel:"noreferrer",dangerouslySetInnerHTML:{__html:o},"aria-label":o})}):(0,l.jsx)("h3",{className:`${BO}ElTitle`,dangerouslySetInnerHTML:{__html:o}})}):null},YO=({post:e,attributes:t})=>{const{elementsSort:n=["title","meta"]}=t;return n.map(((n,o)=>"title"===n?(0,l.jsx)(qO,{post:e,attributes:t},o):(0,l.jsx)(VO,{post:e,attributes:t},o)))},KO=({post:e,attributes:t})=>{const{excerpt:n,content:o}=e,{isExcerpt:i,isExcerptFromContent:a,isEllipsisOnExcerpt:s,excerptLength:r}=t,c=!a&&n?n:o,d=s&&((u=c)?u.split(" ").length:0)>r?"...":"";var u;const p=-1===r?c:`${((e,t)=>e?e.split(/\s+/).slice(0,t).join(" "):"")(c,r)}${d}`;return i&&c?(0,l.jsx)("div",{className:`${BO}ElExcerpt ${BO}InnerContent`,dangerouslySetInnerHTML:{__html:p}}):null},QO=({post:e,attributes:t})=>{const{link:n}=e,{isReadMore:o,readMorePosition:i="auto",readMoreLabel:a,isLinkNewTab:s}=t;return o?(0,l.jsx)("div",{className:`${BO}ElReadMore ${i}`,children:(0,l.jsx)("a",{href:n,target:s?"_blank":"_self",rel:"noreferrer",dangerouslySetInnerHTML:{__html:St(a)},"aria-label":a})}):null},ZO=({post:e,attributes:t,postClass:n})=>{const{subLayout:o}=t,i=$O(n,`${BO}SLDefault`);return(0,l.jsxs)("article",{className:i,children:[(0,l.jsx)(zO,{post:e,attributes:t}),(0,l.jsxs)("div",{className:`${BO}ElTexts`,children:[(0,l.jsx)(YO,{post:e,attributes:t}),"title-meta"!==o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(KO,{post:e,attributes:t}),(0,l.jsx)(QO,{post:e,attributes:t})]})]})]})},XO=({post:e,attributes:t,postClass:n})=>{const{thumbnail:o}=e,{subLayout:i,isFImg:a}=t,s="left-image"===i,r="right-image"===i,c=$O(n,`${BO}SLSideImage`,{grid:a&&o.url,leftImage:s,rightImage:r});return(0,l.jsxs)("article",{className:c,children:[s&&(0,l.jsx)(zO,{post:e,attributes:t}),(0,l.jsxs)("div",{className:`${BO}ElTexts`,children:[(0,l.jsx)(YO,{post:e,attributes:t}),(0,l.jsx)(KO,{post:e,attributes:t}),(0,l.jsx)(QO,{post:e,attributes:t})]}),r&&(0,l.jsx)(zO,{post:e,attributes:t})]})},JO=({post:e,attributes:t,postClass:n})=>{const{title:o,thumbnail:{url:i}}=e,{subLayout:a}=t,s=$O(n,`${BO}SLOverlay`,{[`${BO}SLOverlayHover`]:"overlay-content-hover"===a&&i,[`${BO}SLOverlayBox`]:"overlay-box"===a||"overlay-content-box"===a,[`${BO}SLOverlayHalfContent`]:"overlay-half-content"===a});return(0,l.jsxs)("article",{className:s,children:[i&&(0,
519 +l.jsx)("img",{src:i,alt:o}),(0,l.jsxs)("div",{className:`${BO}ElTexts`,children:[(0,l.jsx)(YO,{post:e,attributes:t}),"overlay-box"!==a&&"overlay-half-content"!==a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(KO,{post:e,attributes:t}),(0,l.jsx)(QO,{post:e,attributes:t})]})]})]})},eR=({post:e,attributes:t})=>{const{subLayout:n,content:o={height:"auto"}}=t,{id:i,thumbnail:a}=e,s=$O(`${BO}Article`,`${BO}Article-${i}`,`${o?.height}ContentHeight`,{hasThumbnail:a.url});switch(n){case"default":case"title-meta":return(0,l.jsx)(ZO,{post:e,attributes:t,postClass:s});case"left-image":case"right-image":return(0,l.jsx)(XO,{post:e,attributes:t,postClass:s});case"overlay-content":case"overlay-content-hover":case"overlay-box":case"overlay-content-box":case"overlay-half-content":return(0,l.jsx)(JO,{post:e,attributes:t,postClass:s});default:return null}};function tR(){return tR=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},tR.apply(this,arguments)}function nR(e,t){return nR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},nR(e,t)}var oR=function(e){var t,n;function o(){var t;return(t=e.call(this)||this).state={columns:[],childRefs:[],hasDistributed:!1},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,nR(t,n);var i=o.prototype;return i.componentDidUpdate=function(){this.state.hasDistributed||this.props.sequential||this.distributeChildren()},o.getDerivedStateFromProps=function(e,t){var n=e.children,i=e.columnsCount,a=i!==t.columns.length;return t&&n===t.children&&!a?null:tR({},o.getEqualCountColumns(n,i),{children:n,hasDistributed:!1})},i.shouldComponentUpdate=function(e){return e.children!==this.state.children||e.columnsCount!==this.props.columnsCount},i.distributeChildren=function(){var e=this,t=this.props,n=t.children,o=t.columnsCount,i=Array(o).fill(0);if(this.state.childRefs.every((function(e){return e.current.getBoundingClientRect().height}))){var a=Array.from({length:o},(function(){return[]})),s=0;b().Children.forEach(n,(function(t){if(t&&b().isValidElement(t)){var n=e.state.childRefs[s].current.getBoundingClientRect().height,o=i.indexOf(Math.min.apply(Math,i));i[o]+=n,a[o].push(t),s++}})),this.setState((function(e){return tR({},e,{columns:a,hasDistributed:!0})}))}},o.getEqualCountColumns=function(e,t){var n=Array.from({length:t},(function(){return[]})),o=0,i=[];return b().Children.forEach(e,(function(e){if(e&&b().isValidElement(e)){var a=b().createRef();i.push(a),n[o%t].push(b().createElement("div",{style:{display:"flex",justifyContent:"stretch"},key:o,ref:a},e)),o++}})),{columns:n,childRefs:i}},i.renderColumns=function(){var e=this.props,t=e.gutter,n=e.itemTag,o=e.itemStyle;return this.state.columns.map((function(e,i){return b().createElement(n,{key:i,style:tR({display:"flex",flexDirection:"column",justifyContent:"flex-start",alignContent:"stretch",flex:1,width:0,gap:t},o)},e.map((function(e){return e})))}))},i.render=function(){var e=this.props,t=e.gutter,n=e.className,o=e.style,i=e.containerTag;return b().createElement(i,{style:tR({display:"flex",flexDirection:"row",justifyContent:"center",alignContent:"stretch",boxSizing:"border-box",width:"100%",gap:t},o),className:n},this.renderColumns())},o}(b().Component);oR.propTypes={},oR.defaultProps={columnsCount:3,gutter:"0",className:null,style:{},containerTag:"div",itemTag:"div",itemStyle:{},sequential:!1};const iR=oR;var aR="undefined"!=typeof window?m.useLayoutEffect:m.useEffect,sR=function(e){var t,n,o,i,a,s=e.columnsCountBreakPoints,r=void 0===s?{350:1,750:2,900:3}:s,l=e.gutterBreakPoints,c=void 0===l?{}:l,d=e.children,u=e.className,p=void 0===u?null:u,h=e.style,g=void 0===h?null:h,f=(t=function(){var e=(0,m.useState)(!1),t=e[0],n=e[1];return aR((function(){n(!0)}),[]),t}(),n=(0,m.useState)("undefined"!=typeof window?window.innerWidth:0),o=n[0],i=n[1],a=(0,m.useCallback)((function(){t&&i(window.innerWidth)}),[t]),aR((function(){if(t)return window.addEventListener("resize",a),a(),function(){return window.removeEventListener("resize",a)}}),[t,a]),o),x=(0,m.useCallback)((function(e,t){var n=Object.keys(e).sort((function(e,t){return e-t})),o=n.length>0?e[n[0]]:t;return n.forEach((function(t){t<f&&(o=e[t])})),o}),[f]),y=(0,m.useMemo)((function(){return x(r,1)}),[x,r]),v=(0,m.useMemo)((function(){return x(c,"10px")}),[x,c]);return b().createElement("div",{className:p,style:g},b().Children.map(d,(function(e,t){return b().cloneElement(e,{key:t,columnsCount:y,gutter:v})})))};sR.propTypes={};const rR=sR,lR=iR,cR=({posts:e,attributes:t})=>{const{columns:n,columnGap:o,rowGap:i}=t,{desktop:a=3,tablet:s=2,mobile:r=1}=n;return(0,l.jsx)(rR,{className:`${BO}LayoutMasonry`,columnsCountBreakPoints:{0:r,576:s,768:a},children:(0,l.jsx)(lR,{gutter:`${i}px ${o}px`,children:e.map((e=>(0,l.jsx)(eR,{post:e,attributes:t},e.id)))})})},dR=({posts:e,attributes:t,id:n,Slider:o,Ticker:i})=>{const{layout:a,columns:s}=t,{desktop:r=3,tablet:c=2,mobile:d=1}=s,u=()=>e.map((e=>(0,l.jsx)(eR,{post:e,attributes:t},e.id)));switch(a){case"grid":return(0,l.jsx)("div",{className:`${BO}LayoutGrid columns-${r} columns-tablet-${c} columns-mobile-${d}`,children:(0,l.jsx)(u,{})});case"grid1":return(0,l.jsx)("div",{className:`${BO}LayoutGrid1`,children:(0,l.jsx)(u,{})});case"masonry":return(0,l.jsx)(cR,{posts:e,attributes:t});case"slider":return(0,l.jsx)(o,{posts:e,attributes:t,id:n});case"ticker":return(0,l.jsx)(i,{posts:e,attributes:t,id:n});default:return null}},uR="&#183;",pR=(e,t)=>{let n=t-e+1;return Array.from({length:n},((t,n)=>n+e))},hR=({attributes:e,totalCount:t,onChange:n})=>{const{layout:o,isPostsPerPageAll:i,postsPerPage:a,isPagination:s,paginationPrevLabel:r,paginationNextLabel:c}=e,[d,u]=(0,m.useState)(1),p=(({currentPage:e,totalCount:t,pageSize:n,siblingCount:o=1})=>(0,m.useMemo)((()=>{const i=Math.ceil(t/n);if(o+5>=i)return pR(1,i);const a=Math.max(e-o,1),s=Math.min(e+o,i),r=a>2,l=s<i-2,c=i;if(!r&&l)return[...pR(1,3+2*o),uR,i];if(r&&!l){let e=pR(i-(3+2*o)+1,i);return[1,uR,...e]}if(r&&l){let e=pR(a,s);return[1,uR,...e,uR,c]}}),[e,t,n,o]))({currentPage:d,totalCount:t,pageSize:a,siblingCount:1});if(0===d||p.length<2)return null;let h=p[p.length-1];const g=e=>{n(e),u(e)};return s&&!i&&"slider"!==o&&"ticker"!==o?(0,l.jsxs)("ul",{className:`${BO}Pagination`,children:[(0,l.jsx)("li",{className:`${BO}PageNumber ${1===d?"disabled":""}`,onClick:()=>g(d-1),children:r}),p.map(((e,t)=>e===uR?(0,l.jsx)("li",{className:"dots",children:"·····"},t):(0,l.jsxs)("li",{className:`${BO}PageNumber ${e===d?`${BO}PageActive`:""}`,onClick:()=>g(e),children:[" ",e]},t))),(0,l.jsx)("li",{className:`${BO}PageNumber ${d===h?"disabled":""}`,onClick:()=>g(d+1),children:c})]}):null},gR=({posts:e,attributes:t,id:n})=>{const{columns:o,columnGap:i,sliderIsLoop:a,sliderIsTouchMove:s,sliderIsAutoplay:r,sliderAutoplayOptions:c={delay:1.5},sliderSpeed:d,sliderEffect:u,sliderIsPage:p,sliderIsPageClickable:h,sliderIsPageDynamic:g,sliderIsPrevNext:b}=t;return(0,m.useEffect)((()=>{(e=>{const t=[],n=document.querySelectorAll(`#${e} .swiper .swiper-slide`),o=document.querySelectorAll(`#${e} .swiper .swiper-slide .${BO}ElTexts`);o?.forEach((e=>{t.push(e?.clientHeight)})),n?.length&&n.forEach((e=>{e.querySelector("article").style.height=`${Math.max(...t)}px`}))})(n)}),[e?.length]),(0,l.jsx)(Ux,{className:`${BO}LayoutSlider`,spaceBetween:i,slidesPerView:o.mobile,breakpoints:{576:{slidesPerView:o.tablet},768:{slidesPerView:o.desktop}},modules:[Of,Ff,Vf,Pf,Af],loop:a,allowTouchMove:s,grabCursor:s,autoplay:!!r&&{delay:1e3*c?.delay},speed:1e3*d,effect:u,fadeEffect:{crossFade:!0},creativeEffect:{prev:{shadow:!0,translate:["-120%",0,-500]},next:{shadow:!0,translate:["120%",0,-500]}},pagination:!!p&&{clickable:h,dynamicBullets:g},navigation:b,allowSlideNext:!0,allowSlidePrev:!0,autoHeight:!1,children:e.map((e=>(0,l.jsx)(Gx,{children:(0,l.jsx)(eR,{post:e,attributes:t})},e.id)))})},mR=({posts:e,attributes:t,id:n})=>{
520 +const{columns:o,columnGap:i,sliderIsLoop:a,sliderIsTouchMove:s,sliderIsAutoplay:r,sliderAutoplayOptions:c={delay:1.5},sliderSpeed:d,sliderEffect:u,sliderIsPage:p,sliderIsPageClickable:h,sliderIsPageDynamic:g,sliderIsPrevNext:b}=t,[f,x]=(0,m.useState)(!0),y=()=>(0,l.jsx)(gR,{posts:e,attributes:t,id:n});return(0,m.useEffect)((()=>{x(!f)}),[o,i,a,s,r,c,d,u,p,h,g,b]),(0,l.jsx)(y,{})},bR=jQuery,fR=({posts:e,attributes:t,id:n})=>{const{rowGap:o,tickerDirection:i,tickerSpeed:a,tickerInterval:s,tickerHeight:r,tickerVisible:c,tickerIsMousePause:d}=t,u=(0,m.useRef)(null),p=(0,m.useRef)(null),h=`#${n}`;return(0,m.useEffect)((()=>{const e=p.current;e&&(e.innerHTML="",e.innerHTML=u.current.outerHTML,bR(`${h} .${BO}LayoutTickerWrapper .${BO}LayoutTicker`).easyTicker((e=>{const{rowGap:t,tickerDirection:n="up",tickerSpeed:o="slow",tickerInterval:i=2e3,tickerHeight:a="0px",tickerVisible:s=3,tickerIsMousePause:r=!0}=e;return{direction:n,easing:"swing",speed:isNaN(o)?o:parseInt(o),interval:i,height:"0px"===a||"0em"===a?"auto":a,gap:t,visible:s,mousePause:r}})(t)))}),[o,i,a,s,r,c,d]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:`${BO}LayoutTickerWrapper`,ref:p}),(0,l.jsx)("div",{className:`${BO}LayoutTicker`,ref:u,children:(0,l.jsx)("div",{children:e.map((e=>(0,l.jsx)(eR,{post:e,attributes:t},e.id)))})})]})},xR=({posts:e,totalPosts:t,attributes:n,setAttributes:o,id:i,isPremium:a})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(RO,{attributes:n,id:i}),(0,l.jsx)(dR,{posts:e,attributes:n,id:i,Slider:mR,Ticker:fR}),a&&(0,l.jsx)(hR,{attributes:n,totalCount:t,onChange:e=>o({paginationCurrentPage:e})})]}),{dateI18n:yR}=wp.date,vR=(0,f.withSelect)(((e,{attributes:t})=>{const{getUsers:n,getEntityRecords:o,getTaxonomies:i,getMedia:a,getComments:s}=e("core"),{postType:r,selectedTaxonomies:l={},selectedCategories:c=[],selectedTags:d=[],isPostsPerPageAll:u,postsPerPage:p,postsOrderBy:h,postsOrder:g,postsOffset:m=0,postsInclude:b=[],postsExclude:f=[],isExcludeCurrent:x,isPagination:y,paginationCurrentPage:v,fImgSize:k="full",metaDateFormat:w="M j, Y"}=t,_="post"===r?{categories:c}:{},C="post"===r?{tags:d}:{},j=Object.assign({},l?.category?{categories:l.category}:{},l?.post_tag?{tags:l.post_tag}:{},(e=>Object.fromEntries(Object.entries(e).filter((([e,t])=>(e=>"category"!==e&&"post_tag"!==e)(e)))))(l)),$={...j,..._,...C,per_page:u?-1:p,orderby:h,order:g,offset:u?0:m,...kO(b)?.length?{include:kO(b)}:{},exclude:x?[e("core/editor").getCurrentPostId(),...kO(f)]:kO(f),status:"publish"},S=SO(o("postType",r,{...$,per_page:-1}),"false"),T=p*(v-1),N=T+p,M=S?.slice(T,N),L=e=>o("taxonomy",e,{per_page:-1}),P=e=>s({per_page:-1})?.filter((({post:t})=>e===t)),E=i({per_page:-1})?.filter((e=>e.types.includes(r)&&"category"!==e.slug))?.map((({name:e,slug:t,rest_base:n})=>({name:e,slug:t,rest_base:n}))),A=y&&!u?M:SO(o("postType",r,$),"false");return{totalPosts:S?.length,posts:(e=>e?.map((e=>{const{id:t,link:o,slug:i,featured_media:s,title:r,excerpt:l,author:c,categories:d,content:u,date:p,date_gmt:h,modified:g,modified_gmt:m,comment_status:b,status:f}=e,x=((e,t)=>{const n=a(e),o=n?.media_details?.sizes?.[t]?.source_url||n?.source_url;return{url:o?.replace(/<[^>]+>/g,""),alt:n?.alt_text}})(s,k),y={};E?.map((t=>{const n=L(t.slug)?.filter((n=>e[t.rest_base]?.includes(n.id)))?.map((e=>`<a href='${e.link}' rel='${t.slug}'>${e.name}</a>`));y[t.slug]=n?.join("")}));const v=u?.raw?.replace(/(<([^>]+)>)/gi,""),_=d?.length?L("category")?.filter((e=>d?.includes(e.id)))?.map((e=>`<a href='${e.link}' rel='category tag'>${e.name}</a>`)):[],C=n({who:"authors"})?.map((({id:e,name:t,link:n})=>({id:e,name:t,link:n})))?.find((e=>e.id===c));return{id:t,link:o,name:i,thumbnail:x,title:r?.rendered,excerpt:l?.raw?.replace(/(<([^>]+)>)/gi,"")?.trim(),content:v,author:C,date:yR(w,new Date(p)),dateGMT:h,modifiedDate:g,modifiedDateGMT:m,commentCount:P(t)?.length,commentStatus:b,categories:{coma:_?.join(", "),space:_?.join(" ")},taxonomies:y,readTime:{min:Math.floor(wO(v)/200),sec:Math.floor(wO(v)%200/(200/60))},status:f}})))(A),taxOfPostType:E,media:e=>a(e)}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,totalPosts:a,posts:s,taxOfPostType:r}=e,c=(0,h.useBlockProps)(),d=bBlocksPremiumChecker;(0,m.useEffect)((()=>me()),[i]),(0,m.useEffect)((()=>n({paginationCurrentPage:1})),[]);const u=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(AO,{attributes:t,setAttributes:n,isPremium:d,posts:s,taxOfPostType:r}),s?s?.length?(0,l.jsx)("div",{...c,children:(0,l.jsx)(xR,{posts:s,totalPosts:a,attributes:t,setAttributes:n,id:u,isPremium:d})}):(0,l.jsx)(OO,{}):(0,l.jsx)(IO,{})]})}));Pl(nO.name)&&(0,p.registerBlockType)(nO,{icon:Ar,transforms:{from:[{type:"block",blocks:["ap-block/posts"],transform:e=>(0,p.createBlock)("b-blocks/posts",e)},{type:"prefix",prefix:"apb",transform:()=>(0,p.createBlock)("b-blocks/posts")},{type:"prefix",prefix:"posts",transform:()=>(0,p.createBlock)("b-blocks/posts")}],to:[{type:"block",blocks:["ap-block/posts"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("ap-block/posts",e)}]},edit:vR,save:()=>null});const kR=JSON.parse('{"apiVersion":3,"name":"b-blocks/price-lists","title":"Price Lists","description":"Display Price lists section.","category":"bBlocks","keywords":["price","lists","price lists section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"products":{"type":"array","default":[{"background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{},"name":"Product 1 Name","nameColor":"#333","desc":"This content area describes product 1 descriptions or details.","descColor":"#333","price":"$99.99","priceColor":"#146EF5","separator":{"width":"40%","height":"1px","color":"#bbb"}},{"background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{},"name":"Product 2 Name","nameColor":"#333","desc":"This content area describes product 2 descriptions or details.","descColor":"#333","price":"$99.99","priceColor":"#146EF5","separator":{"width":"40%","height":"1px","color":"#bbb"}},{"background":{"color":"#0000"},"img":{"id":null,"url":"","alt":"","title":""},"imgBorder":{},"name":"Product 3 Name","nameColor":"#333","desc":"This content area describes product 3 descriptions or details.","descColor":"#333","price":"$99.99","priceColor":"#146EF5","separator":{"width":"40%","height":"1px","color":"#bbb"}}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"40px"},"rowGap":{"type":"string","default":"30px"},"layout":{"type":"string","default":"vertical"},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"20px"}},"imgMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"nameTypo":{"type":"object","default":{"fontSize":{"desktop":"18px","tablet":"17px","mobile":"16px"},"fontWeight":600}},"nameMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"},"fontStyle":"italic"}},"descMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"priceTypo":{"type":"object","default":{"fontSize":{"desktop":"24px","tablet":"22px","mobile":"20px"},"fontStyle":"italic"}},"isSep":{"type":"boolean","default":true}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),wR=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateProduct:n,activeIndex:i,setActiveIndex:a,device:s})=>{const{products:r=[],columns:c,columnGap:p,rowGap:g,layout:m,textAlign:b,padding:f,imgMargin:k,nameTypo:w,nameMargin:C,isDesc:j,descTypo:$,descMargin:S,priceTypo:T,isSep:N}=e,M=()=>{t({
521 +products:[...r,{background:{color:"#0000"},img:{id:null,url:"",alt:"",title:""},imgBorder:{},name:`Product ${r.length+1} Name`,nameColor:"#333",desc:`This content area describes product ${r.length+1} descriptions or details.`,descColor:"#333",price:"$99.99",priceColor:o,separator:{width:"40%",height:"1px",color:"#bbb"}}]}),a(r.length)},{background:L={},img:P={},imgBorder:E={},nameColor:A="",descColor:B="",priceColor:I="",separator:O={}}=r[i]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Product","b-blocks"),children:[null!==i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Product No ${i+1}:`,"b-blocks")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:L,onChange:e=>n("background",e)}),(0,l.jsx)(v,{children:(0,x.__)("Image:","b-blocks")}),(0,l.jsx)(ke,{value:P,onChange:e=>n("img",e),placeholder:(0,x.__)("Enter Image URL","b-blocks")}),(0,l.jsx)(nd,{className:"mt20",value:P,onChange:e=>n("img",e)}),(0,l.jsx)(ed,{label:(0,x.__)("Image Border:","b-blocks"),value:E,onChange:e=>n("imgBorder",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Name Color:","b-blocks"),value:A,onChange:e=>n("nameColor",e),defaultColor:"#333"}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:B,onChange:e=>n("descColor",e),defaultColor:"#333"}),(0,l.jsx)(Ue,{label:(0,x.__)("Price Color:","b-blocks"),value:I,onChange:e=>n("priceColor",e),defaultColor:o}),(0,l.jsx)(Ta,{value:O,onChange:e=>n("separator",e),defaults:{width:"40%",height:"1px",color:"#bbb"}}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<r?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{e.preventDefault(),t({products:[...r.slice(0,i),...r.slice(i+1)]}),a(0===i?0:i-1)},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{e.preventDefault(),t({products:[...r.slice(0,i),{...r[i]},...r.slice(i)]}),a(i+1)},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Product","b-blocks"),onClick:M,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Product","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsxs)(y.ButtonGroup,{className:"bPlBtnGroup",children:[(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Vertical","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(y.Button,{icon:d,isPrimary:"vertical"===m,"aria-pressed":"vertical"===m,onClick:()=>{t({layout:"vertical",columns:{...c,desktop:3},textAlign:"center",padding:{...f,vertical:"50px",horizontal:"20px",styles:"50px 20px"},imgMargin:{...k,right:"0px",bottom:"20px",styles:"0px 0px 20px 0px"}})}})}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Horizontal","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)(y.Button,{icon:u,isPrimary:"horizontal"===m,"aria-pressed":"horizontal"===m,onClick:()=>{t({layout:"horizontal",columns:{...c,desktop:2},textAlign:"left",padding:{...f,vertical:"20px",horizontal:"20px",styles:"20px 20px"},imgMargin:{...k,right:"20px",bottom:"0px",styles:"0px 20px 0px 0px"}})}})})]})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:c[s],onChange:e=>{t({columns:{...c,[s]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Content Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(ad,{label:(0,x.__)("Padding:","b-blocks"),value:f,onChange:e=>t({padding:e}),defaults:{vertical:"50px",horizontal:"20px"}})}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(ad,{label:(0,x.__)("Margin:","b-blocks"),value:k,onChange:e=>t({imgMargin:e}),defaults:{side:4,bottom:"20px"}})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Name Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:w,onChange:e=>t({nameTypo:e}),defaults:{fontSize:{desktop:18,tablet:17,mobile:16},fontWeight:600}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>t({nameMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:j,onChange:e=>t({isDesc:e})}),(0,l.jsx)(Oa,{value:$,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15},fontStyle:"italic"}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:S,onChange:e=>t({descMargin:e}),defaults:{side:4,bottom:"15px"}})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Price Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Oa,{value:T,onChange:e=>t({priceTypo:e}),defaults:{fontSize:{desktop:24,tablet:22,mobile:20},fontStyle:"italic"}})}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:N,onChange:e=>t({isSep:e})})})]}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Product","b-blocks"),onClick:M,children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:b,onChange:e=>t({textAlign:e})})]})]})})),_R="bBlocksPriceLists";Pl(kR.name)&&(0,p.registerBlockType)(kR,{icon:Br,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{products:i=[],columns:a,columnGap:s,rowGap:r,layout:c,textAlign:d,padding:u,imgMargin:p,nameTypo:g,nameMargin:b,isDesc:f,descTypo:v,descMargin:k,priceTypo:w,isSep:_}=t,[C,j]=(0,m.useState)(0),$=(e,t)=>{const o=zb(i,(n=>{n[C][e]=t}));n({products:o})},S=`#block-${o}`,T=`${S} .${_R}`,N=`${T} .priceItem`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wR,{attributes:t,setAttributes:n,updateProduct:$,activeIndex:C,setActiveIndex:j}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${ps("",g)?.googleFontLink}\n\t\t\t\t${ps("",v)?.googleFontLink}\n\t\t\t\t${ps("",w)?.googleFontLink}\n\t\t\t\t${ps(`${N} .productName`,g)?.styles}\n\t\t\t\t${ps(`${N} .productDescription`,v)?.styles}\n\t\t\t\t${ps(`${N} .productPrice`,w)?.styles}\n\n\t\t\t\t${T}{\n\t\t\t\t\tgrid-gap: ${r} ${s};\n\t\t\t\t}\n\t\t\t\t${N}{\n\t\t\t\t\ttext-align: ${d};\n\t\t\t\t\tpadding: ${us(u)};\n\t\t\t\t}\n\t\t\t\t${N} .productImage{\n\t\t\t\t\tmargin: ${us(p)};\n\t\t\t\t}\n\t\t\t\t${N} .productName{\n\t\t\t\t\tmargin: ${us(b)};\n\t\t\t\t}\n\t\t\t\t${N} .productDescription{\n\t\t\t\t\tmargin: ${us(k)};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsx)("div",{className:`${_R} ${c||"vertical"} columns-${a?.desktop} columns-tablet-${a?.tablet} columns-mobile-${a?.mobile}`,children:i?.map(((e,t)=>{const{background:n,img:o,imgBorder:i,name:a,nameColor:s,desc:r,descColor:c,price:d,priceColor:u,separator:p}=e,g=`${S} #priceItem-${t}`;return(0,l.jsxs)("div",{onClick:()=>j(t),
522 +className:"priceItem "+(t===C?"bPlNowEditing":""),id:`priceItem-${t}`,children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t\t\t\t${g}{\n\t\t\t\t\t\t\t\t${os(n)}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productImage{\n\t\t\t\t\t\t\t\t${is(i)}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productName{\n\t\t\t\t\t\t\t\tcolor: ${s};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productDescription{\n\t\t\t\t\t\t\t\tcolor: ${c};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productPrice{\n\t\t\t\t\t\t\t\tcolor: ${u};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t${g} .productSeparator{\n\t\t\t\t\t\t\t\t${cs(p)}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t`}}),o?.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{className:`productImage ${o?.id?`wp-image-${o?.id}`:null}`,src:o?.url,alt:o?.alt}),(0,td.isBlobURL)(o?.url)&&(0,l.jsx)(y.Spinner,{})]}):(0,l.jsx)(od,{label:(0,x.__)(" Product Image:","b-blocks"),value:o,onChange:e=>$("img",e)}),(0,l.jsxs)("div",{className:"productDetails",children:[(0,l.jsx)(h.RichText,{className:"productName",tagName:"h4",value:a,onChange:e=>$("name",e),placeholder:(0,x.__)("Product name","b-blocks"),inlineToolbar:!0}),f&&(0,l.jsx)(h.RichText,{className:"productDescription",tagName:"p",value:r,onChange:e=>$("desc",e),placeholder:(0,x.__)("Description of the product","b-blocks"),inlineToolbar:!0}),(0,l.jsx)(h.RichText,{className:"productPrice",tagName:"span",value:d,onChange:e=>$("price",e),placeholder:(0,x.__)("$99.99","b-blocks"),inlineToolbar:!0})]}),_&&(0,l.jsx)("span",{className:"productSeparator"})]},t)}))})]})]})},save:()=>null});const CR=JSON.parse('{"apiVersion":3,"name":"b-blocks/pricing-table","title":"Pricing Table","description":"Display product prices as a table.","category":"bBlocks","keywords":["pricing","price list","table"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"pricingTables":{"type":"array","default":[{"name":"Basic","price":2.99,"priceCurrency":"$","period":"Month","link":"#","linkLabel":"Enroll Now","color":"#f00025","features":[{"isEnable":true,"label":"25GB Disk Space"},{"isEnable":true,"label":"25 Email Accounts"},{"isEnable":true,"label":"50GB Bandwidth"},{"isEnable":true,"label":"25 Subdomains"},{"isEnable":false,"label":"Maintenance"}]},{"name":"Standard","price":5.99,"priceCurrency":"$","period":"Month","link":"#","linkLabel":"Enroll Now","color":"#001645","features":[{"isEnable":true,"label":"50GB Disk Space"},{"isEnable":true,"label":"50 Email Accounts"},{"isEnable":true,"label":"100GB Bandwidth"},{"isEnable":true,"label":"50 Subdomains"},{"isEnable":false,"label":"Maintenance"}]},{"name":"Premium","price":9.99,"priceCurrency":"$","period":"Month","link":"#","linkLabel":"Enroll Now","color":"#01944e","features":[{"isEnable":true,"label":"100GB Disk Space"},{"isEnable":true,"label":"100 Email Accounts"},{"isEnable":true,"label":"Unlimited Bandwidth"},{"isEnable":true,"label":"100 Subdomains"},{"isEnable":true,"label":"Maintenance"}]}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"20px"},"rowGap":{"type":"string","default":"30px"},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"35px","horizontal":"25px"}},"shadow":{"type":"object","default":{"blur":"30px","color":"#6e8faf4d"}}},"supports":{"align":["wide","full"],"html":false},"styles":[{"name":"basic","label":"Basic","isDefault":true},{"name":"standard","label":"Standard"},{"name":"ultimate","label":"Ultimate"}],"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),jR=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updatePriceTable:n,activeIndex:i,setActiveIndex:a,device:s})=>{const{pricingTables:r,columns:c,columnGap:d,rowGap:u,textAlign:p,padding:g,shadow:m}=e,b=()=>{t({pricingTables:[...r,{name:"Ultimate",price:14.99,priceCurrency:"$",period:"Month",link:"#",linkLabel:"Enroll Now",color:o,features:[{isEnable:!0,label:"Unlimited Disk Space"},{isEnable:!0,label:"Unlimited Website"},{isEnable:!0,label:"Unlimited Email Accounts"},{isEnable:!0,label:"Unlimited Bandwidth"},{isEnable:!0,label:"Unlimited Subdomains"},{isEnable:!0,label:"Maintenance"}]}]}),a(n.length)},f=e=>{e.preventDefault(),t({pricingTables:[...r.slice(0,i),{...r[i]},...r.slice(i)]}),a(i+1)},k=e=>{e.preventDefault(),t({pricingTables:[...r.slice(0,i),...r.slice(i+1)]}),a(0===i?0:i-1)},{name:w="",price:C=0,priceCurrency:j="",period:$="",features:S=[],linkLabel:T="",link:N="",color:M=""}=r[i]||{},L=e=>{e.preventDefault(),n("features",[...S,{isEnable:"#",label:"New Feature of Price"}])};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:hn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove Prices","b-blocks"),children:[null!==i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Price No ${i+1}:`,"b-blocks")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Plan Name:","b-blocks"),value:w,onChange:e=>n("name",e)}),(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Price:","b-blocks"),labelPosition:"left",value:C,onChange:e=>n("price",parseFloat(e))}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Currency:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:j,onChange:e=>n("priceCurrency",e)})]}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Period:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:$,onChange:e=>n("period",e)})]}),(0,l.jsx)(v,{children:(0,x.__)("Features:","b-blocks")}),S?.map(((e,t)=>{const{isEnable:o,label:i}=e;return(0,l.jsxs)(y.PanelRow,{className:"editPriceFeature",children:[(0,l.jsx)(y.CheckboxControl,{className:"priceFeatureIsEnable",checked:o,onChange:e=>n("features",e,t,"isEnable")}),(0,l.jsx)(y.TextControl,{value:i,onChange:e=>n("features",e,t,"label")}),(0,l.jsx)(y.Tooltip,{text:(0,x.__)("Remove the feature","b-blocks"),placement:"top",position:"top",children:(0,l.jsx)("a",{className:"removeItem",onClick:e=>{e.preventDefault(),n("features",[...S.slice(0,t),...S.slice(t+1)])},children:(0,l.jsx)(y.Dashicon,{icon:"no"})})})]},t)})),(0,l.jsx)("div",{className:"addItem addFeature mt5",children:(0,l.jsxs)(y.Button,{className:"addItem",label:(0,x.__)("Add New Feature","b-blocks"),onClick:L,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Feature","b-blocks")]})}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Label:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:T,onChange:e=>n("linkLabel",e)})]}),(0,l.jsx)(v,{children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:N,onChange:e=>n("link",e)}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:M,onChange:e=>n("color",e),defaultColor:o}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<r?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:k,children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:f,children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Price","b-blocks"),onClick:b,children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Price","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,
523 +l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:c[s],onChange:e=>{t({columns:{...c,[s]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]})]})]}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Pricing Table","b-blocks"),children:[(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:g,onChange:e=>t({padding:e}),defaults:{vertical:"35px",horizontal:"25px"}}),(0,l.jsx)(id,{className:"mt20",label:(0,x.__)("Shadow:","b-blocks"),value:m,onChange:e=>t({shadow:e}),defaults:{blur:"30px",color:"#6e8faf4d"}})]})})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Price","b-blocks"),onClick:b,children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:p,onChange:e=>t({textAlign:e})})]})]})})),$R="bBlocksPricingTable",SR=({attributes:e,id:t,isStandard:n})=>{const{pricingTables:o,columnGap:i,rowGap:a,textAlign:s,padding:r,shadow:c}=e,d=`#${t}`,u=`${d} .${$R}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${u}{\n\t\t\tgrid-gap: ${a} ${i};\n\t\t\ttext-align: ${s};\n\t\t\tpadding: ${n?"30px 0":"0"}\n\t\t}\n\t\t${u} .priceItem{\n\t\t\tpadding: ${us(r)};\n\t\t\tbox-shadow: ${ds(c)};\n\t\t}\n\n\t\t${o?.map(((e,t)=>{const{color:n}=e,o=`${u} #priceItem-${t} .priceItem`,i=e=>`${d}.is-style-${e} .${$R} #priceItem-${t} .priceItem`;return`\n\t\t\t\t${o} .priceName,\n\t\t\t\t${i("basic")} .priceAmountWrap,\n\t\t\t\t${i("standard")} .priceAmountWrap{\n\t\t\t\t\tcolor: ${n};\n\t\t\t\t}\n\t\t\t\t${o} .priceLink,\n\t\t\t\t${i("basic")} .priceName,\n\t\t\t\t${i("standard")}::before,\n\t\t\t\t${i("ultimate")} .priceAmountWrap{\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tbackground-color: ${n};\n\t\t\t\t}\n\t\t\t\t${i("basic")} .priceName::before{\n\t\t\t\t\tborder-top-color: ${n};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},TR=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureEnabled",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{fill:"#01944e",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})}),NR=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureDisabled",viewBox:"0 0 352 512",children:(0,l.jsx)("path",{fill:"#f00025",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})}),MR=({features:e})=>(0,l.jsx)("div",{className:"priceFeatures",children:e?.map(((e,t)=>{const{isEnable:n,label:o}=e;return(0,l.jsxs)("div",{className:"priceFeature",children:[n?TR:NR,(0,l.jsx)("span",{className:"priceFeatureLabel",dangerouslySetInnerHTML:{__html:St(o)}})]},t)}))}),LR=({priceTable:e,index:t,className:n,activeIndex:o,setActiveIndex:i,updatePriceTable:a})=>{const{name:s,price:r,priceCurrency:c,period:d,link:u,linkLabel:p,features:g}=e,b=n.includes("basic"),f=n.includes("standard"),y=n.includes("ultimate"),v=(0,m.useRef)(null),k=(0,m.useRef)(null);(0,m.useEffect)((()=>{if(y){const e=v?.current?.clientHeight/100*82;k.current.style.width=`${e}px`,k.current.style.top=e/2+"px",k.current.style.left=-e/2+60+"px"}}),[n,v,k]);const w=(0,l.jsxs)("span",{className:"priceAmount",children:[c,r]}),_=(0,l.jsx)(h.RichText,{className:"pricePeriod",tagName:"span",value:d,onChange:e=>a("period",e),placeholder:(0,x.__)("Period","b-blocks"),inlineToolbar:!0});return(0,l.jsx)("div",{onClick:()=>i(t),className:t===o?"bPlNowEditing":"",id:`priceItem-${t}`,children:(0,l.jsxs)("div",{className:"priceItem",ref:v,children:[(0,l.jsx)(h.RichText,{className:"priceName",tagName:"h3",value:s,onChange:e=>a("name",e),placeholder:(0,x.__)("Plan Name","b-blocks"),inlineToolbar:!0}),f||y?(0,l.jsxs)("div",{className:"priceAmountWrap",ref:k,children:[w,d?" / ":"",_]}):"",(0,l.jsx)(MR,{features:g}),f||y?"":(0,l.jsx)("div",{className:"priceAmountWrap",children:w}),!b&&(0,l.jsx)("br",{}),p&&(0,l.jsx)(h.RichText,{className:"priceLink",tagName:"a",value:p,href:$t(u),onChange:e=>a("linkLabel",e),placeholder:(0,x.__)("Link Label","b-blocks"),inlineToolbar:!0})]})},t)};Pl(CR.name)&&(0,p.registerBlockType)(CR,{icon:Ir,transforms:{from:[{type:"block",blocks:["bptb/pricing-table"],transform:e=>(0,p.createBlock)("b-blocks/pricing-table",e)},{type:"prefix",prefix:"count",transform:()=>(0,p.createBlock)("b-blocks/pricing-table")}],to:[{type:"block",blocks:["bptb/pricing-table"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("bptb/pricing-table",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{pricingTables:i,columns:a}=t,s=(0,h.useBlockProps)(),{className:r}=s,[c,d]=(0,m.useState)(0),u=(e,t,o=!1,a=!1)=>{const s=zb(i,(n=>{!1!==o&&a?n[c][e][o][a]=t:n[c][e]=t}));n({pricingTables:s})},p=r.includes("standard"),g=r.includes("ultimate");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(jR,{attributes:t,setAttributes:n,updatePriceTable:u,activeIndex:c,setActiveIndex:d}),(0,l.jsxs)("div",{...s,className:`${r} ${p||g?"":"is-style-basic"}`,children:[(0,l.jsx)(SR,{attributes:t,id:`block-${o}`,isStandard:p}),(0,l.jsx)("div",{className:`${$R} columns-${a.desktop} columns-tablet-${a.tablet} columns-mobile-${a.mobile}`,children:i?.map(((e,t)=>(0,l.jsx)(LR,{priceTable:e,index:t,className:r,activeIndex:c,setActiveIndex:d,updatePriceTable:u},t)))})]})]})},save:()=>null})
524 +;const PR=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/process-steps","title":"Process Steps","category":"bBlocks","description":"Build a numbered \\"How it works\\" section. Drop in 3–6 steps with title, description, icon or number badge, and a connector line. Horizontal or vertical layout, fully responsive, accessible <ol> semantics.","keywords":["process","steps","how it works","how we work","numbered","timeline","workflow"],"textdomain":"b-blocks","attributes":{"layout":{"type":"object","default":{"type":"horizontal","theme":"classic","alignment":"center","columnCount":{"desktop":3,"tablet":2,"mobile":1},"gap":{"desktop":"32px","tablet":"24px","mobile":"16px"}}},"steps":{"type":"array","default":[{"_key":"ps-default-1","title":"Discovery","description":"We learn about your goals and challenges.","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2v82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9V380.8c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168a40 40 0 1 0 0-80 40 40 0 1 0 0 80z\'/></svg>"},{"_key":"ps-default-2","title":"Strategy","description":"We craft a tailored plan to meet your needs.","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 384 512\'><path d=\'M272 384c9.6-31.9 29.5-59.1 49.2-86.2l0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4l0 0c19.8 27.1 39.7 54.4 49.2 86.2H272zM192 512c44.2 0 80-35.8 80-80V416H112v16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z\'/></svg>"},{"_key":"ps-default-3","title":"Delivery","description":"We execute and iterate until you are thrilled.","icon":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 512 512\'><path d=\'M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z\'/></svg>"}]},"connector":{"type":"object","default":{"show":true,"color":"#CBD5E1","width":"2px","style":"solid"}},"badge":{"type":"object","default":{"type":"number","size":"56px","bg":{"color":"#2563EB"},"color":"#FFFFFF","typo":{"fontSize":{"desktop":"20px","tablet":null,"mobile":null}},"border":{},"borderRadius":{"top":"50%","bottom":"50%","left":"50%","right":"50%"},"shadow":[]}},"content":{"type":"object","default":{"titleTag":"h3","titleColor":"","typo":{"fontSize":{"desktop":"18px","tablet":null,"mobile":null}},"descColor":"","descTypo":{"fontSize":{"desktop":"15px","tablet":null,"mobile":null}}}},"card":{"type":"object","default":{"bg":{"color":""},"padding":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"border":{},"borderRadius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","viewScript":"file:./view.js","render":"file:./render.php"}'),ER=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],AR=["h2","h3","h4","p"],BR=[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:(0,x.__)("Paragraph","b-blocks"),value:"p"}],IR=[{label:(0,x.__)("Classic — clean cards, blue accent","b-blocks"),value:"classic"},{label:(0,x.__)("Modern — gradient badges, soft shadow","b-blocks"),value:"modern"},{label:(0,x.__)("Minimal — borderless, dotted connectors","b-blocks"),value:"minimal"},{label:(0,x.__)("Bold — high-contrast dark badges","b-blocks"),value:"bold"}],OR=e=>({top:e,right:e,bottom:e,left:e}),RR={classic:{badge:{bg:{type:"solid",color:"#2563EB"},color:"#FFFFFF",border:{},borderRadius:OR("50%"),shadow:[],typo:{fontWeight:"700"}},card:{bg:{type:"solid",color:""},border:{},borderRadius:OR("8px"),shadow:[]},content:{titleColor:"",descColor:"",typo:{fontWeight:"600",textTransform:"",letterSpace:""}},connector:{style:"solid",color:"#CBD5E1",width:"2px"}},modern:{badge:{bg:{type:"gradient",gradient:"linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%)"},color:"#FFFFFF",border:{},borderRadius:OR("50%"),shadow:[{hOffset:"0px",vOffset:"8px",blur:"20px",spreed:"-6px",color:"rgba(236, 72, 153, 0.45)",isInset:!1}],typo:{fontWeight:"700"}},card:{bg:{type:"gradient",gradient:"linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)"},border:{},borderRadius:OR("16px"),shadow:[{hOffset:"0px",vOffset:"14px",blur:"32px",spreed:"-16px",color:"rgba(15, 23, 42, 0.18)",isInset:!1},{hOffset:"0px",vOffset:"2px",blur:"6px",spreed:"-2px",color:"rgba(15, 23, 42, 0.06)",isInset:!1}]},content:{titleColor:"#0f172a",descColor:"#475569",typo:{fontWeight:"700",textTransform:"",letterSpace:""}},connector:{style:"solid",color:"#C4B5FD",width:"2px"}},minimal:{badge:{bg:{type:"solid",color:""},color:"#475569",border:{width:"1px",style:"solid",color:"#475569"},borderRadius:OR("50%"),shadow:[],typo:{fontWeight:"500"}},card:{bg:{type:"solid",color:""},border:{},borderRadius:OR("8px"),shadow:[]},content:{titleColor:"",descColor:"#64748B",typo:{fontWeight:"500",textTransform:"",letterSpace:"-0.01em"}},connector:{style:"dotted",color:"#CBD5E1",width:"2px"}},bold:{badge:{bg:{type:"solid",color:"#0F172A"},color:"#FACC15",border:{},borderRadius:OR("0px"),shadow:[{hOffset:"3px",vOffset:"3px",blur:"0px",spreed:"0px",
525 +color:"#FACC15",isInset:!1}],typo:{fontWeight:"800"}},card:{bg:{type:"solid",color:"#FFFFFF"},border:{width:"2px",style:"solid",color:"#0F172A"},borderRadius:OR("0px"),shadow:[{hOffset:"6px",vOffset:"6px",blur:"0px",spreed:"0px",color:"#0F172A",isInset:!1}]},content:{titleColor:"#0f172a",descColor:"#1e293b",typo:{fontWeight:"800",textTransform:"uppercase",letterSpace:"0.02em"}},connector:{style:"solid",color:"#0F172A",width:"3px"}}},zR=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],DR=[{label:(0,x.__)("Number","b-blocks"),value:"number"},{label:(0,x.__)("Icon","b-blocks"),value:"icon"}],FR=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"}],HR=(e,t)=>(e??"").toString().trim()||t,WR=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",UR=e=>{const{layout:t={},badge:n={},connector:o={}}=e,{type:i,alignment:a}=t,s="vertical"===i?"vertical":"horizontal",r=["left","center","right"].includes(a)?a:"center",l="icon"===n.type?"icon":"number",c=o.show;return["bBlocksProcessSteps",`bBlocksProcessStepsLayout${WR(s)}`,`bBlocksProcessStepsAlign${WR(r)}`,`bBlocksProcessStepsBadge${WR(l)}`,c?"has-connector":"no-connector"].join(" ")},GR=(e,t)=>parseInt(e,10)||t,VR=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:a={},connector:s={},badge:r={},content:c={},card:d={},advanced:u={}}=e,p=`#${o} .bBlocksProcessSteps`,h=`${p} .bBlocksProcessStepsList`,g=`${p}.bBlocksProcessStepsLayoutHorizontal .bBlocksProcessStepsList`,m=`${h} .bBlocksProcessStepsItem`,b=`${m} .bBlocksProcessStepsBadge`,f=`${m} .bBlocksProcessStepsTitle`,x=`${p} .bBlocksProcessStepsDescription`,y=`${p}.bBlocksProcessStepsLayoutVertical.has-connector .bBlocksProcessStepsItem:not(:last-child)::before`,v=`${p}.bBlocksProcessStepsLayoutHorizontal.has-connector .bBlocksProcessStepsItem:not(:first-child)::before`,k=HR(r.size,"56px"),w=.42*(e=>{const t=(e??"").toString().trim();if(!t)return 56;const n=t.match(/^(-?\d+(?:\.\d+)?)/);return n?parseFloat(n[1]):56})(k)+"px",_=s.color||"#CBD5E1",C=HR(s.width,"2px"),j=(e=>["solid","dashed","dotted"].includes(e)?e:"solid")(s.style),$=!!s.show,S=HR(d?.padding?.top,"0px"),T=HR(d?.padding?.left,"0px"),{gap:N={},columnCount:M={}}=a,L=HR(N?.desktop,"32px"),P=HR(N?.tablet,L),E=HR(N?.mobile,P),A=GR(M?.desktop,3),B=GR(M?.tablet,2),I=GR(M?.mobile,1),O=e=>`${y}{\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: calc(${S} + ${k} + 8px);\n\t\tleft: calc(${T} + ${k} / 2);\n\t\twidth: 0;\n\t\theight: calc(100% + ${e} - ${k} - 8px);\n\t\tborder-left: ${C} ${j} ${_};\n\t\ttransform: translateX(calc(${C} / -2));\n\t\tpointer-events: none;\n\t\tz-index: 0;\n\t}`,R=e=>`${v}{\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: calc(${S} + (${k} / 2));\n\t\tright: calc(100% - ${e} / 2 - 1px);\n\t\twidth: ${e};\n\t\theight: 0;\n\t\tborder-top: ${C} ${j} ${_};\n\t\tpointer-events: none;\n\t\tz-index: 0;\n\t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t\t${ps("",r.typo).googleFontLink}\n\t\t\t${ps(b,r.typo).styles}\n\n\t\t\t${ps("",c.typo).googleFontLink}\n\t\t\t${ps(f,c.typo).styles}\n\n\t\t\t${ps("",c.descTypo).googleFontLink}\n\t\t\t${ps(x,c.descTypo).styles}\n\n\t\t\t${h}{\n\t\t\t\tgap: ${L};\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\tgrid-template-columns: repeat(${A}, minmax(0, 1fr));\n\t\t\t}\n\t\t\t${m}{\n\t\t\t\t${ns("padding",hs(d.padding))}\n\t\t\t\t${os(d.bg)}\n\t\t\t\t${ns("border-radius",hs(d?.borderRadius))}\n\t\t\t\t${as(d.border)}\n\t\t\t\t${ns("box-shadow",ls(d?.shadow))}\n\t\t\t}\n\t\t\t${b}{\n\t\t\t\twidth: ${k};\n\t\t\t\theight: ${k};\n\t\t\t\t${os(r.bg)}\n\t\t\t\t${ns("color",r.color)}\n\t\t\t\t${ns("border-radius",hs(r?.borderRadius))}\n\t\t\t\t${as(r.border)}\n\t\t\t\t${ns("box-shadow",ls(r?.shadow))}\n\t\t\t}\n\t\t\t${b} .bBlocksProcessStepsIcon>svg{\n\t\t\t\twidth: ${w};\n\t\t\t\theight: ${w};\n\t\t\t\tfill: ${r.color};\n\t\t\t}\n\t\t\t${f}{\n\t\t\t\t${ns("color",c.titleColor)}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${ns("color",c.descColor)}\n\t\t\t}\n\t\t\t${$?O(L):""}\n\t\t\t${$?R(L):""}\n\n\t\t\t${t}{\n\t\t\t\t${h}{\n\t\t\t\t\tgap: ${P};\n\t\t\t\t}\n\t\t\t\t${g}{\n\t\t\t\t\tgrid-template-columns: repeat(${B}, minmax(0, 1fr));\n\t\t\t\t}\n\t\t\t\t${$?O(P):""}\n\t\t\t\t${$?R(P):""}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t${h}{\n\t\t\t\t\tgap: ${E};\n\t\t\t\t}\n\t\t\t\t${g}{\n\t\t\t\t\tgrid-template-columns: repeat(${I}, minmax(0, 1fr));\n\t\t\t\t}\n\t\t\t\t${$?O(E):""}\n\t\t\t\t${$?`${v}{ display: none; }`:""}\n\t\t\t}\n\n\t\t\t${_s(o,u,i,!1)}\n\t\t\t`}})},qR=({attributes:e,updateObj:t})=>{const{connector:n={}}=e,{show:o,color:i,width:a,style:s}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Connector","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show connector line","b-blocks"),checked:!!o,onChange:e=>t("connector",e,"show")}),o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Connector color","b-blocks"),value:i,onChange:e=>t("connector",e,"color"),defaultColor:"#CBD5E1"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Connector width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:a,onChange:e=>t("connector",e,"width"),min:1,max:8})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Connector style","b-blocks"),labelPosition:"edge",value:s,options:FR,onChange:e=>t("connector",e,"style"),__nextHasNoMarginBottom:!0})]})]})},YR={desktop:3,tablet:2,mobile:1},KR=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={}}=e,{type:a,theme:s,alignment:r,columnCount:c={},gap:d={}}=i;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>n("layout",e,"type"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"horizontal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"vertical"})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Theme","b-blocks"),value:s||"classic",options:IR,onChange:n=>t(((e,t)=>{const n=RR[t]||RR.classic,{layout:o={},badge:i={},card:a={},content:s={},connector:r={}}=e;return{layout:{...o,theme:t},badge:{...i,...n.badge,typo:{...i.typo||{},...n.badge.typo||{}}},card:{...a,...n.card},content:{...s,...n.content,typo:{...s.typo||{},...n.content.typo||{}}},connector:{...r,...n.connector}}})(e,n)),help:(0,x.__)("Applies a preset color & feel to the badge, card, connector and text. You can still fine-tune each in the Style tab afterwards.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Text alignment","b-blocks"),value:r||"center",options:zR,labelPosition:"edge",onChange:e=>n("layout",e,"alignment"),__nextHasNoMarginBottom:!0}),"vertical"!==a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.RangeControl,{value:parseInt(c?.[o],10)||YR[o],onChange:e=>n("layout",parseInt(e,10)||1,"columnCount",o),min:1,max:6,step:1,__nextHasNoMarginBottom:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"mb0 flex2",children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",labelPosition:"edge",isUnitSelectTabbable:!0,value:d?.[o]||"",onChange:e=>n("layout",e,"gap",o)})]})]})},QR=({attributes:e,setAttributes:t,index:n})=>{const{steps:o=[],badge:i={}}=e,a=o[n]||{},s=(e,i)=>t({steps:be(o,i,n,e)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Title","b-blocks"),value:a.title||"",
526 +onChange:e=>s("title",e),placeholder:(0,x.__)("Short title for this step","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Description","b-blocks"),value:a.description||"",onChange:e=>s("description",e),placeholder:(0,x.__)("Explain what happens in this step","b-blocks"),rows:3,__nextHasNoMarginBottom:!0}),"icon"===i?.type&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),className:"mt10",icon:a.icon||"",onChange:e=>s("icon",e)})})]})},ZR=({attributes:e,setAttributes:t})=>{const n={_key:`ps-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,title:"",description:"",icon:""};return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Steps","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,newItem:n,design:"sortable",itemLabel:"Step",arrKey:"steps",title:"title",ItemSettings:QR,minItem:0})})},XR=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(KR,{...e}),(0,l.jsx)(ZR,{...e}),(0,l.jsx)(qR,{...e})]}),JR=({attributes:e,updateObj:t})=>{const{badge:n={}}=e,{type:o,size:i,bg:a,color:s}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Badge","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Badge type","b-blocks"),labelPosition:"edge",value:o,options:DR,onChange:e=>t("badge",e,"type"),help:"icon"===o?(0,x.__)("Add a Font Awesome class on each step in the Steps panel.","b-blocks"):(0,x.__)("Numbers are auto-incremented starting at 1.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Badge size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",isUnitSelectTabbable:!0,value:i,onChange:e=>t("badge",e,"size")})]}),(0,l.jsx)(An,{label:(0,x.__)("Badge background","b-blocks"),value:a,onChange:e=>t("badge",e,"bg"),defaults:{color:"#2563EB"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Badge text/icon color","b-blocks"),value:s,onChange:e=>t("badge",e,"color"),defaultColor:"#FFFFFF"}),"icon"!==o&&(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("badge",e,"typo")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:n.border,onChange:e=>t("badge",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:n.borderRadius,onChange:e=>t("badge",e,"borderRadius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:n.shadow,onChange:e=>t("badge",e,"shadow")})]})},ez=({attributes:e,updateObj:t})=>{const{card:n={}}=e,{bg:o,padding:i={},borderRadius:a={},border:s={}}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card Style","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:o,onChange:e=>t("card",e,"bg")}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i,onChange:e=>t("card",e,"padding")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:s,onChange:e=>t("card",e,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:a,onChange:e=>t("card",e,"borderRadius")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:n.shadow,onChange:e=>t("card",e,"shadow")})]})},tz=({attributes:e,updateObj:t})=>{const{content:n={}}=e,{titleTag:o,titleColor:i,descColor:a}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title & Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Heading tag","b-blocks"),value:o||"h3",options:BR,onChange:e=>t("content",e,"titleTag"),help:(0,x.__)("Use H3 for pages that already have an H2 section heading.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Title color","b-blocks"),value:i||"",onChange:e=>t("content",e||"","titleColor"),defaultColor:""}),(0,l.jsx)(Oa,{label:(0,x.__)("Title Typography","b-blocks"),value:n.typo,onChange:e=>t("content",e,"typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color","b-blocks"),value:a||"",onChange:e=>t("content",e||"","descColor"),defaultColor:""}),(0,l.jsx)(Oa,{label:(0,x.__)("Description Typography","b-blocks"),value:n.descTypo,onChange:e=>t("content",e,"descTypo")})]})},nz=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(JR,{...e}),(0,l.jsx)(tz,{...e}),(0,l.jsx)(ez,{...e})]}),oz=e=>{const{attributes:t,setAttributes:n,updateObj:o,isPremium:i}=e,{layout:a={},advanced:s}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:a.alignment,onChange:e=>o("layout",e||"center","alignment")})}),(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:ER,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(XR,{...e}),"style"===t.name&&(0,l.jsx)(nz,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:s,onChange:e=>n({advanced:e}),isPremium:i})]})})})]})},iz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{steps:a=[],badge:s={},content:r={}}=t,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,d=fe(t,n),u=AR.includes(r.titleTag)?r.titleTag:"h3",p="icon"===s.type?"icon":"number",g=(e,t,o)=>{n({steps:a.map(((n,i)=>i===e?{...n||{},[t]:o}:n))})},m=(e,t)=>{if(t<0||t>=a.length)return;const o=a.slice(),[i]=o.splice(e,1);o.splice(t,0,i),n({steps:o})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(oz,{attributes:t,setAttributes:n,updateObj:d,isPremium:c,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(VR,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:UR(t),children:0===a.length?(0,l.jsx)("p",{className:"bBlocksProcessStepsEmpty",children:(0,x.__)("No steps yet. Add the first one from the sidebar.","b-blocks")}):(0,l.jsx)("ol",{className:"bBlocksProcessStepsList","aria-label":(0,x.__)("Process steps","b-blocks"),children:a.map(((e,t)=>{const o=u;return(0,l.jsxs)("li",{className:"bBlocksProcessStepsItem",children:[(0,l.jsx)("div",{className:"bBlocksProcessStepsBadge","aria-hidden":"true",children:"icon"===p&&e&&e.icon?(0,l.jsx)("span",{className:"bBlocksProcessStepsIcon",dangerouslySetInnerHTML:{__html:e.icon}}):(0,l.jsx)("span",{className:"bBlocksProcessStepsNumber",children:t+1})}),(0,l.jsxs)("div",{className:"bBlocksProcessStepsBody",children:[(0,l.jsx)(h.RichText,{tagName:o,className:"bBlocksProcessStepsTitle",value:e&&e.title||"",onChange:e=>g(t,"title",e),placeholder:(0,x.__)("Step title","b-blocks"),allowedFormats:[]}),(0,l.jsx)(h.RichText,{tagName:"div",className:"bBlocksProcessStepsDescription",value:e&&e.description||"",onChange:e=>g(t,"description",e),placeholder:(0,x.__)("Describe this step…","b-blocks"),allowedFormats:["core/bold","core/italic","core/link"]}),(0,l.jsxs)("div",{className:"bBlocksProcessStepsEditorActions",style:{display:"flex",justifyContent:"center",gap:4,marginTop:8},children:[(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-up-alt2",label:(0,x.__)("Move step up","b-blocks"),onClick:()=>m(t,t-1),disabled:0===t}),(0,l.jsx)(y.Button,{variant:"tertiary",size:"small",icon:"arrow-down-alt2",label:(0,x.__)("Move step down","b-blocks"),onClick:()=>m(t,t+1),disabled:t===a.length-1}),(0,l.jsx)(y.Button,{variant:"tertiary",isDestructive:!0,size:"small",icon:"trash",label:(0,x.__)("Remove step","b-blocks"),onClick:()=>{return e=t,void n({steps:a.filter(((t,n)=>n!==e))});var e}})]})]})]},e&&e._key||t)}))})})]})]})}));Pl(PR.name)&&(0,p.registerBlockType)(PR,{icon:ul,edit:iz})
527 +;const az=JSON.parse('{"apiVersion":3,"name":"b-blocks/qr-code","title":"QR Code","description":"Show QR Code in posts and pages.","category":"bBlocks","keywords":["QR scanner","QR code","Code"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"qrAlign":{"type":"string","default":"center"},"url":{"type":"string","default":""},"dimension":{"type":"number","default":180},"color":{"type":"string","default":"#000"},"bgColor":{"type":"string","default":"#fff"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),sz=({attributes:e,setAttributes:t})=>{const{qrAlign:n,url:o,dimension:i,color:a,bgColor:s}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:gn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("QR Code Settings","b-blocks"),children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Website URL:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:o,onChange:e=>t({url:e}),placeholder:(0,x.__)("Website URL:","b-blocks")}),(0,l.jsx)(v,{children:(0,x.__)("Dimension:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:i,onChange:e=>t({dimension:e}),min:50,max:1e3,step:1}),(0,l.jsx)(Ge,{label:(0,x.__)("Color:","b-blocks"),value:a,onChange:e=>t({color:e}),defaultColor:"#000",disableAlpha:!0}),(0,l.jsx)(Ge,{label:(0,x.__)("Background Color:","b-blocks"),value:s,onChange:e=>t({bgColor:e}),defaultColor:"#fff",disableAlpha:!0})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>t({qrAlign:e}),describedBy:(0,x.__)("QR Code Alignment"),alignmentControls:[{title:(0,x.__)("QR Code in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("QR Code in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("QR Code in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},rz="bBlocksQRCode";Pl(az.name)&&(0,p.registerBlockType)(az,{icon:Or,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{qrAlign:i,url:a,dimension:s,color:r,bgColor:c}=t,d=`https://api.qrserver.com/v1/create-qr-code/?size=${s}x${s}&color=${r.replace("#","")}&bgcolor=${c.replace("#","")}&ecc=L&qzone=1&data=${a||"http://bplugins.com"}`,u=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(sz,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t#${u} .${rz}{\n\t\t\t\t\ttext-align: ${i};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsx)("div",{className:rz,children:(0,l.jsx)("img",{src:d,alt:a})})]})]})},save:()=>null});const lz=JSON.parse('{"apiVersion":3,"name":"b-blocks/section-heading","title":"Section Heading","description":"Display heading before section.","category":"bBlocks","keywords":["headline","section headline","heading description"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"textAlign":{"type":"string","default":"left"},"title":{"type":"string","default":"Section Heading"},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"},"fontWeight":600}},"titleColor":{"type":"string","default":""},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isSep":{"type":"boolean","default":true},"separator":{"type":"object","default":{"width":"150px","height":"3px","color":"#0c0d3c1a"}},"sepMargin":{"type":"object","default":{"side":4,"bottom":"5px"}},"isDesc":{"type":"boolean","default":true},"desc":{"type":"string","default":"This content area describes section heading descriptions or details."},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"descColor":{"type":"string","default":""},"descMargin":{"type":"object","default":{"side":4,"bottom":"15px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":["file:./view.js","mailtoui"]}'),cz=({attributes:e,setAttributes:t})=>{const{textAlign:n,titleTypo:i,titleColor:s,titleMargin:r,isSep:c,separator:d,sepMargin:u,isDesc:p,descTypo:g,descColor:m,descMargin:b}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title Settings","b-blocks"),children:[(0,l.jsx)(Oa,{value:i,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20},fontWeight:600}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:s,onChange:e=>t({titleColor:e}),defaultColor:o}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:r,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Separator","b-blocks"),checked:c,onChange:e=>t({isSep:e})}),(0,l.jsx)(Ta,{value:d,onChange:e=>t({separator:e}),defaults:{width:"150px",height:"3px",color:a}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:u,onChange:e=>t({sepMargin:e}),defaults:{side:4,bottom:"5px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:p,onChange:e=>t({isDesc:e})}),(0,l.jsx)(Oa,{value:g,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:m,onChange:e=>t({descColor:e}),defaultColor:"#333"}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:b,onChange:e=>t({descMargin:e}),defaults:{side:4,bottom:"15px"}})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:n,onChange:e=>t({textAlign:e})})})]})},dz="bBlocksSectionHeading";Pl(lz.name)&&(0,p.registerBlockType)(lz,{icon:Rr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{textAlign:i,title:a,titleTypo:s,titleColor:r,titleMargin:c,isSep:d,separator:u,sepMargin:p,isDesc:g,desc:m,descTypo:b,descColor:f,descMargin:y}=t,v=`#block-${o} .${dz}`,k=`${v} .sectionHeadingTitle`,w=`${v} .sectionHeadingDescription`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(cz,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t\t${ps("",s)?.googleFontLink}\n\t\t\t\t${ps("",b)?.googleFontLink}\n\t\t\t\t${ps(k,s)?.styles}\n\t\t\t\t${ps(w,b)?.styles}\n\n\t\t\t\t${v}{\n\t\t\t\t\t${ns("text-align",i)}\n\t\t\t\t}\n\t\t\t\t${k}{\n\t\t\t\t\t${ns("color",r)}\n\t\t\t\t\tmargin: ${us(c)};\n\t\t\t\t}\n\t\t\t\t${v} .sectionHeadingSeparator{\n\t\t\t\t\t${cs(u)}\n\t\t\t\t\tmargin: ${us(p)};\n\t\t\t\t}\n\t\t\t\t${w}{\n\t\t\t\t\t${ns("color",f)}\n\t\t\t\t\tmargin: ${us(y)};\n\t\t\t\t}\n\t\t\t`}}),(0,l.jsxs)("div",{className:dz,children:[(0,l.jsx)(h.RichText,{className:"sectionHeadingTitle",tagName:"h2",value:a,onChange:e=>n({title:e}),placeholder:(0,x.__)("Section heading title","b-blocks")}),d&&(0,l.jsx)("span",{className:"sectionHeadingSeparator"}),g&&(0,l.jsx)(h.RichText,{className:"sectionHeadingDescription",tagName:"p",value:m,onChange:e=>n({desc:e}),placeholder:(0,x.__)("Section heading description","b-blocks")})]})]})]})},save:()=>null});var uz=(0,l.jsx)(Jk.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)(Jk.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})})
528 +;const pz=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/skill-bar","version":"0.1.0","title":"Skill Bar","category":"bBlocks","icon":"chart-bar","textdomain":"b-blocks","description":"Display skills with customizable progress bars, multiple themes and templates.","attributes":{"skills":{"type":"array","default":[{"title":"JavaScript","percentage":90,"color":"#f7df1e"},{"title":"React","percentage":85,"color":"#61dafb"},{"title":"WordPress","percentage":95,"color":"#21759b"}]},"theme":{"type":"string","default":"modern"},"template":{"type":"string","default":"standard"},"columns":{"type":"number","default":2},"customBackgroundColor":{"type":"string","default":""},"customTitleColor":{"type":"string","default":""},"customPercentageColor":{"type":"string","default":""},"customBarBackgroundColor":{"type":"string","default":""},"customBarProgressColor":{"type":"string","default":""},"customBarRemainingColor":{"type":"string","default":""}},"supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}');Pl(pz.name)&&(0,p.registerBlockType)(pz,{icon:Zr,edit:function({attributes:e,setAttributes:t}){const{skills:n,theme:o,template:i,columns:a,customBackgroundColor:s,customTitleColor:r,customPercentageColor:c,customBarProgressColor:d,customBarRemainingColor:u}=e,[p,g]=(0,Qa.useState)(0),m="customizable"===o,b={};m&&s&&(b.background=s);const f={};m&&r&&(f.color=r);const v={};m&&c&&(v.color=c);const k=(0,h.useBlockProps)({className:`skill-bar-block theme-${o} template-${i} columns-${a}`}),w=()=>{const e=[...n,{title:"New Skill",percentage:50,color:"#0073aa"}];t({skills:e}),g(e.length-1)},_=(e,o,i)=>{const a=[...n];a[e]={...a[e],[o]:i},t({skills:a})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.ToolbarGroup,{children:(0,l.jsx)(y.ToolbarButton,{icon:uz,label:(0,x.__)("Add Skill","b-blocks"),onClick:w})})}),(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Theme & Layout","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Theme","b-blocks"),value:o,options:[{label:(0,x.__)("Modern","b-blocks"),value:"modern"},{label:(0,x.__)("Classic","b-blocks"),value:"classic"},{label:(0,x.__)("Gradient","b-blocks"),value:"gradient"},{label:(0,x.__)("Customizable","b-blocks"),value:"customizable"}],onChange:e=>t({theme:e})}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Template","b-blocks"),value:i,options:[{label:(0,x.__)("Standard","b-blocks"),value:"standard"},{label:(0,x.__)("Circular","b-blocks"),value:"circular"},{label:(0,x.__)("Striped","b-blocks"),value:"striped"}],onChange:e=>t({template:e})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Columns","b-blocks"),value:a,onChange:e=>t({columns:e}),min:1,max:4})]}),m&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Customizable Theme Colors","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("p",{style:{marginBottom:"20px",color:"#757575",fontSize:"13px",lineHeight:"1.5"},children:(0,x.__)('Customize all color aspects of your skill bars. These settings only apply when "Customizable" theme is selected.',"b-blocks")}),(0,l.jsx)("h3",{style:{margin:"20px 0 12px",fontSize:"13px",fontWeight:600,textTransform:"uppercase",color:"#1e1e1e"},children:(0,x.__)("Card Styling","b-blocks")}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Background Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:s||"#ffffff",onChange:e=>t({customBackgroundColor:e}),enableAlpha:!0}),s&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customBackgroundColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsx)("h3",{style:{margin:"24px 0 12px",fontSize:"13px",fontWeight:600,textTransform:"uppercase",color:"#1e1e1e"},children:(0,x.__)("Text Colors","b-blocks")}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Skill Title Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:r||"#333333",onChange:e=>t({customTitleColor:e}),enableAlpha:!0}),r&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customTitleColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Percentage Number Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:c||"#666666",onChange:e=>t({customPercentageColor:e}),enableAlpha:!0}),c&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customPercentageColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsx)("h3",{style:{margin:"24px 0 12px",fontSize:"13px",fontWeight:600,textTransform:"uppercase",color:"#1e1e1e"},children:(0,x.__)("Progress Bar Colors","b-blocks")}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Bar Progress Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:d||"#0073aa",onChange:e=>t({customBarProgressColor:e}),enableAlpha:!0}),d&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customBarProgressColor:""}),children:(0,x.__)("Reset","b-blocks")})]}),(0,l.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Bar Remaining/Background Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:u||"#f0f0f0",onChange:e=>t({customBarRemainingColor:e}),enableAlpha:!0}),u&&(0,l.jsx)(y.Button,{isSmall:!0,variant:"secondary",style:{marginTop:"8px"},onClick:()=>t({customBarRemainingColor:""}),children:(0,x.__)("Reset","b-blocks")})]})]}),n.length>0&&(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Individual Skill Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Select Skill","b-blocks"),value:p,options:n.map(((e,t)=>({label:e.title||`Skill ${t+1}`,value:t}))),onChange:e=>g(parseInt(e,10))}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Skill Title","b-blocks"),value:n[p].title,onChange:e=>_(p,"title",e)}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Percentage","b-blocks"),value:n[p].percentage,onChange:e=>_(p,"percentage",e),min:0,max:100}),!m&&(0,l.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,l.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:500,fontSize:"12px"},children:(0,x.__)("Progress Bar Color","b-blocks")}),(0,l.jsx)(y.ColorPicker,{color:n[p].color,onChange:e=>_(p,"color",e),enableAlpha:!0})]}),m&&(0,l.jsx)("p",{style:{fontSize:"12px",color:"#757575",fontStyle:"italic"},children:(0,x.__)("Individual skill colors are overridden by the Customizable theme settings above.","b-blocks")}),n.length>1&&(0,l.jsx)(y.Button,{isDestructive:!0,variant:"secondary",onClick:()=>(e=>{const o=n.filter(((t,n)=>n!==e));t({skills:o}),p>=o.length&&g(Math.max(0,o.length-1))})(p),children:(0,x.__)("Remove This Skill","b-blocks")})]})]}),(0,l.jsxs)("div",{...k,children:[(0,l.jsx)("div",{className:"b-blocks-skill-bar-skills-grid",children:n.map(((e,t)=>((e,t)=>{const n="b-blocks-skill-bar-skill-item",o=p===t?`${n} is-selected`:n,a={};m&&u&&(a.backgroundColor=u);const s={width:`${e.percentage}%`};s.background=m&&d?d:e.color;const r=m&&d?d:e.color,c=m&&u?u:"#e0e0e0";return(0,l.jsxs)("div",{className:o,style:b,onClick:()=>g(t),role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||g(t)},children:[(0,l.jsxs)("div",{className:"skill-header",children:[(0,l.jsx)("span",{className:"skill-title",style:f,children:e.title}),(0,l.jsxs)("span",{
529 +className:"skill-percentage",style:v,children:[e.percentage,"%"]})]}),"circular"===i?(0,l.jsxs)("div",{className:"skill-circular",children:[(0,l.jsxs)("svg",{viewBox:"0 0 100 100",children:[(0,l.jsx)("circle",{className:"skill-circular-bg",cx:"50",cy:"50",r:"45",fill:"none",stroke:c,strokeWidth:"10"}),(0,l.jsx)("circle",{className:"b-blocks-skill-bar-skill-circular-progress",cx:"50",cy:"50",r:"45",fill:"none",stroke:r,strokeWidth:"10",strokeDasharray:""+2*Math.PI*45,strokeDashoffset:""+2*Math.PI*45*(1-e.percentage/100),transform:"rotate(-90 50 50)"})]}),(0,l.jsxs)("div",{className:"b-blocks-skill-bar-skill-circular-text",style:v,children:[e.percentage,"%"]})]}):(0,l.jsx)("div",{className:"skill-bar-wrapper",children:(0,l.jsx)("div",{className:"skill-bar-bg",style:a,children:(0,l.jsx)("div",{className:"b-blocks-skill-bar-skill-bar-fill",style:s})})})]},t)})(e,t)))}),(0,l.jsx)("div",{className:"b-blocks-skill-bar-skill-bar-actions",children:(0,l.jsx)(y.Button,{variant:"secondary",onClick:w,icon:uz,children:(0,x.__)("Add Skill","b-blocks")})})]})]})},save:function({attributes:e}){const{skills:t,theme:n,template:o,columns:i,customBackgroundColor:a,customTitleColor:s,customPercentageColor:r,customBarProgressColor:c,customBarRemainingColor:d}=e,u="customizable"===n,p={};u&&a&&(p.backgroundColor=a);const g={};u&&s&&(g.color=s);const m={};u&&r&&(m.color=r);const b=h.useBlockProps.save({className:`skill-bar-block theme-${n} template-${o} columns-${i}`});return(0,l.jsx)("div",{...b,children:(0,l.jsx)("div",{className:"b-blocks-skill-bar-skills-grid",children:t.map(((e,t)=>{const n={};u&&d&&(n.backgroundColor=d);const i=u&&c?c:e.color,a=u&&c?c:e.color,s=u&&d?d:"#e0e0e0";return(0,l.jsxs)("div",{className:"b-blocks-skill-bar-skill-item","data-percentage":e.percentage,style:p,children:[(0,l.jsxs)("div",{className:"skill-header",children:[(0,l.jsx)("span",{className:"skill-title",style:g,children:e.title}),(0,l.jsxs)("span",{className:"skill-percentage",style:m,children:[e.percentage,"%"]})]}),"circular"===o?(0,l.jsxs)("div",{className:"skill-circular",children:[(0,l.jsxs)("svg",{viewBox:"0 0 100 100",children:[(0,l.jsx)("circle",{className:"skill-circular-bg",cx:"50",cy:"50",r:"45",fill:"none",stroke:s,strokeWidth:"10"}),(0,l.jsx)("circle",{className:"b-blocks-skill-bar-skill-circular-progress",cx:"50",cy:"50",r:"45",fill:"none",stroke:a,strokeWidth:"10",strokeDasharray:""+2*Math.PI*45,strokeDashoffset:""+2*Math.PI*45,transform:"rotate(-90 50 50)","data-color":a})]}),(0,l.jsxs)("div",{className:"b-blocks-skill-bar-skill-circular-text",style:m,children:[e.percentage,"%"]})]}):(0,l.jsx)("div",{className:"skill-bar-wrapper",children:(0,l.jsx)("div",{className:"skill-bar-bg",style:n,children:(0,l.jsx)("div",{className:"b-blocks-skill-bar-skill-bar-fill",style:{backgroundColor:i},"data-percentage":e.percentage,"data-color":i})})})]},t)}))})})}});const hz=JSON.parse('{"apiVersion":3,"name":"b-blocks/service","title":"Service","description":"Service item for services section.","parent":["b-blocks/services"],"category":"bBlocks","keywords":["our service","service item","service card"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"background":{"type":"object","default":{"color":"#0000"}},"hoverBG":{"type":"object","default":{"type":"image","image":{"url":"https://i.imgur.com/i6qCSdM.png"},"overlayColor":"#0000","position":"bottom left","repeat":"no-repeat","size":"auto"}},"isIcon":{"type":"boolean","default":true},"isUpIcon":{"type":"boolean","default":false},"icon":{"type":"object","default":{"class":"fa-brands fa-wordpress","fontSize":70}},"upIcon":{"type":"object","default":{"id":null,"url":"","alt":"","title":""}},"iconWidth":{"type":"string","default":"70px"},"iconBorder":{"type":"object","default":{}},"isTitle":{"type":"boolean","default":true},"title":{"type":"string","selector":".bBlocksService h3.title","default":"Service title"},"titleColor":{"type":"string","default":"#222"},"isDesc":{"type":"boolean","default":true},"desc":{"type":"string","selector":".bBlocksService h3.description","default":"Lorem ipsum dolor sit, amet consectetur adipisicing elit. Accusamus, fuga."},"descColor":{"type":"string","default":"#333"},"isLink":{"type":"boolean","default":true},"link":{"type":"string","default":"#"},"linkIn":{"type":"string","default":"button"},"linkIconColor":{"type":"string","default":"#fff"},"linkBGColor":{"type":"string","default":"#d2d2d2"},"linkBGHovColor":{"type":"string","default":"#146EF5"}},"supports":{"align":false,"reusable":false,"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","render":"file:./render.php","viewScript":"file:./view.js"}'),gz=({attributes:e,setAttributes:t})=>{const{background:n,hoverBG:i,isIcon:a,isUpIcon:s,icon:r,upIcon:c,iconWidth:d,iconBorder:u,isTitle:p,titleColor:g,isDesc:m,descColor:b,isLink:f,link:k,linkIn:w,linkIconColor:_,linkBGColor:C,linkBGHovColor:j}=e;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:bn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Service Settings","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(An,{label:(0,x.__)("Hover Background:","b-blocks"),value:i,onChange:e=>t({hoverBG:e}),defaults:{type:"image",image:{url:"https://i.imgur.com/i6qCSdM.png"},overlayColor:"#0000",position:"bottom left",size:"auto"}})]}),a&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:"Upload Icon?",checked:s,onChange:e=>t({isUpIcon:e})}),s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{value:c,onChange:e=>t({upIcon:e}),placeholder:(0,x.__)("Enter Icon URL","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Icon Width:","b-blocks"),labelPosition:"left",value:d,onChange:e=>t({iconWidth:e}),units:[Pe(),Ee(),Ae()]})]}):(0,l.jsx)(Un,{value:r,onChange:e=>t({icon:e}),defaults:{class:"fa-brands fa-wordpress",fontSize:70}}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:u,onChange:e=>t({iconBorder:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Colors Settings","b-blocks"),initialOpen:!1,children:[p&&(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:g,onChange:e=>t({titleColor:e}),defaultColor:"#222"}),m&&(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:b,onChange:e=>t({descColor:e}),defaultColor:"#333"})]}),f&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Link Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:k,onChange:e=>t({link:e})}),"button"===w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color:","b-blocks"),value:_,onChange:e=>t({linkIconColor:e}),defaultColor:"#fff"}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Color:","b-blocks"),value:C,onChange:e=>t({linkBGColor:e}),defaultColor:"#d2d2d2"}),(0,l.jsx)(Ue,{label:(0,x.__)("Background Hover Color:","b-blocks"),value:j,onChange:e=>t({linkBGHovColor:e}),defaultColor:o})]})]})]})},mz="bBlocksServices",bz="bBlocksService",fz=({attributes:e,id:t})=>{const{background:n,hoverBG:o,icon:i,iconWidth:a,iconBorder:s,titleColor:r,descColor:c,linkIconColor:d,linkBGColor:u,linkBGHovColor:p}=e,h=`#${t}`,g=`${h} .${bz}`,m=`${g} .icon`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
530 +__html:`\n\t\t${g}{\n\t\t\t${os(n)}\n\t\t}\n\t\t${g} .bgLayer{\n\t\t\t${os(o)}\n\t\t}\n\n\t\t${g} .title{\n\t\t\tcolor: ${r};\n\t\t}\n\t\t${m}{\n\t\t\t${is(s)}\n\t\t}\n\t\t${m} i{\n\t\t\t${rs(i)}\n\t\t}\n\t\t${m} img{\n\t\t\twidth: ${a};\n\t\t}\n\t\t${g} .description{\n\t\t\tcolor: ${c};\n\t\t}\n\t\t${g} .link a{\n\t\t\tbackground-color: ${u};\n\t\t}\n\t\t${h}:hover .ssbService .link a{\n\t\t\tbackground-color: ${p};\n\t\t}\n\t\t${g} .link a svg{\n\t\t\tfill: ${d};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},xz=(e="Service")=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 493.356 493.356",role:"img","aria-label":e.replace(/(<([^>]+)>)/gi,""),children:(0,l.jsx)("path",{d:"M490.498,239.278l-109.632-99.929c-3.046-2.474-6.376-2.95-9.993-1.427c-3.613,1.525-5.427,4.283-5.427,8.282v63.954H9.136 c-2.666,0-4.856,0.855-6.567,2.568C0.859,214.438,0,216.628,0,219.292v54.816c0,2.663,0.855,4.853,2.568,6.563 c1.715,1.712,3.905,2.567,6.567,2.567h356.313v63.953c0,3.812,1.817,6.57,5.428,8.278c3.62,1.529,6.95,0.951,9.996-1.708 l109.632-101.077c1.903-1.902,2.852-4.182,2.852-6.849C493.356,243.367,492.401,241.181,490.498,239.278z"})}),yz=({attributes:e,children:t})=>{const{title:n,isIcon:o,isUpIcon:i,icon:a,upIcon:s,isLink:r,link:c,linkIn:d}=e;return(0,l.jsxs)("div",{className:bz,children:["service"===d&&(0,l.jsx)("a",{className:"serviceLink",href:$t(c)}),(0,l.jsx)("div",{className:"bgLayer"}),o&&(0,l.jsx)("div",{className:"icon",children:i?(0,l.jsx)("img",{src:s?.url,alt:s?.alt}):a?.class&&(0,l.jsx)("i",{className:a?.class})}),t,r&&"button"===d&&(0,l.jsx)("div",{className:"link",children:c?(0,l.jsx)("a",{href:$t(c),children:xz(n)}):(0,l.jsx)("a",{children:xz(n)})})]})};Pl("b-blocks/services")&&(0,p.registerBlockType)(hz,{icon:zr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{isTitle:i,title:a,isDesc:s,desc:r}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(gz,{attributes:e.attributes,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(fz,{attributes:t,id:`block-${o}`}),(0,l.jsxs)(yz,{attributes:t,isBackend:!0,custom:{setAttributes:n},children:[i&&(0,l.jsx)(h.RichText,{className:"title",tagName:"h3",value:a,onChange:e=>n({title:e}),placeholder:(0,x.__)("Service Title","b-blocks"),inlineToolbar:!0}),s&&(0,l.jsx)(h.RichText,{className:"description",tagName:"p",value:r,onChange:e=>n({desc:e}),placeholder:(0,x.__)("Service Description","b-blocks"),inlineToolbar:!0})]})]})]})},save:()=>null});const vz=JSON.parse('{"apiVersion":3,"name":"b-blocks/services","title":"Services","description":"Services section for web page.","category":"bBlocks","keywords":["our services","services template","services section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"cId":{"type":"string","default":""},"layout":{"type":"string","default":"default"},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"30px"},"rowGap":{"type":"string","default":"30px"},"background":{"type":"object","default":{"color":"#0000"}},"textAlign":{"type":"string","default":"left"},"itemHeight":{"type":"string","default":"375px"},"itemPadding":{"type":"object","default":{"side":4,"top":"50px","right":"30px","bottom":"50px","left":"50px"}},"itemBorder":{"type":"object","default":{"radius":"15px"}},"itemShadow":{"type":"object","default":{"blur":"20px","color":"#0000001a"}},"iconPadding":{"type":"object","default":{"side":4,"bottom":"10px"}},"iconMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"23px","tablet":"20px","mobile":"18px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"30px"}},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),kz=[{label:(0,x.__)("Default","services-section"),value:"default"},{label:(0,x.__)("Layout 1","services-section"),value:"layout1"}],wz=[{label:(0,x.__)("Service Element","services-section"),value:"service"},{label:(0,x.__)("Title","services-section"),value:"title"},{label:(0,x.__)("Button","services-section"),value:"button"}],_z=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,clientId:n,device:o})=>{const{layout:i,columns:a,columnGap:s,rowGap:c,background:d,textAlign:u,itemHeight:p,itemPadding:g,itemBorder:b,itemShadow:k,iconPadding:w,iconMargin:C,titleTypo:j,titleMargin:$,descTypo:S}=e,T=(0,f.select)("core/block-editor").getBlocksByClientId(n)[0]?.innerBlocks,N=T&&T[0]?.attributes,[M,L]=(0,m.useState)(N?.isIcon),[P,E]=(0,m.useState)(N?.isTitle),[A,B]=(0,m.useState)(N?.isDesc),[I,O]=(0,m.useState)(N?.linkIn),R=e=>T.forEach((t=>{(0,f.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,e)}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:bn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,onChange:e=>{t({layout:e}),"default"===e&&t({background:{...d,type:"solid",color:"#0000"},itemShadow:{...k,blur:"20px",color:"#0000001a"}}),"layout1"===e&&t({background:{...d,type:"solid",color:"#121212"},itemShadow:{...k,blur:"0",color:"#0000"}}),T.forEach((t=>{const{hoverBG:n,icon:o,iconBorder:i}=t?.attributes;"default"===e&&(0,f.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{hoverBG:{...n,type:"image",image:{url:"https://i.imgur.com/i6qCSdM.png"},overlayColor:"#0000",position:"bottom left",size:"auto"},icon:{...o,colorType:"solid",gradient:r},iconBorder:{...i,width:"0px",color:"#0000",side:"all"},titleColor:"#222",descColor:"#333",linkIn:"button"}),"layout1"===e&&(0,f.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{hoverBG:{...n,type:"solid",color:"#0000"},icon:{...o,colorType:"gradient",gradient:"linear-gradient(135deg, #7f246b, #c70d2b)"},iconBorder:{...i,width:"1px",color:"#777",side:"bottom"},titleColor:"#fff",descColor:"#777",linkIn:"title"})}))},options:kz})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:a[o],onChange:e=>{t({columns:{...a,[o]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:c,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t({background:e}),defaults:{color:"#0000"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Item Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Min Height:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({itemHeight:e}),units:[Pe(),Ae()]}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:g,onChange:e=>t({itemPadding:e}),defaults:{side:4,top:"50px",right:"30px",bottom:"50px",left:"50px"}}),(0,l.jsx)(ed,{label:(0,x.__)("Border","b-blocks"),value:b,onChange:e=>t({itemBorder:e}),defaults:{radius:"15px"}}),(0,l.jsx)(id,{label:(0,x.__)("Shadow:","b-blocks"),value:k,onChange:e=>t({itemShadow:e}),defaults:{blur:"20px",color:"#0000001a"}}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,
531 +x.__)("Link In:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:I,onChange:e=>{R({linkIn:e}),O(e)},options:wz})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Icon","b-blocks"),checked:M||N?.isIcon,onChange:e=>{R({isIcon:e}),L(e)}}),M||N?.isIcon?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Icon Padding:","b-blocks"),value:w,onChange:e=>t({iconPadding:e}),defaults:{side:4,bottom:"10px"}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Icon Margin:","b-blocks"),value:C,onChange:e=>t({iconMargin:e}),defaults:{side:4,bottom:"20px"}})]}):"",(0,l.jsx)(y.ToggleControl,{className:"mt35",label:(0,x.__)("Show Title","b-blocks"),checked:P||N?.isTitle,onChange:e=>{R({isTitle:e}),E(e)}}),P||N?.isTitle?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Oa,{label:(0,x.__)("Title Typography:","b-blocks"),value:j,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:23,tablet:20,mobile:18}}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Title Margin:","b-blocks"),value:$,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"30px"}})]}):"",(0,l.jsx)(y.ToggleControl,{className:"mt35",label:(0,x.__)("Show Description","b-blocks"),checked:A||N?.isDesc,onChange:e=>{R({isDesc:e}),B(e)}}),A||N?.isDesc?(0,l.jsx)(Oa,{label:(0,x.__)("Description Typography:","b-blocks"),value:S,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}):""]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:u,onChange:e=>t({textAlign:e})})})]})})),Cz=({attributes:e,id:t,isBackend:n=!1})=>{const{columnGap:o,rowGap:i,background:a,textAlign:s,itemHeight:r,itemPadding:c,itemBorder:d,itemShadow:u,iconPadding:p,iconMargin:h,titleTypo:g,titleMargin:m,descTypo:b}=e,f=`#${t} .${mz}`,x=`${f} .${bz}`,y=n?`${f} .block-editor-inner-blocks .block-editor-block-list__layout{\n\t\tgrid-gap: ${i} ${o};\n\t}`:`${f}{\n\t\tgrid-gap: ${i} ${o};\n\t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",g)?.googleFontLink}\n\t\t${ps("",b)?.googleFontLink}\n\t\t${ps(`${x} .title`,g)?.styles}\n\t\t${ps(`${x} .description`,b)?.styles}\n\n\t\t${f}{\n\t\t\t${os(a)}\n\t\t}\n\t\t${y}\n\n\t\t${x}{\n\t\t\ttext-align: ${s};\n\t\t\tmin-height: ${r};\n\t\t\tpadding: ${us(c)};\n\t\t\t${is(d)||"border-radius: 15px;"}\n\t\t\tbox-shadow: ${ds(u)};\n\t\t}\n\t\t${x} .bgLayer{\n\t\t\tborder-radius: ${d?.radius||"15px"}\n\t\t}\n\t\t${x} .icon{\n\t\t\tpadding: ${us(p)};\n\t\t\tmargin: ${us(h)};\n\t\t}\n\t\t${x} .title{\n\t\t\tmargin: ${us(m)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})};Pl(vz.name)&&(0,p.registerBlockType)(vz,{icon:zr,transforms:{from:[{type:"block",blocks:["services-section/services"],transform:e=>(0,p.createBlock)("b-blocks/services",e)},{type:"prefix",prefix:"slider",transform:()=>(0,p.createBlock)("b-blocks/services")}],to:[{type:"block",blocks:["services-section/services"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("services-section/services",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{layout:i,columns:a}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_z,{attributes:t,setAttributes:n,clientId:o}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Cz,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:`${mz} ${i} columns-${a.desktop} columns-tablet-${a.tablet} columns-mobile-${a.mobile}`,children:(0,l.jsx)(h.InnerBlocks,{allowedBlocks:["b-blocks/service"],template:[["b-blocks/service"],["b-blocks/service"],["b-blocks/service"]]})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const jz=JSON.parse('{"apiVersion":3,"name":"b-blocks/shape-divider","title":"Shape Divider","description":"Create unique and visually appealing dividers.","category":"bBlocks","keywords":["shape divider","svg shape","dynamic divider"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"full"},"background":{"type":"object","default":{"type":"gradient","gradient":"linear-gradient(135deg, #74E2D5, #7BCACF);"}},"padding":{"type":"object","default":{"top":"100px","right":"0px","bottom":"100px","left":"0px"}},"height":{"type":"object","default":{"desktop":"100vh","tablet":"100vh","mobile":"100vh"}},"shape":{"type":"string","default":"waves-opacity"},"shapePosition":{"type":"string","default":"bottom"},"isShapeSplite":{"type":"boolean","default":false},"shapeHeight":{"type":"object","default":{"desktop":"150px","tablet":"150px","mobile":"150px"}},"shapeWidth":{"type":"number","default":100},"shapeColor":{"type":"string","default":"#fff"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),$z=[{label:(0,x.__)("Curve","b-blocks"),value:"curve"},{label:(0,x.__)("Tilt","b-blocks"),value:"tilt"},{label:(0,x.__)("Curve Acymmetrical","b-blocks"),value:"curve-acymmetrical"},{label:(0,x.__)("Waves","b-blocks"),value:"waves"},{label:(0,x.__)("Waves Opacity","b-blocks"),value:"waves-opacity"}],Sz=({attributes:e,setAttributes:t})=>{const{height:n,shape:o,shapePosition:i,isShapeSplite:a,shapeWidth:s,shapeHeight:r,shapeColor:c,background:d,padding:u}=e;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Section","b-blocks"),children:(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:n.desktop,onChange:e=>t({height:{desktop:e,tablet:e,mobile:e}}),units:[Pe(1080),Ae(67),Oe(100)],isResetValueOnUnitChange:!0})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Shape","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:o,onChange:e=>t({shape:e}),options:$z})]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Position:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i,options:[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],onChange:e=>t({shapePosition:e})})]}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Shape Splite","b-blocks"),checked:a,value:a,onChange:e=>t({isShapeSplite:e})}),(0,l.jsx)(v,{children:(0,x.__)("Width:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:s,onChange:e=>t({shapeWidth:e}),min:100,max:300}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:r.desktop,onChange:e=>t({shapeHeight:{desktop:e,tablet:e,mobile:e}}),units:[Pe(150),Ae(10)],isResetValueOnUnitChange:!0})]})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Section","b-blocks"),children:[(0,l.jsx)(An,{className:"mb20",label:(0,x.__)("Background","b-blocks"),value:d,onChange:e=>t({background:e})}),(0,l.jsx)(y.__experimentalBoxControl,{label:(0,x.__)("Padding:","b-blocks"),values:u,resetValues:{top:"100px",right:"0px",bottom:"100px",left:"0px"},onChange:e=>t({padding:e})})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Shape","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:c,onChange:e=>t({shapeColor:e}),defaultColor:"#fff"})})]})]})})})},Tz=({attributes:e,id:t})=>{const{shapeColor:n,shapePosition:o,shapeWidth:i,shapeHeight:a,isShapeSplite:s,padding:r,background:c,height:d}=e,u=`#${t}`,p="top"===o?"rotate(0deg)":"rotate(180deg)",h=s?"scaleX(1)":"scaleX(-1)";return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
532 +__html:`\n\t\t${u}{\n\t\t\tmin-height: ${d.desktop};\n\t\t\t${os(c)}\n\t\t\tpadding: ${hs(r)};\n\t\t}\n\n\t\t${u} svg{\n\t\t\twidth: calc(${i}% + 1.3px);\n\t\t\theight: ${a.desktop};\n\t\t\tfill: ${n};\n\t\t\ttop: ${"top"===o?0:"auto"};\n\t\t\tbottom: ${"bottom"===o?0:"auto"};\n\t\t\ttransform: ${p+" "+h};\n\t\t}\n\t`}})},Nz=({attributes:e})=>{const{shape:t}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1200 120",preserveAspectRatio:"none",children:(0,l.jsx)(Mz,{shape:t})})},Mz=({shape:e})=>{switch(e){case"curve":default:return(0,l.jsx)("path",{d:"M0,0V7.23C0,65.52,268.63,112.77,600,112.77S1200,65.52,1200,7.23V0Z"});case"tilt":return(0,l.jsx)("path",{d:"M1200 120L0 16.48 0 0 1200 0 1200 120z"});case"curve-acymmetrical":return(0,l.jsx)("path",{d:"M0,0V6c0,21.6,291,111.46,741,110.26,445.39,3.6,459-88.3,459-110.26V0Z"});case"waves":return(0,l.jsx)("path",{d:"M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z"});case"waves-opacity":return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("path",{d:"M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z",opacity:".25"}),(0,l.jsx)("path",{d:"M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z",opacity:".5"}),(0,l.jsx)("path",{d:"M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z"})]})}},Lz=[["core/heading",{content:"Creative Shape Divider",textAlign:"center",style:{typography:{fontSize:"52px"}},textColor:"white"}],["core/paragraph",{content:"The Gutenberg Shape Divider plugin is an innovative tool designed to enhance the visual appeal and creativity of websites built using the WordPress Gutenberg editor. With its intuitive interface and powerful features, this plugin empowers users to create unique and captivating designs by adding customizable shape dividers to their web pages.",align:"center",style:{typography:{fontSize:"18px"}},textColor:"white"}]];Pl(jz.name)&&(0,p.registerBlockType)(jz,{icon:Dr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Sz,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Tz,{attributes:t,id:`block-${o}`}),(0,l.jsx)(Nz,{attributes:t}),(0,l.jsx)("div",{className:"shapeContent",children:(0,l.jsx)(h.InnerBlocks,{template:Lz,renderAppender:()=>(0,l.jsx)(h.Inserter,{rootClientId:o,isAppender:!0,renderToggle:({onToggle:e,disabled:t})=>(0,l.jsx)(y.Button,{onClick:e,disabled:t,icon:"plus-alt",children:" "})})})})]})]})},save:()=>(0,l.jsx)(h.InnerBlocks.Content,{})});const Pz=JSON.parse('{"apiVersion":3,"name":"b-blocks/slider","title":"Slider","description":"Display image and content slider.","category":"bBlocks","keywords":["content slider","image slider","image carousel"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"slides":{"type":"array","default":[{"background":{"color":"#00000080"},"border":{},"position":"center center","childPositions":[{"top":36,"right":44.71,"bottom":44.5,"left":44.71},{"top":47.5,"right":34.67,"bottom":52.5,"left":34.67},{"top":55.5,"right":44.54,"bottom":67,"left":44.54}],"title":"Slide Title 1","titleColor":"#fff","description":"This content area describes slider 1 descriptions/details.","descColor":"#fff","btnText":"Button 1","btnLink":"#","btnColors":{"color":"#fff","bg":"#146EF5"},"btnHovColors":{"color":"#fff","bg":"#FF7A00"}},{"background":{"color":"#00000080"},"border":{},"position":"center center","childPositions":[{"top":36,"right":44.71,"bottom":44.5,"left":44.71},{"top":47.5,"right":34.67,"bottom":52.5,"left":34.67},{"top":55.5,"right":44.54,"bottom":67,"left":44.54}],"title":"Slide Title 2","titleColor":"#fff","description":"This content area describes slider 2 descriptions/details.","descColor":"#fff","btnText":"Button 2","btnLink":"#","btnColors":{"color":"#fff","bg":"#146EF5"},"btnHovColors":{"color":"#fff","bg":"#FF7A00"}}]},"columns":{"type":"object","default":{"desktop":1,"tablet":1,"mobile":1}},"columnGap":{"type":"number","default":15},"sliderWidth":{"type":"string","default":"100%"},"sliderHeight":{"type":"string","default":"400px"},"sliderAlign":{"type":"string","default":"center"},"isLoop":{"type":"boolean","default":true},"isTouchMove":{"type":"boolean","default":true},"speed":{"type":"number","default":1.5},"isAutoplay":{"type":"boolean","default":true},"autoplayOptions":{"type":"object","default":{"delay":1.5,"disableOnInteraction":false,"reverseDirection":false,"pauseOnMouseEnter":false,"stopOnLastSlide":false}},"freeModeOptions":{"type":"object","default":{"enabled":false,"sticky":false}},"effect":{"type":"string","default":"slide"},"keyboardOptions":{"type":"object","default":{"enabled":false}},"isMousewheel":{"type":"boolean","default":false},"isPage":{"type":"boolean","default":true},"pageOnDevice":{"type":"object","default":{"tablet":true,"mobile":true}},"isPageClickable":{"type":"boolean","default":true},"isPageDynamic":{"type":"boolean","default":true},"isPrevNext":{"type":"boolean","default":true},"prevNextOnDevice":{"type":"object","default":{"tablet":true,"mobile":true}},"sliderBG":{"type":"object","default":{"color":"#0000"}},"sliderPadding":{"type":"object","default":{"vertical":"0px","horizontal":"0px"}},"pageColor":{"type":"string","default":"#fff"},"pageWidth":{"type":"string","default":"15px"},"pageHeight":{"type":"string","default":"15px"},"pageBorder":{"type":"object","default":{"radius":"50%"}},"prevNextColor":{"type":"string","default":"#fff"},"isTitle":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"25px","tablet":"22px","mobile":"20px"}}},"isDesc":{"type":"boolean","default":true},"descTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"descColor":{"type":"string","default":""},"isBtn":{"type":"boolean","default":true},"linkTarget":{"type":"string","default":"_blank"},"btnTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"btnPadding":{"type":"object","default":{"vertical":"12px","horizontal":"35px"}},"btnBorder":{"type":"object","default":{"radius":"3px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":["file:./view.js","wp-util"]}'),Ez=[{label:(0,x.__)("Slide","content-slider-block"),value:"slide"},{label:(0,x.__)("Fade","content-slider-block"),value:"fade"},{label:(0,x.__)("Cube","content-slider-block"),value:"cube"},{label:(0,x.__)("Creative","content-slider-block"),value:"creative"},{label:(0,x.__)("Coverflow","content-slider-block"),value:"coverflow"},{label:(0,x.__)("Flip","content-slider-block"),value:"flip"},{label:(0,x.__)("Cards","content-slider-block"),value:"cards"}],Az=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"options",title:(0,x.__)("Options","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Bz=(e,t)=>100*parseFloat(e/t),Iz=e=>parseInt(e?.clientWidth),Oz=e=>parseInt(e?.clientHeight),Rz=({attributes:e,setAttributes:t,clientId:n,arrKey:i,index:s,setActiveIndex:r=!1,premiumProps:c})=>{
533 +const d=e[i],{background:u,border:p={},title:h,titleColor:g,description:m,descColor:b,btnText:f,btnLink:k,btnColors:w,btnHovColors:_}=d[s],C=(n,o,a)=>{const s=zb(e[i],(e=>{e[n][o]=a}));t({[i]:s}),r&&r(n)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:u,onChange:e=>C(s,"background",e),defaults:{color:"#00000080"}}),(0,l.jsx)(Ya,{label:(0,x.__)("Border:","b-blocks"),value:p,onChange:e=>C(s,"border",e),...c,Component:ed}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Content Position","b-blocks")}),(0,l.jsx)(y.__experimentalAlignmentMatrixControl,{onChange:e=>{t({slides:zb(d,(t=>{t[s].position=e,t[s].childPositions=((e,t,n)=>{const o=document.querySelector(`#${e} .swiper-wrapper .slide-${t} .slideContent`),i=o?.children||[];if(i?.length){const e=i.length,t=[];for(let a=0;a<e;a++){const s=(e=a)=>Bz(Oz(i[e]),Oz(o)),r=((e=a)=>Bz(Iz(i[e]),Iz(o)))(a),l=s(a);if(0<r&&0<l&&isFinite(r)&&isFinite(l)){const o=e=>e>=0?s(e)+3:0,i=11,c=5.8;let d=0;for(let e=0;e<a;e++)d+=o(e);let u=0;for(let t=e-1;t>a;t--)u+=o(t);const p=i+d,h=100-(i+l+d),g=100-(i+l+u),m=i+u,b=100-(r+c),f=50-r/2,x=3===e?1===a?50-l/2:2===a?50+s(1)/2+3:50-s(1)/2-3-l:2===e?1===a?51.5:48.5-l:50-l/2,y=3===e?1===a?50+l/2:2===a?50+s(1)/2+3+l:50-s(1)/2-3:2===e?1===a?51.5+l:48.5:50+l/2,v={top:p,right:b,bottom:h,left:c},k={top:p,right:f,bottom:h,left:f},w={top:p,right:c,bottom:h,left:b},_={top:x,right:b,bottom:y,left:c},C={top:x,right:f,bottom:y,left:f},j={top:x,right:c,bottom:y,left:b},$={top:g,right:b,bottom:m,left:c},S={top:g,right:f,bottom:m,left:f},T={top:g,right:c,bottom:m,left:b};switch(n){case"top left":t.push(v);break;case"top center":t.push(k);break;case"top right":t.push(w);break;case"center left":t.push(_);break;case"center center":t.push(C);break;case"center right":t.push(j);break;case"bottom left":t.push($);break;case"bottom center":t.push(S);break;case"bottom right":t.push(T)}}}return t}})(`block-${n}`,s,e)}))})}})]}),(0,l.jsx)("small",{children:(0,x.__)("You can also change the content position by dragging element.","b-blocks")}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:h,onChange:e=>C(s,"title",e),placeholder:(0,x.__)("Slide title","b-blocks")})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color:","b-blocks"),value:g,onChange:e=>C(s,"titleColor",e),defaultColor:"#fff"}),(0,l.jsx)(v,{children:(0,x.__)("Description:","b-blocks")}),(0,l.jsx)(y.TextareaControl,{value:m,onChange:e=>C(s,"description",e),placeholder:(0,x.__)("Description of the slider","b-blocks")}),(0,l.jsx)(Ue,{label:(0,x.__)("Description Color:","b-blocks"),value:b,onChange:e=>C(s,"descColor",e),defaultColor:"#fff"}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Text:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:f,onChange:e=>C(s,"btnText",e),placeholder:(0,x.__)("Button label","b-blocks")})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Button Link:","b-blocks")}),(0,l.jsx)(y.TextControl,{value:k,onChange:e=>C(s,"btnLink",e),placeholder:(0,x.__)("Button link","b-blocks")})]}),(0,l.jsx)(On,{label:(0,x.__)("Button Colors:","b-blocks"),value:w,onChange:e=>C(s,"btnColors",e),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(On,{label:(0,x.__)("Button Hover Colors:","b-blocks"),value:_,onChange:e=>C(s,"btnHovColors",e),defaults:{color:"#fff",bg:a}})]})},zz=[{top:36,right:44.71,bottom:44.5,left:44.71},{top:47.5,right:34.67,bottom:52.5,left:34.67},{top:55.5,right:44.54,bottom:67,left:44.54}],Dz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,clientId:n,activeIndex:i,setActiveIndex:s,isPremium:r,device:c})=>{const{slides:d=[],columns:u,columnGap:p,sliderWidth:g,sliderHeight:b,isLoop:f,isTouchMove:k,speed:w,isAutoplay:C,autoplayOptions:j={},freeModeOptions:$={},effect:S,keyboardOptions:T={},isMousewheel:N=!1,isPage:M,pageOnDevice:L={},isPageClickable:P,isPageDynamic:E,isPrevNext:A,prevNextOnDevice:B={},sliderBG:I={},sliderPadding:O={},pageColor:R,pageWidth:z,pageHeight:D,pageBorder:F,prevNextColor:H,sliderAlign:W,isTitle:U,titleTypo:G,isDesc:V,descTypo:q,isBtn:Y,linkTarget:K,btnTypo:Q,btnPadding:Z,btnBorder:X}=e,[J,ee]=(0,m.useState)(!1),te={background:{color:"#00000080"},border:{},position:"center center",childPositions:zz,title:`Slide Title ${d.length+1}`,titleColor:"#fff",description:`This content area describes slider ${d.length+1} descriptions/details.`,descColor:"#fff",btnText:`Button ${d.length+1}`,btnLink:"#",btnColors:{color:"#fff",bg:o},btnHovColors:{color:"#fff",bg:a}},ne={isPremium:r,setIsProModalOpen:ee},oe={className:"bPlPanelBody",initialOpen:!1},ie={attributes:e,setAttributes:t,clientId:n,arrKey:"slides",activeIndex:i,setActiveIndex:s,premiumProps:ne};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Az,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slides","b-blocks"),children:(0,l.jsx)(_a,{...ie,newItem:te,ItemSettings:Rz,itemLabel:"Slide",design:r?"sortable":"all"})}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Layout Settings","b-blocks"),...oe,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:u[c],onChange:e=>t({columns:{...u,[c]:e}}),min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(v,{children:(0,x.__)("Column Gap:","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:p,onChange:e=>t({columnGap:e}),min:0,max:250,step:1,beforeIcon:"arrow-right-alt"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({sliderWidth:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Height:","b-blocks"),labelPosition:"left",value:b,onChange:e=>t({sliderHeight:e}),units:[Pe(),Ae(),Oe()]})]})]}),"options"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Basic Options","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Loop","b-blocks"),checked:f,onChange:e=>t({isLoop:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Touch Move","b-blocks"),checked:k,onChange:e=>t({isTouchMove:e})}),(0,l.jsx)("small",{children:(0,x.__)("Switch slide with grab in anywhere in slide","b-blocks")}),(0,l.jsx)("small",{children:(0,x.__)("Touch Move will not work in backend","b-blocks")}),(0,l.jsx)(v,{children:(0,x.__)("Speed (s):","b-blocks")}),(0,l.jsx)(y.RangeControl,{value:w,onChange:e=>t({speed:e}),min:0,max:10,step:.05}),(0,l.jsx)("small",{children:(0,x.__)("Smaller speed value will be slide faster","b-blocks")})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Autoplay","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Enable Autoplay","b-blocks"),checked:C,onChange:e=>t({isAutoplay:e})}),(0,l.jsx)("small",{children:(0,x.__)("Autoplay will not work in backend","b-blocks")}),C&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Delay (s):","b-blocks"),value:j.delay,onChange:e=>t({autoplayOptions:{...j,delay:e}}),min:0,max:10,step:.05,beforeIcon:"visibility",...ne,Component:y.RangeControl}),(0,l.jsx)("small",{children:(0,x.__)("Smaller delay value will be autoplay faster","b-blocks")}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Disable on Interaction","b-blocks"),checked:j.disableOnInteraction,onChange:e=>t({autoplayOptions:{...j,disableOnInteraction:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ya,{
534 +className:"mt10",label:(0,x.__)("Pause on Mouse Enter","b-blocks"),checked:j.pauseOnMouseEnter,onChange:e=>t({autoplayOptions:{...j,pauseOnMouseEnter:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)("small",{children:(0,x.__)("If 'Disable on Interaction' is also enabled, it will stop autoplay instead of pause","b-blocks")}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Reverse Direction","b-blocks"),checked:j.reverseDirection,onChange:e=>t({autoplayOptions:{...j,reverseDirection:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Stop on Last Slide","b-blocks"),checked:j.stopOnLastSlide,onChange:e=>t({autoplayOptions:{...j,stopOnLastSlide:e}}),...ne,Component:y.ToggleControl})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Free Mode","b-blocks"),...oe,children:[(0,l.jsx)(Ya,{label:(0,x.__)("Enable Free Mode","b-blocks"),checked:$.enabled,onChange:e=>t({freeModeOptions:{...$,enabled:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)("small",{children:(0,x.__)("Smooth Scrolling with dragging the slide","b-blocks")}),(0,l.jsx)("br",{}),(0,l.jsx)("small",{children:(0,x.__)("Enable Touch Move to use Free Mode","b-blocks")}),$.enabled&&(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Sticky","b-blocks"),checked:$.sticky,onChange:e=>t({freeModeOptions:{...$,sticky:e}}),...ne,Component:y.ToggleControl})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Effects","b-blocks"),...oe,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Effect:","b-blocks")}),(0,l.jsx)(Za,{value:S,onChange:e=>{t({effect:e}),"slide"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"fade"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"cube"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"450px",sliderHeight:"500px",sliderPadding:{vertical:"50px",horizontal:"50px"}}),"creative"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"coverflow"===e&&t({columns:{desktop:3,tablet:2,mobile:1},sliderWidth:"100%",sliderHeight:"400px",sliderPadding:{vertical:"0px",horizontal:"0px"}}),"flip"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"450px",sliderHeight:"500px",sliderPadding:{vertical:"50px",horizontal:"50px"}}),"cards"===e&&t({columns:{desktop:1,tablet:1,mobile:1},sliderWidth:"400px",sliderHeight:"500px",sliderPadding:{vertical:"50px",horizontal:"50px"}})},options:Ez,proValues:["cube","coverflow","flip","cards"],...ne})]}),(0,l.jsx)("small",{children:(0,x.__)("To work fade, cube, creative, flip & cards effects properly, set single column per view.","b-blocks")}),(0,l.jsx)("br",{}),(0,l.jsx)("small",{children:(0,x.__)("Some settings may change when effect will be changed.","b-blocks")})]}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Keyboard Control","b-blocks"),...oe,children:(0,l.jsx)(Ya,{label:(0,x.__)("Enable Keyboard Control","b-blocks"),checked:T.enabled,onChange:e=>t({keyboardOptions:{...T,enabled:e}}),...ne,Component:y.ToggleControl})}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Mousewheel","b-blocks"),...oe,children:(0,l.jsx)(Ya,{label:(0,x.__)("Enable Slide on Mousewheel","b-blocks"),checked:N,onChange:e=>t({isMousewheel:e}),...ne,Component:y.ToggleControl})}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Pagination","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Pagination","b-blocks"),checked:M,onChange:e=>t({isPage:e})}),M&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show On Tablet","b-blocks"),checked:L?.tablet,onChange:e=>t({pageOnDevice:{...L,tablet:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show On Mobile","b-blocks"),checked:L?.mobile,onChange:e=>t({pageOnDevice:{...L,mobile:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Clickable","b-blocks"),checked:P,onChange:e=>t({isPageClickable:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Pagination Dynamic Bullets","b-blocks"),checked:E,onChange:e=>t({isPageDynamic:e})})]})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Navigation","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Preview Next Button","b-blocks"),checked:A,onChange:e=>t({isPrevNext:e})}),A&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show On Tablet","b-blocks"),checked:B?.tablet,onChange:e=>t({prevNextOnDevice:{...B,tablet:e}}),...ne,Component:y.ToggleControl}),(0,l.jsx)(Ya,{className:"mt10",label:(0,x.__)("Show On Mobile","b-blocks"),checked:B?.mobile,onChange:e=>t({prevNextOnDevice:{...B,mobile:e}}),...ne,Component:y.ToggleControl})]})]})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider","b-blocks"),children:[(0,l.jsx)(Ya,{label:(0,x.__)("Background","b-blocks"),value:I,onChange:e=>t({sliderBG:e}),defaults:{color:"#0000"},...ne,Component:An}),(0,l.jsx)(Ya,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:O,onChange:e=>t({sliderPadding:e}),defaults:{vertical:"0px",horizontal:"0px"},...ne,Component:ad})]}),M||A?(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Options","b-blocks"),...oe,children:[M&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Pagination Bullets Color:","b-blocks"),value:R,onChange:e=>t({pageColor:e}),defaultColor:"#fff"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Width:","b-blocks"),labelPosition:"left",value:z,onChange:e=>t({pageWidth:e}),units:[Pe(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Pagination Height:","b-blocks"),labelPosition:"left",value:D,onChange:e=>t({pageHeight:e}),units:[Pe(),Ae()]}),(0,l.jsx)(ed,{label:(0,x.__)("Pagination Border:","b-blocks"),value:F,onChange:e=>t({pageBorder:e}),defaults:{radius:"50%"}})]}),A&&(0,l.jsx)(Ue,{label:(0,x.__)("Preview Next Button Color:","b-blocks"),value:H,onChange:e=>t({prevNextColor:e}),defaultColor:"#fff"})]}):"",(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Slide Title","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:U,onChange:e=>t({isTitle:e})}),U&&(0,l.jsx)(Oa,{value:G,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:25,tablet:22,mobile:20}}})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Slide Description","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Description","b-blocks"),checked:V,onChange:e=>t({isDesc:e})}),V&&(0,l.jsx)(Oa,{value:q,onChange:e=>t({descTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Slide Button","b-blocks"),...oe,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Button","b-blocks"),checked:Y,onChange:e=>t({isBtn:e})}),Y&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open link in new tab","b-blocks"),checked:"_blank"===K,onChange:e=>t({linkTarget:e?"_blank":""})}),(0,l.jsx)(Oa,{value:Q,onChange:e=>t({btnTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:Z,onChange:e=>t({btnPadding:e}),defaults:{vertical:"12px",horizontal:"35px"}}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:X,onChange:e=>t({btnBorder:e}),defaults:{radius:"3px"}})]})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Slide","b-blocks"),onClick:()=>{t({slides:[...d,te]}),s(d.length)},children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:W,onChange:e=>t({sliderAlign:e}),describedBy:(0,x.__)("Slider Alignment"),
535 +alignmentControls:[{title:(0,x.__)("Slider in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Slider in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Slider in right","b-blocks"),align:"right",icon:"align-right"}]})]}),(0,l.jsxs)(jn,{isProModalOpen:J,setIsProModalOpen:ee,block:"Slider",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Border: ","b-blocks")}),(0,x.__)("Border style options in every single slide.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Delay time: ","b-blocks")}),(0,x.__)("Delay time option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Disable on Interaction: ","b-blocks")}),(0,x.__)("Disable on Interaction option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Reverse Direction: ","b-blocks")}),(0,x.__)("Reverse Direction option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Pause on Mouse Enter: ","b-blocks")}),(0,x.__)("Pause on Mouse Enter option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Stop on Last Slide: ","b-blocks")}),(0,x.__)("Stop on Last Slide option in autoplay.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Free Mode: ","b-blocks")}),(0,x.__)("Free Mode option on drag slide.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Sticky: ","b-blocks")}),(0,x.__)("Sticky option in free mode.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Effects: ","b-blocks")}),(0,x.__)("Explore more effects such as Cube, Coverflow, Flip, and Cards.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Keyboard Control: ","b-blocks")}),(0,x.__)("Slide with Keyboard control.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Slide on Mousewheel: ","b-blocks")}),(0,x.__)("Slide on Mousewheel option.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Pagination Device: ","b-blocks")}),(0,x.__)("Show/Hide pagination in different devices(tablet and mobile).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Navigation Device: ","b-blocks")}),(0,x.__)("Show/Hide navigation in different devices(tablet and mobile).","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Background: ","b-blocks")}),(0,x.__)("Background style option for slider wrapper.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Padding: ","b-blocks")}),(0,x.__)("Padding style option for slider wrapper.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Shortcode: ","b-blocks")}),(0,x.__)("Shortcode option to use anywhere.","b-blocks")]})]})]})})),Fz="bBlocksSlider",Hz=({attributes:e,initialSlide:t=0,isBackend:n=!1})=>{const{slides:o=[],columns:i,columnGap:a,isLoop:s,isTouchMove:r,speed:c,isAutoplay:d,autoplayOptions:u,freeModeOptions:p={},effect:h,keyboardOptions:g={},isMousewheel:m=!1,isPage:b,isPageClickable:f,isPageDynamic:x,isPrevNext:y,isTitle:v,isDesc:k,isBtn:w}=e;return(0,l.jsx)(Ux,{className:Fz,direction:"horizontal",initialSlide:t,slidesPerView:i.mobile,breakpoints:{576:{slidesPerView:i.tablet},768:{slidesPerView:i.desktop}},spaceBetween:a,modules:[Of,Pf,Af,Ff,Hf,Vf,Gf,Uf,qf],loop:s,allowTouchMove:r,grabCursor:r,speed:1e3*c,autoplay:!!d&&{...u,delay:1e3*u.delay},freeMode:p,effect:h,fadeEffect:{crossFade:!1},cubeEffect:{shadow:!1},creativeEffect:{prev:{shadow:!0,translate:["-120%",0,-500]},next:{shadow:!0,translate:["120%",0,-500]}},keyboard:g,mousewheel:m,pagination:!!b&&{clickable:f,dynamicBullets:x,forceClass:!0},navigation:y,allowSlidePrev:!0,allowSlideNext:!0,autoHeight:!1,children:o?.map(((e,t)=>{const{position:o,title:i,description:a,btnText:s,btnLink:r}=e;return(0,l.jsx)(Gx,{className:`slide-${t}`,children:(0,l.jsxs)("div",{className:`slideContent ${o?.split(" ")?.join("-")||"center-center"}`,children:[v&&i&&(0,l.jsx)("h2",{className:"slideTitle",dangerouslySetInnerHTML:{__html:St(i)}}),k&&a&&(0,l.jsx)("p",{className:"slideDesc",dangerouslySetInnerHTML:{__html:St(a)}}),w&&s&&(0,l.jsx)("a",{href:n?"#":$t(r),className:"slideBtn",dangerouslySetInnerHTML:{__html:St(s)}})]})},t)}))})},Wz=[{top:36,right:44.71,bottom:44.5,left:44.71},{top:47.5,right:34.67,bottom:52.5,left:34.67},{top:55.5,right:44.54,bottom:67,left:44.54}],Uz=({attributes:e,id:t})=>{const{slides:n=[],sliderWidth:i,sliderHeight:s,pageOnDevice:r={},prevNextOnDevice:c={},sliderBG:d={},sliderPadding:u={},pageColor:p,pageWidth:h,pageHeight:g,pageBorder:m,prevNextColor:b,sliderAlign:f,isTitle:x,titleTypo:y,isDesc:v,descTypo:k,isBtn:w,btnTypo:_,btnPadding:C,btnBorder:j}=e,$=`#${t}`,S=`${$} .${Fz}`,T=`${S} .swiper-slide`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",y)?.googleFontLink}\n\t\t${ps("",k)?.googleFontLink}\n\t\t${ps("",_)?.googleFontLink}\n\t\t${ps(`${T} .slideTitle`,y)?.styles}\n\t\t${ps(`${T} .slideDesc`,k)?.styles}\n\t\t${ps(`${T} .slideBtn`,_)?.styles}\n\n\t\t${$}{\n\t\t\ttext-align: ${f};\n\t\t\theight: ${s};\n\t\t}\n\t\t${S}{\n\t\t\twidth: ${i};\n\t\t\theight: ${s};\n\t\t\t${os(d)};\n\t\t\tpadding: ${us(u)};\n\t\t}\n\n\t\t${T} .slideBtn{\n\t\t\tpadding: ${us(C)};\n\t\t\t${is(j)}\n\t\t}\n\n\t\t${S} .swiper-pagination .swiper-pagination-bullet{\n\t\t\tbackground: ${p};\n\t\t\twidth: ${h};\n\t\t\theight: ${g};\n\t\t\t${is(m)}\n\t\t}\n\t\t\n\t\t${S} .swiper-button-prev, ${S} .swiper-button-next{\n\t\t\tcolor: ${b};\n\t\t}\n\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${S} .swiper-pagination{\n\t\t\t\tdisplay: ${r?.tablet?"block":"none"};\n\t\t\t}\n\t\t\t${S} .swiper-button-prev, ${S} .swiper-button-next{\n\t\t\t\tdisplay: ${c?.tablet?"flex":"none"};\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) { \n\t\t\t${S} .swiper-pagination{\n\t\t\t\tdisplay: ${r?.mobile?"block":"none"};\n\t\t\t}\n\t\t\t${S} .swiper-button-prev, ${S} .swiper-button-next{\n\t\t\t\tdisplay: ${c?.mobile?"flex":"none"};\n\t\t\t}\n\t\t}\n\n\t\t${n.map(((e,t)=>{const{background:n,border:i={},childPositions:s=Wz,title:r,titleColor:l,description:c,descColor:d,btnText:u,btnColors:p,btnHovColors:h}=e,g=(x&&r?1:0)+(v&&c?1:0)+(w&&u?1:0),m=`${$} .swiper-wrapper .slide-${t}`,b=`${m} .slideContent`;let f="";for(let e=0;e<g;e++){const{top:t,right:n,bottom:o,left:i}=s[e]||{};f+=`${b} > *:nth-child(${e+1}){${t>o?`bottom: ${o}%;`:`top: ${t}%;`}${i>n?`right: ${n}%;`:`left: ${i}%;`}}`}return`\n\t\t\t\t${m}{\n\t\t\t\t\t${os(n)}\n\t\t\t\t\t${is(i)||""}\n\t\t\t\t}\n\t\t\t\t${m} .slideTitle{\n\t\t\t\t\tcolor: ${l||"#fff"};\n\t\t\t\t}\n\t\t\t\t${m} .slideDesc{\n\t\t\t\t\tcolor: ${d||"#fff"};\n\t\t\t\t}\n\t\t\t\t${m} .slideBtn{\n\t\t\t\t\t${ss(p)||`color: #fff; background: ${o};`}\n\t\t\t\t}\n\t\t\t\t${m} .slideBtn:hover{\n\t\t\t\t\t${ss(h)||`color: #fff; background: ${a};`}\n\t\t\t\t}\n\t\t\t\t${f}\n\t\t\t`})).join("")}\n\t\t`.replace(/\s+/g," ")}})},Gz=jQuery,Vz=(0,f.withSelect)((e=>({isEditorSidebarOpened:!!e("core/edit-post")?.isEditorSidebarOpened()})))((e=>{const{attributes:t,setAttributes:n,clientId:o,isEditorSidebarOpened:i}=e,{slides:a=[],columns:s,columnGap:r,isLoop:c,speed:d,freeModeOptions:u,effect:p,keyboardOptions:g,isMousewheel:b,isPage:f,isPageClickable:x,isPageDynamic:y,isPrevNext:v,isTitle:k,isDesc:w,isBtn:_}=t,C=bBlocksPremiumChecker,[j,$]=(0,m.useState)(0),[S,T]=(0,m.useState)(!0),N=`block-${o}`;(0,m.useEffect)((()=>{T(!S)}),[a,s,r,c,u,d,p,g,b,f,x,y,v,k,w,_,i]);const M=(e,t,o,i=!1,s=!1)=>{const r=zb(a,(n=>{!1!==i&&s?n[e][t][i][s]=o:!1!==i&&!1===s?n[e][t][i]=o:n[e][t]=o}));n({slides:r}),$(e)};Gz(document).ready((function(){a?.length&&a.map(((e,t)=>{
536 +const n=document.querySelector(`#${N} .${Fz} .slide-${t}:not(.swiper-slide-duplicate) .slideContent`),o=n?.children||[];for(let e=0;e<o?.length;e++)Gz(o[e]).draggable({containment:"parent",cursor:"dragging",stop(n,o){const{top:i,left:a}=o.position,{clientWidth:s,clientHeight:r}=n.target||{},{clientWidth:l,clientHeight:c}=n.target?.parentElement||{};M(t,"childPositions",{top:i/c*100,right:(l-(a+s))/l*100,bottom:(c-(i+r))/c*100,left:a/l*100},e)}})}))}));const L=()=>(0,l.jsx)(Hz,{attributes:t,initialSlide:j,isBackend:!0});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dz,{attributes:t,setAttributes:n,clientId:o,activeIndex:j,isPremium:C,setActiveIndex:$}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(Uz,{attributes:t,id:N}),(0,l.jsx)(L,{})]})]})}));Pl(Pz.name)&&(0,p.registerBlockType)(Pz,{icon:Fr,transforms:{from:[{type:"block",blocks:["csb/content-slider-block"],transform:e=>(0,p.createBlock)("b-blocks/slider",e)},{type:"prefix",prefix:"slider",transform:()=>(0,p.createBlock)("b-blocks/slider")}],to:[{type:"block",blocks:["csb/content-slider-block"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("csb/content-slider-block",e)}]},edit:Vz,save:()=>null});const qz=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/scroll-to-top","version":"1.0.0","title":"Scroll To Top","category":"bBlocks","description":"Enhance user experience with a fully customizable Scroll To Top button for smooth navigation.","keywords":["scroll to top","scroll to top button","scroll to top widget"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"scroll":{"type":"object","default":{"scrollType":"progress","position":"","desktop":{"position":{"right":"10px","bottom":"10px","left":"10px"},"align":""},"tablet":{"position":{"right":"","bottom":"","left":""},"align":""},"mobile":{"position":{"right":"","bottom":"","left":""},"align":""}}},"icon":{"type":"object","default":{"svg":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 384 512\'><path d=\'M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z\'/></svg>","text":"Top"}},"styles":{"type":"object","default":{"icon":{"size":"40px","color":"#000","bg":{},"normal":{"rotate":0},"hover":{"rotate":0,"transition":0.3},"radius":{"top":"","left":"","bottom":"","right":""}},"progress":{"size":"60px","strokeSize":6,"color":"#ff0000","strokeBg":"#efefef","bg":"#fff"},"text":{"typography":{"fontSize":{"desktop":"24px"}},"normal":{"color":"","bg":{},"shadow":[],"padding":{"top":"","left":"","bottom":"","right":""},"border":{},"radius":{"top":"","left":"","bottom":"","right":""}},"hover":{"color":"","bg":{},"shadow":[],"padding":{"top":"","left":"","bottom":"","right":""},"border":{},"radius":{"top":"","left":"","bottom":"","right":""}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}},"margin":{"desktop":{"bottom":"0px","top":"0px","right":"0px","left":"0px"}}},"transform":{"normal":{"rotate":{"desktop":{"x":"","y":"","z":""},"tablet":{"x":"","y":"","z":""},"mobile":{"x":"","y":"","z":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}],"border":{"width":"0px","style":"none"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"mask":{"isMask":false,"shape":{"type":"circle"},"repeat":"no-repeat"},"animation":{"type":"","duration":1},"visibility":{"zIndex":{"desktop":""},"overflow":""},"responsive":{"desktop":false,"tablet":false,"mobile":false}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css","aos"],"render":"file:./render.php","viewScript":["file:./view.js","aos"]}'),Yz=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Kz=[{label:(0,x.__)("Icon","b-blocks"),value:"icon"},{label:(0,x.__)("Text","b-blocks"),value:"text"},{label:(0,x.__)("Progress","b-blocks"),value:"progress"}],Qz=e=>{const{attributes:t,updateObj:n}=e,{icon:o,styles:i}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:o.svg,onChange:e=>n("icon",e,"svg")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Icon Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i.icon.size,onChange:e=>n("styles",e,"icon","size")})]})]})},Zz=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{scroll:i}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Position","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.position,onChange:e=>n("scroll",e,"position"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Bottom Left",value:"left"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Bottom Right",value:"right"})]}),"right"===i.position&&(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mt10",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Right","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10 flex1",value:i[o].position.right,onChange:e=>n("scroll",e,o,"position","right")})]}),"left"===i.position&&(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mt10",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Left","b-blocks")," ",(0,l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10 flex1",value:i[o].position.left,onChange:e=>n("scroll",e,o,"position","left")})]}),("left"===i.position||"right"===i.position)&&(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mt10",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Bottom","b-blocks")," ",(0,
537 +l.jsx)(_,{})]})}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10 flex1",value:i[o].position.bottom,onChange:e=>n("scroll",e,o,"position","bottom")})]})]})})),Xz=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Jz=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),eD=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),tD=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,updateObj:n,device:o}=e,{scroll:i,icon:a}=t;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Scroll To Top","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex1",children:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Alignment","lists")," ",(0,l.jsx)(_,{})]})}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,isDeselectable:!0,value:i[o].align,onChange:e=>n("scroll",e,o,"align"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:Xz}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:Jz}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:eD})]})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Scroll Type","b-blocks"),labelPosition:"edge",options:Kz,value:i.scrollType,onChange:e=>n("scroll",e,"scrollType")}),"text"===i.scrollType&&(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Scroll Text","b-blocks"),value:a.text,onChange:e=>n("icon",e,"text")})]})})),nD=e=>{const{attributes:t}=e,{scroll:n}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tD,{...e}),"text"!==n.scrollType&&(0,l.jsx)(Qz,{...e}),(0,l.jsx)(Zz,{...e})]})},oD=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{icon:i}=o,[a,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon Style","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:i.color,onChange:e=>n("styles",e,"icon","color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>n("styles",e,"icon","bg")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Rotate","b-blocks"),value:i[a].rotate,onChange:e=>n("styles",e,"icon",a,"rotate"),max:360}),"hover"===a&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),value:i.hover.transition,onChange:e=>n("styles",e,"icon","hover","transition"),step:.05,max:10})]})},iD=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{progress:i}=o;return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Progress Style","b-blocks"),className:"bPlPanelBody",initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"mb0 flex2",children:(0,x.__)("Progress Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i.size,onChange:e=>n("styles",e,"progress","size")})]}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Stroke Size","b-blocks"),value:i.strokeSize,onChange:e=>n("styles",e,"progress","strokeSize")}),(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Color","b-blocks"),value:i.color,onChange:e=>n("styles",e,"progress","color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Background","b-blocks"),value:i.strokeBg,onChange:e=>n("styles",e,"progress","strokeBg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Background","b-blocks"),value:i.bg,onChange:e=>n("styles",e,"progress","bg")})]})},aD=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{text:i}=o,[a,s]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Text Style","b-blocks"),className:"bPlPanelBody",initialOpen:!0,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:i.typography,onChange:e=>n("styles",e,"text","typography")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i[a].color,onChange:e=>n("styles",e,"text",a,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[a].bg,onChange:e=>n("styles",e,"text",a,"bg"),isImage:!0}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i[a].padding,onChange:e=>n("styles",e,"text",a,"padding")}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow","b-blocks"),value:i[a].shadow,onChange:e=>n("styles",e,"text",a,"shadow")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:i[a].border,onChange:e=>n("styles",e,"text",a,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i[a].radius,onChange:e=>n("styles",e,"text",a,"radius")})]})},sD=e=>{const{attributes:t}=e,{scroll:n}=t;return(0,l.jsxs)(l.Fragment,{children:["text"!==n.scrollType&&(0,l.jsx)(oD,{...e}),"text"===n.scrollType&&(0,l.jsx)(aD,{...e}),"progress"===n.scrollType&&(0,l.jsx)(iD,{...e})]})},rD={dimension:["padding","margin","width","height"],transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,animation:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0},lD=e=>{const{attributes:t,setAttributes:n}=e,{advanced:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Yz,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(nD,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(sD,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:o,onChange:e=>n({advanced:e}),enabled:rD,isPremium:!0})})]})})})})},cD=({attributes:e,id:t})=>{
538 +const{scroll:n,styles:o,advanced:i}=e,{icon:a,text:s,progress:r}=o,c=`#${t}`,d=`${c} .b-blocks-scroll-to-top-wrapper`,u=`${d} .b-blocks-scroll-to-top-icon`,p=`${d} .b-blocks-scroll-to-top-text`,h={icon:`\n\t\t\t${os(a.bg)}\n\t\t`,text:`\n\t\t\t\t${os(s.normal.bg)}\n\t\t\t\t${ns("box-shadow",ls(s.normal.shadow))}\n\t\t\t\t${ns("padding",hs(s.normal.padding))}\n\t\t\t\t${as(s.normal.border)}\n\t\t\t\t${ns("border-radius",hs(s.normal.radius))}\n\t\t`,progress:` \n\t\t\t${ns("width",r.size)}\n\t\t\t${ns("height",r.size)}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${ps("",s.typography).googleFontLink}\n\t\t${ps(p,s.typography).styles}\n\n\t\t\t${c}{\n\t\t\t\t${ns("justify-content",n.desktop.align)}\n\t\t\t\t${g="desktop",n.position?`\n\t\t\tposition:fixed;\n\t\t\t${ns(n.position,n[g].position?.[n.position])}\n\t\t\t${ns("bottom",n[g].position.bottom)}\n\t`:""}\n\t\t\t}\n\n\t\t\t${d}{\n\t\t\t\t${h[n.scrollType]}\n\t\t\t}\n\n\t\t\t${d}:hover .b-blocks-scroll-to-top-icon>svg{\n\t\t\t\t${ns("rotate",a.hover.rotate>=0?a.hover.rotate+"deg":"")}\n\t\t\t}\n\n\t\t\t${p}{\n\t\t\t\t${ns("color",s.normal.color)}\n\t\t\t}\n\t\t\t\n\t\t\t${u}>svg{\n\t\t\t\t${ns("width",a.size)}\n\t\t\t\t${ns("height",a.size)}\n\t\t\t\t${ns("fill",a.color)}\n\t\t\t\t${ns("transition",a.hover.transition?`all ${a.hover.transition}s ease-in-out`:"")}\n\t\t\t\t${ns("rotate",a.normal.rotate>=0?a.normal.rotate+"deg":"")}\n\t\t\t}\n\n\t\t\t${_s(t,i,!0,!1)}\n\t`}});var g},dD=e=>{const{attributes:t,doc:n=document,win:o=window,isBackend:i=!1}=e,{scroll:a,icon:s,styles:r}=t,{scrollType:c}=a,{progress:d}=r,[u,p]=(0,m.useState)(0),[h,g]=(0,m.useState)(!1),b={strokeWidth:d.strokeSize,color:d.color,bgColor:d.strokeBg,bg:d.bg},f=(0,m.useMemo)((()=>50-b.strokeWidth/2),[b.strokeWidth]),x=(0,m.useMemo)((()=>2*Math.PI*f),[f]);(0,m.useEffect)((()=>{const e=()=>{const e=o?.pageYOffset||n?.documentElement?.scrollTop||n?.body?.scrollTop||0,t=n?.documentElement?.scrollHeight-n?.documentElement?.clientHeight,a=0===t?0:e/t*100;p(Math.min(100,Math.max(0,a))),g(!i&&e>80)};return o?.addEventListener("scroll",e,{passive:!0}),e(),()=>o?.removeEventListener("scroll",e)}),[n,o]);const y=x-u/100*x;return(0,l.jsx)("div",{className:"b-blocks-scroll-to-top-main-wrapper",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},style:{...i?{}:{opacity:h?1:0}},children:(0,l.jsxs)("div",{className:"b-blocks-scroll-to-top-wrapper "+("progress"===c?"b-blocks-scroll-to-top-progress-wrapper":""),children:[("icon"===c||"progress"===c)&&(0,l.jsx)("div",{className:"b-blocks-scroll-to-top-icon",dangerouslySetInnerHTML:{__html:s.svg}}),"progress"===c&&(0,l.jsxs)("svg",{viewBox:"0 0 100 100",children:[(0,l.jsx)("circle",{cx:"50",cy:"50",r:f,fill:b.bg,stroke:b.bgColor,strokeWidth:b.strokeWidth}),(0,l.jsx)("circle",{cx:"50",cy:"50",r:f,fill:"transparent",stroke:b.color,strokeWidth:b.strokeWidth,strokeDasharray:x,strokeDashoffset:y,strokeLinecap:"round",className:"b-blocks-scroll-to-top-progress-circle"})]}),"text"===c&&(0,l.jsx)("div",{className:"b-blocks-scroll-to-top-text",dangerouslySetInnerHTML:{__html:s.text}})]})})};Pl(qz.name)&&(0,p.registerBlockType)(qz,{icon:ol,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=fe(t,n),a=(0,m.useRef)(null),s=a.current?.ownerDocument,r=s?.defaultView;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(lD,{attributes:t,setAttributes:n,updateObj:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)({ref:a}),children:[(0,l.jsx)(cD,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{children:(0,l.jsx)(dD,{attributes:t,doc:s,win:r,isBackend:!0})})]})]})}});const uD=JSON.parse('{"apiVersion":3,"name":"b-blocks/social-share","title":"Social Share","description":"Share your website/website-page link.","category":"bBlocks","keywords":["share","social share","page share"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"socials":{"type":"array","default":[{"networkType":"socialNetworks","network":"facebook","isUpIcon":false,"icon":{"class":"fab fa-facebook-f","color":"#1877f2"},"upIcon":{"id":null,"url":"","alt":"","title":""}},{"networkType":"socialNetworks","network":"twitter","isUpIcon":false,"icon":{"class":"fab fa-twitter","color":"#1da1f2"},"upIcon":{"id":null,"url":"","alt":"","title":""}},{"networkType":"socialNetworks","network":"linkedin","isUpIcon":false,"icon":{"class":"fab fa-linkedin-in","color":"#0a66c2"},"upIcon":{"id":null,"url":"","alt":"","title":""}},{"networkType":"mobileMessenger","network":"whatsapp","isUpIcon":false,"icon":{"class":"fab fa-whatsapp","color":"#25d366"},"upIcon":{"id":null,"url":"","alt":"","title":""}}]},"alignment":{"type":"string","default":"left"},"theme":{"type":"string","default":"default"},"background":{"type":"object","default":{"color":"#0000"}},"size":{"type":"string","default":"28px"},"padding":{"type":"string","default":"10px"},"margin":{"type":"string","default":"10px"},"border":{"type":"object","default":{"radius":"50%"}},"shadow":{"type":"object","default":{}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":["file:./view.js","goodShare"]}'),pD=(e,t)=>{for(const n of t)if(e===n[0])return n[1]},hD=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Theme 1","b-blocks"),value:"theme1"},{label:(0,x.__)("Theme 2","b-blocks"),value:"theme2"}],gD=[{label:(0,x.__)("Social Networks","b-blocks"),value:"socialNetworks"},{label:(0,x.__)("Mobile Messenger","b-blocks"),value:"mobileMessenger"}],mD=[{label:(0,x.__)("Facebook","b-blocks"),value:"facebook"},{label:(0,x.__)("Twitter","b-blocks"),value:"twitter"},{label:(0,x.__)("LinkedIn","b-blocks"),value:"linkedin"},{label:(0,x.__)("Pinterest","b-blocks"),value:"pinterest"},{label:(0,x.__)("Blogger","b-blocks"),value:"blogger"},{label:(0,x.__)("WordPress","b-blocks"),value:"wordpress"},{label:(0,x.__)("Tumblr","b-blocks"),value:"tumblr"},{label:(0,x.__)("Reddit","b-blocks"),value:"reddit"},{label:(0,x.__)("Digg","b-blocks"),value:"digg"},{label:(0,x.__)("LiveJournal","b-blocks"),value:"livejournal"},{label:(0,x.__)("Evernote","b-blocks"),value:"evernote"},{label:(0,x.__)("Flipboard","b-blocks"),value:"flipboard"},{label:(0,x.__)("Mix","b-blocks"),value:"mix"},{label:(0,x.__)("Pocket","b-blocks"),value:"pocket"},{label:(0,x.__)("Buffer","b-blocks"),value:"buffer"},{label:(0,x.__)("Instapaper","b-blocks"),value:"instapaper"},{label:(0,x.__)("Meneame","b-blocks"),value:"meneame"},{label:(0,x.__)("Baidu","b-blocks"),value:"baidu"},{label:(0,x.__)("Weibo","b-blocks"),value:"weibo"},{label:(0,x.__)("Xing","b-blocks"),value:"xing"},{label:(0,x.__)("RenRen","b-blocks"),value:"renren"},{label:(0,x.__)("Vkontakte (VK)","b-blocks"),value:"vkontakte"},{label:(0,x.__)("Odnoklassniki","b-blocks"),value:"odnoklassniki"},{label:(0,x.__)("My [email protected]","b-blocks"),value:"moimir"},{label:(0,x.__)("Surfingbird","b-blocks"),value:"surfingbird"},{label:(0,x.__)("LiveInternet","b-blocks"),value:"liveinternet"}],bD=[{label:(0,x.__)("SMS","b-blocks"),value:"sms"},{label:(0,x.__)("Skype","b-blocks"),value:"skype"},{label:(0,x.__)("Telegram","b-blocks"),value:"telegram"},{label:(0,x.__)("Viber","b-blocks"),value:"viber"},{label:(0,x.__)("WhatsApp","b-blocks"),value:"whatsapp"},{label:(0,x.__)("WeChat","b-blocks"),value:"wechat"},{label:(0,x.__)("LINE","b-blocks"),value:"line"
539 +}],fD=[["facebook","fab fa-facebook-f"],["twitter","fab fa-twitter"],["linkedin","fab fa-linkedin-in"],["pinterest","fab fa-pinterest-p"],["blogger","fab fa-blogger-b"],["wordpress","fa-brands fa-wordpress"],["tumblr","fab fa-tumblr"],["reddit","fab fa-reddit-alien"],["digg","fab fa-digg"],["evernote","fab fa-evernote"],["flipboard","fab fa-flipboard"],["mix","fab fa-mix"],["buffer","fab fa-buffer"],["weibo","fab fa-weibo"],["xing","fab fa-xing"],["renren","fab fa-renren"],["odnoklassniki","fab fa-odnoklassniki"],["sms","fas fa-sms"],["skype","fab fa-skype"],["telegram","fab fa-telegram-plane"],["viber","fab fa-viber"],["whatsapp","fab fa-whatsapp"],["wechat","fab fa-weixin"],["line","fab fa-line"]],xD=[["facebook","#1877f2"],["twitter","#1da1f2"],["linkedin","#0a66c2"],["pinterest","#bd081c"],["blogger","#fc4f08"],["wordpress","#0073aa"],["tumblr","#35465d"],["reddit","#ff4500"],["digg","#1b1a19"],["evernote","#00aa0f"],["flipboard","#f52828"],["mix","#ff8226"],["buffer","#000"],["weibo","#df152c"],["xing","#00a82d"],["renren","#0259a0"],["odnoklassniki","#f68b25"],["sms","#000"],["skype","#00aff0"],["telegram","#0088cc"],["viber","#794f9b"],["whatsapp","#25d366"],["wechat","#09b83e"],["line","#06c755"]],yD=[["facebook",!1],["twitter",!1],["linkedin",!1],["pinterest",!1],["blogger",!1],["wordpress",!1],["tumblr",!1],["reddit",!1],["digg",!1],["evernote",!1],["flipboard",!1],["mix",!1],["buffer",!1],["weibo",!1],["xing",!1],["renren",!1],["odnoklassniki",!1],["sms",!1],["skype",!1],["telegram",!1],["viber",!1],["whatsapp",!1],["line",!1],["livejournal",!0],["pocket",!0],["instapaper",!0],["meneame",!0],["baidu",!0],["vkontakte",!0],["moimir",!0],["surfingbird",!0],["liveinternet",!0]],vD=({attributes:e,setAttributes:t,activeIndex:n,setActiveIndex:i})=>{const{socials:a,alignment:s,theme:c,background:d,size:u,padding:p,margin:g,border:m,shadow:b}=e,f=(e,o)=>{const i=zb(a,(t=>{t[n][e]=o}));t({socials:i})},k=e=>{const o=zb(a,(t=>{for(const o of e){const e=o[0],i=o[1],a=o?.[2];a?t[n][e][a]=i:t[n][e]=i}}));t({socials:o})},w=(e,n,o=!1)=>{const i=[...a];i.map(((t,a)=>{o?i[a][e][o]=n:i[a][e]=n})),t({socials:i})},{networkType:_="",network:C="",isUpIcon:j=!1,icon:$={},upIcon:S={}}=a[n]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:fn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody addRemoveItems editItem",title:(0,x.__)("Add or Remove socials","b-blocks"),children:[null!==n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"bplItemTitle",children:(0,x.__)(`Social No ${n+1}:`,"b-blocks")}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Network Type:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:_,onChange:e=>{k([["networkType",e],["network","mobileMessenger"===e?"sms":"facebook"],["isUpIcon",!1],["icon","mobileMessenger"===e?"fas fa-sms":"fab fa-facebook-f","class"],["icon","mobileMessenger"===e?"#000":"#1877f2","color"]])},options:gD})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Network:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:C,onChange:e=>{const t=[["network",e],["icon",pD(e,fD),"class"],["icon",pD(e,xD),"color"],["isUpIcon",pD(e,yD)]];k(t)},options:"mobileMessenger"===_?bD:mD})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Upload Icon?","b-blocks"),checked:j,onChange:e=>f("isUpIcon",e)}),j?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Icon:","b-blocks")}),(0,l.jsx)(ke,{className:"mt10",value:S,onChange:e=>f("upIcon",e),placeholder:(0,x.__)("Enter Icon URL","b-blocks")})]}):(0,l.jsx)(Un,{label:(0,x.__)("Icon:","b-blocks"),value:$,onChange:e=>f("icon",e),defaults:{class:"fab fa-facebook-f",color:o},isSize:!1}),(0,l.jsxs)(y.PanelRow,{className:"itemAction mt20 mb15",children:[1<a?.length&&(0,l.jsxs)(y.Button,{className:"removeItem",label:(0,x.__)("Remove","b-blocks"),onClick:e=>{e.preventDefault(),t({socials:[...a.slice(0,n),...a.slice(n+1)]}),i(0===n?0:n-1)},children:[(0,l.jsx)(y.Dashicon,{icon:"no"}),(0,x.__)("Remove","b-blocks")]}),(0,l.jsxs)(y.Button,{className:"duplicateItem",label:(0,x.__)("Duplicate","b-blocks"),onClick:e=>{e.preventDefault(),t({socials:[...a.slice(0,n),{...a[n]},...a.slice(n)]}),i(n+1)},children:[dt,(0,x.__)("Duplicate","b-blocks")]})]})]}),(0,l.jsx)("div",{className:"addItem",children:(0,l.jsxs)(y.Button,{label:(0,x.__)("Add New Social","b-blocks"),onClick:()=>{t({socials:[...a,{networkType:"socialNetworks",network:"facebook",isUpIcon:!1,icon:{class:"fab fa-facebook-f",color:"#1877f2"},upIcon:{id:null,url:"",alt:"",title:""}}]}),i(a.length)},children:[(0,l.jsx)(y.Dashicon,{icon:"plus"}),(0,x.__)("Add New Social","b-blocks")]})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Social Icon Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>{t({theme:e}),"default"===e&&(t({background:{type:"solid",color:"#0000"},border:{width:"0",color:"#0000"}}),w("icon",o,"color")),"theme1"===e&&(t({background:{type:"gradient",gradient:r},border:{width:"0",color:"#0000"}}),w("icon","#fff","color")),"theme2"===e&&(t({background:{type:"solid",color:"#0000"},border:{width:"2px",color:o}}),w("icon",o,"color"))},options:hD})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:d,onChange:e=>t({background:e}),defaults:{color:"#0000"}}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Size:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({size:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({padding:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Space Between:","b-blocks"),labelPosition:"left",value:g,onChange:e=>t({margin:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:m,onChange:e=>t({border:e}),defaults:{radius:"50%"}}),(0,l.jsx)(id,{label:(0,x.__)("Shadow:","b-blocks"),value:b,onChange:e=>t({shadow:e})})]})]}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:s,onChange:e=>t({alignment:e}),describedBy:(0,x.__)("Social Icons Alignment"),alignmentControls:[{title:(0,x.__)("Social Icons in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Social Icons in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Social Icons in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},kD="bBlocksSocialShare",wD=({attributes:e,id:t})=>{const{socials:n,alignment:o,background:i,size:a,padding:s,margin:r,border:c,shadow:d}=e,u=`#${t}`,p=`${u} ul.${kD}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${u}{\n\t\t\ttext-align: ${o};\n\t\t}\n\t\t${p} li.icon{\n\t\t\tfont-size: ${a};\n\t\t\t${os(i)}\n\t\t\twidth: calc( ${a} + ${s} + ${s} );\n\t\t\theight: calc( ${a} + ${s} + ${s} );\n\t\t\tmargin: 0 calc( ${r} / 2 );\n\t\t\t${is(c)}\n\t\t\tbox-shadow: ${ds(d)||"none"};\n\t\t}\n\t\t${p} li.icon img{\n\t\t\twidth: ${a};\n\t\t}\n\n\t\t${n?.map(((e,t)=>`\n\t\t\t${p} li.icon-${t} i{\n\t\t\t\t${rs(e?.icon)}\n\t\t\t\tfont-size: inherit;\n\t\t\t}`)).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},_D=({attributes:e,isBackend:t=!1,custom:n})=>(0,l.jsx)("ul",{className:kD,children:e.socials?.map(((e,o)=>{const{network:i,isUpIcon:a,icon:s,upIcon:r}=e;return(0,l.jsx)("li",{onClick:()=>t&&n.setActiveIndex(o),className:`icon icon-${o} ${t&&o===n.activeIndex?"bPlNowEditing":""}`,"data-social":i,children:a?(0,l.jsx)("img",{className:r?.id?`wp-image-${r?.id}`:null,src:r?.url,alt:r?.alt}):s?.class&&(0,l.jsx)("i",{className:s?.class})},o)}))});Pl(uD.name)&&(0,p.registerBlockType)(uD,{icon:Hr,transforms:{from:[{type:"block",blocks:["bssb/social-share"],transform:e=>(0,p.createBlock)("b-blocks/social-share",e)},{
540 +type:"prefix",prefix:"share",transform:()=>(0,p.createBlock)("b-blocks/social-share")}],to:[{type:"block",blocks:["bssb/social-share"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("bssb/social-share",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e;(0,m.useEffect)((()=>me()),[i]);const[a,s]=(0,m.useState)(0);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(vD,{attributes:t,setAttributes:n,activeIndex:a,setActiveIndex:s}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(wD,{attributes:t,id:`block-${o}`}),(0,l.jsx)(_D,{attributes:t,isBackend:!0,custom:{activeIndex:a,setActiveIndex:s}})]})]})},save:()=>null});const CD=JSON.parse('{"UU":"b-blocks/whatsapp-chat"}'),jD=()=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),$D=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),SD=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),TD=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),ND=({attributes:e,setAttributes:t})=>{const{phoneNumber:n,buttonText:o,prefillMessage:i,showIcon:a,showStatusDot:s,tooltipText:r,buttonSize:c,hoverAnimation:d,openInNewTab:u,fullWidth:p,alignment:h,iconPosition:g,pulseAnimation:m}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("WhatsApp Settings","b-blocks"),initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Alignment","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:h,onChange:e=>t({alignment:e}),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:$D}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:SD}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:TD})]})]}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Phone Number","b-blocks"),help:(0,x.__)("Full international format without + or spaces, e.g. 15551234567","b-blocks"),value:n,onChange:e=>t({phoneNumber:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Button Text","b-blocks"),value:o,onChange:e=>t({buttonText:e})}),(0,l.jsx)(y.TextareaControl,{label:(0,x.__)("Pre-filled Message","b-blocks"),help:(0,x.__)("This message will be pre-filled when the user opens WhatsApp.","b-blocks"),value:i,onChange:e=>t({prefillMessage:e})}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Tooltip Text","b-blocks"),help:(0,x.__)("Shown on hover. Leave empty to disable.","b-blocks"),value:r,onChange:e=>t({tooltipText:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open in New Tab","b-blocks"),checked:u,onChange:e=>t({openInNewTab:e})})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Appearance","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Button Size","b-blocks"),value:c,options:[{label:(0,x.__)("Small","b-blocks"),value:"small"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"}],onChange:e=>t({buttonSize:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Full Width","b-blocks"),checked:p,onChange:e=>t({fullWidth:e})})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon & Status","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show WhatsApp Icon","b-blocks"),checked:a,onChange:e=>t({showIcon:e})}),a&&(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Icon Position","b-blocks"),value:g,options:[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],onChange:e=>t({iconPosition:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Online Status Dot","b-blocks"),help:(0,x.__)("Show a pulsing green dot to indicate availability.","b-blocks"),checked:s,onChange:e=>t({showStatusDot:e})})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Animations","b-blocks"),initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Hover Scale Animation","b-blocks"),checked:d,onChange:e=>t({hoverAnimation:e})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Pulse Attention Animation","b-blocks"),help:(0,x.__)("Adds a subtle pulse to draw attention.","b-blocks"),checked:m,onChange:e=>t({pulseAnimation:e})})]})]})},MD=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,pulseAnimation:a,showIcon:s,showStatusDot:r}=t,[c,d]=(0,m.useState)("normal"),[u,p]=(0,m.useState)("normal");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:"Style",initialOpen:!0,className:"bPlPanelBody",children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks"),(0,l.jsx)(_,{})]}),values:i[o].margin,onChange:e=>n("styles",e,o,"margin")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),values:i[o].padding,onChange:e=>n("styles",e,o,"padding")}),a&&(0,l.jsx)(Ue,{label:(0,x.__)("Pulse Color","b-blocks"),value:i.pulseColor,onChange:e=>n("styles",e,"pulseColor")}),(0,l.jsx)(Oa,{value:i.typo,onChange:e=>n("styles",e,"typo")}),(0,
541 +l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:c,onChange:e=>d(e),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{value:i[c].bg,onChange:e=>n("styles",e,c,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i[c].color,onChange:e=>n("styles",e,c,"color")}),(0,l.jsx)(y.BorderBoxControl,{label:(0,x.__)("Border","b-blocks"),values:i[c].border,onChange:e=>n("styles",e,c,"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),values:i[c].radius,onChange:e=>n("styles",e,c,"radius")}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),values:i[c].shadow,onChange:e=>n("styles",e,c,"shadow")}),"hover"===c&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition","b-blocks"),min:0,max:5e3,step:.01,value:i.hover.transition,onChange:e=>n("styles",e,"hover","transition")})]}),s&&(0,l.jsxs)(y.PanelBody,{title:"Icon",initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size","b-blocks"),value:i.icon.size,onChange:e=>n("styles",e,"icon","size")}),(0,l.jsx)("br",{}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:u,onChange:e=>p(e),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:i.icon[u].color,onChange:e=>n("styles",e,"icon",u,"color")})]}),r&&(0,l.jsxs)(y.PanelBody,{title:"Status",initialOpen:!1,className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Status Size","b-blocks"),value:i.status.size,onChange:e=>n("styles",e,"status","size")}),(0,l.jsx)(An,{isImage:!1,label:(0,x.__)("Status Color","b-blocks"),value:i.status.color,onChange:e=>n("styles",e,"status","color")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Position X","b-blocks"),value:i.status.position.x,onChange:e=>n("styles",e,"status","position","x")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,x.__)("Position Y","b-blocks"),value:i.status.position.y,onChange:e=>n("styles",e,"status","position","y")})]})]})},LD=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ND,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(MD,{...e})})]})})})}),PD=({attributes:e,id:o})=>{const{alignment:i,styles:a}=e,{normal:s,hover:r,desktop:c,tablet:d,mobile:u,typo:p}=a,h=`#${o}.wp-block-b-blocks-whatsapp-chat`,g=`${h} .bBlocks-whatsapp-block-wrapper`,m=`${h} .bBlocks-whatsapp-block-btn`,b=`${m}.bBlocks-whatsapp-block-btn--pulse`,f=`${m} .bBlocks-whatsapp-block-btn__text`,x=`${m} .bBlocks-whatsapp-block-btn__icon`,y=`${m} .bBlocks-whatsapp-block-btn__status-dot`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${ps("",p).googleFontLink}\n\t\t${ps(f,p).styles}\n\n\t\t${g}{\n\t\t\t${ns("align-items",i)}\n\t\t}\n\n\t\t${b} {\n\t\t\tanimation: bBlocks-whatsapp-block-pulse 2s infinite;\n\t\t}\n\n\t\t@keyframes bBlocks-whatsapp-block-pulse {\n\t\t\t0% {\n\t\t\t\tbox-shadow: 0 0 0 0 ${a.pulseColor};\n\t\t\t}\n\n\t\t\t70% {\n\t\t\t\tbox-shadow: 0 0 0 12px rgba(37, 211, 102, 0);\n\t\t\t}\n\n\t\t\t100% {\n\t\t\t\tbox-shadow: 0 0 0 0 rgba(37, 211, 102, 0);\n\t\t\t}\n\t\t}\n\n\t\t${m}{\n\t\t\t${ns("margin",hs(c.margin))}\n\t\t\t${ns("padding",hs(c.padding))}\n\t\t\t${os(s.bg)}\n\t\t\t${ns("color",s.color)}\n\t\t\t${as(s.border)}\n\t\t\t${ns("border-radius",hs(s.radius))}\n\t\t\t${ds(s.shadow)}\n\t\t\ttransition: all ${r.transition}s ease-in-out;\n\t\t}\n\t\t${m}:hover{\n\t\t\t${os(r.bg)}\n\t\t\t${as(r.border)}\n\t\t\t${ns("color",r.color)}\n\t\t\t${ns("border-radius",hs(r.radius))}\n\t\t\t${ds(r.shadow)}\n\t\t}\n\n\t\t${f}{\n\t\t\t${ns("color",s.color)}\n\t\t}\n\n\t\t${m}:hover .bBlocks-whatsapp-block-btn__text{\n\t\t\t${ns("color",r.color)}\n\t\t}\n\n\t\t${x}>svg{\n\t\t\t${ns("width",a.icon.size)}\n\t\t\t${ns("fill",a.icon.normal.color)}\n\t\t}\n\n\t\t${m}:hover .bBlocks-whatsapp-block-btn__icon>svg{\n\t\t\t${ns("fill",a.icon.hover.color)}\n\t\t}\n\t\t\n\t\t${y}{\n\t\t\t${os(a.status.color)}\n\t\t\t${ns("width",a.status.size)}\n\t\t\t${ns("height",a.status.size)}\n\t\t\t${ns("left",a.status.position.x)}\n\t\t\t${ns("top",a.status.position.y)}\n\t\t}\n\t\t\n\t\t${t}{\n\t\t\t${m}{\n\t\t\t\t${ns("margin",hs(d.margin))}\n\t\t\t\t${ns("padding",hs(d.padding))}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t${m}{\n\t\t\t\t${ns("margin",hs(u.margin))}\n\t\t\t\t${ns("padding",hs(u.padding))}\n\t\t\t}\n\t\t}\n\t\t\n\t\t`.replace(/\s+/g," ")}})},ED=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{phoneNumber:a,buttonText:s,showIcon:r,showStatusDot:c,tooltipText:d,buttonSize:u,hoverAnimation:p,fullWidth:g,iconPosition:m,shadow:b,pulseAnimation:f}=t,y={small:"bBlocks-whatsapp-block-btn--small",medium:"bBlocks-whatsapp-block-btn--medium",large:"bBlocks-whatsapp-block-btn--large"},v=["bBlocks-whatsapp-block-btn",y[u]||y.medium,g?"bBlocks-whatsapp-block-btn--full":"",p?"bBlocks-whatsapp-block-btn--hover-anim":"",b?"bBlocks-whatsapp-block-btn--shadow":"",f?"bBlocks-whatsapp-block-btn--pulse":""].filter(Boolean).join(" "),k=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(LD,{attributes:t,setAttributes:n,updateObj:k,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(PD,{attributes:t,id:`block-${o}`}),!a&&(0,l.jsx)("p",{className:"bBlocks-whatsapp-block-notice",children:(0,x.__)("Please enter a WhatsApp phone number in the block settings.","bBlocks-whatsapp-block-whatsapp-chat")}),(0,l.jsxs)("div",{className:"bBlocks-whatsapp-block-wrapper",children:[(0,l.jsxs)("button",{className:v,type:"button","aria-label":s,children:[r&&"left"===m&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__icon",children:(0,l.jsx)(jD,{})}),(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__text",children:s}),r&&"right"===m&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__icon",children:(0,l.jsx)(jD,{})}),c&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-btn__status-dot"})]}),d&&(0,l.jsx)("span",{className:"bBlocks-whatsapp-block-tooltip",children:d})]})]})]})}));(0,p.registerBlockType)(CD.UU,{icon:kl,edit:ED})
542 +;const AD=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/woo-add-to-cart","title":"Woo Add to Cart","category":"bBlocks","description":"WooCommerce Add to Cart for a chosen product, or for the product in context on the Single Product page — simple, variable, grouped and external products, with optional quantity and inline or stacked layout.","keywords":["woocommerce","add to cart","buy now","product","cart","shop","ecommerce","checkout"],"textdomain":"b-blocks","attributes":{"product":{"type":"object","default":{"id":0,"previewType":"simple"}},"content":{"type":"object","default":{"buttonText":"Add to Cart","addedText":"Added!","viewCartText":"View cart"}},"options":{"type":"object","default":{"showQuantity":false,"quantity":1,"quantityStyle":"stepper","redirectToCart":false,"viewCart":false}},"layout":{"type":"object","default":{"alignment":"left","fullWidth":false,"desktop":{"displayType":"inline","gap":""},"tablet":{"displayType":"","gap":""},"mobile":{"displayType":"","gap":""}}},"button":{"type":"object","default":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":600,"fontVariant":"600"},"normal":{"color":{"text":"#ffffff"},"bg":{"type":"solid","color":"#146EF5"},"border":{"width":"0px","style":"solid","color":"#146EF5"}},"hover":{"color":{"text":"#ffffff"},"bg":{"type":"solid","color":"#070127"},"border":{}},"desktop":{"padding":{"top":"12px","right":"24px","bottom":"12px","left":"24px"},"radius":{"top":"6px","right":"6px","bottom":"6px","left":"6px"},"width":""},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":""},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""},"width":""},"shadow":[],"icon":{"svg":"","position":"before","size":"16px","gap":"8px","color":{"text":""},"hover":{"color":{"text":""}}},"added":{"color":{"text":""},"bg":{"type":"solid","color":""}}}},"quantity":{"type":"object","default":{"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}},"color":{"text":""},"bg":{"type":"solid","color":""},"border":{"width":"1px","style":"solid","color":"#dddddd"},"desktop":{"width":"","height":"","radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"width":"","height":"","radius":{"top":"","right":"","bottom":"","left":""}},"hover":{"color":{"text":""},"bg":{"type":"solid","color":""},"border":{}}}},"stepper":{"type":"object","default":{"color":{"text":"#333333"},"bg":{"type":"solid","color":"#f0f0f0"},"hover":{"color":{"text":""},"bg":{"type":"solid","color":""}},"desktop":{"width":""},"tablet":{"width":""},"mobile":{"width":""}}},"variations":{"type":"object","default":{"table":{"desktop":{"rowGap":"","labelWidth":"","bottomGap":""},"tablet":{"rowGap":"","labelWidth":"","bottomGap":""},"mobile":{"rowGap":"","labelWidth":"","bottomGap":""}},"label":{"color":{"text":""},"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""},"fontWeight":600,"fontVariant":"600"},"hover":{"color":{"text":""}}},"select":{"typo":{"fontSize":{"desktop":"15px","tablet":"","mobile":""}},"color":{"text":""},"bg":{"type":"solid","color":""},"border":{"width":"1px","style":"solid","color":""},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"width":""},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"width":""},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"width":""},"hover":{"color":{"text":""},"bg":{"type":"solid","color":""},"border":{}}},"clear":{"typo":{"fontSize":{"desktop":"13px","tablet":"","mobile":""}},"color":{"text":""},"hover":{"color":{"text":""}}},"price":{"color":{"text":""},"typo":{"fontSize":{"desktop":"18px","tablet":"","mobile":""},"fontWeight":700,"fontVariant":"700"}}}},"grouped":{"type":"object","default":{"table":{"border":{},"desktop":{"rowGap":"","padding":{"top":"","right":"","bottom":"","left":""}},"tablet":{"rowGap":"","padding":{"top":"","right":"","bottom":"","left":""}},"mobile":{"rowGap":"","padding":{"top":"","right":"","bottom":"","left":""}},"bg":{"type":"solid","color":""}},"name":{"color":{"text":""},"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":400,"fontVariant":"400"},"hover":{"color":{"text":""}}},"price":{"color":{"text":""},"typo":{"fontSize":{"desktop":"16px","tablet":"","mobile":""}}}}},"messages":{"type":"object","default":{"typo":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"color":{"text":"","inStock":"","outOfStock":""}}},"viewCart":{"type":"object","default":{"typo":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"color":{"text":""},"hover":{"color":{"text":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"position":{}}}},"usesContext":["postId","postType"],"supports":{"html":false,"customClassName":true},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),BD=window.wp.apiFetch;var ID=s.n(BD);const OD=window.wp.url,RD="b-blocks-woo-add-to-cart",zD=1e3,DD=(e,t,n="")=>{const{alignment:o,fullWidth:i}=e?.layout||{},{showQuantity:a}=e?.options||{},s=["left","center","right"].includes(o)?o:"left",r=[RD,`${RD}--align-${s}`];return["pro","free"].includes(n)&&r.unshift(n),i&&r.push(`${RD}--full`),"simple"===t?a&&r.push(`${RD}--has-qty`):"unavailable"===t?r.push(`${RD}--unavailable`):(r.push(`${RD}--native`,`${RD}--type-${t}`),a||r.push(`${RD}--no-qty`)),r.join(" ")},FD=e=>`${RD}-btn--${e}`,HD=["svg","g","path","circle","ellipse","line","polyline","polygon","rect","defs","symbol","use","title","desc","lineargradient","radialgradient","stop","clippath","mask","pattern","text","tspan"],WD=new Map,UD=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],GD=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],VD=[{label:(0,x.__)("Simple Product","b-blocks"),value:"simple"},{label:(0,x.__)("Grouped Product","b-blocks"),value:"grouped"},{label:(0,x.__)("External/Affiliate Product","b-blocks"),value:"external"},{label:(0,x.__)("Variable Product","b-blocks"),value:"variable"}],qD=[{label:(0,x.__)("Before Text","b-blocks"),value:"before"},{label:(0,x.__)("After Text","b-blocks"),value:"after"}],YD=[{label:(0,x.__)("Left","b-blocks"),value:"inline"},{label:(0,
543 +x.__)("Right","b-blocks"),value:"inline-reverse"},{label:(0,x.__)("Top","b-blocks"),value:"stacked"},{label:(0,x.__)("Bottom","b-blocks"),value:"stacked-reverse"}],KD=[{label:(0,x.__)("Stepper","b-blocks"),value:"stepper"},{label:(0,x.__)("Input","b-blocks"),value:"input"}],QD=[{value:"px",label:"px",default:12},{value:"em",label:"em",default:1},{value:"rem",label:"rem",default:1},{value:"%",label:"%",default:100}],ZD=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},XD=({children:e})=>(0,l.jsx)("p",{className:"b-blocks-woo-add-to-cart-control-note",children:e}),JD=({attributes:e,updateObj:t,device:n="desktop",previewType:o="simple",onPreviewType:i,isPicked:a})=>{const{product:s={},content:r={},options:c={},layout:d={},button:u={}}=e,p=parseInt(s.id,10)||0,{buttonText:h,addedText:g,viewCartText:b}=r,{showQuantity:f,quantity:k,quantityStyle:w,redirectToCart:C,viewCart:j}=c,$=u.icon||{},{alignment:S,fullWidth:T}=d,[N,M]=(0,m.useState)([]),[L,P]=(0,m.useState)(""),[E,A]=(0,m.useState)(null),[B,I]=(0,m.useState)(!0);(0,m.useEffect)((()=>{let e=!1;const t=setTimeout((()=>ID()({path:(0,OD.addQueryArgs)("/wp/v2/product",{per_page:20,search:L||void 0,_fields:"id,title"})}).then((t=>{if(e)return;const n=(Array.isArray(t)?t:[]).map((e=>({value:String(e.id),label:e.title&&e.title.rendered?ZD(e.title.rendered):`#${e.id}`})));M(n),I(!0)})).catch((t=>{e||"rest_no_route"!==t?.code||I(!1)}))),L?300:0);return()=>{e=!0,clearTimeout(t)}}),[L]),(0,m.useEffect)((()=>{if(!p)return void A(null);let e=!1;return ID()({path:`/wp/v2/product/${p}?_fields=id,title,featured_media`}).then((t=>{if(e||!t)return;const n=t.title&&t.title.rendered?ZD(t.title.rendered):`#${t.id}`;t.featured_media?ID()({path:`/wp/v2/media/${t.featured_media}?_fields=source_url`}).then((t=>{e||A({name:n,thumb:t?.source_url||""})})).catch((()=>{e||A({name:n,thumb:""})})):A({name:n,thumb:""})})).catch((()=>{e||A(null)})),()=>{e=!0}}),[p]);const O=d[n]||{},R=e=>n=>t("content",n,e),z=e=>n=>t("options",n,e),D="simple"===o,F="external"===o;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Product","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Choose Product Type (Only For Preview)","b-blocks"),help:a?(0,x.__)("Starts on the product’s own type (the one picked, or the one in this loop). Switch it to preview the other types; the page always shows the product as it really is.","b-blocks"):(0,x.__)("The block takes its real product from the Single Product page, and renders it as whatever type it really is. This only changes the preview here in the editor.","b-blocks"),value:o,options:VD,onChange:e=>i?i(e):t("product",e,"previewType")}),(0,l.jsx)("div",{className:"mt20",children:B?(0,l.jsx)(y.ComboboxControl,{label:(0,x.__)("Product","b-blocks"),help:(0,x.__)("Optional. Leave empty to use the product of the Single Product page; pick one to show this button anywhere.","b-blocks"),value:p?String(p):"",options:E&&p&&!N.some((e=>e.value===String(p)))?[{value:String(p),label:E.name},...N]:N,onFilterValueChange:e=>P(e),onChange:e=>t("product",parseInt(e,10)||0,"id"),__nextHasNoMarginBottom:!0}):(0,l.jsx)(y.TextControl,{type:"number",label:(0,x.__)("Product ID","b-blocks"),help:(0,x.__)("Enter the WooCommerce product ID, or leave empty to use the product of the Single Product page.","b-blocks"),value:p||"",onChange:e=>t("product",parseInt(e,10)||0,"id"),min:0,__nextHasNoMarginBottom:!0})}),E&&(0,l.jsxs)("div",{className:"b-blocks-woo-add-to-cart-product-preview",children:[E.thumb&&(0,l.jsx)("img",{src:E.thumb,alt:""}),(0,l.jsx)("span",{className:"b-blocks-woo-add-to-cart-product-name",children:E.name})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Add to Cart","b-blocks"),initialOpen:!1,children:[F?(0,l.jsx)(XD,{children:(0,x.__)("External/Affiliate products have no quantity.","b-blocks")}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Quantity","b-blocks"),help:(0,x.__)("Hidden automatically for products sold individually. When off, one of each is added (or the product’s minimum, if it has one).","b-blocks"),checked:!!f,onChange:z("showQuantity")}),f&&D&&(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:(0,x.__)("Quantity Style","b-blocks"),help:(0,x.__)("Stepper has − and + buttons; Input is a plain number box, as WooCommerce shows it.","b-blocks"),value:w||"stepper",onChange:e=>t("options",e||"stepper","quantityStyle"),children:KD.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),f&&D&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Default Quantity","b-blocks"),help:(0,x.__)("Kept within the product's own minimum and maximum. 0 starts the quantity empty, so visitors choose one before adding.","b-blocks"),value:k,onChange:e=>t("options",e??1,"quantity"),min:0,max:zD,step:1})]}),(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Button Text","b-blocks"),help:F?(0,x.__)("External/Affiliate products use their own WooCommerce button text; this is used only when that is empty.","b-blocks"):(0,x.__)("Leave empty to use WooCommerce's own text.","b-blocks"),value:h,onChange:R("buttonText"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("div",{className:"mt20",children:(0,l.jsx)(Zn,{label:(0,x.__)("Button Icon","b-blocks"),value:$.svg||"",onChange:e=>t("button",e||"","icon","svg")})}),$.svg&&(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:(0,x.__)("Icon Position","b-blocks"),value:$.position||"before",onChange:e=>t("button",e||"before","icon","position"),children:qD.map((({label:e,value:t})=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e,value:t},t)))}),F?(0,l.jsx)(XD,{children:(0,x.__)("External/Affiliate products take the visitor to their own URL, so there is no success label, redirect or View Cart link.","b-blocks")}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Success Label","b-blocks"),help:(0,x.__)("Shown on the button for a moment after adding.","b-blocks"),value:g,onChange:R("addedText"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Redirect to Cart","b-blocks"),help:(0,x.__)("Go to the cart page after adding, instead of staying on the page.","b-blocks"),checked:!!C,onChange:z("redirectToCart")}),!C&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show View Cart Link","b-blocks"),help:(0,x.__)("A link to the cart appears beside the button after the first add.","b-blocks"),checked:!!j,onChange:z("viewCart")}),j&&(0,l.jsx)(y.TextControl,{label:(0,x.__)("View Cart Text","b-blocks"),value:b,placeholder:(0,x.__)("View cart","b-blocks"),onChange:R("viewCartText"),__nextHasNoMarginBottom:!0})]})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Alignment:","b-blocks")}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Alignment","b-blocks"),hideLabelFromVision:!0,value:S,options:UD,onChange:e=>t("layout",e,"alignment")})]}),(0,l.jsxs)(y.Flex,{className:"mt20 mb5",children:[(0,l.jsx)("span",{className:"bPlLabel",children:(0,x.__)("Quantity Position","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Quantity Position","b-blocks"),hideLabelFromVision:!0,help:{grouped:(0,x.__)("Grouped products keep each quantity in their table; Top and Bottom give the button a full-width line of its own.","b-blocks"),external:(0,x.__)("External/Affiliate products have no quantity; Top and Bottom give the button a full-width line of its own.","b-blocks")}[o]||(0,
544 +x.__)("Where the quantity sits by the button. Top and Bottom give the button a full-width line of its own.","b-blocks"),value:O.displayType||("desktop"===n?"inline":""),options:"desktop"===n?YD:[{label:(0,x.__)("Same as larger screens","b-blocks"),value:""},...YD],onChange:e=>t("layout",e,n,"displayType")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Full Width","b-blocks"),checked:!!T,onChange:e=>t("layout",e,"fullWidth")})]})]})},eF=({label:e})=>(0,l.jsxs)(y.Flex,{className:"mb5",children:[(0,l.jsx)("span",{className:"bPlLabel",children:e}),(0,l.jsx)(_,{})]}),tF=({label:e,value:t,onChange:n,className:o="mt10",responsive:i=!1})=>(0,l.jsxs)("div",{className:o,children:[i&&(0,l.jsx)(eF,{label:e}),(0,l.jsx)(y.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:e,hideLabelFromVision:i,labelPosition:"edge",units:QD,value:t||"",onChange:e=>n(e||"")})]}),nF=({label:e,...t})=>(0,l.jsxs)("div",{className:"mt10",children:[(0,l.jsx)(eF,{label:e}),(0,l.jsx)(k,{...t})]}),oF="__clear__",iF=({value:e,defaultColor:t,onChange:n,...o})=>(0,l.jsx)(Ue,{...o,value:e,defaultColor:t||(e?oF:void 0),onChange:e=>n(oF===e?"":e)}),aF=({label:e,value:t,onChange:n})=>(0,l.jsx)(y.BorderControl,{className:"mt10",__next40pxDefaultSize:!0,withSlider:!0,label:e,value:t,onChange:e=>n(e||{})}),sF=({name:e,children:t})=>{const[n,o]=(0,Qa.useState)("normal"),i="hover"===n;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:e,hideLabelFromVision:!0,value:n,onChange:e=>o(e||"normal"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),t(i?["hover"]:[],i)]})},rF=(e,t)=>t.reduce(((e,t)=>e?.[t]||{}),e||{}),lF=({attributes:e,updateObj:t,device:n="desktop",previewType:o="simple"})=>{const{layout:i={},options:a={},button:s={},quantity:r={},stepper:c={},variations:d={},grouped:u={},messages:p={},viewCart:h={}}=e,g="external"===o,[m,b]=(0,Qa.useState)("normal"),f=g&&"added"===m?"normal":m,v=s[f]||{},[k,w]=(0,Qa.useState)("normal"),_="hover"===k?c.hover||{}:c,C="hover"===k?["hover"]:[],j="external"!==o&&!!a.showQuantity;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!1,children:(0,l.jsx)(tF,{className:"",label:(0,x.__)("Gap","b-blocks"),responsive:!0,value:i[n]?.gap,onChange:e=>t("layout",e,n,"gap")})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:s.typo,onChange:e=>t("button",e,"typo")}),(0,l.jsx)(nF,{label:(0,x.__)("Padding","b-blocks"),values:s[n]?.padding,onChange:e=>t("button",e,n,"padding")}),(0,l.jsx)(nF,{label:(0,x.__)("Border Radius","b-blocks"),values:s[n]?.radius,onChange:e=>t("button",e,n,"radius")}),(0,l.jsx)(tF,{label:(0,x.__)("Width","b-blocks"),responsive:!0,value:s[n]?.width,onChange:e=>t("button",e,n,"width")}),s.icon?.svg&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tF,{label:(0,x.__)("Icon Size","b-blocks"),value:s.icon?.size,onChange:e=>t("button",e,"icon","size")}),(0,l.jsx)(tF,{label:(0,x.__)("Icon Gap","b-blocks"),value:s.icon?.gap,onChange:e=>t("button",e,"icon","gap")}),(0,l.jsx)(sF,{name:(0,x.__)("Icon state","b-blocks"),children:e=>(0,l.jsx)(iF,{label:(0,x.__)("Icon Color:","b-blocks"),value:rF(s.icon,e).color?.text,onChange:n=>t("button",n,"icon",...e,"color","text")})})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:(0,x.__)("Button state","b-blocks"),hideLabelFromVision:!0,value:f,onChange:e=>b(e||"normal"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"}),!g&&(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Added","b-blocks"),value:"added"})]}),"added"===f&&(0,l.jsx)("p",{className:"b-blocks-woo-add-to-cart-control-note",children:(0,x.__)("For a moment after adding. Left empty, the hover colours are used.","b-blocks")}),(0,l.jsx)(iF,{label:(0,x.__)("Text Color:","b-blocks"),value:v.color?.text,defaultColor:"added"===f?"":"#ffffff",onChange:e=>t("button",e,f,"color","text")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:v.bg,defaults:{color:{normal:"#146EF5",hover:"#070127",added:""}[f]},onChange:e=>t("button",e,f,"bg")}),"added"!==f&&(0,l.jsx)(y.BorderBoxControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,x.__)("Border","b-blocks"),value:v.border,onChange:e=>t("button",e,f,"border")}),"normal"===f&&(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:s.shadow||[],onChange:e=>t("button",e,"shadow")})]}),j&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Quantity","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:r.typo,onChange:e=>t("quantity",e,"typo")}),(0,l.jsx)(tF,{label:(0,x.__)("Input Width","b-blocks"),responsive:!0,value:r[n]?.width,onChange:e=>t("quantity",e,n,"width")}),(0,l.jsx)(tF,{label:(0,x.__)("Height","b-blocks"),responsive:!0,value:r[n]?.height,onChange:e=>t("quantity",e,n,"height")}),(0,l.jsx)(nF,{label:(0,x.__)("Border Radius","b-blocks"),values:r[n]?.radius,onChange:e=>t("quantity",e,n,"radius")}),(0,l.jsx)(sF,{name:(0,x.__)("Quantity input state","b-blocks"),children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iF,{label:(0,x.__)("Text Color:","b-blocks"),value:rF(r,e).color?.text,onChange:n=>t("quantity",n,...e,"color","text")}),(0,l.jsx)(An,{label:(0,x.__)("Input Background:","b-blocks"),value:rF(r,e).bg,onChange:n=>t("quantity",n,...e,"bg")}),(0,l.jsx)(aF,{label:(0,x.__)("Border","b-blocks"),value:rF(r,e).border,onChange:n=>t("quantity",n,...e,"border")})]})}),"simple"===o&&"input"!==a.quantityStyle&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tF,{label:(0,x.__)("Stepper Button Width","b-blocks"),responsive:!0,value:c[n]?.width,onChange:e=>t("stepper",e,n,"width")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:(0,x.__)("Stepper state","b-blocks"),hideLabelFromVision:!0,value:k,onChange:e=>w(e||"normal"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(iF,{label:(0,x.__)("Stepper Text Color:","b-blocks"),value:_.color?.text,defaultColor:"hover"===k?"":"#333333",onChange:e=>t("stepper",e,...C,"color","text")}),(0,l.jsx)(An,{label:(0,x.__)("Stepper Background:","b-blocks"),value:_.bg,defaults:{color:"hover"===k?"":"#f0f0f0"},onChange:e=>t("stepper",e,...C,"bg")})]})]}),"variable"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Variation Table","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(tF,{className:"",label:(0,x.__)("Row Spacing","b-blocks"),responsive:!0,value:d.table?.[n]?.rowGap,onChange:e=>t("variations",e,"table",n,"rowGap")}),(0,l.jsx)(tF,{label:(0,x.__)("Label Column Width","b-blocks"),responsive:!0,value:d.table?.[n]?.labelWidth,onChange:e=>t("variations",e,"table",n,"labelWidth")}),(0,l.jsx)(tF,{label:(0,x.__)("Bottom Spacing","b-blocks"),responsive:!0,value:d.table?.[n]?.bottomGap,onChange:e=>t("variations",e,"table",n,"bottomGap")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Label Typography","b-blocks"),value:d.label?.typo,onChange:e=>t("variations",e,"label","typo")}),(0,l.jsx)(sF,{name:(0,x.__)("Label state","b-blocks"),children:e=>(0,l.jsx)(iF,{label:(0,x.__)("Label Color:","b-blocks"),
545 +value:rF(d.label,e).color?.text,onChange:n=>t("variations",n,"label",...e,"color","text")})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Variation Select","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:d.select?.typo,onChange:e=>t("variations",e,"select","typo")}),(0,l.jsx)(sF,{name:(0,x.__)("Select state","b-blocks"),children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(iF,{label:(0,x.__)("Text Color:","b-blocks"),value:rF(d.select,e).color?.text,onChange:n=>t("variations",n,"select",...e,"color","text")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:rF(d.select,e).bg,onChange:n=>t("variations",n,"select",...e,"bg")}),(0,l.jsx)(aF,{label:(0,x.__)("Border","b-blocks"),value:rF(d.select,e).border,onChange:n=>t("variations",n,"select",...e,"border")})]})}),(0,l.jsx)(nF,{label:(0,x.__)("Border Radius","b-blocks"),values:d.select?.[n]?.radius,onChange:e=>t("variations",e,"select",n,"radius")}),(0,l.jsx)(nF,{label:(0,x.__)("Padding","b-blocks"),values:d.select?.[n]?.padding,onChange:e=>t("variations",e,"select",n,"padding")}),(0,l.jsx)(tF,{label:(0,x.__)("Width","b-blocks"),responsive:!0,value:d.select?.[n]?.width,onChange:e=>t("variations",e,"select",n,"width")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Clear Link","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:d.clear?.typo,onChange:e=>t("variations",e,"clear","typo")}),(0,l.jsx)(sF,{name:(0,x.__)("Clear link state","b-blocks"),children:e=>(0,l.jsx)(iF,{label:(0,x.__)("Color:","b-blocks"),value:rF(d.clear,e).color?.text,onChange:n=>t("variations",n,"clear",...e,"color","text")})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Variation Price","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:d.price?.typo,onChange:e=>t("variations",e,"price","typo")}),(0,l.jsx)(iF,{label:(0,x.__)("Color:","b-blocks"),value:d.price?.color?.text,onChange:e=>t("variations",e,"price","color","text")})]})]}),"grouped"===o&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Grouped Table","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(tF,{className:"",label:(0,x.__)("Row Spacing","b-blocks"),responsive:!0,value:u.table?.[n]?.rowGap,onChange:e=>t("grouped",e,"table",n,"rowGap")}),(0,l.jsx)(aF,{label:(0,x.__)("Row Border","b-blocks"),value:u.table?.border,onChange:e=>t("grouped",e,"table","border")}),(0,l.jsx)(An,{label:(0,x.__)("Row Background:","b-blocks"),value:u.table?.bg,onChange:e=>t("grouped",e,"table","bg")}),(0,l.jsx)(nF,{label:(0,x.__)("Cell Padding","b-blocks"),values:u.table?.[n]?.padding,onChange:e=>t("grouped",e,"table",n,"padding")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Name Typography","b-blocks"),value:u.name?.typo,onChange:e=>t("grouped",e,"name","typo")}),(0,l.jsx)(sF,{name:(0,x.__)("Product name state","b-blocks"),children:e=>(0,l.jsx)(iF,{label:(0,x.__)("Name Color:","b-blocks"),value:rF(u.name,e).color?.text,onChange:n=>t("grouped",n,"name",...e,"color","text")})}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Price Typography","b-blocks"),value:u.price?.typo,onChange:e=>t("grouped",e,"price","typo")}),(0,l.jsx)(iF,{label:(0,x.__)("Price Color:","b-blocks"),value:u.price?.color?.text,onChange:e=>t("grouped",e,"price","color","text")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Messages","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:p.typo,onChange:e=>t("messages",e,"typo")}),(0,l.jsx)(iF,{label:(0,x.__)("Text Color:","b-blocks"),value:p.color?.text,onChange:e=>t("messages",e,"color","text")}),(0,l.jsx)(iF,{label:(0,x.__)("In Stock Color:","b-blocks"),value:p.color?.inStock,onChange:e=>t("messages",e,"color","inStock")}),(0,l.jsx)(iF,{label:(0,x.__)("Out of Stock Color:","b-blocks"),value:p.color?.outOfStock,onChange:e=>t("messages",e,"color","outOfStock")})]}),a.viewCart&&!a.redirectToCart&&!g&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("View Cart Link","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:h.typo,onChange:e=>t("viewCart",e,"typo")}),(0,l.jsx)(sF,{name:(0,x.__)("View Cart link state","b-blocks"),children:e=>(0,l.jsx)(iF,{label:(0,x.__)("Color:","b-blocks"),value:rF(h,e).color?.text,onChange:n=>t("viewCart",n,...e,"color","text")})})]})]})},cF=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,a=fe(t,n);return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:GD,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(JD,{...e,updateObj:a}),"style"===t.name&&(0,l.jsx)(lF,{...e,updateObj:a}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},dF=({svg:e})=>{const t=(e=>{if(!(e=>"string"==typeof e&&/^\s*<svg[\s>]/i.test(e))(e)||void 0===window.DOMParser)return"";if(WD.has(e))return WD.get(e);const t=(new window.DOMParser).parseFromString(e,"image/svg+xml"),n=t.documentElement;let o="";return n&&"svg"===n.localName&&!t.getElementsByTagName("parsererror").length&&([...n.querySelectorAll("*")].forEach((e=>{e.isConnected&&!HD.includes(e.localName.toLowerCase())&&e.remove()})),[n,...n.querySelectorAll("*")].forEach((e=>[...e.attributes].forEach((({name:t,value:n})=>{const o=t.toLowerCase(),i=n.replace(/[\s\u0000-\u001f]+/g,"").toLowerCase(),a="href"===o||o.endsWith(":href");(o.startsWith("on")||a&&!i.startsWith("#")||/javascript:|vbscript:|data:|expression\(|@import|url\((?!['"]?#)/.test(i))&&e.removeAttribute(t)})))),o=(new window.XMLSerializer).serializeToString(n)),WD.set(e,o),o})(e);return t?(0,l.jsx)("span",{className:`${RD}-btn-icon`,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:t}}):null},uF=({icon:e={},children:t})=>(0,l.jsxs)(l.Fragment,{children:["after"!==e.position&&(0,l.jsx)(dF,{svg:e.svg}),t,"after"===e.position&&(0,l.jsx)(dF,{svg:e.svg})]}),pF=({attributes:e,fallback:t=""})=>{const n=e.content?.viewCartText?.trim()||e.i18n?.viewCart||t,o=e.cart?.cartUrl;return o?(0,l.jsx)("a",{className:`${RD}-view-cart`,href:o,children:n}):(0,l.jsx)("a",{className:`${RD}-view-cart`,href:"#preview",onClick:e=>e.preventDefault(),children:n})},hF=e=>{const t=parseInt(e,10);return Number.isNaN(t)?1:Math.min(zD,Math.max(0,t))},gF=(e,t,n)=>{const o="string"==typeof e?e.trim():"";return"external"===t?n?.ownText||o||n?.data?.add_to_cart?.single_text||(0,x.__)("Buy product","b-blocks"):o||n?.data?.add_to_cart?.single_text||(0,x.__)("Add to cart","b-blocks")},mF=e=>{const{symbol:t="$",symbolPosition:n="left",decimalSeparator:o=".",precision:i=2}=window.wcSettings?.currency||{},a=e.toFixed(i).replace(".",o);return{left:`${t}${a}`,right:`${a}${t}`,left_space:`${t} ${a}`,right_space:`${a} ${t}`}[n]||`${t}${a}`},bF=({html:e})=>{const t=(new window.DOMParser).parseFromString(`<div>${e||""}</div>`,"text/html");t.querySelectorAll(".screen-reader-text").forEach((e=>e.remove()));const n=t.querySelector("del")?.textContent.trim(),o=t.querySelector("ins")?.textContent.trim();return n&&o?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("del",{children:(0,l.jsx)("span",{className:"woocommerce-Price-amount amount",children:n})})," ",(0,l.jsx)("ins",{children:(0,l.jsx)("span",{className:"woocommerce-Price-amount amount",children:o})})]}):(0,l.jsx)("span",{className:"woocommerce-Price-amount amount",children:t.body.textContent.replace(/\s+/g," ").trim()})},fF=({availability:e})=>e?.text?(0,l.jsx)("p",{className:`stock ${e.class||""}`,children:e.text}):null,xF=({id:e,label:t,value:n})=>(0,l.jsxs)("div",{className:"quantity",children:[(0,l.jsx)("label",{className:"screen-reader-text",htmlFor:e,children:t}),(0,l.jsx)("input",{type:"number",id:e,className:"input-text qty text",value:n,min:"0",step:"1",inputMode:"numeric",readOnly:!0,"aria-label":t})]
546 +}),yF=e=>e.preventDefault(),vF=({label:e,icon:t})=>(0,l.jsx)("button",{type:"button",className:"single_add_to_cart_button button alt wp-element-button",children:(0,l.jsx)(uF,{icon:t,children:(0,l.jsx)("span",{className:`${RD}-btn-label`,children:e})})}),kF=({attributes:e,uid:t,viewCart:n,real:o})=>{const{buttonText:i}=e.content||{},{showQuantity:a,quantity:s,quantityStyle:r}=e.options||{},c=`${t}-qty`,d="input"===r,u=a&&!o?.data?.sold_individually;return(0,l.jsxs)("div",{className:`${RD}-inner`,children:[u&&(0,l.jsxs)("div",{className:`${RD}-qty ${RD}-qty--${d?"input":"stepper"}`,children:[(0,l.jsx)("label",{className:"screen-reader-text",htmlFor:c,children:(0,x.__)("Quantity","b-blocks")}),!d&&(0,l.jsx)("button",{type:"button",className:`${RD}-qty-btn ${RD}-qty-minus`,"aria-label":(0,x.__)("Decrease quantity","b-blocks"),children:"−"}),(0,l.jsx)("input",{type:"number",className:`${RD}-qty-input`,id:c,value:hF(s),min:"0",max:zD,step:"1",inputMode:"numeric",readOnly:!0}),!d&&(0,l.jsx)("button",{type:"button",className:`${RD}-qty-btn ${RD}-qty-plus`,"aria-label":(0,x.__)("Increase quantity","b-blocks"),children:"+"})]}),(0,l.jsx)("button",{type:"button",className:`${RD}-btn`,children:(0,l.jsx)(uF,{icon:e.button?.icon,children:(0,l.jsx)("span",{className:`${RD}-btn-label`,children:gF(i,"simple",o)})})}),n&&(0,l.jsx)(pF,{attributes:e,fallback:(0,x.__)("View cart","b-blocks")})]})},wF=({real:e})=>(0,l.jsx)("div",{className:`${RD}-inner`,children:e.data.is_purchasable&&e.data.stock_availability?.text?(0,l.jsx)(fF,{availability:e.data.stock_availability}):(0,l.jsx)("p",{className:"stock out-of-stock",children:(0,x.__)("This product is currently unavailable.","b-blocks")})}),_F=({attributes:e,real:t})=>(0,l.jsx)("form",{className:"cart",onSubmit:e=>e.preventDefault(),children:(0,l.jsx)(vF,{label:gF(e.content?.buttonText,"external",t),icon:e.button?.icon})}),CF={grouped:({attributes:e,uid:t,real:n})=>{const o=n?.children?.length?n.children:[{id:1,name:(0,x.__)("Classic Cotton Tee","b-blocks"),price:mF(19),stock_availability:{text:(0,x.__)("In stock","b-blocks"),class:"in-stock"}},{id:2,name:(0,x.__)("Everyday Zip Hoodie","b-blocks"),price:mF(49),stock_availability:{text:(0,x.__)("8 in stock","b-blocks"),class:"in-stock"}},{id:3,name:(0,x.__)("Wool Knit Beanie","b-blocks"),price:mF(14),stock_availability:{text:(0,x.__)("In stock","b-blocks"),class:"in-stock"}}];return(0,l.jsxs)("form",{className:"cart grouped_form",onSubmit:e=>e.preventDefault(),children:[(0,l.jsx)("table",{cellSpacing:"0",className:"woocommerce-grouped-product-list group_table",children:(0,l.jsx)("tbody",{children:o.map(((n,o)=>(0,l.jsxs)("tr",{className:"woocommerce-grouped-product-list-item product type-product "+(!1===n.is_in_stock?"outofstock":"instock"),children:[(0,l.jsx)("td",{className:"woocommerce-grouped-product-list-item__quantity",children:(0,l.jsx)(xF,{id:`${t}-g${o}`,label:`${n.name} ${(0,x.__)("quantity","b-blocks")}`,value:e.options?.showQuantity?0:1})}),(0,l.jsx)("td",{className:"woocommerce-grouped-product-list-item__label",children:(0,l.jsx)("label",{htmlFor:`${t}-g${o}`,children:(0,l.jsx)("a",{href:"#preview",onClick:e=>e.preventDefault(),children:n.name})})}),(0,l.jsxs)("td",{className:"woocommerce-grouped-product-list-item__price",children:[n.price_html?(0,l.jsx)(bF,{html:n.price_html}):(0,l.jsx)("span",{className:"woocommerce-Price-amount amount",children:n.price}),(0,l.jsx)(fF,{availability:n.stock_availability})]})]},n.id)))})}),(0,l.jsx)(vF,{label:gF(e.content?.buttonText,"grouped",n),icon:e.button?.icon})]})},external:_F,variable:({attributes:e,uid:t,real:n})=>{const o=n?.data,i=o?(o.attributes||[]).filter((e=>e.has_variations)).map((e=>({name:e.name,slug:e.taxonomy||e.name,terms:e.terms||[],selected:e.terms?.[0]?.slug||""}))):[{name:(0,x.__)("Size","b-blocks"),slug:"size",terms:[{slug:"s",name:"S"},{slug:"m",name:"M"},{slug:"l",name:"L"}],selected:"m"},{name:(0,x.__)("Color","b-blocks"),slug:"color",terms:[{slug:"blue",name:(0,x.__)("Blue","b-blocks")},{slug:"black",name:(0,x.__)("Black","b-blocks")}],selected:"blue"}];return(0,l.jsxs)("form",{className:"variations_form cart",onSubmit:e=>e.preventDefault(),children:[(0,l.jsx)("table",{className:"variations",cellSpacing:"0",role:"presentation",children:(0,l.jsx)("tbody",{children:i.map(((e,n)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"label",children:(0,l.jsx)("label",{htmlFor:`${t}-a${n}`,children:e.name})}),(0,l.jsxs)("td",{className:"value",children:[(0,l.jsxs)("select",{id:`${t}-a${n}`,defaultValue:e.selected,onMouseDown:yF,children:[(0,l.jsx)("option",{value:"",children:(0,x.__)("Choose an option","b-blocks")}),e.terms.map((e=>(0,l.jsx)("option",{value:e.slug,children:e.name},e.slug)))]}),i.length-1===n&&(0,l.jsx)("a",{className:"reset_variations",href:"#preview",onClick:e=>e.preventDefault(),children:(0,x.__)("Clear","b-blocks")})]})]},e.slug)))})}),(0,l.jsxs)("div",{className:"single_variation_wrap",children:[(0,l.jsxs)("div",{className:"woocommerce-variation single_variation",children:[(0,l.jsx)("div",{className:"woocommerce-variation-price",children:(0,l.jsx)("span",{className:"price",children:o?(0,l.jsx)(bF,{html:o.price_html}):(0,l.jsx)("span",{className:"woocommerce-Price-amount amount",children:mF(24)})})}),(0,l.jsx)("div",{className:"woocommerce-variation-availability",children:(0,l.jsx)(fF,{availability:o?o.stock_availability:{text:(0,x.__)("12 in stock","b-blocks"),class:"in-stock"}})})]}),(0,l.jsxs)("div",{className:"woocommerce-variation-add-to-cart variations_button",children:[(0,l.jsx)(xF,{id:`${t}-qty`,label:(0,x.__)("Quantity","b-blocks"),value:1}),(0,l.jsx)(vF,{label:gF(e.content?.buttonText,"variable",n),icon:e.button?.icon})]})]})]})}},jF=({attributes:e,type:t,uid:n,real:o=null})=>{const i=CF[t]||_F,a="simple"===t&&o?.data&&!(o.data.is_purchasable&&o.data.is_in_stock),s="simple"===t&&o?.data?.sold_individually?{...e,options:{...e.options,showQuantity:!1}}:e,{viewCart:r,redirectToCart:c}=e.options||{},d=r&&!c&&"external"!==t&&!a;return a?(0,l.jsx)("div",{className:DD(s,"unavailable"),children:(0,l.jsx)(wF,{real:o})}):(0,l.jsxs)("div",{className:DD(s,t),children:["simple"===t?(0,l.jsx)(kF,{attributes:s,uid:n,viewCart:d,real:o}):(0,l.jsx)("div",{className:`${RD}-native`,children:(0,l.jsx)(i,{attributes:s,uid:n,real:o})}),d&&"simple"!==t&&(0,l.jsx)(pF,{attributes:e,fallback:(0,x.__)("View cart","b-blocks")})]})},$F=["simple","grouped","external","variable"],SF=new Map;Pl(AD.name)&&(0,p.registerBlockType)(AD,{icon:Sl,edit:e=>{const{attributes:o,setAttributes:i,clientId:a,context:s={}}=e,{product:r={}}=o,c=parseInt(r.id,10)||0,d="product"===s.postType&&parseInt(s.postId,10)||0,u=c||d,p=`block-${a}`,{device:g,postType:m,postId:b,isPreview:y}=(0,f.useSelect)((e=>{const t=e("core/editor");return{device:t?.getDeviceType?.()?.toLowerCase()||"desktop",postType:t?.getCurrentPostType?.(),postId:t?.getCurrentPostId?.(),isPreview:!!e("core/block-editor").getSettings()?.isPreviewMode}}),[]),[v,k]=(0,Qa.useState)(null),[w,_]=(0,Qa.useState)(null);(0,Qa.useEffect)((()=>{if(_(null),k(null),!u)return;let e=!1;var t;return(t=u,SF.has(t)||SF.set(t,ID()({path:`/wc/store/v1/products/${t}`}).catch((e=>{throw SF.delete(t),e}))),SF.get(t)).then((async t=>{const n=$F.includes(t?.type)?t.type:"simple",o="grouped"===n&&Array.isArray(t.grouped_products)?t.grouped_products:[],i=o.length?await ID()({path:(0,OD.addQueryArgs)("/wc/store/v1/products",{include:o.join(","),per_page:100})}).then((e=>o.map((t=>(e||[]).find((e=>e.id===t)))).filter(Boolean))).catch((()=>[])):[],a="external"===n?await ID()({path:`/wc/v3/products/${u}?_fields=button_text`}).then((e=>e?.button_text||"")).catch((()=>"")):"";e||k({type:n,data:t,children:i,ownText:a,problem:t?.is_password_protected?"password":""})})).catch((async()=>{const t=await ID()({path:`/wp/v2/product/${u}?context=edit&_fields=id,status`}).catch((()=>null));e||k({type:"simple",data:null,children:[],ownText:"",problem:t?.id?"unpublished":"missing",status:t?.status||""})
547 +})),()=>{e=!0}}),[u]);const C=u?w||v?.type||"simple":$F.includes(r.previewType)?r.previewType:"simple",j=u&&v?.data&&v.type===C?v:null,$=void 0!==window.wcSettings||void 0!==window.wc,S=!!c||"product"===s.postType||"product"===m||"wp_template"===m&&/single-product/.test(String(b)),T=(0,Qa.useMemo)((()=>((e,o,i=!1)=>{const{layout:a,button:s,quantity:r,stepper:l,variations:c,grouped:d,messages:u,viewCart:p,advanced:h}=e,{normal:g,hover:m,added:b,icon:f}=s||{},{label:x,select:y,clear:v,price:k,table:w}=c||{},{table:_,name:C,price:j}=d||{},$=`#${o} .${RD}`,S=`${$} .${RD}-btn`,T=`${$} .single_add_to_cart_button`,N=`${S}, ${T}`,M=`${S}:hover, ${S}:focus-visible, ${T}:hover, ${T}:focus-visible`,L=`${S}:focus-visible, ${T}:focus-visible`,P=`${S}:not(.${FD("error")})`,E=`${T}:not(.${FD("error")})`,A=`${P}, ${E}`,B=`${P}:hover, ${P}:focus-visible, ${P}.${FD("added")}, ${E}:hover, ${E}:focus-visible, ${E}.${FD("added")}`,I=`${P}.${FD("added")}, ${E}.${FD("added")}`,O=`${$} .${RD}-btn-icon`,R=`${S}:hover .${RD}-btn-icon, ${S}:focus-visible .${RD}-btn-icon, ${S}.${FD("added")} .${RD}-btn-icon, ${T}:hover .${RD}-btn-icon, ${T}:focus-visible .${RD}-btn-icon, ${T}.${FD("added")} .${RD}-btn-icon`,z=`${$} .${RD}-inner, ${$} form.cart:not(.variations_form):not(.grouped_form), ${$} .woocommerce-variation-add-to-cart`,D=`${$} form.grouped_form`,F=`${$} .${RD}-inner > .${RD}-btn, ${T}`,H=`${$} .${RD}-qty, ${$} .quantity .qty`,W=`${$} .${RD}-qty-input`,U=`${$} .${RD}-qty--stepper .${RD}-qty-input`,G=`${$} .${RD}-inner > .${RD}-qty, ${$} .woocommerce-variation-add-to-cart .quantity`,V=`${W}, ${$} .quantity .qty`,q=`${W}:hover, ${W}:focus, ${$} .quantity .qty:hover, ${$} .quantity .qty:focus`,Y=`${$} .${RD}-qty:hover, ${$} .${RD}-qty:focus-within, ${$} .quantity .qty:hover, ${$} .quantity .qty:focus`,K=`${$} .${RD}-qty-btn`,Q=`${K}:focus-visible, ${W}:focus-visible, ${$} .quantity .qty:focus-visible, ${$} table.variations select:focus-visible`,Z=`${$} table.variations`,X=`${Z} th, ${Z} td`,J=`${Z} th.label`,ee=`${J} label`,te=`${Z} select`,ne=`${te}:hover, ${te}:focus`,oe=`${$} .reset_variations`,ie=`${$} .woocommerce-variation-price .price`,ae=`${$} .group_table`,se=`${$} .woocommerce-grouped-product-list-item__label a, ${$} .woocommerce-grouped-product-list-item__label label`,re=`${$} .woocommerce-grouped-product-list-item__label a:hover, ${$} .woocommerce-grouped-product-list-item__label a:focus-visible`,le=`${$} .woocommerce-grouped-product-list-item__price`,ce=`${$} .stock`,de=`${$} .${RD}-view-cart`,ue={left:"flex-start",center:"center",right:"flex-end"}[a?.alignment]||"flex-start",pe=(e="desktop")=>{const t=a?.[e]?.displayType,n=["stacked","stacked-reverse"].includes(t),o=["inline-reverse","stacked-reverse"].includes(t),i=["inline-reverse","stacked","stacked-reverse"].includes(t)||"inline"===t&&"desktop"!==e;return`\n\t\t\t${z}{\n\t\t\t\t${i?ns("flex-direction",n?"column":"row"):""}\n\t\t\t\t${i?ns("align-items",n?ue:"center"):""}\n\t\t\t\t${ns("gap",a?.[e]?.gap)}\n\t\t\t}\n\t\t\t${G}{\n\t\t\t\t${i?ns("order",o?"2":"0"):""}\n\t\t\t}\n\t\t\t${D}{\n\t\t\t\t${ns("gap",a?.[e]?.gap)}\n\t\t\t}\n\t\t\t${F}{\n\t\t\t\t${i?ns("width",n?"100%":"auto"):""}\n\t\t\t}\n\t\t\t${N}{\n\t\t\t\t${ns("padding",hs(s?.[e]?.padding))}\n\t\t\t\t${ns("border-radius",hs(s?.[e]?.radius))}\n\t\t\t}\n\t\t\t${F}, ${N}{\n\t\t\t\t${s?.[e]?.width?`${ns("width",s[e].width)} flex: 0 0 auto; max-width: 100%;`:""}\n\t\t\t}\n\t\t\t${K}{\n\t\t\t\t${ns("width",l?.[e]?.width)}\n\t\t\t\t${ns("min-width",l?.[e]?.width)}\n\t\t\t}\n\t\t\t${ae} td{\n\t\t\t\t${ns("padding",hs(_?.[e]?.padding))}\n\t\t\t}\n\t\t\t${Z}{\n\t\t\t\t${ns("margin-bottom",w?.[e]?.bottomGap)}\n\t\t\t}\n\t\t\t${H}{\n\t\t\t\t${ns("border-radius",hs(r?.[e]?.radius))}\n\t\t\t\t${ns("height",r?.[e]?.height)}\n\t\t\t}\n\t\t\t${V}{\n\t\t\t\t${ns("width",r?.[e]?.width)}\n\t\t\t\t${ns("min-width",r?.[e]?.width)}\n\t\t\t}\n\t\t\t${te}{\n\t\t\t\t${ns("border-radius",hs(y?.[e]?.radius))}\n\t\t\t\t${ns("padding",hs(y?.[e]?.padding))}\n\t\t\t\t${y?.[e]?.width?`${ns("width",y[e].width)} min-width: 0;`:""}\n\t\t\t}\n\t\t\t${X}{\n\t\t\t\t${w?.[e]?.rowGap?`padding-top: calc(${w[e].rowGap} / 2); padding-bottom: calc(${w[e].rowGap} / 2);`:""}\n\t\t\t}\n\t\t\t${J}{\n\t\t\t\t${ns("width",w?.[e]?.labelWidth)}\n\t\t\t}\n\t\t\t${ae}{\n\t\t\t\t${_?.[e]?.rowGap?ns("border-spacing",`0 ${_[e].rowGap}`):""}\n\t\t\t}\n\t\t`}
548 +;return`\n\t\t${ps("",s?.typo)?.googleFontLink}\n\t\t${ps("",r?.typo)?.googleFontLink}\n\t\t${ps("",x?.typo)?.googleFontLink}\n\t\t${ps("",y?.typo)?.googleFontLink}\n\t\t${ps("",v?.typo)?.googleFontLink}\n\t\t${ps("",k?.typo)?.googleFontLink}\n\t\t${ps("",C?.typo)?.googleFontLink}\n\t\t${ps("",j?.typo)?.googleFontLink}\n\t\t${ps("",u?.typo)?.googleFontLink}\n\t\t${ps("",p?.typo)?.googleFontLink}\n\n\t\t${N}{\n\t\t\t${jt(g?.border)?as(g.border):""}\n\t\t\t${ns("box-shadow",ls(s?.shadow))}\n\t\t\t${ns("gap",f?.gap)}\n\t\t}\n\t\t${O} svg{\n\t\t\t${ns("width",f?.size)}\n\t\t\t${ns("height",f?.size)}\n\t\t}\n\t\t${O}{\n\t\t\t${ns("color",f?.color?.text)}\n\t\t}\n\t\t${R}{\n\t\t\t${ns("color",f?.hover?.color?.text)}\n\t\t}\n\t\t${A}{\n\t\t\t${ns("color",g?.color?.text)}\n\t\t\t${os(g?.bg)}\n\t\t}\n\t\t${M}{\n\t\t\t${jt(m?.border)?as(m.border):""}\n\t\t}\n\t\t${B}{\n\t\t\t${ns("color",m?.color?.text)}\n\t\t\t${os(m?.bg)}\n\t\t}\n\t\t${I}{\n\t\t\t${ns("color",b?.color?.text)}\n\t\t\t${os(b?.bg)}\n\t\t}\n\t\t${L}{\n\t\t\t${"gradient"!==m?.bg?.type&&"image"!==m?.bg?.type?ns("outline-color",m?.bg?.color):""}\n\t\t}\n\t\t${Q}{\n\t\t\t${"gradient"!==g?.bg?.type&&"image"!==g?.bg?.type?ns("outline-color",g?.bg?.color):""}\n\t\t}\n\n\t\t${pe("desktop")}\n\n\t\t${t}{\n\t\t\t${pe("tablet")}\n\t\t}\n\n\t\t${n}{\n\t\t\t${pe("mobile")}\n\t\t}\n\n\t\t${K}{\n\t\t\t${ns("color",l?.color?.text)}\n\t\t\t${os(l?.bg)}\n\t\t}\n\t\t${K}:hover, ${K}:focus-visible{\n\t\t\t${ns("color",l?.hover?.color?.text)}\n\t\t\t${os(l?.hover?.bg)}\n\t\t\t${l?.hover?.color?.text||l?.hover?.bg?.color||"gradient"===l?.hover?.bg?.type?"filter: none;":""}\n\t\t}\n\t\t${H}{\n\t\t\t${ns("border-width",r?.border?.width)}\n\t\t\t${ns("border-style",r?.border?.style)}\n\t\t\t${ns("border-color",r?.border?.color)}\n\t\t}\n\t\t${U}{\n\t\t\t${ns("border-inline-width",r?.border?.width)}\n\t\t\t${ns("border-inline-style",r?.border?.style)}\n\t\t\t${ns("border-inline-color",r?.border?.color)}\n\t\t}\n\t\t${V}{\n\t\t\t${ns("color",r?.color?.text||l?.color?.text)}\n\t\t\t${os(r?.bg)}\n\t\t}\n\t\t${q}{\n\t\t\t${ns("color",r?.hover?.color?.text)}\n\t\t\t${os(r?.hover?.bg)}\n\t\t}\n\t\t${Y}{\n\t\t\t${ns("border-width",r?.hover?.border?.width)}\n\t\t\t${ns("border-style",r?.hover?.border?.style)}\n\t\t\t${ns("border-color",r?.hover?.border?.color)}\n\t\t}\n\n\t\t${ee}{\n\t\t\t${ns("color",x?.color?.text)}\n\t\t}\n\t\t${ee}:hover{\n\t\t\t${ns("color",x?.hover?.color?.text)}\n\t\t}\n\t\t${te}{\n\t\t\t${ns("color",y?.color?.text)}\n\t\t\t${os(y?.bg)}\n\t\t\t${ns("border-width",y?.border?.width)}\n\t\t\t${ns("border-style",y?.border?.style)}\n\t\t\t${ns("border-color",y?.border?.color)}\n\t\t}\n\t\t${ne}{\n\t\t\t${ns("color",y?.hover?.color?.text)}\n\t\t\t${os(y?.hover?.bg)}\n\t\t\t${ns("border-width",y?.hover?.border?.width)}\n\t\t\t${ns("border-style",y?.hover?.border?.style)}\n\t\t\t${ns("border-color",y?.hover?.border?.color)}\n\t\t}\n\t\t${oe}{\n\t\t\t${ns("color",v?.color?.text)}\n\t\t}\n\t\t${oe}:hover, ${oe}:focus-visible{\n\t\t\t${ns("color",v?.hover?.color?.text)}\n\t\t}\n\t\t${ie}, ${ie} ins, ${ie} .woocommerce-Price-amount{\n\t\t\t${ns("color",k?.color?.text)}\n\t\t}\n\n\t\t${ae} td{\n\t\t\t${ns("border-block-width",_?.border?.width)}\n\t\t\t${ns("border-block-style",_?.border?.style)}\n\t\t\t${ns("border-block-color",_?.border?.color)}\n\t\t\t${os(_?.bg)}\n\t\t}\n\t\t${ae} td:first-child{\n\t\t\t${ns("border-inline-start-width",_?.border?.width)}\n\t\t\t${ns("border-inline-start-style",_?.border?.style)}\n\t\t\t${ns("border-inline-start-color",_?.border?.color)}\n\t\t}\n\t\t${ae} td:last-child{\n\t\t\t${ns("border-inline-end-width",_?.border?.width)}\n\t\t\t${ns("border-inline-end-style",_?.border?.style)}\n\t\t\t${ns("border-inline-end-color",_?.border?.color)}\n\t\t}\n\t\t${se}{\n\t\t\t${ns("color",C?.color?.text)}\n\t\t}\n\t\t${re}{\n\t\t\t${ns("color",C?.hover?.color?.text)}\n\t\t}\n\t\t${le}{\n\t\t\t${ns("color",j?.color?.text)}\n\t\t}\n\n\t\t${ce}{\n\t\t\t${ns("color",u?.color?.text)}\n\t\t}\n\t\t${ce}.in-stock{\n\t\t\t${ns("color",u?.color?.inStock||u?.color?.text)}\n\t\t}\n\t\t${ce}.out-of-stock, ${ce}.available-on-backorder{\n\t\t\t${ns("color",u?.color?.outOfStock||u?.color?.text)}\n\t\t}\n\n\t\t${de}{\n\t\t\t${ns("color",p?.color?.text)}\n\t\t}\n\t\t${de}:hover, ${de}:focus-visible{\n\t\t\t${ns("color",p?.hover?.color?.text)}\n\t\t}\n\n\t\t${ps(N,s?.typo)?.styles}\n\t\t${ps(V,r?.typo)?.styles}\n\t\t${ps(ee,x?.typo)?.styles}\n\t\t${ps(te,y?.typo)?.styles}\n\t\t${ps(oe,v?.typo)?.styles}\n\t\t${ps(ie,k?.typo)?.styles}\n\t\t${ps(se,C?.typo)?.styles}\n\t\t${ps(le,j?.typo)?.styles}\n\t\t${ps(ce,u?.typo)?.styles}\n\t\t${ps(de,p?.typo)?.styles}\n\n\t\t${_s(o,h,i)}\n\t`})(o,p,!0)),[o,p]),N=(0,h.useBlockProps)(),M=void 0!==window.bBlocksPremiumChecker&&window.bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(cF,{...e,isPremium:M,device:g,previewType:C,onPreviewType:e=>{i({product:{...r,previewType:e}}),u&&_(e)},isPicked:!!u}),(0,l.jsxs)("div",{...N,children:[!y&&!$&&(0,l.jsx)("p",{className:"b-blocks-woo-add-to-cart-notice",children:(0,x.__)("WooCommerce is not active. This block shows nothing until it is.","b-blocks")}),!y&&c&&v?.problem&&(0,l.jsx)("p",{className:"b-blocks-woo-add-to-cart-notice",children:{missing:(0,x.__)("The chosen product no longer exists, so visitors see nothing here. Pick another product.","b-blocks"),
549 +/* translators: %s: the product's status, e.g. draft. */
550 +unpublished:(0,x.sprintf)((0,x.__)("The chosen product is not published (%s), so visitors see nothing here until it is.","b-blocks"),v.status),password:(0,x.__)("The chosen product is password-protected, so visitors see nothing here.","b-blocks")}[v.problem]}),!y&&$&&!S&&(0,l.jsx)("p",{className:"b-blocks-woo-add-to-cart-notice",children:(0,x.__)("No product here: on this page the block shows nothing. Pick a product in the block settings, or use the block in the Single Product template.","b-blocks")}),(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:T}}),(0,l.jsx)("div",{children:(0,l.jsx)(jF,{attributes:o,type:C,uid:p,real:j})})]})]})},save:()=>null})
551 +;const TF=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/woo-product-grid","title":"Woo Product Grid","category":"bBlocks","description":"Display WooCommerce products in a stunning, organized grid or list. Let shoppers filter by category, browse more without reloading, and add to cart right from the page.","keywords":["woocommerce","product grid","products","shop","store","ecommerce","add to cart","sale","featured"],"textdomain":"b-blocks","attributes":{"theme":{"type":"string","default":"default"},"layout":{"type":"object","default":{"type":"grid","titleTag":"h4","actionPosition":"overlay","actionAlign":"center","actionFull":false,"actionIconOnly":false,"actionOrder":"cart","imageSize":"default","desktop":{"columns":4,"contentAlign":"left","columnGap":"20px","rowGap":"20px"},"tablet":{"columns":2,"contentAlign":"","columnGap":"","rowGap":""},"mobile":{"columns":1,"contentAlign":"","columnGap":"","rowGap":""}}},"elements":{"type":"object","default":{"image":true,"category":false,"rating":true,"price":true,"saleBadge":true,"soldCount":false,"progressBar":false,"viewButton":false,"title":true,"cart":true}},"query":{"type":"object","default":{"type":"custom","orderBy":"date","order":"desc","perPage":4,"offset":0,"include":[],"exclude":[],"categoryMode":"include","categories":[],"tagMode":"include","tags":[],"onSaleOnly":false,"featuredOnly":false,"currentProductId":0,"noProductsMessage":"No products found."}},"contentOrder":{"type":"array","default":["price","rating","title","category","soldCount"]},"cart":{"type":"object","default":{"useCustomText":false,"simple":"Buy Now","variable":"Select options","grouped":"View products","external":"Buy now","default":"Read more","showIcon":true,"icon":"","iconColor":"","iconPosition":"left","typo":{"fontSize":{"desktop":"14px"},"fontWeight":500},"transition":0.2,"normal":{"color":"#ffffff","bg":{"type":"solid","color":"#146EF5"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"13px","right":"14px","bottom":"13px","left":"14px"},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"color":"#ffffff","bg":{"type":"solid","color":"#070127"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"desktop":{"iconSize":""},"tablet":{"iconSize":""},"mobile":{"iconSize":""}}},"viewButton":{"type":"object","default":{"text":"Visit Product","showIcon":true,"icon":"","iconColor":"","iconPosition":"left","typo":{"fontSize":{"desktop":"14px"},"fontWeight":500},"transition":0.2,"normal":{"color":"#070127","bg":{"type":"solid","color":"#ffffff"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"13px","right":"14px","bottom":"13px","left":"14px"},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"color":"#ffffff","bg":{"type":"solid","color":"#146EF5"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"desktop":{"iconSize":""},"tablet":{"iconSize":""},"mobile":{"iconSize":""}}},"badge":{"type":"object","default":{"align":"top","text":"Sale","content":"text","bg":{"type":"solid","color":"#e44d3a"},"color":"#ffffff","typo":{"fontSize":{"desktop":"12px"},"fontWeight":500},"desktop":{"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"},"padding":{"top":"3px","right":"10px","bottom":"3px","left":"10px"},"offset":"10px"},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"offset":""},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"offset":""}}},"pager":{"type":"object","default":{"enable":true,"type":"button","text":"Load More","align":"center","typo":{"fontSize":{"desktop":"14px"},"fontWeight":500},"transition":0.2,"normal":{"color":"#ffffff","bg":{"type":"solid","color":"#146EF5"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"8px","right":"18px","bottom":"8px","left":"18px"},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"color":"#ffffff","bg":{"type":"solid","color":"#070127"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"active":{"color":"#ffffff","bg":{"type":"solid","color":"#070127"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}}}},"filter":{"type":"object","default":{"enable":false,"taxonomy":"product_cat","allText":"All","align":"left","typo":{"fontSize":{"desktop":"14px"},"fontWeight":400},"transition":0.2,"normal":{"color":"#070127","bg":{"type":"solid","color":"#f1f5f9"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"6px","right":"14px","bottom":"6px","left":"14px"},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"color":"#ffffff","bg":{"type":"solid","color":"#146EF5"},"border":{"width":"","style":"solid","color":""},"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}}}},"card":{"type":"object","default":{"transition":0.25,"bodyBg":{"type":"solid","color":""},"normal":{"bg":{"type":"solid","color":"#ffffff"},"border":{"width":"1px","style":"solid","color":"#e2e8f0"},"shadow":[],"desktop":{"padding":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"radius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":{"type":"solid","color":"#ffffff"},"border":{"width":"1px","style":"solid","color":"#146EF5"},"shadow":[{"hOffset":"0px","vOffset":"6px","blur":"18px","spreed":"0px","color":"rgba(15, 23, 42, 0.12)","isInset":false}],"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"radius":{"top":"","right":"","bottom":"","left":""}}},"desktop":{"bodyMargin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"bodyMargin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"bodyMargin":{"top":"","right":"","bottom":"","left":""}},"divider":"#f1f5f9"}},"media":{"type":"object","default":{"ratio":"3/4","fit":"cover","bg":{"type":"solid","color":"#f1f5f9"},"overlay":{"type":"solid","color":"rgba(7, 1, 39, 0.45)"},"desktop":{"radius":{"top":"8px","right":"8px","bottom":"8px","left":"8px"},"margin":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}}},"title":{"type":"object","default":{"typo":{"fontSize":{"desktop":"","tablet":"","mobile":""},"fontWeight":600},"transition":0.2,"normal":{"color":"#070127"},"hover":{"color":"#146EF5"}}},"price":{"type":"object","default":{"typo":{"fontSize":{"desktop":"16px"},"fontWeight":700},"color":"#e44d3a","regularColor":"#999999"}},"rating":{"type":"object","default":{"style":"star","showEmpty":true,"color":"#f5a623","emptyColor":"#d1d5db","countColor":"#64748b","size":14}},"category":{"type":"object","default":{"typo":{"fontSize":{"desktop":"12px"}},"transition":0.2,"normal":{"color":"#6b7280"},"hover":{"color":"#146EF5"}}},"sold":{"type":"object","default":{"prefix":"Sold","suffix":"+","withoutStock":50,"typo":{"fontSize":{"desktop":"12px"}},"color":"#6b7280","bg":{"type":"solid","color":""},"progress":{"trackColor":"#e2e8f0","fillColor":"#146EF5","height":6,"desktop":{"radius":{"top":"3px","right":"3px","bottom":"3px","left":"3px"}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""}}},"borderShadow":{"normal":{"border":{"width":"","style":"","color":""},"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[]}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"position":{}}}},"supports":{"align":["wide","full"],"html":false,"customClassName":true},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),NF=e=>"string"==typeof e||"number"==typeof e?String(e):"",MF=(e,t)=>String(e||"").replace(/%[ds]/,t),LF=(e,t,n)=>{
552 +const o=e&&"object"==typeof e?e:{},i=o[t];return i&&"object"==typeof i&&!Array.isArray(i)&&n in i?i[n]:(a=o[n],a&&"object"==typeof a&&!Array.isArray(a)&&("desktop"in a||"tablet"in a||"mobile"in a)?a:{desktop:a??"",tablet:"",mobile:""})[t];var a},PF=(e,t)=>({desktop:LF(e,"desktop",t),tablet:LF(e,"tablet",t),mobile:LF(e,"mobile",t)}),EF=e=>!!e&&"object"==typeof e&&!Array.isArray(e),AF=["typo","advanced"],BF=(e,t)=>{if(null!=e){if(Array.isArray(t))return Array.isArray(e)?e:void 0;if(EF(t))return EF(e)?IF(e,t):void 0;switch(typeof t){case"string":return"string"==typeof e?e:"number"==typeof e?String(e):void 0;case"number":{const t="number"==typeof e?e:"string"==typeof e&&""!==e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}case"boolean":return"boolean"==typeof e?e:"true"===e||1===e||"false"!==e&&0!==e&&""!==e&&void 0;default:return e}}},IF=(e,t)=>{if(!EF(e)||!EF(t))return e;const n={};for(const[o,i]of Object.entries(e)){if(!(o in t)||AF.includes(o)){n[o]=i;continue}const e=BF(i,t[o]);void 0!==e&&(n[o]=e)}return n},OF="b-blocks-woo-product-grid",RF={price:"Price",rating:"Rating",title:"Title",category:"Category",soldCount:"Sold Count"},zF=(e,t)=>Object.fromEntries(t.filter((t=>e&&t in e)).map((t=>[t,e[t]]))),DF=(e={})=>({query:e.query||{},cart:zF(e.cart,["useCustomText","simple","variable","grouped","external","default"]),sold:zF(e.sold,["prefix","suffix","withoutStock"]),filter:zF(e.filter,["enable","taxonomy"]),viewButton:zF(e.viewButton,["text"]),layout:{imageSize:e.layout?.imageSize}}),FF=["h1","h2","h3","h4","h5","h6"],HF=(0,l.jsxs)("svg",{className:"b-blocks-woo-product-grid-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:[(0,l.jsx)("circle",{cx:"9",cy:"21",r:"1"}),(0,l.jsx)("circle",{cx:"20",cy:"21",r:"1"}),(0,l.jsx)("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"})]}),WF=(0,l.jsxs)("svg",{className:"b-blocks-woo-product-grid-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,l.jsx)("path",{d:"M15 3h6v6"}),(0,l.jsx)("path",{d:"M10 14 21 3"})]}),UF=e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false",children:e}),GF=UF((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("rect",{x:"3",y:"5",width:"14",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"3",y:"11",width:"18",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"3",y:"17",width:"10",height:"2",rx:"1"})]})),VF=UF((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("rect",{x:"5",y:"5",width:"14",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"3",y:"11",width:"18",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"7",y:"17",width:"10",height:"2",rx:"1"})]})),qF=UF((0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("rect",{x:"7",y:"5",width:"14",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"3",y:"11",width:"18",height:"2",rx:"1"}),(0,l.jsx)("rect",{x:"11",y:"17",width:"10",height:"2",rx:"1"})]})),YF=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],KF=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],QF=[{label:(0,x.__)("Grid","b-blocks"),value:"grid"},{label:(0,x.__)("List","b-blocks"),value:"list"}],ZF=[{label:(0,x.__)("Star","b-blocks"),value:"star"},{label:(0,x.__)("Star with Count","b-blocks"),value:"star-count"},{label:(0,x.__)("Number","b-blocks"),value:"number"}],XF=FF.map((e=>({label:e.toUpperCase(),value:e}))),JF=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Thumbnail","b-blocks"),value:"thumbnail"},{label:(0,x.__)("Medium","b-blocks"),value:"medium"},{label:(0,x.__)("Large","b-blocks"),value:"large"},{label:(0,x.__)("Full Size","b-blocks"),value:"full"}],eH=[{label:(0,x.__)("Custom Query","b-blocks"),value:"custom"},{label:(0,x.__)("Related Products","b-blocks"),value:"related"}],tH=[{label:(0,x.__)("Date","b-blocks"),value:"date"},{label:(0,x.__)("Title","b-blocks"),value:"title"},{label:(0,x.__)("Price","b-blocks"),value:"price"},{label:(0,x.__)("Popularity","b-blocks"),value:"popularity"},{label:(0,x.__)("Rating","b-blocks"),value:"rating"},{label:(0,x.__)("Menu Order","b-blocks"),value:"menu_order"},{label:(0,x.__)("Random","b-blocks"),value:"rand"},{label:(0,x.__)("ID","b-blocks"),value:"id"}],nH=[{label:(0,x.__)("Descending","b-blocks"),value:"desc"},{label:(0,x.__)("Ascending","b-blocks"),value:"asc"}],oH=[{label:(0,x.__)("Include","b-blocks"),value:"include"},{label:(0,x.__)("Exclude","b-blocks"),value:"exclude"}],iH=[{label:(0,x.__)("Top","b-blocks"),value:"top"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],aH=[{label:(0,x.__)("Sale Text","b-blocks"),value:"text"},{label:(0,x.__)("Amount Saved","b-blocks"),value:"amount"},{label:(0,x.__)("Percent Off","b-blocks"),value:"percent"}],sH=[{label:(0,x.__)("Button","b-blocks"),value:"button"},{label:(0,x.__)("Pagination","b-blocks"),value:"pagination"},{label:(0,x.__)("Prev-Next","b-blocks"),value:"prev-next"}],rH=[{label:(0,x.__)("Left","b-blocks"),value:"left",icon:GF},{label:(0,x.__)("Center","b-blocks"),value:"center",icon:VF},{label:(0,x.__)("Right","b-blocks"),value:"right",icon:qF}],lH=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],cH=[{label:"3:4",value:"3/4"},{label:"1:1",value:"1/1"},{label:"4:3",value:"4/3"},{label:"16:9",value:"16/9"}],dH=[{label:(0,x.__)("Cover","b-blocks"),value:"cover"},{label:(0,x.__)("Contain","b-blocks"),value:"contain"}],uH={desktop:4,tablet:2,mobile:1},pH=[{label:(0,x.__)("On Image","b-blocks"),value:"overlay"},{label:(0,x.__)("Below","b-blocks"),value:"below"},{label:(0,x.__)("Split","b-blocks"),value:"split"}],hH=[{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"},{label:(0,x.__)("Bottom","b-blocks"),value:"bottom"}],gH=[{label:(0,x.__)("Cart","b-blocks"),value:"cart"},{label:(0,x.__)("View","b-blocks"),value:"view"}],mH=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],bH=(e,t=e,n=e,o=t)=>({top:e,right:t,bottom:n,left:o}),fH=()=>bH("","","",""),xH=e=>({type:"solid",color:e}),yH=(e,t,n)=>Object.fromEntries(["desktop","tablet","mobile"].map((o=>{const i="desktop"===o,a={padding:i?e:fH()};return n&&(a.margin=fH()),a.radius=i?t:fH(),[o,a]}))),vH=({color:e,bg:t,padding:n,radius:o,border:i={width:"",style:"solid",color:""},shadow:a=[],withMargin:s=!1})=>({...void 0===e?{}:{color:e},bg:xH(t),border:i,shadow:a,...yH(n,o,s)}),kH=e=>vH({...e,withMargin:!0}),wH=(e,t,n)=>[{hOffset:"0px",vOffset:e,blur:t,spreed:"0px",color:n,isInset:!1}],_H={layout:["actionPosition","actionAlign","actionFull","actionIconOnly","actionOrder"],elements:null,contentOrder:null,card:["transition","bodyBg","divider","normal","hover"],media:["ratio","fit","bg","overlay"],title:["transition","typo","normal","hover"],price:["typo","color","regularColor"],rating:["style","color","emptyColor","countColor","size"],category:["transition","typo","normal","hover"],sold:["typo","color","bg","progress"],cart:["transition","showIcon","typo","normal","hover"],viewButton:["transition","showIcon","typo","normal","hover"],badge:["align","content","bg","color","typo"]},CH=["desktop","tablet","mobile"],jH={layout:["contentAlign","columnGap","rowGap"],card:["bodyMargin"],media:["radius","margin"],badge:["radius","padding","offset"]},$H=e=>JSON.parse(JSON.stringify(e)),SH=(e,t)=>{const n={...e};for(const[o,i]of Object.entries(t||{})){const t=i&&"object"==typeof i&&!Array.isArray(i)
553 +;n[o]=t&&e?.[o]&&"object"==typeof e[o]?SH(e[o],i):i}return n},TH=(e,t)=>Object.fromEntries(t.filter((t=>t in(e||{}))).map((t=>[t,$H(e[t])]))),NH=()=>Object.fromEntries(Object.entries(_H).map((([e,t])=>{const n=TF.attributes[e]?.default;if(null===t)return[e,$H(n)];const o=TH(n,t);for(const t of jH[e]?CH:[])o[t]=TH(n?.[t],jH[e]);return[e,o]}))),MH={default:{label:"Default",attributes:NH()},editorial:{label:"Editorial",attributes:{layout:{actionPosition:"below",actionAlign:"center",actionFull:!0,actionIconOnly:!1,actionOrder:"view",desktop:{contentAlign:"center",columnGap:"28px",rowGap:"40px"}},elements:{image:!0,category:!1,rating:!1,price:!0,saleBadge:!1,soldCount:!1,progressBar:!1,viewButton:!0,title:!0,cart:!0},contentOrder:["title","price","rating","category","soldCount"],card:{transition:.3,bodyBg:xH("#ffffff"),desktop:{bodyMargin:bH("-56px","18px","0px","18px")},normal:vH({bg:"#f7efe9",padding:bH("28px","22px"),radius:fH()}),hover:vH({bg:"#f7efe9",padding:fH(),radius:fH()})},media:{ratio:"1/1",fit:"cover",bg:xH("#f7efe9"),desktop:{radius:fH()}},title:{transition:.2,typo:{fontSize:{desktop:"20px",tablet:"",mobile:""},fontWeight:400},normal:{color:"#1a1a1a"},hover:{color:"#8a6a52"}},price:{typo:{fontSize:{desktop:"17px"},fontWeight:600},color:"#1a1a1a",regularColor:"#9a9a9a"},cart:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:kH({color:"#1a1a1a",bg:"#ffffff",padding:bH("13px"),radius:bH("2px"),border:{width:"1px",style:"solid",color:"#d8d2cc"}}),hover:kH({color:"#ffffff",bg:"#1a1a1a",padding:fH(),radius:fH(),border:{width:"1px",style:"solid",color:"#1a1a1a"}})},viewButton:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:kH({color:"#ffffff",bg:"#111111",padding:bH("13px"),radius:bH("2px")}),hover:kH({color:"#ffffff",bg:"#3a3a3a",padding:fH(),radius:fH()})}},list:{card:{desktop:{bodyMargin:bH("18px","18px","18px","-40px")},mobile:{bodyMargin:bH("-56px","18px","0px","18px")},normal:{desktop:{padding:bH("24px")},mobile:{padding:bH("28px","22px")}}}}},catalogue:{label:"Catalogue",attributes:{layout:{actionPosition:"overlay",actionAlign:"right",actionFull:!1,actionIconOnly:!0,actionOrder:"view",desktop:{contentAlign:"left",columnGap:"24px",rowGap:"32px"}},elements:{image:!0,category:!0,rating:!0,price:!0,saleBadge:!0,soldCount:!1,progressBar:!1,viewButton:!0,title:!0,cart:!0},contentOrder:["category","title","rating","price","soldCount"],card:{transition:.2,bodyBg:xH(""),desktop:{bodyMargin:fH()},normal:vH({bg:"#ffffff",padding:bH("14px","4px","4px","4px"),radius:fH()}),hover:vH({bg:"#ffffff",padding:fH(),radius:fH()})},media:{ratio:"1/1",fit:"contain",bg:xH("#f4f5f7"),desktop:{radius:fH()}},title:{transition:.2,typo:{fontSize:{desktop:"15px"},fontWeight:400},normal:{color:"#2b2b2b"},hover:{color:"#12a5a5"}},category:{transition:.2,typo:{fontSize:{desktop:"12px"},fontWeight:400},normal:{color:"#9aa0a6"},hover:{color:"#12a5a5"}},price:{typo:{fontSize:{desktop:"15px"},fontWeight:700},color:"#12a5a5",regularColor:"#b6bcc2"},rating:{style:"star",color:"#f5a623",emptyColor:"#d6dade",countColor:"#9aa0a6",size:13},cart:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:kH({color:"#3c4043",bg:"#ffffff",padding:bH("9px"),radius:bH("2px")}),hover:kH({color:"#ffffff",bg:"#12a5a5",padding:fH(),radius:fH()})},viewButton:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:kH({color:"#3c4043",bg:"#ffffff",padding:bH("9px"),radius:bH("2px")}),hover:kH({color:"#ffffff",bg:"#12a5a5",padding:fH(),radius:fH()})},badge:{align:"left",bg:xH("#12a5a5"),color:"#ffffff",typo:{fontSize:{desktop:"11px"},fontWeight:600},desktop:{padding:bH("3px","9px"),radius:bH("2px"),offset:"8px"}}},list:{card:{normal:{desktop:{padding:bH("12px","16px")},mobile:{padding:bH("14px","4px","4px","4px")}}}}},bold:{label:"Bold",attributes:{layout:{actionPosition:"overlay",actionAlign:"bottom",actionFull:!0,actionIconOnly:!1,actionOrder:"cart",desktop:{contentAlign:"left"}},elements:{image:!0,category:!1,rating:!0,price:!0,saleBadge:!0,soldCount:!1,progressBar:!1,viewButton:!1,title:!0,cart:!0},card:{transition:.3,bodyBg:xH(""),desktop:{bodyMargin:fH()},normal:vH({bg:"#15161a",padding:bH("18px"),radius:bH("4px")}),hover:vH({bg:"#1f2127",padding:fH(),radius:fH(),shadow:wH("10px","28px","rgba(0, 0, 0, 0.45)")})},media:{ratio:"4/3",fit:"cover",bg:xH("#0f1013"),desktop:{radius:fH()}},title:{transition:.2,typo:{fontSize:{desktop:"17px"},fontWeight:600},normal:{color:"#f5f6f8"},hover:{color:"#ffb547"}},price:{typo:{fontSize:{desktop:"16px"},fontWeight:700},color:"#ffb547",regularColor:"#6b6f78"},rating:{style:"star",color:"#ffb547",emptyColor:"#3a3d45",countColor:"#8b9098",size:14},cart:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:600},normal:kH({color:"#15161a",bg:"#ffb547",padding:bH("12px"),radius:bH("2px")}),hover:kH({color:"#15161a",bg:"#ffffff",padding:fH(),radius:fH()})}}},soft:{label:"Soft",attributes:{layout:{actionPosition:"below",actionAlign:"center",actionFull:!1,actionIconOnly:!1,actionOrder:"cart",desktop:{contentAlign:"center",columnGap:"24px",rowGap:"30px"}},elements:{image:!0,category:!1,rating:!0,price:!0,saleBadge:!0,soldCount:!1,progressBar:!1,viewButton:!1,title:!0,cart:!0},card:{transition:.35,bodyBg:xH(""),desktop:{bodyMargin:fH()},normal:vH({bg:"#ffffff",padding:bH("20px"),radius:bH("18px"),shadow:wH("2px","10px","rgba(17, 24, 39, 0.06)")}),hover:vH({bg:"#ffffff",padding:fH(),radius:fH(),shadow:wH("14px","30px","rgba(17, 24, 39, 0.14)")})},media:{ratio:"1/1",fit:"cover",bg:xH("#f6f7fb"),desktop:{radius:bH("14px")}},title:{transition:.2,typo:{fontSize:{desktop:"16px"},fontWeight:500},normal:{color:"#1f2937"},hover:{color:"#6366f1"}},price:{typo:{fontSize:{desktop:"16px"},fontWeight:700},color:"#6366f1",regularColor:"#b6bcc8"},cart:{transition:.25,typo:{fontSize:{desktop:"13px"},fontWeight:600},normal:kH({color:"#ffffff",bg:"#6366f1",padding:bH("11px","20px"),radius:bH("999px")}),hover:kH({color:"#ffffff",bg:"#4f46e5",padding:fH(),radius:fH()})}}},storefront:{label:"Storefront",attributes:{layout:{actionPosition:"split",actionAlign:"center",actionFull:!1,actionIconOnly:!1,actionOrder:"cart",desktop:{contentAlign:"left",columnGap:"24px",rowGap:"24px"}},elements:{image:!0,category:!0,rating:!0,price:!0,saleBadge:!0,soldCount:!1,progressBar:!1,viewButton:!0,title:!0,cart:!0},contentOrder:["category","title","rating","price","soldCount"],card:{transition:.25,bodyBg:xH(""),divider:"#f1f5f9",desktop:{bodyMargin:fH()},normal:vH({bg:"#ffffff",padding:bH("14px","16px","16px","16px"),radius:bH("16px"),border:{width:"1px",style:"solid",color:"#e2e8f0"},shadow:wH("4px","14px","rgba(15, 23, 42, 0.06)")}),hover:vH({bg:"#ffffff",padding:fH(),radius:fH(),border:{width:"1px",style:"solid",color:"#e2e8f0"},shadow:wH("12px","28px","rgba(15, 23, 42, 0.10)")})},media:{ratio:"1/1",fit:"cover",bg:xH("#f1f5f9"),desktop:{radius:bH("10px"),margin:bH("16px","16px","0px","16px")}},title:{transition:.2,typo:{fontSize:{desktop:"16px"},fontWeight:600,lineHeight:"1.4"},normal:{color:"#0f172a"},hover:{color:"#146ef5"}},category:{transition:.2,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:{color:"#94a3b8"},hover:{color:"#146ef5"}},price:{typo:{fontSize:{desktop:"18px"},fontWeight:700},color:"#0f172a",regularColor:"#94a3b8"},rating:{style:"star-count",color:"#fbbf24",emptyColor:"#e2e8f0",countColor:"#64748b",size:14},cart:{transition:.2,showIcon:!0,typo:{fontSize:{desktop:"14px"},fontWeight:600},normal:kH({color:"#ffffff",bg:"#146ef5",padding:bH("8px","14px"),radius:bH("8px")}),hover:kH({color:"#ffffff",bg:"#0f58d0",padding:fH(),radius:fH()})},viewButton:{transition:.2,showIcon:!1,typo:{fontSize:{desktop:"13px"},fontWeight:500},normal:kH({color:"#334155",bg:"rgba(255, 255, 255, 0.92)",padding:bH("6px","12px"),radius:bH("6px")}),hover:kH({color:"#0f172a",bg:"#ffffff",padding:fH(),radius:fH()})},badge:{align:"left",content:"amount",bg:xH("#2a9669"),color:"#ffffff",typo:{fontSize:{desktop:"12px"},fontWeight:700,
554 +textTransform:"none"},desktop:{padding:bH("4px","10px"),radius:bH("999px"),offset:"10px"}}},list:{card:{normal:{desktop:{padding:bH("16px","16px","16px","0px")},mobile:{padding:bH("14px","16px","16px","16px")}}},media:{desktop:{margin:bH("16px")},mobile:{margin:bH("16px","16px","0px","16px")}}}}},LH=Object.entries(MH).map((([e,{label:t}])=>({value:e,label:t}))),PH=(e,t={})=>{const n=MH[e];if(!n)return null;const o=NH(),i={},a="list"===t.layout?.type&&n.list?SH(n.attributes,n.list):n.attributes;for(const e of new Set([...Object.keys(o),...Object.keys(a)])){const n=o[e],s=a[e];if(Array.isArray(n)||Array.isArray(s))i[e]=[...Array.isArray(s)?s:n];else{i[e]={...t[e]||{},...n||{},...s||{}};for(const o of jH[e]?CH:[])i[e][o]={...t[e]?.[o]||{},...n?.[o]||{},...s?.[o]||{}}}}return i},EH=(e,t)=>e===t||!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&(Array.isArray(e)===Array.isArray(t)&&[...new Set([...Object.keys(e),...Object.keys(t)])].every((n=>void 0===e[n]&&void 0===t[n]||EH(e[n],t[n])))),AH=(e={})=>Object.keys(MH).find((t=>{const n=PH(t,e);return Object.keys(n).every((t=>EH(n[t],e[t])))}))||"",BH=({attributes:e,setAttributes:t})=>{const n=(0,Qa.useMemo)((()=>AH(e)),[e])||(MH[e.theme]?e.theme:"default");return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Theme","b-blocks"),initialOpen:!0,children:(0,l.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Preset","b-blocks"),labelPosition:"edge",value:n,options:LH,onChange:n=>t({...PH(n,e),theme:n})})})},IH=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},elements:a={},rating:s={},sold:r={}}=e,c=(e,t)=>(0,l.jsx)(y.ToggleControl,{className:"mt10",label:t,checked:!!a[e],onChange:t=>n("elements",t,e)});return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Layouts:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.type,onChange:n=>{const o={...e,layout:{...i,type:n||"grid"}},a=AH(e);t(a?PH(a,o):{layout:o.layout})},children:QF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),"list"!==i.type&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]}),value:parseInt(LF(i,o,"columns"),10)||uH[o],onChange:e=>n("layout",e||uH[o],o,"columns"),min:1,max:12,step:1,allowReset:!0,resetFallbackValue:uH[o]}),c("image",(0,x.__)("Show Image","b-blocks")),c("category",(0,x.__)("Show Category","b-blocks")),c("rating",(0,x.__)("Show Rating","b-blocks")),a.rating&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show When Unreviewed","b-blocks"),help:(0,x.__)("Empty stars for products nobody has reviewed yet.","b-blocks"),checked:!1!==s.showEmpty,onChange:e=>n("rating",e,"showEmpty")}),a.rating&&(0,l.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"mt10",label:(0,x.__)("Rating Style","b-blocks"),labelPosition:"edge",value:s.style,options:ZF,onChange:e=>n("rating",e,"style")}),c("price",(0,x.__)("Show Price","b-blocks")),c("saleBadge",(0,x.__)("Show Sale Badge","b-blocks")),c("soldCount",(0,x.__)("Show Sold Count","b-blocks")),a.soldCount&&(0,l.jsxs)(l.Fragment,{children:[c("progressBar",(0,x.__)("Show Sold Count Progress Bar","b-blocks")),(0,l.jsx)(y.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Prefix","b-blocks"),value:r.prefix,onChange:e=>n("sold",e,"prefix")}),(0,l.jsx)(y.TextControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Suffix","b-blocks"),value:r.suffix,onChange:e=>n("sold",e,"suffix")}),a.progressBar&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt20 mb5",children:(0,x.__)("Without Stock Value (%):","b-blocks")}),(0,l.jsx)(y.__experimentalNumberControl,{__next40pxDefaultSize:!0,help:(0,x.__)("Bar fill used when a product does not manage stock.","b-blocks"),value:r.withoutStock,onChange:e=>n("sold",Math.min(100,Math.max(0,parseInt(e,10)||0)),"withoutStock"),min:0,max:100,step:1})]})]}),c("title",(0,x.__)("Show Title","b-blocks")),a.title&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt20 mb5",children:(0,x.__)("Title Tag:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.titleTag,onChange:e=>n("layout",e||"h4","titleTag"),children:XF.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(a.cart||a.viewButton)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{className:"mt20 mb5",children:(0,x.__)("Buttons:","b-blocks")}),a.image&&(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Position:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.actionPosition,onChange:e=>n("layout",e||"overlay","actionPosition"),children:pH.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),a.image&&!["below","split"].includes(i.actionPosition)&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Align:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.actionAlign,onChange:e=>n("layout",e||"center","actionAlign"),children:hH.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),a.cart&&a.viewButton&&"split"!==i.actionPosition&&(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("First:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.actionOrder,onChange:e=>n("layout",e||"cart","actionOrder"),children:gH.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),"split"!==i.actionPosition&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Full Width Buttons","b-blocks"),checked:!!i.actionFull,onChange:e=>n("layout",e,"actionFull")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Icon Only","b-blocks"),help:(0,x.__)("Hides the button text. The label is kept for screen readers.","b-blocks"),checked:!!i.actionIconOnly,onChange:e=>n("layout",e,"actionIconOnly")})]}),a.image&&(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Image Size","b-blocks"),value:i.imageSize,options:JF,onChange:e=>n("layout",e,"imageSize")})]})},OH=()=>{const{data:e}=$d("bBlocksUtils"),t=e?.nonce,n=(0,m.useRef)(null);(0,m.useEffect)((()=>()=>clearTimeout(n.current)),[]);const o=(0,m.useCallback)((e=>t&&window.wp?.ajax?window.wp.ajax.post("bb_wpg_search",{_wpnonce:t,...e}).then((e=>Array.isArray(e?.items)?e.items:[])).catch((()=>[])):Promise.resolve([])),[t]),i=(0,m.useCallback)((e=>new Promise((t=>{clearTimeout(n.current),n.current=setTimeout((()=>o(e).then(t)),300)}))),[o]);return{request:o,debouncedRequest:i,isReady:!!t}},RH=OH,zH=(e,t)=>t[e.label]&&t[e.label]!==e.id?`${e.label} (#${e.id})`:e.label,DH=({label:e,value:t=[],onChange:n,type:o,taxonomy:i="",placeholder:a=""})=>{const{request:s,debouncedRequest:r,isReady:c}=RH(),[d,u]=(0,m.useState)({}),[p,h]=(0,m.useState)([]),g=(0,m.useRef)(!1),b=(0,m.useMemo)((()=>Array.isArray(t)?t.map((e=>parseInt(e,10))).filter(Boolean):[]),[t]),f=e=>{e.length&&u((t=>{const n={...t};return e.forEach((e=>{n[e.id]=e.label})),n}))};(0,m.useEffect)((()=>{c&&!g.current&&b.length&&(g.current=!0,s({type:o,taxonomy:i,include:b}).then(f))}),[c,b,s,o,i])
555 +;const v=(0,m.useMemo)((()=>{const e={};return Object.entries(d).forEach((([t,n])=>{e[n]=e[n]??parseInt(t,10)})),e}),[d]),k=(0,m.useMemo)((()=>{const e={};return Object.entries(d).forEach((([t,n])=>{e[zH({id:parseInt(t,10),label:n},v)]=parseInt(t,10)})),e}),[d,v]),w=b.filter((e=>d[e])).map((e=>zH({id:e,label:d[e]},v))),_=p.filter((e=>d[e]&&!b.includes(e))).map((e=>zH({id:e,label:d[e]},v)));return(0,l.jsx)(y.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:e,value:w,suggestions:_,placeholder:a||(0,x.__)("Type to search…","b-blocks"),onInputChange:e=>{!e||e.length<2?h([]):r({type:o,taxonomy:i,search:e}).then((e=>{f(e),h(e.map((e=>e.id)))}))},onChange:e=>{const t=e.map((e=>"string"==typeof e?k[e]:e?.value)).filter((e=>Number.isInteger(e)));n([...new Set(t)])}})},FH=({attributes:e,updateObj:t})=>{const{query:n={}}=e,o="related"===n.type,i=(e,t,n,o)=>{const i=parseInt(e,10);return Number.isNaN(i)?o:Math.min(n,Math.max(t,i))},a=e=>n=>t("query",n,e);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Product Query","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Query Type","b-blocks"),value:n.type,options:eH,onChange:a("type")}),o&&(0,l.jsx)(y.Notice,{className:"mt10",status:"info",isDismissible:!1,children:(0,x.__)("Related Products only resolves on a single product page. Anywhere else the grid falls back to the newest products.","b-blocks")}),!o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Order By","b-blocks"),value:n.orderBy,options:tH,onChange:a("orderBy")}),(0,l.jsx)(y.SelectControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Order","b-blocks"),value:n.order,options:nH,onChange:a("order")})]}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,x.__)("Products Per Page","b-blocks"),value:n.perPage,onChange:e=>t("query",i(e,1,48,4),"perPage"),min:1,max:48,step:1}),!o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,x.__)("Offset","b-blocks"),value:n.offset,onChange:e=>t("query",i(e,0,1e3,0),"offset"),min:0,step:1}),(0,l.jsx)(DH,{label:(0,x.__)("Include Products","b-blocks"),placeholder:(0,x.__)("Search Products","b-blocks"),type:"product",value:n.include,onChange:a("include")}),(0,l.jsx)(DH,{label:(0,x.__)("Exclude Products","b-blocks"),placeholder:(0,x.__)("Search Products","b-blocks"),type:"product",value:n.exclude,onChange:a("exclude")}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Product Categories:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.categoryMode,onChange:e=>t("query",e||"include","categoryMode"),children:oH.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsx)(DH,{label:"exclude"===n.categoryMode?(0,x.__)("Exclude Categories","b-blocks"):(0,x.__)("Include Categories","b-blocks"),placeholder:(0,x.__)("Search Product Categories","b-blocks"),type:"term",taxonomy:"product_cat",value:n.categories,onChange:a("categories")}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Product Tags:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.tagMode,onChange:e=>t("query",e||"include","tagMode"),children:oH.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsx)(DH,{label:"exclude"===n.tagMode?(0,x.__)("Exclude Tags","b-blocks"):(0,x.__)("Include Tags","b-blocks"),placeholder:(0,x.__)("Search Product Tags","b-blocks"),type:"term",taxonomy:"product_tag",value:n.tags,onChange:a("tags")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("On Sale Only","b-blocks"),checked:!!n.onSaleOnly,onChange:a("onSaleOnly")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Featured Only","b-blocks"),checked:!!n.featuredOnly,onChange:a("featuredOnly")})]}),(0,l.jsx)(y.TextControl,{className:"mt20",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("No Products Message","b-blocks"),help:(0,x.__)("Shown when the query returns nothing.","b-blocks"),value:n.noProductsMessage,onChange:a("noProductsMessage")})]})},HH=({group:e,value:t={},updateObj:n,device:o="desktop"})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:!1!==t.showIcon,onChange:t=>n(e,t,"showIcon")}),!1!==t.showIcon&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{className:"mt10",label:(0,x.__)("Icon","b-blocks"),value:t.icon,onChange:t=>n(e,t,"icon")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Icon Color:","b-blocks"),value:t.iconColor,onChange:t=>n(e,t,"iconColor")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:YF,isUnitSelectTabbable:!0,value:LF(t,o,"iconSize"),onChange:t=>n(e,t||"",o,"iconSize")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon Position:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:t.iconPosition,onChange:t=>n(e,t||"left","iconPosition"),children:mH.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]})]})]}),WH=({attributes:e,updateObj:t,device:n="desktop"})=>{const{elements:o={},cart:i={}}=e,a=[["simple",(0,x.__)("Simple Product","b-blocks")],["variable",(0,x.__)("Variable Product","b-blocks")],["grouped",(0,x.__)("Grouped Product","b-blocks")],["external",(0,x.__)("External Product","b-blocks")],["default",(0,x.__)("Default Product","b-blocks")]];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Cart Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Cart Button","b-blocks"),checked:!!o.cart,onChange:e=>t("elements",e,"cart")}),o.cart&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Use Custom Text","b-blocks"),checked:!!i.useCustomText,onChange:e=>t("cart",e,"useCustomText"),help:i.useCustomText?(0,x.__)("Overrides the WooCommerce label per product type.","b-blocks"):(0,x.__)("Uses the label WooCommerce supplies for each product.","b-blocks")}),i.useCustomText&&a.map((([e,n])=>(0,l.jsx)(y.TextControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:n,value:i[e],onChange:n=>t("cart",n,e)},e))),(0,l.jsx)(HH,{group:"cart",value:i,updateObj:t,device:n})]})]})},UH=({attributes:e,updateObj:t,device:n="desktop"})=>{const{elements:o={},viewButton:i={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("View Button","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show View Button","b-blocks"),checked:!!o.viewButton,onChange:e=>t("elements",e,"viewButton")}),o.viewButton&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.TextControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Button Text","b-blocks"),value:i.text,onChange:e=>t("viewButton",e,"text")}),(0,l.jsx)(HH,{group:"viewButton",value:i,updateObj:t,device:n})]})]})},GH=({attributes:e,updateObj:t})=>{const{badge:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sale Badge","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Alignment:","b-blocks")}),(0,
556 +l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.align,onChange:e=>t("badge",e||"top","align"),children:iH.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsx)(y.SelectControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Show","b-blocks"),labelPosition:"edge",value:n.content||"text",options:aH,onChange:e=>t("badge",e,"content")}),(0,l.jsx)(y.TextControl,{className:"mt10",help:"text"===(n.content||"text")?"":(0,x.__)("Used for products with no saving to show, such as grouped products.","b-blocks"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Sale Text","b-blocks"),value:n.text,onChange:e=>t("badge",e,"text")})]})},VH=({attributes:e,updateObj:t})=>{const{pager:n={}}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Load More Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Enable Load More Option?","b-blocks"),checked:!!n.enable,onChange:e=>t("pager",e,"enable")}),n.enable&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RadioControl,{className:"mt10",label:(0,x.__)("More Posts Type","b-blocks"),selected:n.type,options:sH,onChange:e=>t("pager",e,"type")}),"button"===n.type&&(0,l.jsx)(y.TextControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Button Text","b-blocks"),value:n.text,onChange:e=>t("pager",e,"text")}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Alignment:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.align,onChange:e=>t("pager",e||"center","align"),children:rH.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:e.icon},e.value)))})]})]})]})},qH=({attributes:e,setAttributes:t})=>{const{contentOrder:n=[]}=e,o={price:(0,x.__)("Price","b-blocks"),rating:(0,x.__)("Rating","b-blocks"),title:(0,x.__)("Title","b-blocks"),category:(0,x.__)("Category","b-blocks"),soldCount:(0,x.__)("Sold Count","b-blocks")},i=Object.keys(RF),a=[...n.filter((e=>i.includes(e))),...i.filter((e=>!n.includes(e)))].map((e=>({id:e,label:o[e]})));return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sorting Content","b-blocks"),initialOpen:!1,children:(0,l.jsx)(Ma,{label:(0,x.__)("Drag to reorder the card content:","b-blocks"),value:a,property:"label",onChange:e=>t({contentOrder:e.map((e=>e.id)).filter(Boolean)})})})},YH=({attributes:e,updateObj:t})=>{const{filter:n={}}=e,{taxonomies:o,isLoading:i}=(()=>{const{request:e,isReady:t}=OH(),[n,o]=(0,m.useState)([]),[i,a]=(0,m.useState)(!0);return(0,m.useEffect)((()=>{if(!t)return;let n=!1;return e({type:"taxonomies"}).then((e=>{n||(o(e.map((e=>({label:e.label,value:String(e.id)})))),a(!1))})),()=>{n=!0}}),[t,e]),{taxonomies:n,isLoading:i}})();return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Filter By Taxonomy","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Filter By Taxonomy?","b-blocks"),checked:!!n.enable,onChange:e=>t("filter",e,"enable")}),n.enable&&(i?(0,l.jsx)(y.Spinner,{}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Select Taxonomy Type","b-blocks"),value:n.taxonomy,options:o.length?o:[{label:(0,x.__)("No product taxonomies found","b-blocks"),value:""}],onChange:e=>t("filter",e,"taxonomy")}),(0,l.jsx)(y.TextControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)('"All" Button Text',"b-blocks"),value:n.allText,onChange:e=>t("filter",e,"allText")}),(0,l.jsxs)(y.Flex,{className:"mt20",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Alignment:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:n.align||"left",onChange:e=>t("filter",e||"left","align"),children:rH.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:e.label,value:e.value,icon:e.icon},e.value)))})]})]}))]})},KH=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsx)(BH,{...e}),(0,l.jsx)(IH,{...e}),(0,l.jsx)(FH,{...e}),(0,l.jsx)(WH,{...e}),(0,l.jsx)(UH,{...e}),(0,l.jsx)(GH,{...e}),(0,l.jsx)(VH,{...e}),(0,l.jsx)(qH,{...e}),(0,l.jsx)(YH,{...e})]}),QH=({attributes:e,updateObj:t,device:n="desktop"})=>{const{layout:o={},card:i={}}=e,[a,s]=(0,Qa.useState)("normal");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Grid","b-blocks"),initialOpen:!0,children:["list"!==o.type&&(0,l.jsx)(y.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Column Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:YF,isUnitSelectTabbable:!0,value:LF(o,n,"columnGap"),onChange:e=>t("layout",e||"",n,"columnGap")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"list"!==o.type?"mt10":"",__next40pxDefaultSize:!0,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Row Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:YF,isUnitSelectTabbable:!0,value:LF(o,n,"rowGap"),onChange:e=>t("layout",e||"",n,"rowGap")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(v,{className:"flex2",children:[(0,x.__)("Content Alignment:","b-blocks")," ",(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1 mb20",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:LF(o,n,"contentAlign"),onChange:e=>t("layout",e||"",n,"contentAlign"),children:lH.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(An,{label:(0,x.__)("Content Background:","b-blocks"),value:i.bodyBg,isImage:!1,onChange:e=>t("card",e,"bodyBg")}),(0,l.jsx)(k,{className:"mt10 mb20",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Content Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(i,n,"bodyMargin"),onChange:e=>t("card",e,n,"bodyMargin")}),"split"===o.actionPosition&&(0,l.jsx)(Ue,{className:"mb20",label:(0,x.__)("Footer Divider:","b-blocks"),value:i.divider,defaultColor:"#f1f5f9",onChange:e=>t("card",e,"divider")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e||"normal"),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Normal","b-blocks"),value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,x.__)("Hover","b-blocks"),value:"hover"})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:i[a]?.bg,onChange:e=>t("card",e,a,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,x.__)("Border","b-blocks"),value:i[a]?.border,onChange:e=>t("card",e,a,"border")}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Box Shadow","b-blocks"),value:i[a]?.shadow,onChange:e=>t("card",e,a,"shadow")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(i[a],n,"padding"),onChange:e=>t("card",e,a,n,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(i[a],n,"radius"),onChange:e=>t("card",e,a,n,"radius")}),"hover"===a&&(0,l.jsx)(y.RangeControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Transition (s)","b-blocks"),help:(0,x.__)("How long the change from normal to hover takes.","b-blocks"),value:i.transition,onChange:e=>t("card",e??0,"transition"),min:0,max:2,step:.05,allowReset:!0,
557 +resetFallbackValue:.25})]})]})},ZH=({attributes:e,updateObj:t,device:n="desktop"})=>{const{media:o={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Aspect Ratio","b-blocks"),labelPosition:"edge",value:o.ratio,options:cH,onChange:e=>t("media",e,"ratio")}),(0,l.jsx)(y.SelectControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Object Fit","b-blocks"),labelPosition:"edge",value:o.fit,options:dH,onChange:e=>t("media",e,"fit")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(o,n,"radius"),onChange:e=>t("media",e,n,"radius")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(o,n,"margin"),onChange:e=>t("media",e,n,"margin")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o.bg,isImage:!1,onChange:e=>t("media",e,"bg")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Hover Overlay","b-blocks"),initialOpen:!1,children:(0,l.jsx)(An,{label:(0,x.__)("Overlay Background:","b-blocks"),value:o.overlay,isImage:!1,onChange:e=>t("media",e,"overlay")})})]})},XH=({attributes:e,updateObj:t,device:n="desktop"})=>{const{title:o={},price:i={},rating:a={},category:s={},sold:r={}}=e,c=r.progress||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography:","b-blocks"),value:o.typo,onChange:e=>t("title",e,"typo")}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color:","b-blocks"),value:o.normal?.color,defaultColor:"#070127",onChange:e=>t("title",e,"normal","color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:o.hover?.color,defaultColor:"#146EF5",onChange:e=>t("title",e,"hover","color")}),(0,l.jsx)(y.RangeControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Transition (s)","b-blocks"),help:(0,x.__)("How long the change to the hover colour takes.","b-blocks"),value:o.transition,onChange:e=>t("title",e??0,"transition"),min:0,max:2,step:.05,allowReset:!0,resetFallbackValue:.2})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Price","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography:","b-blocks"),value:i.typo,onChange:e=>t("price",e,"typo")}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Price Color:","b-blocks"),value:i.color,defaultColor:"#e44d3a",onChange:e=>t("price",e,"color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Strikethrough Regular Price:","b-blocks"),value:i.regularColor,defaultColor:"#999999",onChange:e=>t("price",e,"regularColor")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Rating","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Star Color:","b-blocks"),value:a.color,defaultColor:"#f5a623",onChange:e=>t("rating",e,"color")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Empty Star Color:","b-blocks"),value:a.emptyColor,defaultColor:"#d1d5db",onChange:e=>t("rating",e,"emptyColor")}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Review Count Color:","b-blocks"),value:a.countColor,defaultColor:"#64748b",onChange:e=>t("rating",e,"countColor")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Star Size (px)","b-blocks"),value:a.size,onChange:e=>t("rating",e??14,"size"),min:8,max:40,allowReset:!0,resetFallbackValue:14})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Category","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography:","b-blocks"),value:s.typo,onChange:e=>t("category",e,"typo")}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color:","b-blocks"),value:s.normal?.color,defaultColor:"#6b7280",onChange:e=>t("category",e,"normal","color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Hover Color:","b-blocks"),value:s.hover?.color,defaultColor:"#146EF5",onChange:e=>t("category",e,"hover","color")}),(0,l.jsx)(y.RangeControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Transition (s)","b-blocks"),help:(0,x.__)("How long the change to the hover colour takes.","b-blocks"),value:s.transition,onChange:e=>t("category",e??0,"transition"),min:0,max:2,step:.05,allowReset:!0,resetFallbackValue:.2})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sold Count","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography:","b-blocks"),value:r.typo,onChange:e=>t("sold",e,"typo")}),(0,l.jsx)(Ue,{className:"mt20",label:(0,x.__)("Color:","b-blocks"),value:r.color,defaultColor:"#6b7280",onChange:e=>t("sold",e,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:r.bg,isImage:!1,onChange:e=>t("sold",e,"bg")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Progress Bar","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Track Color:","b-blocks"),value:c.trackColor,defaultColor:"#e2e8f0",onChange:e=>t("sold",e,"progress","trackColor")}),(0,l.jsx)(Ue,{label:(0,x.__)("Fill Color:","b-blocks"),value:c.fillColor,defaultColor:"#146EF5",onChange:e=>t("sold",e,"progress","fillColor")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Height (px)","b-blocks"),value:c.height,onChange:e=>t("sold",e??6,"progress","height"),min:2,max:24,allowReset:!0,resetFallbackValue:6}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(c,n,"radius"),onChange:e=>t("sold",e,"progress",n,"radius")})]})]})},JH=({group:e,value:t={},title:n,updateObj:o,device:i="desktop",defaultColors:a={},states:s,withMargin:r=!1})=>{const c=s||[["normal",(0,x.__)("Normal","b-blocks")],["hover",(0,x.__)("Hover","b-blocks")]],[d,u]=(0,Qa.useState)("normal"),p=t[d]||{};return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:n,initialOpen:!1,children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:t.typo,onChange:t=>o(e,t,"typo")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:d,onChange:e=>u(e||"normal"),children:c.map((([e,t])=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:t,value:e},e)))}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:p.color,defaultColor:a[d],onChange:t=>o(e,t,d,"color")}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:p.bg,isImage:!1,onChange:t=>o(e,t,d,"bg")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(p,i,"padding"),onChange:t=>o(e,t,d,i,"padding")}),r&&(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(p,i,"margin"),onChange:t=>o(e,t,d,i,"margin")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,x.__)("Border","b-blocks"),value:p.border,onChange:t=>o(e,t,d,"border")}),"hover"===d&&(0,l.jsx)(y.RangeControl,{className:"mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,x.__)("Transition (s)","b-blocks"),help:(0,x.__)("How long the change from normal to hover takes.","b-blocks"),value:t.transition,onChange:t=>o(e,t??0,"transition"),min:0,max:2,step:.05,allowReset:!0,resetFallbackValue:.2}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(p,i,"radius"),onChange:t=>o(e,t,d,i,"radius")})]})},eW=({attributes:e,updateObj:t,device:n="desktop"})=>{const{cart:o={},viewButton:i={},badge:a={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(JH,{group:"cart",withMargin:!0,value:o,title:(0,
558 +x.__)("Cart Button","b-blocks"),updateObj:t,device:n,defaultColors:{normal:"#ffffff",hover:"#ffffff"}}),(0,l.jsx)(JH,{group:"viewButton",withMargin:!0,value:i,title:(0,x.__)("View Button","b-blocks"),updateObj:t,device:n,defaultColors:{normal:"#070127",hover:"#ffffff"}}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Sale Badge","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:a.bg,isImage:!1,onChange:e=>t("badge",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color:","b-blocks"),value:a.color,defaultColor:"#ffffff",onChange:e=>t("badge",e,"color")}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typo,onChange:e=>t("badge",e,"typo")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(a,n,"padding"),onChange:e=>t("badge",e,n,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),values:LF(a,n,"radius"),onChange:e=>t("badge",e,n,"radius")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",__next40pxDefaultSize:!0,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Offset","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:YF,isUnitSelectTabbable:!0,help:(0,x.__)("Distance from the top and side of the image.","b-blocks"),value:LF(a,n,"offset"),onChange:e=>t("badge",e||"",n,"offset")})]})]})},tW=({attributes:e,updateObj:t,device:n="desktop"})=>{const{filter:o={},pager:i={}}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(JH,{group:"filter",value:o,title:(0,x.__)("Filter Buttons","b-blocks"),updateObj:t,device:n,defaultColors:{normal:"#070127",hover:"#ffffff"},states:[["normal",(0,x.__)("Normal","b-blocks")],["hover",(0,x.__)("Active","b-blocks")]]}),(0,l.jsx)(JH,{group:"pager",value:i,title:(0,x.__)("Load More / Pagination","b-blocks"),updateObj:t,device:n,defaultColors:{normal:"#ffffff",hover:"#ffffff",active:"#ffffff"},states:[["normal",(0,x.__)("Normal","b-blocks")],["hover",(0,x.__)("Hover","b-blocks")],["active",(0,x.__)("Active","b-blocks")]]})]})},nW=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(QH,{...e}),(0,l.jsx)(ZH,{...e}),(0,l.jsx)(XH,{...e}),(0,l.jsx)(eW,{...e}),(0,l.jsx)(tW,{...e})]}),oW=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:KF,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(KH,{...e}),"style"===t.name&&(0,l.jsx)(nW,{...e}),"advanced"===t.name&&(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})]})})})},iW={left:"flex-start",center:"center",right:"flex-end"},aW=e=>e&&"object"==typeof e&&!Array.isArray(e)?e:{},sW=e=>Array.isArray(e)?e:[],rW=e=>{let t=String(e).replace(/</g,"");for(let e=0;e<3;e++){const e=t.replace(/[^{}]*\{\s*\}/g,"");if(e===t)break;t=e}return t},lW=({attributes:e,id:o,advancedCSS:i=""})=>{const a=aW(e),s=aW(a.layout),r=aW(a.card),c=aW(a.media),d=aW(a.title),u=aW(a.price),p=aW(a.rating),h=aW(a.category),g=aW(a.sold),m=aW(a.cart),b=aW(a.viewButton),f=aW(a.badge),x=aW(a.filter),y=aW(a.pager),v=PF(s,"columnGap"),k=PF(s,"rowGap"),w=PF(s,"columns"),_=PF(s,"contentAlign"),C=aW(g.progress),j=aW(r.normal),$=aW(r.hover),S=PF(j,"padding"),T=PF(j,"radius"),N=PF($,"padding"),M=PF($,"radius"),L=PF(r,"bodyMargin"),P=PF(c,"radius"),E=PF(c,"margin"),A=PF(f,"radius"),B=PF(f,"padding"),I=PF(C,"radius"),O=e=>`#${o} .${OF}${e?`-${e}`:""}`,R=O("grid"),z=O("card"),D=O("card-body"),F=`${z}:hover, ${z}:focus-within`,H=`.${OF}-card-body`,W=`${z}:hover ${H}, ${z}:focus-within ${H}`,U=O("media"),G=O("title"),V=O("price"),q=O("star"),Y=O("category"),K=O("sold-text"),Q=O("progress"),Z=O("atc-btn"),X=O("filter-btn"),J=`${O("load-more")}, ${O("page-btn")}`,ee=`${O("view-btn")}, #${o} .${OF} .added_to_cart`,te=`${Z} .${OF}-icon`,ne=`${O("view-btn")} .${OF}-icon`,oe=`${O("rating-count")}, ${O("rating-value")}`,ie=e=>iW[e]?`${ns("align-items",iW[e])} ${ns("text-align",e)}`:"",ae=p.emptyColor||"#d1d5db",se=PF(f,"offset"),re=e=>{const t=se[e];return`${ns("top",t)} ${"top"===f.align?"":ns("left"===f.align?"left":"right",t)}`},le=Number.isFinite(p.size)?`${p.size}px`:"",ce=Number.isFinite(C.height)?`${C.height}px`:"",de=y.normal?.bg?.color||"#146EF5",ue=e=>ns("padding",hs(e)),pe=e=>ns("margin",hs(e)),he=(e,t)=>Number.isFinite(t)&&t>0?`@media (prefers-reduced-motion: no-preference){ ${e}{ transition: all ${t}s ease; } }`:"",ge=e=>ns("border-radius",hs(e)),me=e=>!(!aW(e).width&&!aW(e).color),be=e=>{const t=aW(e);return me(t)||["top","right","bottom","left"].some((e=>me(t[e])))?as(t):""},fe="list"===s.type,xe=(e,t)=>fe?"":ns("grid-template-columns",`repeat(${e??t}, minmax(0, 1fr))`),ye=(e,t)=>pe(fe&&"mobile"!==t&&e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,["top","bottom"].includes(e)&&/^\s*-/.test(String(t??""))?"0px":t]))):e),ve=(e,t)=>e.split(", ").flatMap((e=>t.map((t=>`${e}${t}`)))).join(", "),ke=(e,t)=>t.trim()?`${e}{ ${t} }`:"",we=(e,t)=>t.trim()?`${e}{ ${t} }`:"",_e=(e,t)=>`\n\t\t${ue(LF(e,t,"padding"))}\n\t\t${pe(LF(e,t,"margin"))}\n\t\t${ge(LF(e,t,"radius"))}\n\t`,Ce=(e,o)=>{const i=!!o.active,a=[[aW(o.normal),e],[aW(o.hover),ve(e,i?[":hover",":focus-visible"]:[":hover",":focus-visible",".is-active"])],...i?[[aW(o.active),ve(e,[".is-active"])]]:[]],s=e=>a.map((([t,n])=>ke(n,_e(t,e)))).join("\n");return`\n\t\t\t${a.map((([e,t])=>ke(t,`\n\t\t\t\t${ns("color",e.color)}\n\t\t\t\t${os(e.bg)}\n\t\t\t\t${be(e.border)}\n\t\t\t\t${_e(e,"desktop")}\n\t\t\t`))).join("\n")}\n\t\t\t${ps(e,o.typo)?.styles}\n\t\t\t${he(e,o.transition)}\n\t\t\t${we(t,s("tablet"))}\n\t\t\t${we(n,s("mobile"))}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
559 +__html:rW(`\n\t\t${ps("",d.typo)?.googleFontLink}\n\t\t${ps("",u.typo)?.googleFontLink}\n\t\t${ps("",h.typo)?.googleFontLink}\n\t\t${ps("",g.typo)?.googleFontLink}\n\t\t${ps("",m.typo)?.googleFontLink}\n\t\t${ps("",b.typo)?.googleFontLink}\n\t\t${ps("",x.typo)?.googleFontLink}\n\t\t${ps("",y.typo)?.googleFontLink}\n\t\t${ps("",f.typo)?.googleFontLink}\n\n\t\t${R}{\n\t\t\t${xe(w.desktop,4)}\n\t\t\t${ns("column-gap",v.desktop)}\n\t\t\t${ns("row-gap",k.desktop)}\n\t\t}\n\t\t${t}{\n\t\t\t${R}{ ${xe(w.tablet,2)} ${ns("column-gap",v.tablet)} ${ns("row-gap",k.tablet)} }\n\t\t}\n\t\t${n}{\n\t\t\t${R}{ ${xe(w.mobile,1)} ${ns("column-gap",v.mobile)} ${ns("row-gap",k.mobile)} }\n\t\t}\n\n\t\t${ke(z,`\n\t\t\t${os(j.bg)}\n\t\t\t${be(j.border)}\n\t\t\t${ge(T.desktop)}\n\t\t\t${ns("box-shadow",ls(sW(j.shadow))||"none")}\n\t\t`)}\n\t\t${he(z,r.transition)}\n\t\t${ke(F,`\n\t\t\t${os($.bg)}\n\t\t\t${be($.border)}\n\t\t\t${ge(M.desktop)}\n\t\t\t${ns("box-shadow",ls(sW($.shadow)))}\n\t\t`)}\n\t\t${ke(D,`${os(r.bodyBg)} ${ue(S.desktop)} ${ye(L.desktop,"desktop")} ${ie(_.desktop)}`)}\n\t\t${ke(W,ue(N.desktop))}\n\t\t${we(t,`\n\t\t\t${ke(z,ge(T.tablet))}\n\t\t\t${ke(F,ge(M.tablet))}\n\t\t\t${ke(D,`${ue(S.tablet)} ${ye(L.tablet,"tablet")} ${ie(_.tablet)}`)}\n\t\t\t${ke(W,ue(N.tablet))}\n\t\t`)}\n\t\t${we(n,`\n\t\t\t${ke(z,ge(T.mobile))}\n\t\t\t${ke(F,ge(M.mobile))}\n\t\t\t${ke(D,`${ue(S.mobile)} ${ye(L.mobile,"mobile")} ${ie(_.mobile)}`)}\n\t\t\t${ke(W,ue(N.mobile))}\n\t\t`)}\n\n\t\t${U}{\n\t\t\t${os(c.bg)}\n\t\t\t${ge(P.desktop)}\n\t\t\t${pe(E.desktop)}\n\t\t}\n\t\t${O("image-link")}{ ${ns("aspect-ratio",c.ratio)} }\n\t\t${O("image")}{ ${ns("object-fit",c.fit)} }\n\t\t${U} .${OF}-actions:not(.${OF}-actions--split){ ${os(c.overlay)} }\n\t\t${ke(O("card-footer"),ns("border-top-color",r.divider))}\n\n\t\t${O("sale-badge")}{\n\t\t\t${ns("color",f.color)}\n\t\t\t${os(f.bg)}\n\t\t\t${ge(A.desktop)}\n\t\t\t${ue(B.desktop)}\n\t\t\t${re("desktop")}\n\t\t}\n\t\t${ps(O("sale-badge"),f.typo)?.styles}\n\n\t\t${we(t,`\n\t\t\t${ke(U,`${ge(P.tablet)} ${pe(E.tablet)}`)}\n\t\t\t${ke(O("sale-badge"),`${ge(A.tablet)} ${ue(B.tablet)} ${re("tablet")}`)}\n\t\t\t${ke(Q,ge(I.tablet))}\n\t\t`)}\n\t\t${we(n,`\n\t\t\t${ke(U,`${ge(P.mobile)} ${pe(E.mobile)}`)}\n\t\t\t${ke(O("sale-badge"),`${ge(A.mobile)} ${ue(B.mobile)} ${re("mobile")}`)}\n\t\t\t${ke(Q,ge(I.mobile))}\n\t\t`)}\n\n\t\t${ke(te,`${ns("color",m.iconColor)} ${ns("font-size",LF(m,"desktop","iconSize"))}`)}\n\t\t${ke(ne,`${ns("color",b.iconColor)} ${ns("font-size",LF(b,"desktop","iconSize"))}`)}\n\t\t${we(t,`\n\t\t\t${ke(te,ns("font-size",LF(m,"tablet","iconSize")))}\n\t\t\t${ke(ne,ns("font-size",LF(b,"tablet","iconSize")))}\n\t\t`)}\n\t\t${we(n,`\n\t\t\t${ke(te,ns("font-size",LF(m,"mobile","iconSize")))}\n\t\t\t${ke(ne,ns("font-size",LF(b,"mobile","iconSize")))}\n\t\t`)}\n\n\t\t${Ce(Z,m)}\n\t\t${Ce(ee,b)}\n\t\t${Ce(X,x)}\n\t\t${Ce(J,y)}\n\n\t\t${O("pager-wrap")}{ ${ns("justify-content",iW[y.align]||"center")} }\n\t\t${O("filter")}{ ${ns("justify-content",iW[x.align]||"flex-start")} }\n\n\t\t${G}{ ${ns("color",d.normal?.color)} }\n\t\t${he(`${G}, ${O("title-link")}`,d.transition)}\n\t\t${O("title-link")}:hover, ${O("title-link")}:focus-visible{ ${ns("color",d.hover?.color)} }\n\n\t\t${V}{ ${ns("color",u.color)} }\n\t\t${V} ins{ ${ns("color",u.color)} }\n\t\t${V} del{ ${ns("color",u.regularColor)} }\n\n\t\t${q}{ ${ns("font-size",le)} ${ns("color",ae)} }\n\t\t${q}.is-full{ ${ns("color",p.color)} }\n\t\t${q}.is-half{\n\t\t\t${ns("background",`linear-gradient(90deg, ${p.color||ae} 50%, ${ae} 50%)`)}\n\t\t\t${ns("-webkit-background-clip","text")}\n\t\t\t${ns("background-clip","text")}\n\t\t}\n\n\t\t${oe}{ ${ns("font-size",le)} ${ns("color",p.countColor)} }\n\n\t\t${Y}{ ${ns("color",h.normal?.color)} }\n\t\t${he(`${Y}, ${Y} a`,h.transition)}\n\t\t${Y} a:hover, ${Y} a:focus-visible{ ${ns("color",h.hover?.color)} }\n\n\t\t${K}{ ${ns("color",g.color)} ${os(g.bg)} }\n\n\t\t${Q}{\n\t\t\t${ns("height",ce)}\n\t\t\t${ns("background",C.trackColor)}\n\t\t\t${ge(I.desktop)}\n\t\t}\n\t\t${O("progress-fill")}{ ${ns("background",C.fillColor)} }\n\n\t\t${O("btn")}:focus-visible,\n\t\t${X}:focus-visible,\n\t\t${O("load-more")}:focus-visible,\n\t\t${O("page-btn")}:focus-visible,\n\t\t${O("title-link")}:focus-visible{\n\t\t\t${ns("outline",`2px solid ${de}`)}\n\t\t\t${ns("outline-offset","2px")}\n\t\t}\n\n\t\t${ps(G,d.typo)?.styles}\n\t\t${ps(V,u.typo)?.styles}\n\t\t${ps(Y,h.typo)?.styles}\n\t\t${ps(K,g.typo)?.styles}\n\n\t\t${i}\n\t`)}})},cW=({terms:e=[],activeTerm:t=0,attributes:n,isLoading:o=!1,labels:i={},onChange:a})=>{const{enable:s,allText:r}=n.filter||{};if(!s||!e.length)return null;const c=(e,n)=>{const i=e===t;return(0,l.jsx)("button",{type:"button",className:"b-blocks-woo-product-grid-filter-btn"+(i?" is-active":""),"aria-pressed":i,disabled:o,onClick:()=>!i&&a(e),children:n},e)};return(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-filter",role:"group","aria-label":i.filter,children:[c(0,NF(r)),e.map((e=>c(e.id,e.name)))]})},dW=({product:e})=>e.priceHtml?(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-price",dangerouslySetInnerHTML:{__html:e.priceHtml}}):null,uW=(e,t)=>e>=t?"b-blocks-woo-product-grid-star is-full":e>=t-.5?"b-blocks-woo-product-grid-star is-half":"b-blocks-woo-product-grid-star",pW=({product:e,attributes:t,isBackend:n=!1,only:o=""})=>{const{cart:i,viewButton:a}=t.elements||{},s=i&&"view"!==o,r=a&&"cart"!==o,{text:c}=t.viewButton||{};if(!s&&!r)return null;const{id:d,link:u,cartText:p,cartAjax:h,cartUrl:g,cartClass:m,sku:b,cartAria:f,viewAria:x}=e,y=!n&&h?` button ${m||""} add_to_cart_button ajax_add_to_cart`:"",{actionAlign:v="center",actionFull:k,actionIconOnly:w,actionOrder:_,actionPosition:C}=t.layout||{},j="split"===C,$=t.cart||{},S=t.viewButton||{},T=(e,t)=>!1!==e.showIcon||w?e.icon?(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:e.icon}}):t:null,N=e=>"right"===e.iconPosition?" is-icon-right":"",M=["b-blocks-woo-product-grid-actions",j?"b-blocks-woo-product-grid-actions--split":`b-blocks-woo-product-grid-actions--${v}`,k&&!j?"is-full":"",w?"is-icon-only":""].filter(Boolean).join(" "),L=s&&(0,l.jsxs)("a",{className:`b-blocks-woo-product-grid-btn b-blocks-woo-product-grid-atc-btn${N($)}${y}`,href:g||u,rel:"nofollow","aria-label":f,"data-product_id":h?d:void 0,"data-product_sku":h?b||"":void 0,"data-quantity":h?1:void 0,onClick:n?e=>e.preventDefault():void 0,children:[T($,HF),(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-btn-label",children:p})]},"cart"),P=r&&(0,l.jsxs)("a",{className:`b-blocks-woo-product-grid-btn b-blocks-woo-product-grid-view-btn${N(S)}`,href:u,"aria-label":x,onClick:n?e=>e.preventDefault():void 0,children:[T(S,WF),(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-btn-label",children:NF(c)})]},"view");return(0,l.jsx)("div",{className:M,children:"view"===_?[P,L]:[L,P]})},hW={price:{Component:dW,toggle:"price"},rating:{Component:({product:e,attributes:t})=>{const{style:n,showEmpty:o=!0}=t.rating||{},{rating:i=0,ratingCount:a=0}=e;if(!a&&!o)return null;const s=Math.round(2*i)/2;return(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-rating",role:"img","aria-label":e.ratingLabel,children:["number"!==n&&[1,2,3,4,5].map((e=>(0,l.jsx)("span",{className:uW(s,e),"aria-hidden":"true",children:"★"},e))),"star-count"===n&&(0,l.jsxs)("span",{className:"b-blocks-woo-product-grid-rating-count","aria-hidden":"true",children:["(",a,")"]}),"number"===n&&(0,l.jsxs)("span",{className:"b-blocks-woo-product-grid-rating-value","aria-hidden":"true",children:[a>0&&(0,l.jsxs)(l.Fragment,{children:[i.toFixed(1)," "]}),(0,l.jsxs)("span",{className:"b-blocks-woo-product-grid-rating-count",children:["(",a,")"]})]})]})},toggle:"rating"},title:{Component:({product:e,attributes:t})=>{const{titleTag:n}=t.layout||{};if(!e.title)return null;const o=FF.includes(n)?n:"h4";return(0,l.jsx)(o,{className:"b-blocks-woo-product-grid-title",children:(0,
560 +l.jsx)("a",{className:"b-blocks-woo-product-grid-title-link",href:e.link,children:e.title})})},toggle:"title"},category:{Component:({product:e})=>e.categoriesHtml?(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-category",dangerouslySetInnerHTML:{__html:e.categoriesHtml}}):null,toggle:"category"},soldCount:{Component:({product:e,attributes:t})=>{const n=t.elements?.progressBar,{soldLabel:o="",soldPercent:i=0,soldBarLabel:a=""}=e;return(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-sold",children:[n&&(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-progress",role:"img","aria-label":a,children:(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-progress-fill",style:{width:`${i}%`}})}),(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-sold-text",children:o})]})},toggle:"soldCount"}},gW=({product:e,attributes:t,isBackend:n=!1,index:o=0})=>{const i=Array.isArray(t.contentOrder)?t.contentOrder:[],a=t.elements||{},s=t.badge||{},{image:r,saleBadge:c}=a,{text:d}=s,u=(0,l.jsx)(pW,{product:e,attributes:t,isBackend:n}),{actionPosition:p}=t.layout||{},h="split"===p,g=r&&"below"!==p&&!h,m=h&&r,b=a.cart||!m&&a.viewButton,f=h&&(a.price||b)&&(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-card-footer",children:[a.price&&(0,l.jsx)(dW,{product:e,attributes:t}),(0,l.jsx)(pW,{product:e,attributes:t,isBackend:n,only:m?"cart":""})]}),{content:x}=s,y="amount"===x&&e.saveLabel||"percent"===x&&e.percentLabel||NF(d),{image:v={}}=e,k=o<(parseInt(LF(t.layout,"desktop","columns"),10)||4);return(0,l.jsxs)("article",{className:"b-blocks-woo-product-grid-card",role:"listitem","aria-label":e.title,children:[r&&(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-media",children:[c&&e.onSale&&(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-sale-badge",children:y}),(0,l.jsx)("a",{className:"b-blocks-woo-product-grid-image-link",href:e.link,tabIndex:-1,"aria-hidden":"true",children:v.url&&(0,l.jsx)("img",{className:"b-blocks-woo-product-grid-image",src:v.url,srcSet:v.srcset||void 0,sizes:v.sizes||void 0,width:v.width||void 0,height:v.height||void 0,alt:v.alt||"",loading:k?"eager":"lazy",fetchpriority:0===o?"high":void 0,decoding:"async"})}),g&&u,m&&(0,l.jsx)(pW,{product:e,attributes:t,isBackend:n,only:"view"})]}),(0,l.jsxs)("div",{className:"b-blocks-woo-product-grid-card-body"+(f?" has-footer":""),children:[!g&&!h&&u,i.map((n=>{const o=hW[n];if(!o||!a[o.toggle])return null;if(h&&"price"===n)return null;const{Component:i}=o;return(0,l.jsx)(i,{product:e,attributes:t},n)})),f]})]})},mW=({products:e=[],attributes:t,isLoading:n,isBackend:o,labels:i={}})=>{const{noProductsMessage:a}=t.query||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-grid"+(n?" is-loading":""),role:"list","aria-label":i.products,"aria-busy":n,children:e.map(((e,n)=>(0,l.jsx)(gW,{product:e,attributes:t,isBackend:o,index:n},e.id)))}),!e.length&&!n&&(0,l.jsx)("p",{className:"b-blocks-woo-product-grid-empty",children:NF(a)})]})},bW=(e,t)=>{if(t<=7)return Array.from({length:t},((e,t)=>t+1));const n=[1];e>3&&n.push("...");for(let o=Math.max(2,e-1);o<=Math.min(t-1,e+1);o++)n.push(o);return e<t-2&&n.push("..."),n.push(t),n},fW=({attributes:e,page:t=1,maxPages:n=1,isLoading:o=!1,labels:i={},onPage:a})=>{const{enable:s,type:r,text:c}=e.pager||{};return!s||n<=1?null:"pagination"===r?(0,l.jsx)("nav",{className:"b-blocks-woo-product-grid-pager b-blocks-woo-product-grid-pager--pagination","aria-label":i.pagination,children:bW(t,n).map(((e,n)=>"..."===e?(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-page-gap","aria-hidden":"true",children:"…"},`gap-${n}`):(0,l.jsx)("button",{type:"button",className:"b-blocks-woo-product-grid-page-btn"+(e===t?" is-active":""),"aria-current":e===t?"page":void 0,disabled:o,"aria-label":MF(i.goToPage,e),onClick:()=>e!==t&&a(e),children:e},e)))}):"prev-next"===r?(0,l.jsxs)("nav",{className:"b-blocks-woo-product-grid-pager b-blocks-woo-product-grid-pager--prev-next","aria-label":i.pagination,children:[(0,l.jsx)("button",{type:"button",className:"b-blocks-woo-product-grid-page-btn b-blocks-woo-product-grid-page-prev",disabled:o||t<=1,"aria-label":i.prevPage,onClick:()=>a(t-1),children:i.prev}),(0,l.jsx)("button",{type:"button",className:"b-blocks-woo-product-grid-page-btn b-blocks-woo-product-grid-page-next",disabled:o||t>=n,"aria-label":i.nextPage,onClick:()=>a(t+1),children:i.next})]}):t>=n?null:(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-pager b-blocks-woo-product-grid-pager--button",children:(0,l.jsxs)("button",{type:"button",className:"b-blocks-woo-product-grid-load-more"+(o?" is-loading":""),"aria-busy":o,disabled:o,onClick:()=>a(t+1,{append:!0}),children:[(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-load-more-label",children:NF(c)}),o&&(0,l.jsx)("span",{className:"b-blocks-woo-product-grid-spinner","aria-hidden":"true"})]})})},xW=e=>{const{attributes:t,id:n,isBackend:o=!1,advancedCSS:i,products:a,terms:s,activeTerm:r,page:c,maxPages:d,isLoading:u,status:p,labels:h,hasError:g,onTerm:m,onPage:b}=e,{type:f}=t.layout||{},{align:x}=t.badge||{},y=[OF,`${OF}--${f}`,`${OF}--badge-${x}`].join(" "),v=(0,l.jsxs)("div",{className:y,children:[(0,l.jsx)(cW,{terms:s,activeTerm:r,attributes:t,isLoading:u,labels:h,onChange:m}),(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-status","aria-live":"polite","aria-atomic":"true",children:p}),g&&h.error&&(0,l.jsx)("p",{className:"b-blocks-woo-product-grid-error",role:"alert",children:h.error}),(0,l.jsx)(mW,{products:a,attributes:t,isLoading:u,isBackend:o,labels:h}),(0,l.jsx)("div",{className:"b-blocks-woo-product-grid-pager-wrap",children:(0,l.jsx)(fW,{attributes:t,page:c,maxPages:d,isLoading:u,labels:h,onPage:b})})]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(lW,{attributes:t,id:n,advancedCSS:i}),o?(0,l.jsx)("div",{children:v}):v]})},yW=({ajaxUrl:e,nonce:t,attributes:n,seed:o=null})=>{const[i,a]=(0,m.useState)(o?.products||[]),[s,r]=(0,m.useState)(o?.maxPages||0),[l,c]=(0,m.useState)(""),[d,u]=(0,m.useState)({page:1,term:0,attempt:0}),[p,h]=(0,m.useState)({page:1,term:0}),g=(0,m.useRef)(!1),[b,f]=(0,m.useState)(!o),x=JSON.stringify(DF(n)),y=(0,m.useRef)(!0);(0,m.useEffect)((()=>{y.current?y.current=!1:(g.current=!1,u((e=>({page:1,term:0,attempt:e.attempt+1}))),h({page:1,term:0}),f(!0))}),[x]);const{products:v,terms:k,labels:w,maxPages:_,respPage:C,respTerm:j,hasWoo:$,installUrl:S,isLoading:T,isReady:N,hasError:M}=((e,t,n,o=1,i=0,a=!1,s=0)=>{const r=DF(n),l=JSON.stringify(r),c=(0,m.useRef)(l);c.current=l;const d=(0,m.useRef)(0),[u,p]=(0,m.useState)(null),[h,g]=(0,m.useState)(!1),[b,f]=(0,m.useState)(!1),x=(0,m.useRef)(!0);return(0,m.useEffect)((()=>()=>{x.current=!1}),[]),(0,m.useEffect)((()=>{if(!e||!t||a)return;const n=++d.current,s=()=>x.current&&n===d.current;g(!0),f(!1);const r=new URLSearchParams({action:"bb_wpg_query",_wpnonce:t,queryAttr:c.current,pageNumber:String(o),termId:String(i)});fetch(e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:r.toString()}).then((e=>e.json())).then((e=>{s()&&(e?.success?p(e.data):f(!0))})).catch((()=>{s()&&f(!0)})).finally((()=>{s()&&g(!1)}))}),[e,t,o,i,a,s]),{respPage:u?.page??0,respTerm:u?.termId??0,labels:u?.labels||{},products:u?.products||[],terms:u?.terms||[],maxPages:u?.maxPages||0,total:u?.total||0,hasWoo:!1!==u?.woo,installUrl:u?.installUrl||"",hasError:b,isLoading:h||!u&&!!t&&!a&&!b,isReady:!!u}})(e,t,n,d.page,d.term,!b,d.attempt),L=o?.labels||w||{},P=C===d.page&&j===d.term;(0,m.useEffect)((()=>{if(!b||!N||T||!P)return;const e=g.current;a((t=>((e,t,n)=>{const o=Array.isArray(t)?t:[];if(!n)return o;const i=Array.isArray(e)?e:[],a=new Set(i.map((e=>e?.id)));return[...i,...o.filter((e=>!a.has(e?.id)))]})(t,v,e))),r(_),h({page:d.page,term:d.term}),e||c(v.length?MF(L.showing,v.length):n.query?.noProductsMessage)}),[v,N,T,P]),(0,m.useEffect)((()=>{g.current&&c(MF(L.showing,i.length))}),[i]),(0,m.useEffect)((()=>{
561 +M&&L.error&&c(L.error)}),[M]);const E=b&&T;return{products:i,terms:o?.terms?.length?o.terms:k,maxPages:s,page:p.page,activeTerm:p.term,status:l,labels:L,isLoading:E,isReady:N||!!o,hasError:M,hasWoo:$,installUrl:S,onTerm:e=>{E||(g.current=!1,f(!0),u((t=>({page:1,term:e,attempt:t.attempt+1}))))},onPage:(e,{append:t=!1}={})=>{E||(g.current=t,f(!0),u((t=>({...t,page:e,attempt:t.attempt+1}))))}}},vW=({installUrl:e})=>{const t=(0,x.__)("WooCommerce is not installed/activated on your site. Please install and activate <a>WooCommerce</a> first.","b-blocks");return(0,l.jsx)("p",{className:"b-blocks-woo-product-grid-notice",children:(0,Qa.createInterpolateElement)(t,{a:e?(0,l.jsx)("a",{href:e,target:"_blank",rel:"noreferrer noopener"}):(0,l.jsx)("strong",{})})})},kW=Object.fromEntries(Object.entries(TF.attributes).map((([e,{default:t}])=>[e,t]))),wW=(0,w.compose)((0,f.withSelect)((e=>{const t=e("core/editor");return{device:t?.getDeviceType()?.toLowerCase()||"desktop",currentProductId:"product"===t?.getCurrentPostType()?t.getCurrentPostId():0}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i="desktop",currentProductId:a=0}=e,s=(0,Qa.useMemo)((()=>IF(t,kW)),[t]),r=`block-${o}`,c="undefined"!=typeof bBlocksPremiumChecker&&bBlocksPremiumChecker,{data:d}=$d("bBlocksUtils"),u=d?.nonce,p=fe(s,n),g={...s,query:{...s.query,currentProductId:a}},{hasWoo:m,installUrl:b,isReady:f,...v}=yW({ajaxUrl:window.ajaxurl,nonce:u,attributes:g}),k=(0,Qa.useMemo)((()=>_s(r,s.advanced,!0)),[r,JSON.stringify(s.advanced)]),w=(0,h.useBlockProps)({id:r});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(oW,{...e,attributes:s,updateObj:p,device:i,isPremium:c}),(0,l.jsxs)("div",{...w,children:[!f&&!v.hasError&&(0,l.jsxs)("p",{className:"b-blocks-woo-product-grid-loading",children:[(0,l.jsx)(y.Spinner,{}),(0,x.__)("Loading product grid…","b-blocks")]}),!f&&v.hasError&&(0,l.jsx)("p",{className:"b-blocks-woo-product-grid-error",role:"alert",children:(0,x.__)("Products could not be loaded. Check that you are still signed in, then reload the editor.","b-blocks")}),f&&!m&&(0,l.jsx)(vW,{installUrl:b}),f&&m&&(0,l.jsx)(xW,{isBackend:!0,attributes:s,id:r,advancedCSS:k,...v})]})]})}));Pl(TF.name)&&(0,p.registerBlockType)(TF,{icon:Tl,edit:wW,save:()=>null});const _W=JSON.parse('{"apiVersion":3,"name":"b-blocks/star-rating","title":"Star Rating","description":"Gutenberg editing with easy-to-use, responsive star-rating more.","category":"bBlocks","keywords":["star-rating","Rating","Gutenberg"],"textdomain":"star-rating","attributes":{"align":{"type":"string","default":""},"ratingScale":{"type":"number","default":5},"rating":{"type":"number","default":4.3},"iconStyle":{"type":"string","default":"solid"},"iconColor":{"type":"string","default":"#f0ad4e"},"prefix":{"type":"string","default":""},"gap":{"type":"string","default":"0px"},"alignment":{"type":"string","default":"center"},"margin":{"type":"object","default":{"top":"","right":"","bottom":"","left":""}},"textTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"textColor":{"type":"string","default":"#7a7a7a"},"textShadow":{"type":"array","default":[]},"iconSize":{"type":"string","default":"20px"},"unmarkedColor":{"type":"string","default":"#ccd6df"}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),CW=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:(0,l.jsx)("path",{d:"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"})}),jW=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:(0,l.jsx)("path",{d:"M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.6 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z"})}),$W=[{label:"0-5",value:5},{label:"0-10",value:10}],SW=[{label:(0,x.__)("Solid","b-blocks"),value:"solid",icon:CW},{label:(0,x.__)("Outline","b-blocks"),value:"outline",icon:jW}],TW=[{label:(0,x.__)("left","b-blocks"),value:"left",icon:"editor-alignleft"},{label:(0,x.__)("center","b-blocks"),value:"center",icon:"editor-aligncenter"},{label:(0,x.__)("right","b-blocks"),value:"right",icon:"editor-alignright"}],NW=({attributes:e,setAttributes:t})=>{const{ratingScale:n,rating:o,iconStyle:i,prefix:a,gap:s,alignment:r,margin:c,textTypo:d,textColor:u,textShadow:p,iconColor:g="#f0ad4e",iconSize:m="20px",unmarkedColor:b="#ccd6df"}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Star Rating","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Rating Scale","b-blocks"),labelPosition:"left",value:n,onChange:e=>t({ratingScale:parseInt(e),rating:5===parseInt(e)?parseFloat((o/2).toFixed(1)):parseFloat((2*o).toFixed(1))}),options:$W}),(0,l.jsx)(y.TextControl,{className:"mt20",label:(0,x.__)("Prefix","b-blocks"),value:a,onChange:e=>t({prefix:e})}),(0,l.jsx)(y.RangeControl,{className:"mt20",label:(0,x.__)("Rating","b-blocks"),labelPosition:"left",value:o,onChange:e=>t({rating:e}),min:1,max:n,step:.1}),(0,l.jsx)(Tn,{className:"mt20",label:(0,x.__)("Icon Style","b-blocks"),value:i,onChange:e=>t({iconStyle:e}),options:SW,isIcon:!0})]}),"style"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Star Rating","b-blocks"),children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Icon Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:m,onChange:e=>t({iconSize:e}),units:[Pe(10),Ae(1)],isResetValueOnUnitChange:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:s,onChange:e=>t({gap:e}),units:[Pe(10),Ae(1)],isResetValueOnUnitChange:!0})]}),(0,l.jsx)(k,{label:(0,x.__)("Margin","b-blocks"),values:c,onChange:e=>t({margin:e})}),(0,l.jsx)(Tn,{label:(0,x.__)("Alignment","b-blocks"),value:r,onChange:e=>t({alignment:e}),options:TW,isIcon:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:g,onChange:e=>t({iconColor:e})}),(0,l.jsx)(Ue,{label:(0,x.__)("Unmarked Icon Color","b-blocks"),value:b,onChange:e=>t({unmarkedColor:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Gap","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({gap:e}),units:[Pe(10),Ae(1)],isResetValueOnUnitChange:!0}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:u,onChange:e=>t({textColor:e}),defaultColor:"#7a7a7a"}),(0,l.jsx)(Oa,{label:(0,x.__)("Text Typography","b-blocks"),value:d,onChange:e=>t({textTypo:e}),defaults:{fontSize:16}}),(0,l.jsx)(yt,{label:(0,x.__)("Text Shadow","b-blocks"),value:p,onChange:e=>t({textShadow:e}),type:"text"})]})]})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:r,onChange:e=>t({alignment:e}),
562 +describedBy:(0,x.__)("Rating Alignment"),alignmentControls:[{title:(0,x.__)("Rating in left","b-blocks"),align:"left",icon:"align-left"},{title:(0,x.__)("Rating in center","b-blocks"),align:"center",icon:"align-center"},{title:(0,x.__)("Rating in right","b-blocks"),align:"right",icon:"align-right"}]})})]})},MW=e=>Array.from({length:e},((e,t)=>t+1)),LW="bBlocksRating",PW=({attributes:e,id:t})=>{const{rating:n,gap:o,alignment:i,margin:a,textTypo:s,textColor:r,textShadow:c,iconColor:d="#f0ad4e",iconSize:u="20px",unmarkedColor:p="#ccd6df"}=e,h=`#${t} .${LW}`,g=`${h} .stars .star`,m=(n+"").split("."),b=parseInt(m[0]),f=parseInt(m[1]||0);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",s)?.googleFontLink}\n\t\t${ps(`${h} .ratingPrefix`,s)?.styles}\n\n\t\t${h} {\n\t\t\tjustify-content: ${i};\n\t\t\tgap: ${o};\n\t\t\tcolor: ${r};\n\t\t\t${ns("margin",hs(a))}\n\t\t}\n\n\t\t${h} .ratingPrefix{\n\t\t\ttext-shadow: ${ls(c,"text")}\n\t\t}\n\n\t\t${h} .stars{\n\t\t\t${ns("gap",o)}\n\t\t}\n\n\t\t${g}>.starFill>svg{\n\t\t\t${ns("fill",d)}\n\t\t\t${ns("width",u)}\n\t\t\t${ns("height",u)}\n\t\t}\n\n\t\t${g}>svg{\n\t\t\t${ns("fill",p)}\n\t\t\t${ns("width",u)}\n\t\t\t${ns("height",u)}\n\t\t}\n\n\t\t${g}{\n\t\t\t${ns("width",u)}\n\t\t\t${ns("height",u)}\n\t\t}\n\n\t\t${MW(b).map((e=>`${g}:nth-child(${e}) .starFill`)).join(", ")}{\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t${g}:nth-child(${b+1}) .starFill{\n\t\t\twidth: ${(()=>{switch(f){case 1:return 25;case 2:return 30;case 3:return 35;case 4:return 42.5;case 5:return 50;case 6:return 57.5;case 7:return 65;case 8:return 70;case 9:return 75;default:return 0}})()}%;\n\t\t}\n\t`}})},EW=({attributes:e})=>{const{ratingScale:t,iconStyle:n,prefix:o}=e;return(0,l.jsxs)("div",{className:LW,children:[(0,l.jsx)("span",{className:"ratingPrefix",children:o}),(0,l.jsx)("div",{className:"stars",children:MW(t).map((e=>(0,l.jsxs)("span",{className:"star",children:["solid"===n?CW:jW,(0,l.jsx)("span",{className:"starFill",children:CW})]},e)))})]})};Pl(_W.name)&&(0,p.registerBlockType)(_W,{icon:Wr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(NW,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(PW,{attributes:t,id:`block-${o}`}),(0,l.jsx)(EW,{attributes:t})]})]})},save:()=>null});const AW=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/stacked-cards","title":"Stacked Cards","category":"bBlocks","description":"Create interactive stacked card layouts that stay sticky while scrolling. The Stacked Cards block helps you present content in a layered, engaging format that enhances the user experience as visitors navigate your page.","keywords":["stacked","cards","stack","cards"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"options":{"type":"object","default":{"effect":"default","responsive":{"desktop":false,"tablet":true,"mobile":true}}},"styles":{"type":"object","default":{"stickyTop":30,"cardGaps":30,"desktop":{"height":""},"tablet":{"height":""},"mobile":{"height":""}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"bottom":"","top":"","right":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"x":"","y":"","z":""},"tablet":{"x":"","y":"","z":""},"mobile":{"x":"","y":"","z":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"#7090b0","isInset":false}],"border":{"width":"","style":"none"}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"","position":"0"},{"color":"","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"visibility":{"zIndex":{"desktop":""},"overflow":""},"responsive":{"desktop":false,"tablet":false,"mobile":false}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),BW=((0,x.__)("Simple"),(0,x.__)("Minimal"),(0,x.__)("Small"),(0,x.__)("Short"),(0,x.__)("Vertical","b-blocks"),(0,x.__)("Horizontal","b-blocks"),[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}]),IW=e=>{const{attributes:t,updateObj:n,device:o="desktop"}=e,{styles:i,options:a}=t,{stickyTop:s}=i,{responsive:r}=a;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Sticky Top Value","b-blocks"),value:s,onChange:e=>n("styles",e,"stickyTop"),min:0,max:1e3}),(0,l.jsxs)(y.Flex,{children:[(0,l.jsxs)(v,{className:"mb0 flex3",children:[(0,x.__)("Card Height","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i[o].height,onChange:e=>n("styles",e,o,"height")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Disable On Desktop","b-blocks"),checked:r.desktop,value:r.desktop,onChange:e=>n("options",e,"responsive","desktop")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Disable On Tablet","b-blocks"),checked:r.tablet,value:r.tablet,onChange:e=>n("options",e,"responsive","tablet")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Disable On Mobile","b-blocks"),checked:r.mobile,value:r.mobile,onChange:e=>n("options",e,"responsive","mobile")})]})]})},OW=e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{advanced:i}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:BW,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(IW,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e})})})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.Button,{onClick:()=>{const e=[...(0,f.select)("core/block-editor").getBlocks(o)],t=(0,p.createBlock)("b-blocks/container",{className:"bBlocksStackedSingleCard"});e.push(t),(0,f.dispatch)("core/block-editor").replaceInnerBlocks(o,e,!1)},style:{height:"100%"},children:"Add Card"})})]})},RW=({attributes:e,id:o,isBackend:i=!1})=>{
563 +const{styles:a,options:s,advanced:r}=e,{responsive:c}=s,d=`#${o} .b-blocks-stackedCardsMainWrapper .bBlocksStackedSingleCard`,u=`${d} .bBlocksContainer .bBlocksContainerContent`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${d}{\n\t\t\t${i?"":ns("top",a.stickyTop+"px")}\n\t\t\t${i?"":ns("position",c.desktop?"unset":"sticky")}\n\t\t\t${c.desktop?"transform: scale(1) !important;":""}\n\n\t\t}\n\t\t${d}:last-child{\n\t\t\t${ns("margin-bottom","0px")}\n\t\t}\n\t\t${u}{\n\t\t\t${i?"":ns("height",a.desktop.height)}\n\t\t}\n\t\t${t}{\n\t\t\t${d}{\n\t\t\t\t${i?"":ns("position",c.tablet?"unset":"sticky")}\n\t\t\t\t${c.tablet?"transform: scale(1) !important;":""}\n\t\t\t}\n\t\t\t${u}{\n\t\t\t\t${i?"":ns("height",a.tablet.height)}\n\t\t\t}\n\t\t}\n\n\t\t${n}{\n\t\t\t${d}{\n\t\t\t\t${i?"":ns("position",c.mobile?"unset":"sticky")}\n\t\t\t\t${c.desktop?"transform: scale(1) !important;":""}\n\t\t\t}\n\t\t\t${u}{\n\t\t\t\t${i?"":ns("height",a.mobile.height)}\n\t\t\t}\n\t\t}\n\n\t\t${Cs(o,r,i)}\n\t`}})},zW=["rgba(230, 244, 255, 1)","rgba(230, 227, 255, 1)","rgba(230, 252, 255, 1)"].map(((e,t)=>["b-blocks/container",{advanced:{dimension:{padding:{desktop:{top:"45px",right:"45px",bottom:"45px",left:"45px"}}},background:{normal:{type:"color",color:e}},borderShadow:{normal:{radius:{top:"15px",right:"15px",bottom:"15px",left:"15px"}}}},className:"bBlocksStackedSingleCard"},[["b-blocks/section-heading",{textAlign:"center",title:`Card Item #${t+1}`,titleTypo:{fontSize:{desktop:"40px",tablet:"",mobile:""},fontWeight:600},titleMargin:{side:4,bottom:"20px"},isSep:!1,desc:"Insert your own content to showcase or highlight<br> the feature you want to represent. Add any <br>blocks you want to customize it as per<br> your preference.",descTypo:{fontSize:{desktop:"20px"},fontWeight:500,fontVariant:"500"},descColor:"rgba(0, 0, 0, 1)"}]]])),DW=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,[a,s]=(0,m.useState)(0),r=fe(t,n),c=(0,h.useInnerBlocksProps)({className:"b-blocksStackedCards"},{template:zW,templateLock:!1,renderAppender:!1});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(OW,{attributes:t,setAttributes:n,updateObj:r,activeIndex:a,setActiveIndex:s,clientId:o,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(RW,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"b-blocks-stackedCardsMainWrapper",children:(0,l.jsx)("div",{className:"b-blocksStackedCardsWrapper",...c})})})]})]})}));Pl(AW.name)&&(0,p.registerBlockType)(AW,{icon:cl,edit:DW,save:h.InnerBlocks.Content})
564 +;const FW=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/stat-cards","title":"Stat Cards","category":"bBlocks","description":"Display a static, responsive grid of impact stat cards — a big number with prefix/suffix, label, optional trend badge, description, and per-card link. No JavaScript.","keywords":["stats","statistics","kpi","numbers","metrics","counter","impact"],"textdomain":"b-blocks","attributes":{"layout":{"type":"object","default":{"align":"center","columnGap":{"desktop":"24px","tablet":"24px","mobile":"24px"},"rowGap":{"desktop":"24px","tablet":"24px","mobile":"24px"},"columns":{"desktop":3,"tablet":2,"mobile":1}}},"card":{"type":"object","default":{"style":"flat","orientation":"vertical","shadow":[],"accentColor":"#146EF5","accentWidth":4,"bg":{"type":"solid","color":""},"border":{"color":"#e2e8f0","style":"solid","width":"1px"},"borderRadius":{"desktop":{"top":"12px","right":"12px","bottom":"12px","left":"12px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"padding":{"desktop":{"top":"28px","right":"24px","bottom":"28px","left":"24px"},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}},"margin":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}}},"number":{"type":"object","default":{"color":"#111827","typography":{"fontSize":{"desktop":"48px","tablet":"40px","mobile":"32px"},"fontWeight":700},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"label":{"type":"object","default":{"color":"#374151","typography":{"fontSize":{"desktop":"16px","tablet":"","mobile":""},"fontWeight":400},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"description":{"type":"object","default":{"show":true,"color":"#6B7280","typography":{"fontSize":{"desktop":"14px","tablet":"","mobile":""}},"bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"icon":{"type":"object","default":{"show":true,"color":"#146EF5","size":"32px","bg":{"type":"solid","color":""},"border":{},"borderRadius":{"top":"","right":"","bottom":"","left":""},"padding":{"top":"","right":"","bottom":"","left":""},"margin":{"top":"","right":"","bottom":"","left":""}}},"trend":{"type":"object","default":{"show":true}},"items":{"type":"array","default":[{"icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z\\"/></svg>","orientation":"","number":"500","prefix":"","suffix":"+","label":"Customers","description":"","trendValue":"","trendDirection":"up","trendColor":"","linkUrl":"","linkTarget":false},{"icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z\\"/></svg>","orientation":"","number":"98","prefix":"","suffix":"%","label":"Satisfaction","description":"","trendValue":"","trendDirection":"up","trendColor":"","linkUrl":"","linkTarget":false},{"icon":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 512 512\\" fill=\\"currentColor\\"><path d=\\"M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z\\"/></svg>","orientation":"","number":"4.9","prefix":"","suffix":"","label":"Average Rating","description":"","trendValue":"","trendDirection":"up","trendColor":"","linkUrl":"","linkTarget":false}]},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),HW=(e,t)=>Number.isFinite(parseInt(e,10))?parseInt(e,10):t,WW=(e={})=>`\n\t${os(e.bg)}\n\t${as(e.border)}\n\t${ns("border-radius",hs(e.borderRadius))}\n\t${ns("padding",hs(e.padding))}\n\t${ns("margin",hs(e.margin))}\n`,UW=({attributes:e,id:o,isBackend:i=!1})=>{
565 +const{layout:a={},card:s={},number:r={},label:c={},description:d={},icon:u={},advanced:p}=e,h=a.columns||{},g=a.columnGap||{},m=a.rowGap||{},b=["left","center","right"].includes(a.align)?a.align:"center",f="left"===b?"flex-start":"right"===b?"flex-end":"center",x=s.style||"flat",y="outlined"===x||"accent-top"===x,v=s.padding||{},k=s.borderRadius||{},w=s.margin||{},_=r.typography||{},C=_.fontSize?.tablet,j=_.fontSize?.mobile,$=`#${o} .bBlocks-stat-cards-wrapper`,S=`${$} .bBlocks-stat-cards-grid`,T=`${$} .bBlocks-stat-cards-item`,N=`${$} .bBlocks-stat-cards-icon`,M=`${$} .bBlocks-stat-cards-number`,L=`${$} .bBlocks-stat-cards-label`,P=`${$} .bBlocks-stat-cards-desc`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${ps("",_).googleFontLink}\n\t\t\t${ps("",c.typography).googleFontLink}\n\t\t\t${ps("",d.typography).googleFontLink}\n\t\t\t${S}{\n\t\t\t\tgrid-template-columns: repeat(${HW(h.desktop,3)}, minmax(0, 1fr));\n\t\t\t\tcolumn-gap: ${g.desktop||"24px"};\n\t\t\t\trow-gap: ${m.desktop||"24px"};\n\t\t\t}\n\t\t\t${T}{\n\t\t\t\talign-items: ${f};\n\t\t\t\ttext-align: ${b};\n\t\t\t\t${ns("padding",hs(v.desktop))}\n\t\t\t\t${ns("margin",hs(w.desktop))}\n\t\t\t\t${ns("border-radius",hs(k.desktop))}\n\t\t\t\t${os(s.bg)}\n\t\t\t\t${ns("box-shadow",ls(s.shadow))}\n\t\t\t\t${y?as(s.border):""}\n\t\t\t\t${"accent-top"===x?`border-top: ${HW(s.accentWidth,4)}px solid ${s.accentColor};`:""}\n\t\t\t}\n\t\t\t${N}{\n\t\t\t\t${ns("color",u.color)}\n\t\t\t\tfont-size: ${u.size};\n\t\t\t\t${WW(u)}\n\t\t\t}\n\t\t\t${ps(M,_).styles}\n\t\t\t${M}{\n\t\t\t\t${ns("color",r.color)}\n\t\t\t\tjustify-content: ${f};\n\t\t\t\t${WW(r)}\n\t\t\t}\n\t\t\t${ps(L,c.typography).styles}\n\t\t\t${L}{\n\t\t\t\t${ns("color",c.color)}\n\t\t\t\t${WW(c)}\n\t\t\t}\n\t\t\t${ps(P,d.typography).styles}\n\t\t\t${P}{\n\t\t\t\t${ns("color",d.color)}\n\t\t\t\t${WW(d)}\n\t\t\t}\n\t\t\t${t}{\n\t\t\t\t${S}{\n\t\t\t\t\tgrid-template-columns: repeat(${HW(h.tablet,2)}, minmax(0, 1fr));\n\t\t\t\t\tcolumn-gap: ${g.tablet||g.desktop||"24px"};\n\t\t\t\t\trow-gap: ${m.tablet||m.desktop||"24px"};\n\t\t\t\t}\n\t\t\t\t${T}{\n\t\t\t\t\t${ns("padding",hs(v.tablet))}\n\t\t\t\t\t${ns("margin",hs(w.tablet))}\n\t\t\t\t\t${ns("border-radius",hs(k.tablet))}\n\t\t\t\t}\n\t\t\t\t${C?`${M}{ font-size: ${C}; }`:""}\n\t\t\t}\n\t\t\t${n}{\n\t\t\t\t${S}{\n\t\t\t\t\tgrid-template-columns: repeat(${HW(h.mobile,1)}, minmax(0, 1fr));\n\t\t\t\t\tcolumn-gap: ${g.mobile||g.tablet||g.desktop||"24px"};\n\t\t\t\t\trow-gap: ${m.mobile||m.tablet||m.desktop||"24px"};\n\t\t\t\t}\n\t\t\t\t${T}{\n\t\t\t\t\t${ns("padding",hs(v.mobile))}\n\t\t\t\t\t${ns("margin",hs(w.mobile))}\n\t\t\t\t\t${ns("border-radius",hs(k.mobile))}\n\t\t\t\t}\n\t\t\t\t${j?`${M}{ font-size: ${j}; }`:""}\n\t\t\t}\n\t\t\t${_s(o,p,i,!1)}\n\t\t\t`}})},GW=({direction:e})=>{let t="M18 15l-6-6-6 6";return"down"===e?t="M6 9l6 6 6-6":"neutral"===e&&(t="M5 12h14"),(0,l.jsx)("svg",{className:"bBlocks-stat-cards-trend-icon",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:t,fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})},VW=["left","center","right"],qW=["flat","outlined","accent-top"],YW=({attributes:e})=>{const{layout:t={},card:n={},icon:o={},description:i={},trend:a={},items:s=[]}=e,r=VW.includes(t.align)?t.align:"center",c=qW.includes(n.style)?n.style:"flat",d=n.orientation||"vertical",u=!1!==o.show,p=!1!==i.show,h=!1!==a.show,g=(Array.isArray(s)?s:[]).filter((e=>{const t=e||{};return t.number||t.label||t.prefix||t.suffix||""})),m=["bBlocks-stat-cards-wrapper",`bBlocks-stat-cards-style-${c}`,`bBlocks-stat-cards-align-${r}`].join(" ");return 0===g.length?(0,l.jsx)("div",{className:m,children:(0,l.jsx)("p",{className:"bBlocks-stat-cards-empty",children:(0,x.__)("Add stat cards from the block settings.","b-blocks")})}):(0,l.jsx)("div",{className:m,children:(0,l.jsx)("dl",{className:"bBlocks-stat-cards-grid","aria-label":(0,x.__)("Key statistics","b-blocks"),children:g.map(((e,t)=>{const n=e||{},o=`${n.prefix||""}${n.number||""}${n.suffix||""}`,i=h&&n.trendValue,a=n.trendDirection||"up",s=n.trendColor?{backgroundColor:n.trendColor,color:"#ffffff"}:void 0,r=n.label?(0,x.sprintf)(/* translators: 1: label, 2: value */ /* translators: 1: label, 2: value */(0,x.__)("%1$s: %2$s","b-blocks"),n.label,o):o,c=(0,l.jsxs)(l.Fragment,{children:[n.prefix&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-prefix",children:n.prefix}),(0,l.jsx)("span",{className:"bBlocks-stat-cards-value",children:n.number}),n.suffix&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-suffix",children:n.suffix})]}),g=n.orientation||d;return(0,l.jsxs)("div",{className:`bBlocks-stat-cards-item bBlocks-stat-cards-item-${g}`,children:[u&&n.icon&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-icon","aria-hidden":"true",dangerouslySetInnerHTML:{__html:n.icon}}),n.linkUrl?(0,l.jsxs)("a",{className:"bBlocks-stat-cards-link",href:n.linkUrl,"aria-label":r,...n.linkTarget?{target:"_blank",rel:"noopener noreferrer"}:{},children:[""!==o&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-number",children:c}),n.label&&(0,l.jsx)("span",{className:"bBlocks-stat-cards-label",children:n.label})]}):(0,l.jsxs)(l.Fragment,{children:[""!==o&&(0,l.jsx)("dd",{className:"bBlocks-stat-cards-number",children:c}),n.label&&(0,l.jsx)("dt",{className:"bBlocks-stat-cards-label",children:n.label})]}),i&&(0,l.jsxs)("span",{className:`bBlocks-stat-cards-trend bBlocks-stat-cards-trend-${a}`,style:s,"aria-label":(0,x.sprintf)(/* translators: 1: direction, 2: value */ /* translators: 1: direction, 2: value */(0,x.__)("Trend: %1$s %2$s","b-blocks"),a,n.trendValue),children:[(0,l.jsx)(GW,{direction:a}),(0,l.jsx)("span",{className:"bBlocks-stat-cards-trend-text",children:n.trendValue})]}),p&&n.description&&(0,l.jsx)("p",{className:"bBlocks-stat-cards-desc",children:n.description})]},n._key||t)}))})})},KW=[{label:"px",value:"px"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"%",value:"%"}],QW=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],ZW=[{label:(0,x.__)("Flat","b-blocks"),value:"flat"},{label:(0,x.__)("Outlined","b-blocks"),value:"outlined"},{label:(0,x.__)("Accent top","b-blocks"),value:"accent-top"}],XW=[{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:(0,x.__)("Right","b-blocks"),value:"right"}],JW=((0,x.__)("Normal","b-blocks"),(0,x.__)("Medium","b-blocks"),(0,x.__)("Semi-bold","b-blocks"),(0,x.__)("Bold","b-blocks"),(0,x.__)("Extra-bold","b-blocks"),(0,x.__)("Black","b-blocks"),[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}]),eU=[{label:(0,x.__)("Default (inherit)","b-blocks"),value:""},...JW],tU=[{label:(0,x.__)("Up","b-blocks"),value:"up"},{label:(0,x.__)("Down","b-blocks"),value:"down"},{label:(0,x.__)("Neutral","b-blocks"),value:"neutral"}],nU=e=>{const{attributes:t,updateObj:n,index:o}=e,i=t.items[o]||{},a=(e,t)=>n("items",t,o,e);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zn,{label:(0,x.__)("Icon","b-blocks"),value:i.icon,onChange:e=>a("icon",e)}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Orientation:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i.orientation||"",options:eU,onChange:e=>a("orientation",e)})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(y.FlexItem,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Prefix","b-blocks"),value:i.prefix||"",onChange:e=>a("prefix",e),placeholder:"$",__nextHasNoMarginBottom:!0})}),(0,l.jsx)(y.FlexItem,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Number","b-blocks"),value:i.number||"",onChange:e=>a("number",e),placeholder:"500",__nextHasNoMarginBottom:!0})}),(0,l.jsx)(y.FlexItem,{children:(0,l.jsx)(y.TextControl,{label:(0,x.__)("Suffix","b-blocks"),value:i.suffix||"",
566 +onChange:e=>a("suffix",e),placeholder:"+",__nextHasNoMarginBottom:!0})})]}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Label","b-blocks"),value:i.label||"",onChange:e=>a("label",e),placeholder:(0,x.__)("e.g. Customers","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Description","b-blocks"),value:i.description||"",onChange:e=>a("description",e),help:(0,x.__)("Optional one-line supporting text.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Trend value","b-blocks"),value:i.trendValue||"",onChange:e=>a("trendValue",e),placeholder:(0,x.__)("e.g. 34%","b-blocks"),help:(0,x.__)("Leave blank to hide the trend badge.","b-blocks"),__nextHasNoMarginBottom:!0}),(0,l.jsxs)(y.PanelRow,{className:"mt10",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Trend direction:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:i.trendDirection||"up",options:tU,onChange:e=>a("trendDirection",e)})]}),(0,l.jsx)(Ue,{className:"mt10",label:(0,x.__)("Trend color override:","b-blocks"),value:i.trendColor||"",onChange:e=>a("trendColor",e)}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Link URL","b-blocks"),type:"url",value:i.linkUrl||"",onChange:e=>a("linkUrl",e),placeholder:"https://",__nextHasNoMarginBottom:!0}),i.linkUrl&&(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Open link in new tab","b-blocks"),checked:!!i.linkTarget,onChange:e=>a("linkTarget",e)})]})},oU={desktop:3,tablet:2,mobile:1},iU=({attributes:e,setAttributes:t,updateObj:n,device:o="desktop"})=>{const{layout:i={},card:a={},icon:s={},description:r={},trend:c={}}=e,d=i.columns||{},u=i.columnGap||{},p=i.rowGap||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.Flex,{children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Card alignment:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:i.align||"center",onChange:e=>n("layout",e||"center","align"),children:XW.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Card orientation:","b-blocks")}),(0,l.jsx)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a.orientation||"vertical",onChange:e=>n("card",e||"vertical","orientation"),children:JW.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})]}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Columns","b-blocks")," ",(0,l.jsx)(_,{})]}),value:parseInt(d[o],10)||oU[o],onChange:e=>n("layout",e,"columns",o),min:1,max:6,step:1}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Column Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:KW,isUnitSelectTabbable:!0,value:u[o],onChange:e=>n("layout",e,"columnGap",o)}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Row Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:KW,isUnitSelectTabbable:!0,value:p[o],onChange:e=>n("layout",e,"rowGap",o)})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Icon","b-blocks"),checked:!1!==s.show,onChange:e=>n("icon",e,"show")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Description","b-blocks"),checked:!1!==r.show,onChange:e=>n("description",e,"show")}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Trend Badge","b-blocks"),checked:!1!==c.show,onChange:e=>n("trend",e,"show")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Stat cards","b-blocks"),initialOpen:!1,children:(0,l.jsx)(_a,{attributes:e,setAttributes:t,updateObj:n,newItem:{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path d="M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"/></svg>',orientation:"",number:"",prefix:"",suffix:"",label:"",description:"",trendValue:"",trendDirection:"up",trendColor:"",linkUrl:"",linkTarget:!1},design:"sortable",itemLabel:"Stat",arrKey:"items",title:"label",ItemSettings:nU})})]})},aU={top:"",right:"",bottom:"",left:""},sU=({attrKey:e,value:t={},updateObj:n})=>{const{bg:o={},border:i={},borderRadius:a={},padding:s={},margin:r={}}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{className:"mt10",label:(0,x.__)("Background:","b-blocks"),value:o,onChange:t=>n(e,t,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:i,onChange:t=>n(e,t||{},"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Border Radius","b-blocks"),units:KW,values:a,resetValues:aU,onChange:t=>n(e,t,"borderRadius")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Padding","b-blocks"),units:KW,values:s,resetValues:aU,onChange:t=>n(e,t,"padding")}),(0,l.jsx)(k,{className:"mt10",label:(0,x.__)("Margin","b-blocks"),units:KW,values:r,resetValues:aU,onChange:t=>n(e,t,"margin")})]})},rU=({attributes:e,updateObj:t,device:n="desktop"})=>{const{card:o={},number:i={},label:a={},description:s={},icon:r={}}=e,c=o.style||"flat",d="outlined"===c||"accent-top"===c,u=o.borderRadius||{},p=o.padding||{},h=o.margin||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card","b-blocks"),initialOpen:!0,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Card style:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:c,options:ZW,onChange:e=>t("card",e,"style")})]}),(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o.bg,onChange:e=>t("card",e,"bg")}),"accent-top"===c&&(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Accent line height (px)","b-blocks"),value:o.accentWidth??4,onChange:e=>t("card",e,"accentWidth"),min:2,max:12,step:1}),d&&(0,l.jsx)(y.BorderBoxControl,{className:"mt10",label:(0,x.__)("Border","b-blocks"),value:o.border,onChange:e=>t("card",e||{},"border")}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),units:KW,values:u[n],resetValues:aU,onChange:e=>t("card",e,"borderRadius",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),units:KW,values:p[n],resetValues:aU,onChange:e=>t("card",e,"padding",n)}),(0,l.jsx)(k,{className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Margin","b-blocks")," ",(0,l.jsx)(_,{})]}),units:KW,values:h[n],resetValues:aU,onChange:e=>t("card",e,"margin",n)}),(0,l.jsx)(yt,{className:"mt10",label:(0,x.__)("Shadow:","b-blocks"),value:o.shadow||[],onChange:e=>t("card",e,"shadow")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Number","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:i.color||"#111827",onChange:e=>t("number",e,"color"),defaultColor:"#111827"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:i.typography,onChange:e=>t("number",e,"typography")}),(0,l.jsx)(sU,{attrKey:"number",value:i,updateObj:t})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,
567 +x.__)("Color:","b-blocks"),value:a.color||"#374151",onChange:e=>t("label",e,"color"),defaultColor:"#374151"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:a.typography,onChange:e=>t("label",e,"typography")}),(0,l.jsx)(sU,{attrKey:"label",value:a,updateObj:t})]}),!1!==s.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Description","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color:","b-blocks"),value:s.color||"#6B7280",onChange:e=>t("description",e,"color"),defaultColor:"#6B7280"}),(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-blocks"),value:s.typography,onChange:e=>t("description",e,"typography")}),(0,l.jsx)(sU,{attrKey:"description",value:s,updateObj:t})]}),!1!==r.show&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:r.color||"#146EF5",onChange:e=>t("icon",e,"color"),defaultColor:"#146EF5"}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex2",children:(0,x.__)("Size","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",units:KW,isUnitSelectTabbable:!0,value:r.size||"32px",onChange:e=>t("icon",e,"size")})]}),(0,l.jsx)(sU,{attrKey:"icon",value:r,updateObj:t})]})]})},lU=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:QW,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(iU,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(rU,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})})},cU=["left","center","right"],dU=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,{layout:a={}}=t,s=bBlocksPremiumChecker,r=fe(t,n),c=cU.includes(a.align)?a.align:"center";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(h.AlignmentToolbar,{value:c,onChange:e=>r("layout",e||"center","align"),alignmentControls:[{icon:"editor-alignleft",title:(0,x.__)("Align left","b-blocks"),align:"left"},{icon:"editor-aligncenter",title:(0,x.__)("Align center","b-blocks"),align:"center"},{icon:"editor-alignright",title:(0,x.__)("Align right","b-blocks"),align:"right"}]})}),(0,l.jsx)(lU,{attributes:t,setAttributes:n,updateObj:r,isPremium:s,device:i}),(0,l.jsx)("div",{...(0,h.useBlockProps)(),children:(0,l.jsxs)("div",{children:[(0,l.jsx)(UW,{attributes:t,id:`block-${o}`,isBackend:!0}),(0,l.jsx)(YW,{attributes:t})]})})]})}));Pl(FW.name)&&(0,p.registerBlockType)(FW,{icon:_l,edit:dU,save:()=>null})
568 +;const uU=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/svg-draw","version":"1.0.0","title":"SVG Draw","category":"bBlocks","description":"Add animated SVG drawings to your content with customizable paths, timing, and effects.","keywords":["svg","draw","icon","draw svg","animated icon"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"icon":{"type":"object","default":{"upload":"","library":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 448 512\\"><path d=\\"M103.3 344.3c-6.5-14.2-6.9-18.3 7.4-23.1 25.6-8 8 9.2 43.2 49.2h.3v-93.9c1.2-50.2 44-92.2 97.7-92.2 53.9 0 97.7 43.5 97.7 96.8 0 63.4-60.8 113.2-128.5 93.3-10.5-4.2-2.1-31.7 8.5-28.6 53 0 89.4-10.1 89.4-64.4 0-61-77.1-89.6-116.9-44.6-23.5 26.4-17.6 42.1-17.6 157.6 50.7 31 118.3 22 160.4-20.1 24.8-24.8 38.5-58 38.5-93 0-35.2-13.8-68.2-38.8-93.3-24.8-24.8-57.8-38.5-93.3-38.5s-68.8 13.8-93.5 38.5c-.3.3-16 16.5-21.2 23.9l-.5.6c-3.3 4.7-6.3 9.1-20.1 6.1-6.9-1.7-14.3-5.8-14.3-11.8V20c0-5 3.9-10.5 10.5-10.5h241.3c8.3 0 8.3 11.6 8.3 15.1 0 3.9 0 15.1-8.3 15.1H130.3v132.9h.3c104.2-109.8 282.8-36 282.8 108.9 0 178.1-244.8 220.3-310.1 62.8zm63.3-260.8c-.5 4.2 4.6 24.5 14.6 20.6C306 56.6 384 144.5 390.6 144.5c4.8 0 22.8-15.3 14.3-22.8-93.2-89-234.5-57-238.3-38.2zM393 414.7C283 524.6 94 475.5 61 310.5c0-12.2-30.4-7.4-28.9 3.3 24 173.4 246 256.9 381.6 121.3 6.9-7.8-12.6-28.4-20.7-20.4zM213.6 306.6c0 4 4.3 7.3 5.5 8.5 3 3 6.1 4.4 8.5 4.4 3.8 0 2.6.2 22.3-19.5 19.6 19.3 19.1 19.5 22.3 19.5 5.4 0 18.5-10.4 10.7-18.2L265.6 284l18.2-18.2c6.3-6.8-10.1-21.8-16.2-15.7L249.7 268c-18.6-18.8-18.4-19.5-21.5-19.5-5 0-18 11.7-12.4 17.3L234 284c-18.1 17.9-20.4 19.2-20.4 22.6z\\" stroke-dasharray=\\"5371.4248046875\\" style=\\"stroke-dashoffset: 699.897px;\\"></path></svg>","custom":"<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 448 512\\"><path d=\\"M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z\\"/></svg>","type":{"svgType":"icon","iconType":"library"}}},"options":{"type":"object","default":{"duration":3000,"repeat":true,"direction":"normal","delay":250,"easing":"linear"}},"style":{"type":"object","default":{"height":"200px","width":"200px","align":"center","strokeWidth":2,"colors":{"normal":{"strokeColor":"#146EF5","fill":"#0000","shadow":{"color":"#000"}},"hover":{"strokeColor":"","fill":"","shadow":{"color":"#000"},"transition":200}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos","wp-util","wp-api"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),pU=({attributes:e,id:t,isBackend:n=!1})=>{const{style:o,advanced:i}=e,{height:a,width:s,align:r,margin:c,padding:d,background:u,border:p,borderRadius:h,colors:g}=o,{normal:m,hover:b}=g,f=`#${t} .svdr-icon-draw-wrapper`,x=`${f} .svdr-svg-wrapper`,y=`${x} svg`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${f}{\n\t\t\t\t${ns("justify-content",r)}\n\t\t\t}\n\t\t\t${x}{\n\t\t\t\t${ns("height",a)}\n\t\t\t\t${ns("width",s)}\n\t\t\t\t${ns("margin",hs(c))}\n\t\t\t\t${ns("padding",hs(d))}\n\t\t\t\t${os(u)}\n\t\t\t\t${as(p)}\n\t\t\t\t${ns("border-radius",hs(h))}\n\t\t\t}\n\t\t\t${y}{\n\t\t\t\t${ns("fill",m.fill)}\n\t\t\t\t${ns("stroke",m.strokeColor)}\n\t\t\t\tfilter:drop-shadow(${ds(m.shadow,"text")});\n\t\t\t\ttransition:${b.transition}ms ease-in-out;\n\t\t\t}\n\t\t\t${y}:hover{\n\t\t\t\t${ns("fill",b.fill)}\n\t\t\t\t${ns("stroke",b.strokeColor)}\n\t\t\t\tfilter:drop-shadow(${ds(b.shadow,"text")});\n\t\t\t}\n\t\t\t${Cs(t,i,n)}\n\t`}})},hU=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],gU=[{name:"normal",title:(0,x.__)("Normal","b-blocks")},{name:"hover",title:(0,x.__)("Hover","b-blocks")}],mU=["easeInSine","easeInExpo","easeInCirc","easeInBack","easeInElastic","easeOutQuad","easeOutCubic","easeOutQuart","easeOutQuint","easeOutSine","easeOutExpo","easeOutCirc","easeOutBack","easeOutElastic","easeInOutQuad","easeInOutCubic","easeInOutQuart","easeInOutQuint","easeInOutSine","easeInOutExpo","easeInOutCirc","easeInCubic","easeInQuart","easeInQuint"],bU=[{label:"Linear",value:"linear"},{label:"EaseInOutElastic",value:"easeInOutElastic"},{label:"EaseInQuad",value:"easeInQuad"},{label:"EaseInQuart",value:"easeInQuart"},{label:"EaseInSine",value:"easeInSine"},{label:"EaseInExpo",value:"easeInExpo"},{label:"EaseInCirc",value:"easeInCirc"},{label:"EaseInBack",value:"easeInBack"},{label:"EaseInElastic",value:"easeInElastic"},{label:"EaseOutQuad",value:"easeOutQuad"},{label:"EaseOutCubic",value:"easeOutCubic"},{label:"EaseOutQuart",value:"easeOutQuart"},{label:"EaseOutQuint",value:"easeOutQuint"},{label:"EaseOutSine",value:"easeOutSine"},{label:"EaseOutExpo",value:"easeOutExpo"},{label:"EaseOutCirc",value:"easeOutCirc"},{label:"EaseOutBack",value:"easeOutBack"},{label:"EaseOutElastic",value:"easeOutElastic"},{label:"EaseInOutQuad",value:"easeInOutQuad"},{label:"EaseInOutCubic",value:"easeInOutCubic"},{label:"EaseInOutQuart",value:"easeInOutQuart"},{label:"EaseInOutQuint",value:"easeInOutQuint"},{label:"EaseInOutSine",value:"easeInOutSine"},{label:"EaseInOutExpo",value:"easeInOutExpo"},{label:"EaseInOutCirc",value:"easeInOutCirc"},{label:"EaseInCubic",value:"easeInCubic"},{label:"EaseInQuart",value:"easeInQuart"},{
569 +label:"EaseInQuint",value:"easeInQuint"}];function fU(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})})}function xU(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})})}function yU(e){return(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 1024 1024",height:"1em",width:"1em",...e,children:(0,l.jsx)("path",{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})})}const vU=' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M0 336c0 79.5 64.5 144 144 144l368 0c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z"/></svg>',kU=e=>{const{attributes:t,setAttributes:n,isPremium:o,setIsProModalOpen:i}=e,{icon:a,options:s}=t,{data:r}=$d("bBlocksUtils"),{refetch:c}=jd("b-blocks-enable-svg-mime-type",{_wpnonce:r?.nonce},!1),d=new Tt;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("SVG Type","b-blocks"),labelPosition:"left",options:[{label:"Icon",value:"icon"},{label:"Custom SVG",value:"custom"}],value:a.type.svgType,onChange:e=>n({icon:be(a,e,"type","svgType")})}),"custom"===a.type.svgType&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.TextareaControl,{value:a.custom,onChange:e=>n({icon:be(a,e,"custom")}),rows:8})}),"icon"===a.type.svgType&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{label:(0,x.__)("Icon Type","b-blocks"),options:[{label:"Upload "+(o?"":"(Pro)"),value:"upload"},{label:"Library",value:"library"}],value:a.type.iconType,onChange:e=>{o?n({icon:be(a,e,"type","iconType")}):i(!0)}}),"upload"===a.type.iconType&&(0,l.jsx)(we,{types:["image/svg+xml"],onClick:async()=>{Sd(),await c()},label:(0,x.__)("Upload SVG","b-blocks"),value:{url:a.upload},default:vU,onChange:async e=>{const t=e?.url?await d.sanitizeFile(e?.url):"";n({icon:be(a,t,"upload")})},isSvgEnabled:!0}),"library"===a.type.iconType&&(0,l.jsx)(Zn,{label:(0,x.__)("Icon Library","b-blocks"),value:a.library,onChange:e=>n({icon:be(a,e,"library")})})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Options","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalNumberControl,{label:(0,x.__)("Fill Duration","b-blocks"),labelPosition:"edge",value:s.duration,onChange:e=>n({options:be(s,e,"duration")})}),(0,l.jsx)("small",{children:"Duration on SVG files (in ms)"}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Delay","b-blocks"),labelPosition:"edge",value:s.delay,onChange:e=>n({options:be(s,e,"delay")})}),(0,l.jsx)("small",{children:"Duration on SVG draws (in ms)"}),(0,l.jsx)(y.SelectControl,{className:"mt10 mb10",label:(0,x.__)("Direction","b-blocks"),labelPosition:"edge",options:[{label:"Normal",value:"normal"},{label:"Reverse",value:"reverse"},{label:"Alternate",value:"alternate"}],value:s.direction,onChange:e=>n({options:be(s,e,"direction")})}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Repeat Drawing","b-blocks"),checked:s.repeat,value:s.repeat,onChange:e=>n({options:be(s,e,"repeat")})}),(0,l.jsx)(Za,{className:"mt10",label:(0,x.__)("Animation Easing","b-blocks"),labelPosition:"edge",options:bU,value:s.easing,onChange:e=>n({options:be(s,e,"easing")}),isPremium:o,proValues:mU,setIsProModalOpen:i})]})]})},wU=e=>{const{attributes:t,setAttributes:n}=e,{style:o}=t;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Icon Style","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Height","b-blocks"),labelPosition:"edge",value:t.style.height,onChange:e=>n({style:be(t.style,e,"height")})}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width","b-blocks"),labelPosition:"edge",className:"mt10",value:t.style.width,onChange:e=>n({style:be(t.style,e,"width")})}),(0,l.jsx)(Tn,{label:(0,x.__)("Alignment","b-blocks"),className:"mt10",options:[{label:"Left",value:"left",icon:(0,l.jsx)(fU,{})},{label:"Center",value:"center",icon:(0,l.jsx)(xU,{})},{label:"Right",value:"right",icon:(0,l.jsx)(yU,{})}],value:o.align,onChange:e=>n({style:be(o,e,"align")}),isIcon:!0}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Path Thickness","b-blocks"),className:"mt10",value:o.strokeWidth,onChange:e=>n({style:be(o,e,"strokeWidth")}),step:.1,min:0,max:100}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:gU,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Color","b-blocks"),value:o.colors[e.name].strokeColor,onChange:t=>n({style:be(o,t,"colors",e.name,"strokeColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Fill Color","b-blocks"),value:o.colors[e.name].fill,onChange:t=>n({style:be(o,t,"colors",e.name,"fill")})}),(0,l.jsx)(id,{label:(0,x.__)("Shadow","b-blocks"),value:o.colors[e.name].shadow,onChange:t=>n({style:be(o,t,"colors",e.name,"shadow")}),type:"text"}),"hover"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Transition (ms)","b-blocks"),value:o.colors.hover.transition,step:50,max:1e4,onChange:e=>n({style:be(o,e,"colors","hover","transition")})})})]})})]})})},_U=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,[a,s]=(0,m.useState)(!1),r={isProModalOpen:a,setIsProModalOpen:s,...e};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)("div",{className:"bPlInspectorInfo",children:(0,l.jsx)(Ra,{})}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:hU,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["general"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(kU,{...r})}),"style"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(wU,{...r})}),"advanced"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]}),(0,l.jsxs)(jn,{isProModalOpen:a,setIsProModalOpen:s,block:"SVG Draw",children:[(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("SVG Upload: ","b-blocks")}),(0,x.__)("Upload custom SVG files from your device.","b-blocks")]}),(0,l.jsxs)("li",{children:[" ",(0,l.jsx)("strong",{children:(0,x.__)("Animation Easing: ","b-blocks")}),(0,x.__)("Advanced easing families (Quart, Quint, Elastic, Back, Circ, Expo, Bounce, and many variations) that create richer, more natural or stylized motion.","b-blocks")]})]})]})};var CU={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},jU={duration:1e3,delay:0,endDelay:0,
570 +easing:"easeOutElastic(1, .5)",round:0},$U=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],SU={CSS:{},springs:{}};function TU(e,t,n){return Math.min(Math.max(e,t),n)}function NU(e,t){return e.indexOf(t)>-1}function MU(e,t){return e.apply(null,t)}var LU={arr:function(e){return Array.isArray(e)},obj:function(e){return NU(Object.prototype.toString.call(e),"Object")},pth:function(e){return LU.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||LU.svg(e)},str:function(e){return"string"==typeof e},fnc:function(e){return"function"==typeof e},und:function(e){return void 0===e},nil:function(e){return LU.und(e)||null===e},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return LU.hex(e)||LU.rgb(e)||LU.hsl(e)},key:function(e){return!CU.hasOwnProperty(e)&&!jU.hasOwnProperty(e)&&"targets"!==e&&"keyframes"!==e}};function PU(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map((function(e){return parseFloat(e)})):[]}function EU(e,t){var n=PU(e),o=TU(LU.und(n[0])?1:n[0],.1,100),i=TU(LU.und(n[1])?100:n[1],.1,100),a=TU(LU.und(n[2])?10:n[2],.1,100),s=TU(LU.und(n[3])?0:n[3],.1,100),r=Math.sqrt(i/o),l=a/(2*Math.sqrt(i*o)),c=l<1?r*Math.sqrt(1-l*l):0,d=l<1?(l*r-s)/c:-s+r;function u(e){var n=t?t*e/1e3:e;return n=l<1?Math.exp(-n*l*r)*(1*Math.cos(c*n)+d*Math.sin(c*n)):(1+d*n)*Math.exp(-n*r),0===e||1===e?e:1-n}return t?u:function(){var t=SU.springs[e];if(t)return t;for(var n=1/6,o=0,i=0;;)if(1===u(o+=n)){if(++i>=16)break}else i=0;var a=o*n*1e3;return SU.springs[e]=a,a}}function AU(e){return void 0===e&&(e=10),function(t){return Math.ceil(TU(t,1e-6,1)*e)*(1/e)}}var BU,IU,OU=function(){var e=.1;function t(e,t){return 1-3*t+3*e}function n(e,t){return 3*t-6*e}function o(e){return 3*e}function i(e,i,a){return((t(i,a)*e+n(i,a))*e+o(i))*e}function a(e,i,a){return 3*t(i,a)*e*e+2*n(i,a)*e+o(i)}return function(t,n,o,s){if(0<=t&&t<=1&&0<=o&&o<=1){var r=new Float32Array(11);if(t!==n||o!==s)for(var l=0;l<11;++l)r[l]=i(l*e,t,o);return function(l){return t===n&&o===s||0===l||1===l?l:i(function(n){for(var s=0,l=1;10!==l&&r[l]<=n;++l)s+=e;--l;var c=s+(n-r[l])/(r[l+1]-r[l])*e,d=a(c,t,o);return d>=.001?function(e,t,n,o){for(var s=0;s<4;++s){var r=a(t,n,o);if(0===r)return t;t-=(i(t,n,o)-e)/r}return t}(n,c,t,o):0===d?c:function(e,t,n,o,a){var s,r,l=0;do{(s=i(r=t+(n-t)/2,o,a)-e)>0?n=r:t=r}while(Math.abs(s)>1e-7&&++l<10);return r}(n,s,s+e,t,o)}(l),n,s)}}}}(),RU=(BU={linear:function(){return function(e){return e}}},IU={Sine:function(){return function(e){return 1-Math.cos(e*Math.PI/2)}},Expo:function(){return function(e){return e?Math.pow(2,10*e-10):0}},Circ:function(){return function(e){return 1-Math.sqrt(1-e*e)}},Back:function(){return function(e){return e*e*(3*e-2)}},Bounce:function(){return function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}},Elastic:function(e,t){void 0===e&&(e=1),void 0===t&&(t=.5);var n=TU(e,1,10),o=TU(t,.1,2);return function(e){return 0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-o/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/o)}}},["Quad","Cubic","Quart","Quint"].forEach((function(e,t){IU[e]=function(){return function(e){return Math.pow(e,t+2)}}})),Object.keys(IU).forEach((function(e){var t=IU[e];BU["easeIn"+e]=t,BU["easeOut"+e]=function(e,n){return function(o){return 1-t(e,n)(1-o)}},BU["easeInOut"+e]=function(e,n){return function(o){return o<.5?t(e,n)(2*o)/2:1-t(e,n)(-2*o+2)/2}},BU["easeOutIn"+e]=function(e,n){return function(o){return o<.5?(1-t(e,n)(1-2*o))/2:(t(e,n)(2*o-1)+1)/2}}})),BU);function zU(e,t){if(LU.fnc(e))return e;var n=e.split("(")[0],o=RU[n],i=PU(e);switch(n){case"spring":return EU(e,t);case"cubicBezier":return MU(OU,i);case"steps":return MU(AU,i);default:return MU(o,i)}}function DU(e){try{return document.querySelectorAll(e)}catch(e){return}}function FU(e,t){for(var n=e.length,o=arguments.length>=2?arguments[1]:void 0,i=[],a=0;a<n;a++)if(a in e){var s=e[a];t.call(o,s,a,e)&&i.push(s)}return i}function HU(e){return e.reduce((function(e,t){return e.concat(LU.arr(t)?HU(t):t)}),[])}function WU(e){return LU.arr(e)?e:(LU.str(e)&&(e=DU(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function UU(e,t){return e.some((function(e){return e===t}))}function GU(e){var t={};for(var n in e)t[n]=e[n];return t}function VU(e,t){var n=GU(e);for(var o in e)n[o]=t.hasOwnProperty(o)?t[o]:e[o];return n}function qU(e,t){var n=GU(e);for(var o in t)n[o]=LU.und(e[o])?t[o]:e[o];return n}function YU(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function KU(e,t){return LU.fnc(e)?e(t.target,t.id,t.total):e}function QU(e,t){return e.getAttribute(t)}function ZU(e,t,n){if(UU([n,"deg","rad","turn"],YU(t)))return t;var o=SU.CSS[t+n];if(!LU.und(o))return o;var i=document.createElement(e.tagName),a=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;a.appendChild(i),i.style.position="absolute",i.style.width=100+n;var s=100/i.offsetWidth;a.removeChild(i);var r=s*parseFloat(t);return SU.CSS[t+n]=r,r}function XU(e,t,n){if(t in e.style){var o=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=e.style[t]||getComputedStyle(e).getPropertyValue(o)||"0";return n?ZU(e,i,n):i}}function JU(e,t){return LU.dom(e)&&!LU.inp(e)&&(!LU.nil(QU(e,t))||LU.svg(e)&&e[t])?"attribute":LU.dom(e)&&UU($U,t)?"transform":LU.dom(e)&&"transform"!==t&&XU(e,t)?"css":null!=e[t]?"object":void 0}function eG(e){if(LU.dom(e)){for(var t,n=e.style.transform||"",o=/(\w+)\(([^)]*)\)/g,i=new Map;t=o.exec(n);)i.set(t[1],t[2]);return i}}function tG(e,t,n,o){switch(JU(e,t)){case"transform":return function(e,t,n,o){var i=NU(t,"scale")?1:0+function(e){return NU(e,"translate")||"perspective"===e?"px":NU(e,"rotate")||NU(e,"skew")?"deg":void 0}(t),a=eG(e).get(t)||i;return n&&(n.transforms.list.set(t,a),n.transforms.last=t),o?ZU(e,a,o):a}(e,t,o,n);case"css":return XU(e,t,n);case"attribute":return QU(e,t);default:return e[t]||0}}function nG(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var o=YU(e)||0,i=parseFloat(t),a=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return i+a+o;case"-":return i-a+o;case"*":return i*a+o}}function oG(e,t){if(LU.col(e))return function(e){return LU.rgb(e)?(n=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(t=e))?"rgba("+n[1]+",1)":t:LU.hex(e)?function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"}(e):LU.hsl(e)?function(e){var t,n,o,i=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),a=parseInt(i[1],10)/360,s=parseInt(i[2],10)/100,r=parseInt(i[3],10)/100,l=i[4]||1;function c(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(0==s)t=n=o=r;else{var d=r<.5?r*(1+s):r+s-r*s,u=2*r-d;t=c(u,d,a+1/3),n=c(u,d,a),o=c(u,d,a-1/3)}return"rgba("+255*t+","+255*n+","+255*o+","+l+")"}(e):void 0;var t,n}(e);if(/\s/g.test(e))return e;var n=YU(e),o=n?e.substr(0,e.length-n.length):e;return t?o+t:o}function iG(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function aG(e){for(var t,n=e.points,o=0,i=0;i<n.numberOfItems;i++){var a=n.getItem(i);i>0&&(o+=iG(t,a)),t=a}return o}function sG(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return function(e){return 2*Math.PI*QU(e,"r")}(e);case"rect":return function(e){return 2*QU(e,"width")+2*QU(e,"height")}(e);case"line":return function(e){return iG({x:QU(e,"x1"),y:QU(e,"y1")},{x:QU(e,"x2"),
571 +y:QU(e,"y2")})}(e);case"polyline":return aG(e);case"polygon":return function(e){var t=e.points;return aG(e)+iG(t.getItem(t.numberOfItems-1),t.getItem(0))}(e)}}function rG(e,t){var n=t||{},o=n.el||function(e){for(var t=e.parentNode;LU.svg(t)&&LU.svg(t.parentNode);)t=t.parentNode;return t}(e),i=o.getBoundingClientRect(),a=QU(o,"viewBox"),s=i.width,r=i.height,l=n.viewBox||(a?a.split(" "):[0,0,s,r]);return{el:o,viewBox:l,x:l[0]/1,y:l[1]/1,w:s,h:r,vW:l[2],vH:l[3]}}function lG(e,t,n){function o(n){void 0===n&&(n=0);var o=t+n>=1?t+n:0;return e.el.getPointAtLength(o)}var i=rG(e.el,e.svg),a=o(),s=o(-1),r=o(1),l=n?1:i.w/i.vW,c=n?1:i.h/i.vH;switch(e.property){case"x":return(a.x-i.x)*l;case"y":return(a.y-i.y)*c;case"angle":return 180*Math.atan2(r.y-s.y,r.x-s.x)/Math.PI}}function cG(e,t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,o=oG(LU.pth(e)?e.totalLength:e,t)+"";return{original:o,numbers:o.match(n)?o.match(n).map(Number):[0],strings:LU.str(e)||t?o.split(n):[]}}function dG(e){return FU(e?HU(LU.arr(e)?e.map(WU):WU(e)):[],(function(e,t,n){return n.indexOf(e)===t}))}function uG(e){var t=dG(e);return t.map((function(e,n){return{target:e,id:n,total:t.length,transforms:{list:eG(e)}}}))}function pG(e,t){var n=GU(t);if(/^spring/.test(n.easing)&&(n.duration=EU(n.easing)),LU.arr(e)){var o=e.length;2!==o||LU.obj(e[0])?LU.fnc(t.duration)||(n.duration=t.duration/o):e={value:e}}var i=LU.arr(e)?e:[e];return i.map((function(e,n){var o=LU.obj(e)&&!LU.pth(e)?e:{value:e};return LU.und(o.delay)&&(o.delay=n?0:t.delay),LU.und(o.endDelay)&&(o.endDelay=n===i.length-1?t.endDelay:0),o})).map((function(e){return qU(e,n)}))}var hG={css:function(e,t,n){return e.style[t]=n},attribute:function(e,t,n){return e.setAttribute(t,n)},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,o,i){if(o.list.set(t,n),t===o.last||i){var a="";o.list.forEach((function(e,t){a+=t+"("+e+") "})),e.style.transform=a}}};function gG(e,t){uG(e).forEach((function(e){for(var n in t){var o=KU(t[n],e),i=e.target,a=YU(o),s=tG(i,n,a,e),r=nG(oG(o,a||YU(s)),s),l=JU(i,n);hG[l](i,n,r,e.transforms,!0)}}))}function mG(e,t){return FU(HU(e.map((function(e){return t.map((function(t){return function(e,t){var n=JU(e.target,t.name);if(n){var o=function(e,t){var n;return e.tweens.map((function(o){var i=function(e,t){var n={};for(var o in e){var i=KU(e[o],t);LU.arr(i)&&1===(i=i.map((function(e){return KU(e,t)}))).length&&(i=i[0]),n[o]=i}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(o,t),a=i.value,s=LU.arr(a)?a[1]:a,r=YU(s),l=tG(t.target,e.name,r,t),c=n?n.to.original:l,d=LU.arr(a)?a[0]:c,u=YU(d)||YU(l),p=r||u;return LU.und(s)&&(s=c),i.from=cG(d,p),i.to=cG(nG(s,d),p),i.start=n?n.end:0,i.end=i.start+i.delay+i.duration+i.endDelay,i.easing=zU(i.easing,i.duration),i.isPath=LU.pth(a),i.isPathTargetInsideSVG=i.isPath&&LU.svg(t.target),i.isColor=LU.col(i.from.original),i.isColor&&(i.round=1),n=i,i}))}(t,e),i=o[o.length-1];return{type:n,property:t.name,animatable:e,tweens:o,duration:i.end,delay:o[0].delay,endDelay:i.endDelay}}}(e,t)}))}))),(function(e){return!LU.und(e)}))}function bG(e,t){var n=e.length,o=function(e){return e.timelineOffset?e.timelineOffset:0},i={};return i.duration=n?Math.max.apply(Math,e.map((function(e){return o(e)+e.duration}))):t.duration,i.delay=n?Math.min.apply(Math,e.map((function(e){return o(e)+e.delay}))):t.delay,i.endDelay=n?i.duration-Math.max.apply(Math,e.map((function(e){return o(e)+e.duration-e.endDelay}))):t.endDelay,i}var fG=0,xG=[],yG=function(){var e;function t(n){for(var o=xG.length,i=0;i<o;){var a=xG[i];a.paused?(xG.splice(i,1),o--):(a.tick(n),i++)}e=i>0?requestAnimationFrame(t):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){kG.suspendWhenDocumentHidden&&(vG()?e=cancelAnimationFrame(e):(xG.forEach((function(e){return e._onDocumentVisibility()})),yG()))})),function(){e||vG()&&kG.suspendWhenDocumentHidden||!(xG.length>0)||(e=requestAnimationFrame(t))}}();function vG(){return!!document&&document.hidden}function kG(e){void 0===e&&(e={});var t,n=0,o=0,i=0,a=0,s=null;function r(e){var t=window.Promise&&new Promise((function(e){return s=e}));return e.finished=t,t}var l=function(e){var t=VU(CU,e),n=VU(jU,e),o=function(e,t){var n=[],o=t.keyframes;for(var i in o&&(t=qU(function(e){for(var t=FU(HU(e.map((function(e){return Object.keys(e)}))),(function(e){return LU.key(e)})).reduce((function(e,t){return e.indexOf(t)<0&&e.push(t),e}),[]),n={},o=function(o){var i=t[o];n[i]=e.map((function(e){var t={};for(var n in e)LU.key(n)?n==i&&(t.value=e[n]):t[n]=e[n];return t}))},i=0;i<t.length;i++)o(i);return n}(o),t)),t)LU.key(i)&&n.push({name:i,tweens:pG(t[i],e)});return n}(n,e),i=uG(e.targets),a=mG(i,o),s=bG(a,n),r=fG;return fG++,qU(t,{id:r,children:[],animatables:i,animations:a,duration:s.duration,delay:s.delay,endDelay:s.endDelay})}(e);function c(){var e=l.direction;"alternate"!==e&&(l.direction="normal"!==e?"normal":"reverse"),l.reversed=!l.reversed,t.forEach((function(e){return e.reversed=l.reversed}))}function d(e){return l.reversed?l.duration-e:e}function u(){n=0,o=d(l.currentTime)*(1/kG.speed)}function p(e,t){t&&t.seek(e-t.timelineOffset)}function h(e){for(var t=0,n=l.animations,o=n.length;t<o;){var i=n[t],a=i.animatable,s=i.tweens,r=s.length-1,c=s[r];r&&(c=FU(s,(function(t){return e<t.end}))[0]||c);for(var d=TU(e-c.start-c.delay,0,c.duration)/c.duration,u=isNaN(d)?1:c.easing(d),p=c.to.strings,h=c.round,g=[],m=c.to.numbers.length,b=void 0,f=0;f<m;f++){var x=void 0,y=c.to.numbers[f],v=c.from.numbers[f]||0;x=c.isPath?lG(c.value,u*y,c.isPathTargetInsideSVG):v+u*(y-v),h&&(c.isColor&&f>2||(x=Math.round(x*h)/h)),g.push(x)}var k=p.length;if(k){b=p[0];for(var w=0;w<k;w++){p[w];var _=p[w+1],C=g[w];isNaN(C)||(b+=_?C+_:C+" ")}}else b=g[0];hG[i.type](a.target,i.property,b,a.transforms),i.currentValue=b,t++}}function g(e){l[e]&&!l.passThrough&&l[e](l)}function m(e){var u=l.duration,m=l.delay,b=u-l.endDelay,f=d(e);l.progress=TU(f/u*100,0,100),l.reversePlayback=f<l.currentTime,t&&function(e){if(l.reversePlayback)for(var n=a;n--;)p(e,t[n]);else for(var o=0;o<a;o++)p(e,t[o])}(f),!l.began&&l.currentTime>0&&(l.began=!0,g("begin")),!l.loopBegan&&l.currentTime>0&&(l.loopBegan=!0,g("loopBegin")),f<=m&&0!==l.currentTime&&h(0),(f>=b&&l.currentTime!==u||!u)&&h(u),f>m&&f<b?(l.changeBegan||(l.changeBegan=!0,l.changeCompleted=!1,g("changeBegin")),g("change"),h(f)):l.changeBegan&&(l.changeCompleted=!0,l.changeBegan=!1,g("changeComplete")),l.currentTime=TU(f,0,u),l.began&&g("update"),e>=u&&(o=0,l.remaining&&!0!==l.remaining&&l.remaining--,l.remaining?(n=i,g("loopComplete"),l.loopBegan=!1,"alternate"===l.direction&&c()):(l.paused=!0,l.completed||(l.completed=!0,g("loopComplete"),g("complete"),!l.passThrough&&"Promise"in window&&(s(),r(l)))))}return r(l),l.reset=function(){var e=l.direction;l.passThrough=!1,l.currentTime=0,l.progress=0,l.paused=!0,l.began=!1,l.loopBegan=!1,l.changeBegan=!1,l.completed=!1,l.changeCompleted=!1,l.reversePlayback=!1,l.reversed="reverse"===e,l.remaining=l.loop,t=l.children;for(var n=a=t.length;n--;)l.children[n].reset();(l.reversed&&!0!==l.loop||"alternate"===e&&1===l.loop)&&l.remaining++,h(l.reversed?l.duration:0)},l._onDocumentVisibility=u,l.set=function(e,t){return gG(e,t),l},l.tick=function(e){i=e,n||(n=i),m((i+(o-n))*kG.speed)},l.seek=function(e){m(d(e))},l.pause=function(){l.paused=!0,u()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,xG.push(l),u(),yG())},l.reverse=function(){c(),l.completed=!l.reversed,u()},l.restart=function(){l.reset(),l.play()},l.remove=function(e){_G(dG(e),l)},l.reset(),l.autoplay&&l.play(),l}function wG(e,t){for(var n=t.length;n--;)UU(e,t[n].animatable.target)&&t.splice(n,1)}function _G(e,t){var n=t.animations,o=t.children;wG(e,n);for(var i=o.length;i--;){var a=o[i],s=a.animations;wG(e,s),s.length||a.children.length||o.splice(i,1)}n.length||o.length||t.pause()}kG.version="3.2.1",kG.speed=1,kG.suspendWhenDocumentHidden=!0,kG.running=xG,kG.remove=function(e){
572 +for(var t=dG(e),n=xG.length;n--;)_G(t,xG[n])},kG.get=tG,kG.set=gG,kG.convertPx=ZU,kG.path=function(e,t){var n=LU.str(e)?DU(e)[0]:e,o=t||100;return function(e){return{property:e,el:n,svg:rG(n),totalLength:sG(n)*(o/100)}}},kG.setDashoffset=function(e){var t=sG(e);return e.setAttribute("stroke-dasharray",t),t},kG.stagger=function(e,t){void 0===t&&(t={});var n=t.direction||"normal",o=t.easing?zU(t.easing):null,i=t.grid,a=t.axis,s=t.from||0,r="first"===s,l="center"===s,c="last"===s,d=LU.arr(e),u=d?parseFloat(e[0]):parseFloat(e),p=d?parseFloat(e[1]):0,h=YU(d?e[1]:e)||0,g=t.start||0+(d?u:0),m=[],b=0;return function(e,t,f){if(r&&(s=0),l&&(s=(f-1)/2),c&&(s=f-1),!m.length){for(var x=0;x<f;x++){if(i){var y=l?(i[0]-1)/2:s%i[0],v=l?(i[1]-1)/2:Math.floor(s/i[0]),k=y-x%i[0],w=v-Math.floor(x/i[0]),_=Math.sqrt(k*k+w*w);"x"===a&&(_=-k),"y"===a&&(_=-w),m.push(_)}else m.push(Math.abs(s-x));b=Math.max.apply(Math,m)}o&&(m=m.map((function(e){return o(e/b)*b}))),"reverse"===n&&(m=m.map((function(e){return a?e<0?-1*e:-e:Math.abs(b-e)})))}return g+(d?(p-u)/b:u)*(Math.round(100*m[t])/100)+h}},kG.timeline=function(e){void 0===e&&(e={});var t=kG(e);return t.duration=0,t.add=function(n,o){var i=xG.indexOf(t),a=t.children;function s(e){e.passThrough=!0}i>-1&&xG.splice(i,1);for(var r=0;r<a.length;r++)s(a[r]);var l=qU(n,VU(jU,e));l.targets=l.targets||e.targets;var c=t.duration;l.autoplay=!1,l.direction=t.direction,l.timelineOffset=LU.und(o)?c:nG(o,c),s(t),t.seek(l.timelineOffset);var d=kG(l);s(d),a.push(d);var u=bG(a,e);return t.delay=u.delay,t.endDelay=u.endDelay,t.duration=u.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t},kG.easing=zU,kG.penner=RU,kG.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};const CG=kG,jG=({attributes:e})=>{const{icon:t,options:n,style:o}=e,{type:i}=t,{strokeWidth:a}=o,s=(0,m.useRef)(null),[r,c]=(0,m.useState)(n),{duration:d,repeat:u,direction:p,delay:h,easing:g}=n;(0,m.useEffect)((()=>{CG({targets:s.current?.querySelectorAll("svg path"),strokeDashoffset:[CG.setDashoffset,0],easing:g,duration:d,delay:(e,t)=>t*Number(h),loop:u,autoplay:!0,direction:p})}),[s.current?.querySelectorAll("svg"),n,r]);const b={strokeWidth:a};return(0,l.jsxs)("div",{className:"svdr-icon-draw-wrapper",children:["icon"===i.svgType&&"library"===i.iconType&&t.library&&(0,l.jsx)("div",{ref:s,className:"react-svg-drawing svdr-svg-wrapper",style:b,dangerouslySetInnerHTML:{__html:t.library}}),"icon"===i.svgType&&"upload"===i.iconType&&(0,l.jsx)("div",{ref:s,className:"react-svg-drawing svdr-svg-wrapper",style:b,dangerouslySetInnerHTML:{__html:t.upload||vU}}),"custom"===i.svgType&&(0,l.jsx)("div",{ref:s,className:"react-svg-drawing svdr-svg-wrapper",style:b,dangerouslySetInnerHTML:{__html:t.custom}})]})};Pl(uU.name)&&(0,p.registerBlockType)(uU,{icon:Ur,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,i=`svg-draw-${o}`,a=bBlocksPremiumChecker;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_U,{attributes:t,setAttributes:n,isPremium:a}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),id:i,children:[(0,l.jsx)(pU,{attributes:t,id:i,isBackend:!0}),(0,l.jsx)("div",{children:(0,l.jsx)(jG,{attributes:t})})]})]})}})
573 +;const $G=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/table-of-content","title":"Table of Contents","category":"bBlocks","description":"The Table of Contents block automatically generates a table of contents for your WordPress post or page.","keywords":["table","content","table of contents","heading"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"isNested":{"type":"boolean","default":false},"rendered":{"type":"boolean","default":true},"header":{"type":"object","default":{"bgColor":"","textColor":"#444","iconColor":"#000","separatorWidth":1,"separatorColor":"#ccc"}},"headings":{"type":"array","default":[]},"boxList":{"type":"object","default":{"txtStyle":"normal","nTxtColor":"#2e2e2e","nBarColor":"#b0aeb1","hTxtColor":"#ec1e75","hBarColor":"#ec1e75","nTxtDecoration":false,"hTxtDecoration":false,"dotSize":15,"panelHeight":0,"treeColor":"blueviolet","dotShadow":[{"hOffset":"1px","vOffset":"1px","blur":"5px","spreed":"1px","color":"#b3b3b3","isInset":false}],"maxHeight":{"desktop":0,"tablet":0,"mobile":0},"padding":{"desktop":{"top":"0px","bottom":"0px","left":"20px","right":"0px"},"tablet":{"top":"0px","bottom":"0px","left":"20px","right":"0px"},"mobile":{"top":"0px","bottom":"0px","left":"20px","right":"0px"}}}},"tagName":{"type":"array","default":["h1","h2","h3"]},"title":{"type":"object","default":{"text":"Table of Contents","tag":"h3"}},"markup":{"type":"object","default":{"view":"decimal","icon":"fa-solid fa-circle","color":"#000","markupSize":{"desktop":"16px","tablet":"16px","mobile":"16px"}}},"minimize":{"type":"object","default":{"toggle":true,"expandIcon":"fa-solid fa-chevron-down","collapseIcon":"fa-solid fa-chevron-up"}},"theme":{"type":"string","default":"default"},"sticky":{"type":"object","default":{"toggle":false,"device":["Desktop"],"width":{"desktop":"617px","tablet":"90%","mobile":"100%"},"horizonAlign":"left","verticalAlign":"top","right":{"desktop":"0px","tablet":"0px","mobile":"0px"},"left":{"desktop":"0px","tablet":"0px","mobile":"0px"},"top":{"desktop":"0px","tablet":"0px","mobile":"0px"},"bottom":{"desktop":"0px","tablet":"0px","mobile":"0px"},"zIndex":{"desktop":100,"tablet":100,"mobile":100}}},"slideTitle":{"type":"object","default":{"titleColor":"#2e2e2e","slideBarColor":"#abababbf","spaceDevice":"desktop","space":{"desktop":"15px","tablet":"15px","mobile":"15px"},"spaceBottomDevice":"desktop","spaceBottom":{"desktop":"15px","tablet":"15px","mobile":"15px"},"spaceBottomUnit":{"desktop":"px","tablet":"px","mobile":"px"}}},"slideList":{"type":"object","default":{"spaceDevice":"desktop","space":{"desktop":"15px","tablet":"15px","mobile":"15px"},"fontSize":{"desktop":"16px"}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"tablet":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"mobile":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"borderShadow":{"normal":{"radius":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b0","isInset":false}]}},"background":{"normal":{"type":"color","color":"#fff","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":["file:./view.css"],"render":"file:./render.php","viewScript":["file:./view.js","react","react-dom"]}'),SG=()=>document.querySelectorAll('a[href^="#"]')?.forEach((e=>{e.addEventListener("click",(function(e){e.preventDefault(),document.querySelector(this.getAttribute("href"))?.scrollIntoView({behavior:"smooth"})}))})),TG=[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"div",value:"div"}],NG=[{label:"Numbers",value:"decimal"},{label:"Bullets",value:"disc"}],MG=[{name:"Orange",color:"#F57C00"},{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Cyan",color:"#00BCD4"},{name:"Pink",color:"#E91E63"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],LG=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],PG=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:(0,l.jsx)("path",{d:"M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"})}),EG=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:(0,l.jsx)("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})}),AG=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:(0,l.jsx)("path",{d:"M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z"})}),BG=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"})}),IG=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M246.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L224 402.7 361.4 265.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-160 160zm160-352l-160 160c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L224 210.7 361.4 73.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3z"})}),OG=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",...e,children:(0,l.jsx)("path",{
574 +d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"})}),RG=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M384 480c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"})}),zG=e=>(0,l.jsx)("svg",{height:16,width:16,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",...e,children:(0,l.jsx)("path",{d:"M384 432c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0zm64-16c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"})}),DG=[{label:"Circle",value:"fa-solid fa-circle",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"})})},{label:"Dot Circle",value:"fa-solid fa-circle-dot",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"})})},{label:"Squire",value:"fa-solid fa-square-full",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M0 0H512V512H0V0z"})})},{label:"Circle",value:"fa-regular fa-circle",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"})})},{label:"Dot Circle",value:"fa-regular fa-circle-dot",icon:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"})})}],FG=[{label:"Chevron Down",value:"fa-solid fa-chevron-down",icon:(0,l.jsx)(EG,{})},{label:"Circle Chevron Down",value:"fa-solid fa-circle-chevron-down",icon:(0,l.jsx)(AG,{})},{label:"Angel Down",value:"fa-solid fa-angle-down",icon:(0,l.jsx)(BG,{})},{label:"Angel Double Down",value:"fa-solid fa-angles-down",icon:(0,l.jsx)(IG,{})},{label:"Caret Down",value:"fa-solid fa-caret-down",icon:(0,l.jsx)(OG,{})},{label:"Squire Caret Down",value:"fa-solid fa-square-caret-down",icon:(0,l.jsx)(RG,{})},{label:"Squire Caret Down",value:"fa-regular fa-square-caret-down",icon:(0,l.jsx)(zG,{})}],HG=[{label:"Chevron Up",value:"fa-solid fa-chevron-up",icon:(0,l.jsx)(EG,{className:"tbcnb-rotate180deg"})},{label:"Circle Chevron Up",value:"fa-solid fa-circle-chevron-up",icon:(0,l.jsx)(AG,{className:"tbcnb-rotate180deg"})},{label:"Angel Up",value:"fa-solid fa-angle-up",icon:(0,l.jsx)(BG,{className:"tbcnb-rotate180deg"})},{label:"Angel Double Up",value:"fa-solid fa-angles-up",icon:(0,l.jsx)(IG,{className:"tbcnb-rotate180deg"})},{label:"Caret Up",value:"fa-solid fa-caret-up",icon:(0,l.jsx)(OG,{className:"tbcnb-rotate180deg"})},{label:"Squire Caret Up",value:"fa-solid fa-square-caret-up",icon:(0,l.jsx)(RG,{className:"tbcnb-rotate180deg"})},{label:"Squire Caret Up",value:"fa-regular fa-square-caret-up",icon:(0,l.jsx)(zG,{className:"tbcnb-rotate180deg"})}],WG=({icons:e,label:t,default:n,renderFunction:o,value:i})=>{const[a,s]=(0,m.useState)(!1),r=(0,m.useRef)(),c=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const e=e=>{c?.current?.contains(e.target)||r?.current?.contains(e.target)||s(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}})),(0,l.jsxs)("div",{className:"bblocks-tbcn-iconPicker-main-wrapper",children:[(0,l.jsxs)("div",{className:"bblocks-tbcn-iconPicker-wrapper",children:[(0,l.jsx)("p",{style:{width:"50%",margin:"0"},children:t}),(0,l.jsxs)("div",{className:"bblocks-tbcn-iconPicker",children:[(0,l.jsx)("div",{onClick:()=>o(n),className:"single-icon-admin-panel",children:(0,l.jsx)(PG,{})}),(0,l.jsx)("div",{ref:c,onClick:()=>s(!a),className:"single-icon-admin-panel selectIcon",children:e.map((({value:e,icon:t})=>e===i&&t))})]})]}),a&&(0,l.jsx)("div",{ref:r,className:"bblocks-tbcn-iconPicker-popover-icons",children:e&&e.map(((e,t)=>(0,l.jsxs)("div",{onClick:()=>o(e.value),className:"bblocks-tbcn-single-icon-picker-admin "+(e.value===i?"selectIcon":""),children:[(0,l.jsx)("div",{className:"bblocks-tbcn-icon-picker-tooltip-container",children:(0,l.jsxs)("div",{className:"bblocks-tbcn-icon-picker-tooltip",children:[(0,l.jsx)("span",{children:e.label}),(0,l.jsx)(OG,{})]})}),e.icon]},t)))})]})},UG=({attributes:e,setAttributes:t})=>{const{minimize:n}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Minimize Box","b-blocks"),checked:n.toggle,onChange:e=>t({minimize:{...n,toggle:e}})}),n.toggle&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(WG,{icons:FG,default:"fa-solid fa-chevron-down",label:(0,x.__)("Expand Icon","b-blocks"),value:n.expandIcon,renderFunction:e=>t({minimize:{...n,expandIcon:e}})}),(0,l.jsx)("div",{className:"mt10",children:(0,l.jsx)(WG,{icons:HG,default:"fa-solid fa-chevron-up",label:(0,x.__)("Collapse Icon","b-blocks"),value:n.collapseIcon,renderFunction:e=>t({minimize:{...n,collapseIcon:e}})})})]})]})},GG=({attributes:e,setAttributes:t})=>{const{title:n,theme:o,markup:i,tagName:a,isNested:s=!1}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Table of Contents","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Title","b-blocks"),value:n.text,onChange:e=>((e,o)=>{const i=zb(n,(e=>{e.text=o}));t({title:i})})(0,e)}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Title Tag","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:n.tag,onChange:e=>t({title:{...n,tag:e}}),options:TG})]}),(0,l.jsx)(v,{children:(0,x.__)("Anchors By Tags","b-blocks")}),(0,l.jsx)(Ft,{options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],value:a,onChange:e=>t({tagName:e})}),(0,l.jsx)("br",{}),(0,l.jsx)(y.ToggleControl,{help:"Headings are displayed in a hierarchical structure.",label:(0,x.__)("Enable Nesting","b-blocks"),checked:s,onChange:e=>t({isNested:e})}),"default"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:"Markup view"}),(0,l.jsx)(y.SelectControl,{value:i.view,options:NG,onChange:e=>t({markup:{...i,view:e,icon:"disc"===e&&"fa-solid fa-circle"}})})]}),"disc"===i.view&&(0,l.jsx)(WG,{icons:DG,label:"Icon",renderFunction:e=>t({markup:{...i,icon:e,view:"decimal"===e?"decimal":"disc"}}),value:i.icon,default:"decimal"})]})]})},VG=e=>{const{attributes:t,setAttributes:n}=e,{theme:o}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:"b-blocks",docsLink:"https://bplugins.com/docs/content-slider-block/guides/general"}),(0,l.jsx)(GG,{attributes:t,setAttributes:n}),"default"===o&&(0,l.jsx)(UG,{attributes:t,setAttributes:n})]})},qG=({label:e,units:t,className:n,style:o,value:i="0px",onChange:a=()=>{},...s})=>{const r=(0,m.useRef)(),[c,d]=(0,m.useState)(!1),u=[{label:"px",value:"px"},{label:"%",value:"%"},{label:"em",value:"em"},{label:"rem",value:"rem"},{label:"vw",value:"vw"},{label:"vh",value:"vh"}]||t,p=i.split("").filter((e=>!isNaN(e)&&"%"!==e)).join(""),h=i.split("").filter((e=>isNaN(e)||"%"===e)).join(""),[g,b]=(0,m.useState)(p),[f,x]=(0,m.useState)(h)
575 +;(0,m.useEffect)((()=>{a(`${g}${f}`)}),[g,f]),(0,m.useEffect)((()=>{const e=e=>{r?.current?.contains(e.target)||d(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}));const v=Math.floor(999999*Math.random());return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("style",{children:"\n .labelWrapper {\n display: flex;\n justify-content: space-between;\n }\n .rangeControlWrapper {\n display: flex;\n }\n\n .unitControlBtn {\n font-size: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 9999;\n border: 1px solid rgb(168, 168, 168);\n border-left: none;\n cursor: pointer;\n font-weight: 600;\n background-color: #0000;\n height: 32px;\n width: 21px;\n border-radius: 0 2px 2px 0;\n text-transform: uppercase;\n margin-left: -1px;\n }\n\n .unitControlBtn:focus {\n border-color: #3858e9;\n border-left: 1px solid #3858e9;\n }\n .unitControlWrapper {\n position: relative;\n }\n .unitListWrapper {\n position: absolute;\n right: 0px;\n z-index: 9999 !important;\n background: #fff;\n font-weight: 600;\n border: 1px solid rgb(168, 168, 168);\n width: 19px;\n text-align: center;\n border-radius: 0 0 2px 2px;\n }\n .unitList {\n margin: 0;\n cursor: default;\n font-size: 10px;\n }\n .unitList:hover {\n background-color: #3858e9;\n color: aliceblue;\n }\n .hoverBgColor {\n background-color: #3858e9;\n color: aliceblue;\n }\n "}),(0,l.jsxs)("div",{id:`unitId-${v}`,className:`unitRangeWrapper ${n}`,style:o,children:[(0,l.jsx)("div",{className:"labelWrapper",children:(0,l.jsx)("label",{htmlFor:"",children:e})}),(0,l.jsxs)("div",{className:"rangeControlWrapper",children:[(0,l.jsx)("div",{style:{width:"100%"},children:(0,l.jsx)(y.RangeControl,{value:Number(p),onChange:e=>b(e),...s})}),(0,l.jsxs)("div",{ref:r,className:"unitControlWrapper",children:[(0,l.jsx)("button",{onClick:()=>d(!c),className:"unitControlBtn",children:h}),c&&(0,l.jsx)("div",{className:"unitListWrapper",children:u?.map(((e,t)=>(0,l.jsx)("p",{onClick:()=>{x(e.value),d(!1)},className:`unitList ${e.value===f?"hoverBgColor":""} `,children:e.label},t)))})]})]})]})]})},YG=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,device:n})=>{const{header:o,boxList:i,markup:a}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Ue,{label:(0,x.__)("Background Color","b-blocks"),value:o.bgColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"bgColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:o.txtColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"txtColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:o.iconColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"iconColor")})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Separator Width","b-blocks"),value:o.separatorWidth,onChange:e=>t({header:be(o,e,"separatorWidth")}),min:0,max:100,step:1}),(0,l.jsx)(Ue,{label:(0,x.__)("Separator Color","b-blocks"),value:o.separatorColor,defaults:"#ccc",colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({header:be(o,e,"separatorColor")})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("List Item","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"60px",top:"0px"}}),(0,l.jsx)(k,{label:(0,x.__)("Padding","b-blocks"),values:i.padding[n],resetValues:{top:"0px",left:"20px",right:"0px",bottom:"0px"},onChange:e=>t({boxList:be(i,e,"padding",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"80px",top:"0px"}}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Max Height","b-blocks"),value:i.maxHeight[n],onChange:e=>t({boxList:be(i,e,"maxHeight",n)}),min:0,max:1e3,step:1})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.nTxtColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({boxList:{...i,nTxtColor:e}})}),(0,l.jsx)("div",{style:{marginTop:"10px"},children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Underline","b-blocks"),checked:i.nTxtDecoration,onChange:e=>t({boxList:{...i,nTxtDecoration:e}})})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:i.hTxtColor,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({boxList:{...i,hTxtColor:e}})}),(0,l.jsx)("div",{style:{marginTop:"10px"},children:(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Underline","b-blocks"),checked:i.hTxtDecoration,onChange:e=>t({boxList:{...i,hTxtDecoration:e}})})})]})]})}),(0,l.jsx)("div",{style:{borderTop:"1px solid #ccc",margin:"15px 0",paddingTop:"10px"},children:(0,l.jsx)("strong",{children:"Marker"})}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:a.color,colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],onChange:e=>t({markup:be(a,e,"color")})}),(0,l.jsx)("div",{style:{marginTop:"10px"},children:(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition"}),(0,l.jsx)(qG,{label:(0,x.__)("Size","b-blocks"),value:a.markupSize[n],min:0,step:1,max:a.markupSize[n].includes("px")?50:100,onChange:e=>t({markup:be(a,e,"markupSize",n)})})]})})]})]})})),KG=(0,f.withSelect)((e=>({device:e("core/edit-post").__experimentalGetPreviewDeviceType()?.toLowerCase()})))((({attributes:e,setAttributes:t,device:n})=>{const{slideTitle:o,slideList:i,boxList:a}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("List","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"Heading"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color","b-blocks"),value:o.titleColor,colors:[{name:"Orange",color:"#F57C00"},{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Cyan",color:"#00BCD4"},{name:"Pink",color:"#E91E63"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({slideTitle:{...o,titleColor:e}})}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(qG,{label:(0,x.__)("Space Top","b-blocks"),value:o.space[n],min:0,max:o.space[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(qG,{label:(0,x.__)("Space Bottom","b-blocks"),value:o.spaceBottom[n],min:0,max:o.spaceBottom[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"spaceBottom",n)})})]}),(0,l.jsxs)("div",{style:{
576 +marginTop:"10px",borderTop:"1px solid #ccc",paddingTop:"10px"},children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"List Item"}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(qG,{label:(0,x.__)("List Space Bottom","b-blocks"),value:i.space[n],min:0,max:i.space[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(qG,{label:(0,x.__)("List Font Size","b-blocks"),value:i.fontSize[n],min:0,max:i.fontSize[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"fontSize",n)})})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.nTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,nTxtColor:e}})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:a.nbarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,nbarColor:e}})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.hTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,hTxtColor:e}})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:a.hBarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,hBarColor:e}})})]})]})})]})})})),QG=(0,f.withSelect)((e=>({device:e("core/edit-post").__experimentalGetPreviewDeviceType()?.toLowerCase()})))((({attributes:e,setAttributes:t,device:n})=>{const{slideTitle:o,slideList:i,boxList:a}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slide","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"Heading"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color","b-blocks"),value:o.titleColor,colors:MG,onChange:e=>t({slideTitle:{...o,titleColor:e}})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:o.slideBarColor,colors:MG,onChange:e=>t({slideTitle:{...o,slideBarColor:e}})}),(0,l.jsxs)("div",{style:{marginTop:"10px"},children:[(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"70px"}}),(0,l.jsx)(qG,{label:(0,x.__)("Space Top","b-blocks"),value:o.space[n],min:0,step:1,max:o.space[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"90px"}}),(0,l.jsx)(qG,{label:(0,x.__)("Space Bottom","b-blocks"),value:o.spaceBottom[n],min:0,step:1,max:o.spaceBottom[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"spaceBottom",n)})})]})]}),(0,l.jsxs)("div",{style:{marginTop:"10px",borderTop:"1px solid #ccc",paddingTop:"10px"},children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"List Item"}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(qG,{label:(0,x.__)("List Space Bottom","b-blocks"),value:i.space[n],min:0,max:i.space[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"90px"}}),(0,l.jsx)(qG,{label:(0,x.__)("List Font Size","b-blocks"),value:i.fontSize[n],min:0,max:i.fontSize[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"fontSize",n)})})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.nTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(a,e,"nTxtColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:a.nBarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(a,e,"nBarColor")})})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.hTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(a,e,"hTxtColor")})}),(0,l.jsx)(Ue,{label:(0,x.__)("Bar Color","b-blocks"),value:a.hBarColor,defaults:"#b0aeb1",colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:be(a,e,"hBarColor")})})]})]})})]})})})),ZG=(0,f.withSelect)((e=>({device:e("core/edit-post").__experimentalGetPreviewDeviceType()?.toLowerCase()})))((({attributes:e,setAttributes:t,device:n})=>{const{slideTitle:o,slideList:i,boxList:a}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Timeline","b-blocks"),initialOpen:!0,children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"Heading"}),(0,l.jsx)(Ue,{label:(0,x.__)("Title Color","b-blocks"),value:o.titleColor,colors:[{name:"Orange",color:"#F57C00"},{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Cyan",color:"#00BCD4"},{name:"Pink",color:"#E91E63"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({slideTitle:{...o,titleColor:e}})}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(qG,{label:(0,x.__)("Space Top","b-blocks"),value:o.space[n],min:0,max:o.space[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"space",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(qG,{label:(0,x.__)("Space Bottom","b-blocks"),value:o.spaceBottom[n],min:0,max:o.spaceBottom[n].includes("%")?100:200,onChange:e=>t({slideTitle:be(o,e,"spaceBottom",n)})})]}),(0,l.jsxs)("div",{style:{marginTop:"10px",borderTop:"1px solid #ccc",paddingTop:"10px"},children:[(0,l.jsx)("strong",{style:{marginBottom:"15px",color:"gray"},children:"List Item"}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(qG,{label:(0,x.__)("List Space Bottom","b-blocks"),value:i.space[n],min:0,max:i.space[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"space",n)})})]
577 +}),(0,l.jsxs)("div",{style:{marginTop:"10px"},className:"panelPosition",children:[(0,l.jsx)(_,{className:"devicePosition",style:{left:"110px"}}),(0,l.jsx)(qG,{label:(0,x.__)("List Font Size","b-blocks"),value:i.fontSize[n],min:0,max:i.fontSize[n].includes("%")?100:200,onChange:e=>t({slideList:be(i,e,"fontSize",n)})})]})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Me,onSelect:me,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.nTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,nTxtColor:e}})})}),"hover"===e.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ue,{label:(0,x.__)("Text Color","b-blocks"),value:a.hTxtColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],onChange:e=>t({boxList:{...a,hTxtColor:e}})})})]})}),(0,l.jsxs)("div",{style:{borderTop:"1px solid #ccc",marginTop:"10px",paddingTop:"10px"},children:[(0,l.jsx)("p",{style:{marginBottom:"10px"},children:(0,l.jsx)("strong",{children:"Dots"})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Size","b-blocks"),value:a.dotSize,min:0,step:1,max:70,onChange:e=>t({boxList:{...a,dotSize:e}})}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:a.dotShadow,onChange:e=>t({boxList:{...a,dotShadow:e}}),defaults:[{hOffset:"1px",vOffset:"1px",blur:"5px",spread:"1px",color:"#b3b3b3"}]}),(0,l.jsx)(Ue,{label:(0,x.__)("Tree Color","b-blocks"),value:a.treeColor,colors:[{name:"Purple",color:"#9C27B0"},{name:"Gray",color:"#9E9E9E"},{name:"Pink",color:"#E91E63"},{name:"Orange",color:"#F57C00"},{name:"Lime",color:"#CDDC39"},{name:"Brown",color:"#795548"}],defaults:"blueviolet",onChange:e=>t({boxList:{...a,treeColor:e}})})]})]})})})),XG=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,device:n})=>{const{theme:o,sticky:i}=e;return(0,l.jsxs)(l.Fragment,{children:[i.toggle&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Container","b-blocks"),children:(0,l.jsx)(y.__experimentalUnitControl,{value:i.width[n],label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Width","b-blocks")," ",(0,l.jsx)(_,{})]}),onChange:e=>t({sticky:be(i,e,"width",n)})})}),"default"===o&&(0,l.jsx)(YG,{attributes:e,setAttributes:t}),"slide"===o&&(0,l.jsx)(QG,{attributes:e,setAttributes:t}),"timeline"===o&&(0,l.jsx)(ZG,{attributes:e,setAttributes:t}),"list"===o&&(0,l.jsx)(KG,{attributes:e,setAttributes:t})]})})),JG=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t,a={dimension:["padding","margin"],transform:!0,background:["normal","hover","overlay"],borderShadow:["normal","hover","border","shadow"],mask:!0,visibility:["zIndex","overflow"],responsive:!0,css:!0};return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:LG,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(VG,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(XG,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),enabled:a,isPremium:o})})]})})})})},eV=()=>(0,l.jsx)("div",{style:{padding:"14px"},children:(0,l.jsx)("p",{style:{margin:"0px"},children:"No headings were found on this page!"})}),tV=({attributes:e,id:t})=>{const{header:n,boxList:o,markup:i,sticky:a}=e,s=`#${t}`,r=`${s} .bblocks-tbcn-accordion`,c=`${r} .bblocks-tbcn-accordion-title`,d=`${r} .bblocks-tbcn-panel`,u=`${d} .bblocks-tbcn-panel-table-container-order-list`,p=`${u} .bblocks-tbcn-panel-table-list-items`,h=`${s} ol li a.bblocks-tbcn-table-content-anchor-list`;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("style",{
578 +children:`\n ${h}:hover{\n color:${o.hTxtColor} !important; \n text-decoration:${o.hTxtDecoration?"underline":"none"} !important;\n }\n ${d} :where(ol){\n list-style:none !important;\n }\n ${h}{\n color:${o.nTxtColor} !important;\n text-decoration:${o.nTxtDecoration?"underline":"none"};\n\n }\n ${r}.sticky {\n ${ns("width",a.width.desktop)}\n z-index: ${a.zIndex.desktop} !important;\n position:fixed;\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].desktop};\n }`)).join("")}\n ${u} .bblocks-tbcn-list-item-content{\n display:flex;\n align-items:center;\n gap:5px;\n }\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e]?.desktop}\n }`)).join("")}\n ${"center"===a.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${"decimal"===i.view?`\n \n ${u}{\n list-style-type:none;\n margin:0px;\n }\n ${p}::marker{\n color:${i.color};\n font-size:${i.markupSize.desktop};\n }\n ${p} .bblocks-tbcn-list-item-content>span{\n color:${i.color};\n font-size:${i.markupSize.desktop};\n }\n ${p} .bblocks-tbcn-list-item-content{\n gap:0px;\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n ${p} .bblocks-tbcn-list-item-content>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.desktop} !important;\n }\n `}\n ${c}{\n background:${n.bgColor};\n border-bottom: ${n.separatorWidth}px solid ${n.separatorColor};\n margin-bottom:-2px;\n }\n ${c}>svg{\n fill:${n.iconColor}\n }\n ${r}>.panel{\n ${o.maxHeight.desktop>0?"max-height:"+o.maxHeight.desktop+"px;":""}\n ${o.maxHeight.desktop>0?"overflow-y:auto;":""}\n \n \n }\n ${h}.item-active{\n color:${o.hTxtColor} !important;\n }\n ${p}{\n padding-top:${o.padding.desktop?.top};\n padding-bottom:${o.padding.desktop?.bottom};\n padding-right:${o.padding.desktop?.right};\n }\n ${u}{\n padding-left:${o.padding.desktop?.left};\n }\n @media screen and (min-width: 1024px) {\n ${r}.sticky {\n z-index: ${a.zIndex.desktop} !important;\n position:${a?.device.includes("Desktop")?"fixed":"initial"};\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].desktop};\n }`)).join("")}\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].desktop}\n }`)).join("")}\n ${"center"===a.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${d}{\n ${o.maxHeight.desktop>0?"max-height:"+o.maxHeight.desktop+"px;":""}\n ${o.maxHeight.desktop>0?"overflow-y:auto;":""}\n }\n ${p}{\n padding-top:${o.padding.desktop?.top};\n padding-bottom:${o.padding.desktop?.bottom};\n padding-right:${o.padding.desktop?.right};\n }\n ${u}{\n padding-left:${o.padding.desktop?.left};\n }\n ${"decimal"===i.view?`\n ${p}::marker{\n font-size:${i.markupSize.desktop};\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n\n ${p} .bblocks-tbcn-list-item-content>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.desktop} !important;\n }\n `}\n }\n @media only screen and (min-width:641px) and (max-width: 1024px){\n ${r}.sticky {\n ${ns("width",a.width.tablet)}\n z-index: ${a.zIndex.tablet} !important;\n position:${a.device.includes("Tablet")?"fixed":"initial"};\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].tablet};\n }`)).join("")}\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].tablet}\n }`)).join("")}\n ${"center"===a.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${d}{\n ${o.maxHeight.tablet>0?"max-height:"+o.maxHeight.tablet+"px;":""}\n ${o.maxHeight.tablet>0?"overflow-y:auto;":""}\n }\n ${p}{\n padding-top:${o.padding.tablet?.top};\n padding-bottom:${o.padding.tablet?.bottom};\n padding-right:${o.padding.tablet?.right};\n }\n ${u}{\n padding-left:${o.padding.tablet?.left};\n }\n ${"decimal"===i.view?`\n ${p}::marker{\n font-size:${i.markupSize.tablet};\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n ${p}>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.tablet} !important;\n }\n `}\n\n }\n @media only screen and (max-width: 640px) {\n ${r}.sticky {\n ${ns("width",a.width.mobile)}\n z-index: ${a.zIndex.mobile} !important;\n position:${a.device.includes("Mobile")?"fixed":"initial"};\n }\n ${["left","right"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].mobile};\n }`)).join("")}\n ${["top","bottom"].map((e=>`${r}.sticky.${e}{\n ${e}:${a[e].mobile}\n }`)).join("")}\n ${"center"===a.verticalAlign?`${r}.sticky.center{top:50%; transform: translateY(-50%)}`:null}\n ${d}{\n ${o.maxHeight.mobile>0?"max-height:"+o.maxHeight.mobile+"px;":""}\n ${o.maxHeight.mobile>0?"overflow-y:auto;":""}\n }\n ${p}{\n padding-top:${o.padding.mobile?.top};\n padding-bottom:${o.padding.mobile?.bottom};\n padding-right:${o.padding.mobile?.right};\n }\n ${u}{\n padding-left:${o.padding.mobile?.left};\n }\n ${"decimal"===i.view?`\n ${p}::marker{\n font-size:${i.markupSize.mobile};\n }\n `:`\n ${u}{\n list-style-type:none;\n }\n ${p} .bblocks-tbcn-list-item-content>span>svg{\n color:${i.color};\n fill:${i.color};\n height:${i.markupSize.mobile} !important;\n }\n `}\n }\n `})})},nV=({items:e,markup:t,bullets:n,contentsAttr:o,setContentsAttr:i,className:a="",prefix:s=""})=>e&&0!==e.length?(0,l.jsx)("ol",{className:`bblocks-tbcn-panel-table-container-order-list ${a}`,children:e.map(((e,a)=>{const r=s?`${s}.${a+1}`:`${a+1}`;return"bblocks-tbcn-content-table-title"!==e.className&&(0,l.jsxs)("li",{className:"bblocks-tbcn-panel-table-list-items",children:[(0,l.jsxs)("div",{className:"bblocks-tbcn-list-item-content",children:["decimal"===t.view?(0,l.jsxs)("span",{className:"bblocks-tbcn-decimal-number",children:[r,"."]}):(0,l.jsx)("span",{children:n.map((({value:e,icon:n},o)=>e===t.icon&&(0,l.jsx)(m.Fragment,{children:n},`bullet-${o}`)))}),(0,l.jsx)("a",{className:"bblocks-tbcn-table-content-anchor-list "+(e.id===o?"item-active":""),href:`#${e.id}`,onClick:()=>i(e.id),children:e.contents})]}),e.children&&e.children.length>0&&(0,l.jsx)(nV,{items:e.children,markup:t,bullets:n,contentsAttr:o,setContentsAttr:i,className:"bblocks-tbcn-nested-list",prefix:r})]},e.id+e.contents+s)}))}):null,oV=nV,iV=({attributes:e,setAttributes:t,id:n})=>{const[o,i]=(0,m.useState)(!0),[a,s]=(0,m.useState)(),{boxList:r,header:c,title:d,tagName:u,minimize:p,markup:h,sticky:g,isNested:b=!1}=e,f=(0,m.useRef)(),x=(0,m.useRef)(),y=(0,m.useRef)(),{content:v,savedElements:k}=((e,t,n,o,i,a)=>{const[s,r]=(0,m.useState)([]),[l,c]=(0,m.useState)([]),d=(0,m.useCallback)((e=>e.className===i?null:(Array.from(e.children).slice(1).forEach((e=>e.remove())),{contents:e.textContent,tag:e.tagName,id:e.children[0]?.getAttribute("id")
579 +})),[]),u=(0,m.useCallback)((e=>{Array.from(e).forEach(((e,t)=>{if(e.className!=i&&e?.children&&!Array.from(e?.children).some((e=>e.getAttribute("id")?.startsWith("bppb-heading-anchor-")))){const n=document.createElement("span");n.setAttribute("id",`bppb-heading-anchor-${t}`),e.insertAdjacentElement("afterbegin",n)}}))}),[]),p=(0,m.useCallback)(((e,t)=>{if(e){if("div"!==e.tagName.toLowerCase()){const t=e.querySelector("span");t?.remove()}e.innerHTML=t}}),[]);return(0,m.useEffect)((()=>{(()=>{const i=a?.ownerDocument||a||document,s=i?.querySelector(".wp-block-post-content");if(!s&&!a)return;const l=e.join(", "),h=s?.querySelectorAll(l);if(!h?.length)return;const g=Array.from(h).map(d).filter(Boolean);c(g),u(h);const m=document.querySelector(o),b=m?.querySelector(t);p(b,n),r(h)})()}),[e,t,n,o,d,u,p,a]),{savedElements:l,content:s}})(u,d.tag,d.text,".bblocks-tbcn-accordion-title","bblocks-tbcn-content-table-title",f?.current);(0,m.useEffect)((()=>{k&&t({headings:k})}),[k]),(0,m.useEffect)((()=>{const e=y.current,t=()=>{const t="0px"!==e.style.height,n=t?"0px":`${e.scrollHeight}px`;e.style.height=n,i(!t)};return p.toggle&&x.current.addEventListener("click",t),()=>x.current?.removeEventListener("click",t)}),[JSON.stringify(r),r.maxHeight,d.tag,u,h.view,p.toggle]);const w=b?(e=>{const t=[],n=[{level:0,children:t}];return e.forEach((e=>{const t=parseInt(e.tag.replace("H",""),10),o={...e,children:[]};for(;n.length>1&&n[n.length-1].level>=t;)n.pop();n[n.length-1].children.push(o),n.push({level:t,children:o.children})})),t})(e.headings):e.headings;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tV,{attributes:e,id:n}),(0,l.jsxs)("div",{ref:f,className:`bblocks-tbcn-accordion ${g.toggle?"sticky":""} ${g.horizonAlign} ${g.verticalAlign} `,children:[(0,l.jsxs)("div",{ref:x,className:"bblocks-tbcn-accordion-title",children:[(0,l.jsx)(zn,{className:"bblocks-tbcn-content-table-title",style:{margin:"0",color:c.txtColor},tagName:d?.tag,dangerouslySetInnerHTML:{__html:d?.text}}),p.toggle&&(0,l.jsx)(l.Fragment,{children:o?HG.map((({value:e,icon:t},n)=>e===p.collapseIcon&&(0,l.jsx)("span",{children:t},`expand-${n}`))):FG.map((({value:e,icon:t},n)=>e===p.expandIcon&&(0,l.jsx)("span",{children:t},`expand-${n}`)))})]}),(0,l.jsx)("div",{ref:y,className:"bblocks-tbcn-panel",children:v?.length>1?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(oV,{items:w,markup:h,bullets:DG,contentsAttr:a,setContentsAttr:s})}):(0,l.jsx)(eV,{})})]})]})};Pl($G.name)&&(0,p.registerBlockType)($G,{icon:Gr,edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{minimize:i}=t,{advanced:a}=t,{headingContent:s,headingTags:r}=(()=>{const[e,t]=(0,m.useState)(null),[n,o]=(0,m.useState)([]),i=(0,m.useRef)([]),a=(0,f.useSelect)((e=>e("core/block-editor").getBlocks()),[]);return(0,m.useEffect)((()=>{const e=a,n=i.current,s=e.filter((e=>"core/heading"===e.name)),r=n.filter((e=>"core/heading"===e.name));s.forEach((e=>{const n=r.find((t=>t.clientId===e.clientId));n&&n.attributes.content!==e.attributes.content&&t(e.attributes.content)}));const l=s.map((e=>({level:e.attributes.level,content:e.attributes.content})));o(l),i.current=e}),[a]),{headingContent:e,headingTags:n}})(),c=bBlocksPremiumChecker,d=`block-${o}`;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(JG,{attributes:t,setAttributes:n,isPremium:c}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`${_s(d,a,!1)}`}}),(0,l.jsxs)("div",{children:[(0,l.jsx)(SG,{}),(0,l.jsx)(iV,{setAttributes:n,attributes:t,id:d},i.toggle+s+r+a?.animation?.type)]})]})]})}});const aV=JSON.parse('{"apiVersion":3,"name":"b-blocks/team-members","title":"Team Members","description":"Display Team members section.","category":"bBlocks","keywords":["team","members","team members section"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":"wide"},"members":{"type":"array","default":[{"background":{"color":"#0000"},"border":{"radius":"3px"},"shadow":[],"photo":{"id":null,"url":"","alt":"","title":""},"photoBorder":{"radius":"50%"},"name":"Martin","nameColor":"#333","title":"Founder","titleColor":"#333","separator":{"width":"20%","height":"3px","color":"#777"},"bio":"I am a self-motivated and self-taught professional who likes to solve problems.","bioColor":"#333","social":[{"link":"#","icon":{"class":"fab fa-facebook-f"}},{"link":"#","icon":{"class":"fab fa-twitter"}},{"link":"#","icon":{"class":"fab fa-linkedin-in"}}],"socialIconColors":{"color":"#fff","bg":"#146EF5"},"iconStyle":{"hover":{"socialIconColors":{"color":"#fff","bg":"#146EF5"},"border":{},"shadow":{}},"normal":{"border":{},"shadow":[]}}},{"background":{"color":"#0000"},"border":{"radius":"3px"},"shadow":[],"photo":{"id":null,"url":"","alt":"","title":""},"photoBorder":{"radius":"50%"},"name":"Mary","nameColor":"#333","title":"Co-Founder","titleColor":"#333","separator":{"width":"20%","height":"3px","color":"#777"},"bio":"I am a self-motivated and self-taught professional who likes to solve problems.","bioColor":"#333","social":[{"link":"#","icon":{"class":"fab fa-facebook-f"}},{"link":"#","icon":{"class":"fab fa-twitter"}},{"link":"#","icon":{"class":"fab fa-linkedin-in"}}],"socialIconColors":{"color":"#fff","bg":"#146EF5"},"iconStyle":{"hover":{"socialIconColors":{"color":"#fff","bg":"#146EF5"},"border":{},"shadow":{}},"normal":{"border":{},"shadow":[]}}},{"background":{"color":"#0000"},"border":{"radius":"3px"},"shadow":[],"photo":{"id":null,"url":"","alt":"","title":""},"photoBorder":{"radius":"50%"},"name":"John Doe","nameColor":"#333","title":"CEO","titleColor":"#333","separator":{"width":"20%","height":"3px","color":"#777"},"bio":"I am a self-motivated and self-taught professional who likes to solve problems.","bioColor":"#333","social":[{"link":"#","icon":{"class":"fab fa-facebook-f"}},{"link":"#","icon":{"class":"fab fa-twitter"}},{"link":"#","icon":{"class":"fab fa-linkedin-in"}}],"socialIconColors":{"color":"#fff","bg":"#146EF5"},"iconStyle":{"hover":{"socialIconColors":{"color":"#fff","bg":"#146EF5"},"border":{},"shadow":{}},"normal":{"border":{},"shadow":[]}}}]},"columns":{"type":"object","default":{"desktop":3,"tablet":2,"mobile":1}},"columnGap":{"type":"string","default":"30px"},"rowGap":{"type":"string","default":"30px"},"layout":{"type":"string","default":"vertical"},"theme":{"type":"string","default":"default"},"isLinkNewTab":{"type":"boolean","default":false},"textAlign":{"type":"string","default":"center"},"padding":{"type":"object","default":{"vertical":"50px","horizontal":"20px"}},"photoWidth":{"type":"string","default":"170px"},"photoMargin":{"type":"object","default":{"side":4,"bottom":"20px"}},"nameTypo":{"type":"object","default":{"fontSize":{"desktop":"20px","tablet":"18px","mobile":"16px"},"fontWeight":600}},"nameMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isTitle":{"type":"boolean","default":true},"titleTypo":{"type":"object","default":{"fontSize":{"desktop":"16px"}}},"titleMargin":{"type":"object","default":{"side":4,"bottom":"10px"}},"isSep":{"type":"boolean","default":true},"sepMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isBio":{"type":"boolean","default":true},"bioTypo":{"type":"object","default":{"fontSize":{"desktop":"15px"}}},"bioMargin":{"type":"object","default":{"side":4,"bottom":"15px"}},"isSocial":{"type":"boolean","default":true},"socialSize":{"type":"string","default":"22px"},"socialIconMargin":{"type":"object","default":{"side":2,"vertical":"10px","horizontal":"10px"}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"columns":{"desktop":1,"tablet":1,"mobile":1}}},"editorScript":"file:../index.js","style":["file:./view.css","fontAwesome"],"render":"file:./render.php","viewScript":"file:./view.js"}'),sV=({attributes:e,index:t,updateMember:n})=>{
580 +const{members:i}=e,{background:a={},border:s={},shadow:r={},photo:c,photoBorder:d={},nameColor:u="",titleColor:p="",separator:h={},bioColor:g="",socialIconColors:m={},iconStyle:b={}}=i[t]||{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:a,onChange:e=>n(t,"background",e)}),(0,l.jsx)(ed,{label:(0,x.__)("Border:","b-blocks"),value:s,onChange:e=>n(t,"border",e),defaults:{radius:"3px"}}),(0,l.jsx)(yt,{label:(0,x.__)("Shadow:","b-blocks"),value:r?.shadow||r,onChange:e=>n(t,"shadow",e)}),(0,l.jsx)(v,{children:(0,x.__)("Photo:","b-blocks")}),(0,l.jsx)(ke,{value:c,onChange:e=>n(t,"photo",e),placeholder:(0,x.__)("Enter Image URL","b-blocks")}),(0,l.jsx)(nd,{className:"mt20",value:c,onChange:e=>n(t,"photo",e)}),(0,l.jsx)(ed,{label:(0,x.__)("Photo Border:","b-blocks"),value:d,onChange:e=>n(t,"photoBorder",e),defaults:{radius:"50%"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Name Color:","b-blocks"),value:u,onChange:e=>n(t,"nameColor",e),defaultColor:"#333"}),(0,l.jsx)(Ue,{label:(0,x.__)("Designation/Title Color:","b-blocks"),value:p,onChange:e=>n(t,"titleColor",e),defaultColor:"#333"}),(0,l.jsx)(Ta,{value:h,onChange:e=>n(t,"separator",e),defaults:{width:"20%",height:"3px",color:"#777"}}),(0,l.jsx)(Ue,{label:(0,x.__)("Bio Color:","b-blocks"),value:g,onChange:e=>n(t,"bioColor",e),defaultColor:"#333"}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel mini",activeClass:"activeTab",tabs:en,children:e=>(0,l.jsxs)(l.Fragment,{children:["normal"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{label:(0,x.__)("Social Icon Colors:","b-blocks"),value:m,onChange:e=>n(t,"socialIconColors",e),defaults:{color:"#fff",bg:o}}),(0,l.jsx)(ed,{label:(0,x.__)("Icon Border","b-blocks"),value:b?.normal?.border,onChange:e=>n(t,"iconStyle",e,"normal","border")}),(0,l.jsx)(yt,{label:(0,x.__)("Icon Shadow","b-blocks"),value:b?.normal?.shadow,onChange:e=>n(t,"iconStyle",e,"normal","shadow")})]}),"hover"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(On,{label:(0,x.__)("Social Icon Colors:","b-blocks"),value:b?.hover?.socialIconColors,onChange:e=>n(t,"iconStyle",e,"hover","socialIconColors")}),(0,l.jsx)(ed,{label:(0,x.__)("Icon Border","b-blocks"),value:b?.hover?.border,onChange:e=>n(t,"iconStyle",e,"hover","border")}),(0,l.jsx)(yt,{label:(0,x.__)("Icon Shadow","b-blocks"),value:b?.hover?.border,onChange:e=>n(t,"iconStyle",e,"hover","shadow")})]})]})})]})},rV=[{label:(0,x.__)("Default","b-blocks"),value:"default"},{label:(0,x.__)("Theme 1","b-blocks"),value:"theme1"},{label:(0,x.__)("Theme 2","b-blocks"),value:"theme2"},{label:(0,x.__)("Theme 3","b-blocks"),value:"theme3"},{label:(0,x.__)("Theme 4","b-blocks"),value:"theme4"}],lV=[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical",icon:d},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal",icon:u}],cV=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,updateMember:n,activeIndex:i,setActiveIndex:a,isPremium:s,device:r})=>{const{members:c=[],columns:d,columnGap:u,rowGap:p,layout:g,theme:m,isLinkNewTab:b,textAlign:f,padding:k,photoWidth:w,photoMargin:C,nameTypo:j,nameMargin:$,isTitle:S,titleTypo:T,titleMargin:N,isSep:M,sepMargin:L,isBio:P,bioTypo:E,bioMargin:A,isSocial:B,socialSize:I,socialIconMargin:O}=e,R=()=>({background:{color:"#0000"},border:{radius:"3px"},shadow:[],photo:{id:null,url:"",alt:"",title:""},photoBorder:{radius:"50%"},name:"John Smith",nameColor:"#333",title:"Manager",titleColor:"#333",separator:{width:"20%",height:"3px",style:"solid",color:"#777"},bio:"I am a self-motivated and self-taught professional who likes to solve problems.",bioColor:"#333",social:[{link:"#",icon:{class:"fab fa-facebook-f",fontSize:22,color:"#fff"}},{link:"#",icon:{class:"fab fa-twitter",fontSize:22,color:"#fff"}},{link:"#",icon:{class:"fab fa-linkedin-in",fontSize:22,color:"#fff"}}],socialIconColors:{color:"#fff",bg:o}}),z=e=>{const n=zb(c,(t=>{t.map(((n,o)=>{for(const n of e){const e=n[0],i=n[1];t[o][e]=i}}))}));t({members:n})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Zt,children:h=>(0,l.jsxs)(l.Fragment,{children:["general"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn,docsLink:xn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Add or Remove Members","b-blocks"),children:[(0,l.jsx)(_a,{attributes:e,setAttributes:t,activeIndex:i,setActiveIndex:a,updateMember:n,arrKey:"members",ItemSettings:sV,itemLabel:"Team Member",newItem:R(),design:s?"sortable":"single"}),!s&&(0,l.jsxs)("small",{children:[" ",(0,l.jsx)("b",{children:(0,l.jsx)("a",{href:yn,target:"__blank",children:"Upgrade to Premium"})})," to unlock sorting and more features."]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout Settings","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Columns:","b-blocks")}),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.RangeControl,{value:d[r],onChange:e=>{t({columns:{...d,[r]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-blocks"),labelPosition:"left",value:u,onChange:e=>t({columnGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-blocks"),labelPosition:"left",value:p,onChange:e=>t({rowGap:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsxs)(y.PanelRow,{className:"mt20",children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Layout:","b-blocks")}),(0,l.jsx)(Tn,{value:g,onChange:e=>{t({layout:e}),"vertical"===e&&t({columns:{...d,desktop:3,tablet:2},textAlign:"center",padding:{...k,vertical:"50px"}}),"horizontal"===e&&t({columns:{...d,desktop:2,tablet:1},textAlign:"left",padding:{...k,vertical:"30px"}})},options:lV,isIcon:!0})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Theme:","b-blocks")}),(0,l.jsx)(y.SelectControl,{value:m,onChange:e=>{t({theme:e}),"default"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"170px",nameTypo:{...j,fontSize:20,textTransform:"none"},titleTypo:{...T,fontSize:16,textTransform:"none"},isSep:!0,isBio:!0,socialSize:"22px"}),"theme1"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"190px",nameTypo:{...j,fontSize:20,textTransform:"none"},titleTypo:{...T,fontSize:14,textTransform:"uppercase"},isSep:!0,isBio:!0,socialSize:"22px"}),"theme2"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"190px",nameTypo:{...j,fontSize:20,textTransform:"none"},titleTypo:{...T,fontSize:14,textTransform:"uppercase"},isSep:!0,isBio:!1,socialSize:"22px"}),"theme3"===e&&t({padding:{...k,vertical:"50px",horizontal:"20px"},photoWidth:"170px",nameTypo:{...j,fontSize:24,textTransform:"none"},titleTypo:{...T,fontSize:18,textTransform:"none"},isSep:!1,isBio:!1,socialSize:"28px"}),"theme4"===e&&t({padding:{...k,vertical:"15px",horizontal:"15px"},photoWidth:"100%",nameTypo:{...j,fontSize:20,textTransform:"uppercase"},titleTypo:{...T,fontSize:15,textTransform:"none"},isSep:!1,isBio:!1,socialSize:"22px"}),c.map((t=>{const{background:n,border:i,photoBorder:a,separator:s,socialIconColors:r}=t,l=[["background",{...n,color:"#0000"}],["border",{...i,radius:"3px"}],["shadow",[{hOffset:"",vOffset:"",blur:"0px",color:"#7090b0"}]],["photoBorder",{...a,width:"0px",color:"#0000",radius:"50%"}],["nameColor","#333"],["titleColor","#333"],["separator",{...s,color:"#777"}],["bioColor","#333"],["socialIconColors",{...r,color:"#fff",bg:o}]],c=[["background",{...n,color:"#0000"}],["border",{...i,radius:"3px"}],["shadow",[{hOffset:"",vOffset:"",blur:"20px",color:"#e8edfb"}]],["photoBorder",{...a,width:"10px",color:"#e8edfb",radius:"50%"}],["nameColor","#333"],["titleColor","#7a7a7a"],["separator",{...s,color:o}],["bioColor","#7a7a7a"],["socialIconColors",{...r,color:"#fff",bg:o
581 +}]],d=[["background",{...n,color:"#0000"}],["border",{...i,radius:"3px"}],["shadow",[{hOffset:"",vOffset:"",blur:"0px",color:"#7090b0"}]],["photoBorder",{...a,width:"0px",color:"#0000",radius:"50%"}],["nameColor","#333"],["titleColor","#7a7a7a"],["separator",{...s,color:"#999"}],["bioColor","#7a7a7a"],["socialIconColors",{...r,color:o,bg:"#0000"}]],u=[["background",{...n,color:"#f2f3f7"}],["border",{...i,radius:"10px"}],["shadow",[{hOffset:"-10px",vOffset:"-10px",blur:"20px",color:"#f7f7f7"},{hOffset:"10px",vOffset:"10px",blur:"20px",color:"#d7e0e8"}]],["photoBorder",{...a,width:"0px",color:"#0000",radius:"50%"}],["nameColor","#32285C"],["titleColor","#677592"],["separator",{...s,color:"#777"}],["bioColor","#333"],["socialIconColors",{...r,color:"#677592",bg:"#0000"}]],p=[["background",{...n,color:o}],["border",{...i,radius:"0px"}],["shadow",[{hOffset:"",vOffset:"",blur:"0px",color:"#7090b0"}]],["photoBorder",{...a,width:"0px",color:"#0000",radius:"0px"}],["nameColor","#fff"],["titleColor","#fff"],["separator",{...s,color:"#777"}],["bioColor","#fff"],["socialIconColors",{...r,color:o,bg:"#fff"}]];"default"===e&&z(l),"theme1"===e&&z(c),"theme2"===e&&z(d),"theme3"===e&&z(u),"theme4"===e&&z(p)}))},options:rV})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Title","b-blocks"),checked:S,onChange:e=>t({isTitle:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Separator","b-blocks"),checked:M,onChange:e=>t({isSep:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Bio","b-blocks"),checked:P,onChange:e=>t({isBio:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Show Social","b-blocks"),checked:B,onChange:e=>t({isSocial:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Open Link in New Tab","b-blocks"),checked:b,onChange:e=>t({isLinkNewTab:e})})]})]}),"style"===h.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member","b-blocks"),children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"",children:(0,x.__)("Text Align:","b-blocks")}),(0,l.jsx)(Tn,{value:f,onChange:e=>t({textAlign:e}),options:Jt.filter((e=>"justify"!==e.value)),isIcon:!0})]}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Padding:","b-blocks"),value:k,onChange:e=>t({padding:e}),defaults:{vertical:"50px",horizontal:"20px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Photo","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:w,onChange:e=>t({photoWidth:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:C,onChange:e=>t({photoMargin:e}),defaults:{side:4,bottom:"20px"}})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Name","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:j,onChange:e=>t({nameTypo:e}),defaults:{fontSize:{desktop:20,tablet:18,mobile:16},fontWeight:600}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:$,onChange:e=>t({nameMargin:e}),defaults:{side:4,bottom:"10px"}})]}),S&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Designation/Title","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:T,onChange:e=>t({titleTypo:e}),defaults:{fontSize:{desktop:16,tablet:16,mobile:16}}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:N,onChange:e=>t({titleMargin:e}),defaults:{side:4,bottom:"10px"}})]}),M&&(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Separator","b-blocks"),initialOpen:!1,children:(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:L,onChange:e=>t({sepMargin:e}),defaults:{side:4,bottom:"15px"}})}),P&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Bio","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:E,onChange:e=>t({bioTypo:e}),defaults:{fontSize:{desktop:15,tablet:15,mobile:15}}}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Margin:","b-blocks"),value:A,onChange:e=>t({bioMargin:e}),defaults:{side:4,bottom:"15px"}})]}),B&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Member Social","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Icon Size:","b-blocks"),labelPosition:"left",value:I,onChange:e=>t({socialSize:e}),units:[Pe(),Ee(),Ae()]}),(0,l.jsx)(ad,{className:"mt20",label:(0,x.__)("Icon Margin:","b-blocks"),value:O,onChange:e=>t({socialIconMargin:e}),defaults:{vertical:"10px",horizontal:"10px"}})]})]})]})})}),(0,l.jsxs)(h.BlockControls,{children:[(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Member","b-blocks"),onClick:()=>{const e=[...c,R()];t({members:e}),a(c.length)},children:(0,l.jsx)(y.Dashicon,{icon:"plus"})})}),(0,l.jsx)(h.AlignmentToolbar,{value:f,onChange:e=>t({textAlign:e})})]})]})})),dV="bBlocksTeamMembers",uV=({attributes:e,id:t})=>{const{members:n=[],columnGap:o,rowGap:i,layout:a,textAlign:s,padding:r,photoWidth:c,photoMargin:d,nameTypo:u,nameMargin:p,titleTypo:h,titleMargin:g,sepMargin:m,bioTypo:b,bioMargin:f,socialSize:x,socialIconMargin:y}=e,v=`#${t}`,k=`${v} .${dV}`,w=`${k} .teamMember`,_=`${w} .memberDetails`,C=`${_} .memberSocial`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${ps("",u)?.googleFontLink}\n\t\t${ps("",h)?.googleFontLink}\n\t\t${ps("",b)?.googleFontLink}\n\t\t${ps(`${_} .memberName`,u)?.styles}\n\t\t${ps(`${_} .memberTitle`,h)?.styles}\n\t\t${ps(`${_} .memberBio`,b)?.styles}\n\n\t\t${k}{\n\t\t\tgrid-gap: ${i} ${o};\n\t\t}\n\t\t${w}{\n\t\t\ttext-align: ${s};\n\t\t\tpadding: ${us(r)};\n\t\t}\n\t\t${w} .memberPhoto{\n\t\t\twidth: ${c};\n\t\t\tmargin: ${"horizontal"===a?"0 20px 0 0":`${us(d)}`};\n\t\t}\n\t\t${_} .memberName{\n\t\t\tmargin: ${us(p)};\n\t\t}\n\t\t${_} .memberTitle{\n\t\t\tmargin: ${us(g)};\n\t\t}\n\t\t${_} .memberSeparator{\n\t\t\tmargin: ${us(m)};\n\t\t}\n\t\t${_} .memberBio{\n\t\t\tmargin: ${us(f)};\n\t\t}\n\t\t${C} .icon,\n\t\t${C} .memberSocialAdd{\n\t\t\tmargin: ${us(y)};\n\t\t}\n\t\t${C} .icon i,\n\t\t${C} .memberSocialAdd i{\n\t\t\tfont-size: ${x};\n\t\t\twidth: ${x};\n\t\t}\n\n\t\t${n.map(((e,t)=>{const{background:n,border:o,shadow:i,photoBorder:a,nameColor:r,titleColor:l,separator:c,bioColor:d,socialIconColors:u,iconStyle:p={}}=e,h=`${v} #teamMember-${t}`,g=`${h} .memberDetails`,m=`${g} .memberSocial`;return`\n\t\t\t\t${h}{\n\t\t\t\t\t${os(n)}\n\t\t\t\t\t${is(o)}\n\t\t\t\t\tbox-shadow: ${ls(i?.shadow||(i?.color?[i]:i))};\n\t\t\t\t}\n\t\t\t\t${h} .memberPhoto{\n\t\t\t\t\t${is(a)}\n\t\t\t\t}\n\t\t\t\t${g} .memberName{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t\t${g} .memberTitle{\n\t\t\t\t\tcolor: ${l};\n\t\t\t\t}\n\t\t\t\t${h} .memberSeparator{\n\t\t\t\t\t${cs(c)}\n\t\t\t\t}\n\t\t\t\t${g} .memberBio{\n\t\t\t\t\tcolor: ${d};\n\t\t\t\t}\n\t\t\t\t${m}{\n\t\t\t\t\tjustify-content: ${"center"===s?"center":"right"===s?"flex-end":"flex-start"}\n\t\t\t\t}\n\t\t\t\t${m} li a{\n\t\t\t\t\t${ss(u)}\n\t\t\t\t\t${is(p?.normal?.border)}\n\t\t\t\t\t${ls(p?.normal?.shadow)}\n\t\t\t\t\ttransition:all 0.2s ease-in-out;\n\t\t\t\t}\n\t\t\t\t${m} li a:hover{\n\t\t\t\t\t${ss(p?.hover?.socialIconColors)}\n\t\t\t\t\t${is(p?.hover?.border)}\n\t\t\t\t\t${ls(p?.hover?.shadow)}\n\t\t\t\t}\n\t\t\t\t${m} li.isSelected{\n\t\t\t\t\tborder: 2px solid ${u?.bg};\n\t\t\t\t}\n\t\t\t\t${m} li.memberSocialAdd button i{\n\t\t\t\t\tcolor: ${u?.bg};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})};Pl(aV.name)&&(0,p.registerBlockType)(aV,{icon:Vr,transforms:{from:[{type:"block",blocks:["tsb/team"],transform:e=>(0,p.createBlock)("b-blocks/team-members",e)},{type:"prefix",prefix:"counter",transform:()=>(0,p.createBlock)("b-blocks/team-members")}],to:[{type:"block",blocks:["tsb/team"],isMatch:e=>!!e,transform:e=>(0,
582 +p.createBlock)("tsb/team",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i}=e,{members:a=[],columns:s,layout:r,isTitle:c,isSep:d,isBio:u,isSocial:p}=t,{desktop:g,tablet:b,mobile:f}=s||{},[k,w]=(0,m.useState)(0),[_,C]=(0,m.useState)(null),j=bBlocksPremiumChecker;(0,m.useEffect)((()=>{w(i&&a.length?0:null)}),[i]),(0,m.useEffect)((()=>{!i&&C(null)}),[i]);const $=(e,t,o,i=!1,s=!1)=>{const r=zb(a,(n=>{!1!==i&&s?n[e][t][i][s]=o:n[e][t]=o}));n({members:r}),w(e)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(cV,{attributes:t,setAttributes:n,updateMember:$,activeIndex:k,setActiveIndex:w,isPremium:j}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(uV,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:`${dV} ${r||"vertical"} columns-${g} columns-tablet-${b} columns-mobile-${f}`,children:a.map(((e,t)=>{const{photo:n,name:o,title:a,bio:s,social:r=[]}=e;return(0,l.jsxs)("div",{onClick:()=>w(t),className:"teamMember "+(t===k?"bPlNowEditing":""),id:`teamMember-${t}`,children:[n?.url?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("img",{className:`memberPhoto ${n?.id?`wp-image-${n?.id}`:null}`,src:n?.url,alt:n?.alt}),(0,td.isBlobURL)(n?.url)&&(0,l.jsx)(y.Spinner,{})]}):(0,l.jsx)(od,{label:(0,x.__)(" Member Photo:","b-blocks"),value:n,onChange:e=>$(t,"photo",e)}),(0,l.jsxs)("div",{className:"memberDetails",children:[(0,l.jsx)(h.RichText,{className:"memberName",tagName:"h4",value:o,onChange:e=>$(t,"name",e),placeholder:(0,x.__)("Member name","b-blocks"),inlineToolbar:!0}),c&&(0,l.jsx)(h.RichText,{className:"memberTitle",tagName:"p",value:a,onChange:e=>$(t,"title",e),placeholder:(0,x.__)("Member designation/title","b-blocks"),inlineToolbar:!0}),d&&(0,l.jsx)("span",{className:"memberSeparator"}),u&&(0,l.jsx)(h.RichText,{className:"memberBio",tagName:"p",value:s,onChange:e=>$(t,"bio",e),placeholder:(0,x.__)("Biography of the member","b-blocks"),inlineToolbar:!0}),p&&(0,l.jsx)("ul",{className:"memberSocial",children:r?.map(((e,n)=>{const{icon:o}=e;return(0,l.jsx)("li",{onClick:()=>C(n),className:`icon icon-${t}-${n} ${i&&t===k&&n===_?"isSelected":null}`,children:(0,l.jsx)("a",{href:"#",children:(0,l.jsx)("i",{className:o?.class})})},n)}))}),null!==_&&t===k&&(0,l.jsxs)("div",{className:"socialAction memberSocialForm",children:[(0,l.jsx)(v,{className:"mb5",children:(0,x.__)("Link:","b-blocks")}),(0,l.jsx)(y.__experimentalInputControl,{value:r[_]?.link,onChange:e=>$(t,"social",e,_,"link")}),(0,l.jsx)(Un,{value:r[_]?.icon,onChange:e=>$(t,"social",e,_,"icon"),defaults:{class:"fab fa-facebook-f",fontSize:22},isSize:!1,isColor:!1}),(0,l.jsxs)("a",{className:"memberSocialRemove mt15",onClick:e=>{e.preventDefault(),$(t,"social",[...r.slice(0,_),...r.slice(_+1)]),C(null)},children:[(0,l.jsx)("i",{className:"fa fa-times"}),(0,x.__)("Remove this link","b-blocks")]})]}),i&&p&&t===k&&(0,l.jsx)("div",{className:"socialAction memberSocialAdd mt20",children:(0,l.jsxs)(y.Button,{showTooltip:!0,tooltipPosition:"top enter",label:(0,x.__)("Add Social Link","b-blocks"),onClick:()=>{$(t,"social",[...r,{link:"#",icon:{class:"fab fa-facebook-f"}}]),C(r.length)},children:[(0,l.jsx)("i",{className:"fa fa-plus"})," Add new social"]})})]})]},t)}))}),!a.length&&(0,l.jsx)("h3",{className:"addItemFirst",children:(0,x.__)("Please add a member first!","b-blocks")})]})]})},save:()=>null});const pV=JSON.parse('{"UU":"b-blocks/testimonials"}'),hV=({attributes:e,expanded:t,onChange:n})=>{const{elements:o}=e,{expandBtn:i,expandText:a,collapseText:s}=o;return i&&(0,l.jsx)("span",{className:"expandBtn",type:"button",onClick:n,children:t?s:a})},gV=(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#000000",width:"20px",height:"20px",viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M232 280L64 280 64 232 232 232 232 64 280 64 280 232 448 232 448 280 280 280 280 448 232 448 232 280Z"})}),mV=(e,t=0)=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:e,width:"15px",height:"15px",viewBox:"0 -32 576 576",children:(0,l.jsx)("path",{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"})},t),bV=(e,t)=>{let n=[];for(let o=1;o<=5;o++)o<=e?n.push(mV(t,o)):n.push(mV("#ccc",o));return n},fV={padding:{top:"10px",right:"15px",bottom:"10px",left:"15px"},image:{width:"70",height:"70"},imgBorder:{width:"1px",style:"solid",color:"#C6C6C652",radius:"50%"}},xV=(e,t)=>"default"===e?fV:"theme_1"===e?{...fV,image:{width:"70",height:"70"},imgBorder:{width:t?.width,style:t?.style,color:t?.color,side:"all",radius:"50%"}}:"theme_2"===e?{...fV,expandedColors:{bg:"#fbfbfb00"}}:"theme_3"===e?fV:"theme_4"===e?{...fV,padding:{top:"0px",right:"0px",bottom:"0px",left:"0px"},image:{width:"70",height:"70"},quoteIcon:{size:23}}:"theme_5"===e?{...fV,imgBorder:{width:"4px",style:"solid",color:"#C6C6C652",radius:"1px"},quoteIcon:{size:15}}:void 0,yV=[{label:(0,x.__)("Default","b-testimonials-block"),value:"default"},{label:(0,x.__)("Slider","b-testimonials-block"),value:"slider"},{label:(0,x.__)("Masonry","b-testimonials-block"),value:"masonry"}],vV=[{label:(0,x.__)("Default","b-testimonials-block"),value:"default"},{label:(0,x.__)("Theme-1","b-testimonials-block"),value:"theme_1"},{label:(0,x.__)("Theme-2","b-testimonials-block"),value:"theme_2"},{label:(0,x.__)("Theme-3","b-testimonials-block"),value:"theme_3"},{label:(0,x.__)("Theme-4","b-testimonials-block"),value:"theme_4"},{label:(0,x.__)("Theme-5","b-testimonials-block"),value:"theme_5"},{label:(0,x.__)("Theme-6","b-testimonials-block"),value:"theme_6"}],kV=((0,x.__)("Vertical","block-directory"),(0,x.__)("Horizontal","block-directory"),[{name:"general",title:(0,x.__)("General","b-testimonials-block")},{name:"style",title:(0,x.__)("Style","b-testimonials-block")}]),wV={img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/02/p-29.png"},name:"John Doe",deg:"Developer",reviewText:"It is a long-established fact that a reader will be distracted by the readable content of a page when looking at its layout",rating:4},_V=e=>{const{attributes:t,setAttributes:n,index:o}=e,{items:i}=t,{img:a,name:s,reviewText:r,deg:c,rating:d}=i[o]||{},u=(e,t,a=!1)=>{const s=zb(i,(n=>{a?n[o][e][a]=t:n[o][e]=t}));n({items:s})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{children:(0,x.__)("Image:","b-testimonials-block")}),(0,l.jsx)(ke,{value:a,type:["image"],onChange:e=>u("img",e),placeholder:(0,x.__)("Enter Image URL","b-testimonials-block")}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Name","b-testimonials-block"),value:s,onChange:e=>u("name",e)}),(0,l.jsx)(y.TextControl,{className:"mt10",label:(0,x.__)("Designation","b-testimonials-block"),value:c,onChange:e=>u("deg",e)}),(0,l.jsx)(y.TextareaControl,{className:"mt10",label:(0,x.__)("Review","b-testimonials-block"),value:r,onChange:e=>u("reviewText",e)}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Rating:","b-testimonials-block"),labelPosition:"left",value:d,onChange:e=>u("rating",e),min:1,max:5})]})},CV=({attributes:e,setAttributes:t,setActiveIndex:n,activeIndex:o})=>{const{items:i}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Testimonials","b-testimonials-block"),children:(0,l.jsx)(_a,{value:i,onChange:t,attributes:e,setAttributes:t,arrKey:"items",newItem:wV,ItemSettings:_V,itemLabel:"Item",activeIndex:o,setActiveIndex:n,design:"sortable",title:"name"})})})},jV=e=>{const{attributes:t,setAttributes:n,setActiveIndex:o}=e,{columns:i,columnGap:a,rowGap:s,layout:r,theme:c,items:d,elements:u,background:p,padding:g,shadow:b,border:f,image:k,imgBorder:w,nameTypo:_,nameColor:C,degTypo:j,degColor:$,textTypo:S,textColor:T,starIconColor:N,textLength:M,grid2Bg:L,grid2Padding:P,slider:E}=t,[A,B]=(0,m.useState)("desktop"),{autoPlay:I,mouseWheel:O,navigation:R}=E,z=(e,o,i)=>{const a={...t[e]};a[o]=i,n({[e]:a})};return(0,
583 +l.jsxs)(l.Fragment,{children:[(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:kV,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(CV,{...e}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Elements","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Image","b-testimonials-block"),labelPosition:"left",checked:u?.img,onChange:e=>z("elements","img",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Name","b-testimonials-block"),labelPosition:"left",checked:u?.name,onChange:e=>z("elements","name",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Designation","b-testimonials-block"),labelPosition:"left",checked:u?.deg,onChange:e=>z("elements","deg",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Review Text","b-testimonials-block"),labelPosition:"left",checked:u?.reviewText,onChange:e=>z("elements","reviewText",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Rating","b-testimonials-block"),labelPosition:"left",checked:u?.icon,onChange:e=>z("elements","icon",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Expanded Button","b-testimonials-block"),labelPosition:"left",checked:u?.expandBtn,onChange:e=>z("elements","expandBtn",e)})]}),u?.expandBtn&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Button","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{className:"",label:(0,x.__)("Expand Text","b-testimonials-block"),value:u?.expandText,onChange:e=>z("elements","expandText",e)}),(0,l.jsx)(y.TextControl,{className:"",label:(0,x.__)("Collapse Text","b-testimonials-block"),value:u?.collapseText,onChange:e=>z("elements","collapseText",e)})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Layout","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0 mb0",children:(0,x.__)("Layout:","b-testimonials-block")}),(0,l.jsx)(y.SelectControl,{value:r,onChange:e=>n({layout:e}),options:yV})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{className:"mt0 mb0",children:(0,x.__)("Theme:","b-testimonials-block")}),(0,l.jsx)(y.SelectControl,{value:c,onChange:e=>n({theme:e,...xV(e,f)}),options:vV})]}),(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(v,{mt:"0",children:(0,x.__)("Columns:","b-testimonials-block")}),(0,l.jsx)(Pa,{device:A,onChange:e=>B(e)})]}),(0,l.jsx)(y.RangeControl,{value:i[A],onChange:e=>{n({columns:{...i,[A]:e}})},min:1,max:6,step:1,beforeIcon:"grid-view"}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Column Gap:","b-testimonials-block"),labelPosition:"left",value:a,onChange:e=>n({columnGap:e}),units:[Pe(30),Ee(3),Ae(2)],isResetValueOnUnitChange:!0}),"slider"!==r&&(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Row Gap:","b-testimonials-block"),labelPosition:"left",value:s,onChange:e=>n({rowGap:e}),units:[Pe(40),Ee(3),Ae(2.5)],isResetValueOnUnitChange:!0})]}),"slider"===r&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Slider","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("AutoPlay","b-testimonials-block"),labelPosition:"left",checked:I,onChange:e=>z("slider","autoPlay",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("MouseWheel","b-testimonials-block"),labelPosition:"left",checked:O,onChange:e=>z("slider","mouseWheel",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Navigation","b-testimonials-block"),labelPosition:"left",checked:R,onChange:e=>z("slider","navigation",e)})]})]}),"style"===t.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Card","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Background Color","b-testimonials-block"),value:p,onChange:e=>n({background:e})}),(0,l.jsx)(y.__experimentalBoxControl,{label:(0,x.__)("Padding","b-testimonials-block"),values:g,onChange:e=>n({padding:e}),resetValues:{top:"5px",right:"10px",bottom:"5px",left:"10px"},units:[Pe(3),Ae(2)]}),(0,l.jsx)(ed,{className:"",label:(0,x.__)("Border","b-testimonials-block"),value:f,onChange:e=>n({border:e})}),(0,l.jsx)(id,{label:(0,x.__)("Shadow:","sound-cloud"),value:b,onChange:e=>n({shadow:e}),produce:zb})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Image","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsxs)(y.PanelRow,{children:[(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Width:","b-testimonials-block"),labelPosition:"left",value:k?.width,onChange:e=>z("image","width",e)}),(0,l.jsx)(y.__experimentalNumberControl,{className:"mt10",label:(0,x.__)("Height:","b-testimonials-block"),labelPosition:"left",value:k?.height,onChange:e=>z("image","height",e)})]}),(0,l.jsx)(ed,{className:"",label:(0,x.__)("Border","b-testimonials-block"),value:w,onChange:e=>n({imgBorder:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Name","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-testimonials-block"),value:_,onChange:e=>n({nameTypo:e}),produce:zb}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Color","b-testimonials-block"),value:C,onChange:e=>n({nameColor:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Designation","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-testimonials-block"),value:j,onChange:e=>n({degTypo:e}),produce:zb}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Color","b-testimonials-block"),value:$,onChange:e=>n({degColor:e})})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Review Text","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Oa,{className:"mt10",label:(0,x.__)("Typography","b-testimonials-block"),value:S,onChange:e=>n({textTypo:e}),produce:zb}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Color","b-testimonials-block"),value:T,onChange:e=>n({textColor:e})}),(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Rating Icon Color","b-testimonials-block"),value:N,onChange:e=>n({starIconColor:e})}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Excerpt length","b-testimonials-block"),labelPosition:"left",value:M,onChange:e=>{n({textLength:e})},min:10,max:1e3,step:1,beforeIcon:"grid-view"})]}),("theme_2"===r||"masonry"===r)&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Top","b-testimonials-block"),initialOpen:!1,children:[(0,l.jsx)(Ue,{className:"mb10",label:(0,x.__)("Background Color","b-testimonials-block"),value:L,onChange:e=>n({grid2Bg:e})}),(0,l.jsx)(y.__experimentalBoxControl,{label:(0,x.__)("Padding","b-testimonials-block"),values:P,onChange:e=>n({grid2Padding:e}),resetValues:{top:"10px",right:"10px",bottom:"10px",left:"10px"},units:[Pe(3),Ae(2)]})]})]})]})})}),(0,l.jsx)(h.BlockControls,{children:(0,l.jsx)(y.ToolbarGroup,{className:"bPlToolbar",children:(0,l.jsx)(y.ToolbarButton,{label:(0,x.__)("Add New Item","b-blocks"),onClick:()=>{n({items:[...d,{img:{url:"https://templates.bplugins.com/wp-content/uploads/2025/02/p-29.png"},name:"John Doe",deg:"Developer",reviewText:"It is a long-established fact that a reader will be distracted by the readable content of a page when looking at its layout",rating:4}]}),o(d.length)},children:(0,l.jsx)(y.Dashicon,{icon:"plus",size:23})})})})]})},$V=({attributes:e,id:t})=>{const{columnGap:n,rowGap:o,background:i,padding:a,border:s,shadow:r,image:c,imgBorder:d,nameTypo:u,nameColor:p,degTypo:h,degColor:g,textTypo:m,textColor:b,expandedTypo:f,grid2Bg:x,grid2Padding:y}=e,v=`#${t}`;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
584 +__html:`\n\t\t${ps("",u)?.googleFontLink}\n\t\t${ps("",h)?.googleFontLink}\n\t\t${ps("",m)?.googleFontLink}\n\t\t${ps("",f)?.googleFontLink}\n\t\t${ps(`${v} .layoutSection .single .name`,u)?.styles}\n\t\t${ps(`${v} .layoutSection .single .deg`,h)?.styles}\n\t\t${ps(`${v} .layoutSection .single .reviewText`,m)?.styles}\n\n\t\t${v} .slider-layout .swiper-slide {\n\t\t\t \n\t\t} \n\n\t\t${v} .layoutSection {\n\t\t\tgrid-gap: ${o} ${n};\n\t\t}\n\n\t\t${v} .theme_2 .single .top, ${v} .masonry .single .top {\n\t\t\tbackground:${x};\n\t\t\tpadding:${he(y)};\n\t\t}\n\n\t\t${v} .masonry .single .top::after {\n\t\t\tborder-right: 27px solid ${x};\n\t\t}\n\n\t\t${v} .theme_4 .single .bottom{\n\t\t\tborder-top:${s?.width} ${s?.style} ${s?.color};\n\t\t}\n\n\t\t${v} .theme_4 .single .info {\n\t\t\tborder-left: ${s?.width} ${s?.style} ${s?.color};\n\t\t}\n\n\t\t${v} .layoutSection .single {\n\t\t\tbackground:${i};\n\t\t\tpadding:${he(a)};\n\t\t\t${is(s)};\n\t\t\tbox-shadow: ${ds(r)};\n\t\t}\n \n\t\t${v} .layoutSection .single .img{\n\t\t\twidth:${c?.width}px;\n\t\t\theight:${c?.height}px;\n\t\t\t${is(d)};\n\t\t}\n\n\t\t${v} .layoutSection .single .name{\n\t\t\tcolor:${p};\n\t\t}\n\n\t\t${v} .layoutSection .single .deg{\n\t\t\tcolor:${g};\n\t\t}\n\n\t\t${v} .layoutSection .single .reviewText{\n\t\t\tcolor:${b};\n\t\t}\n\n\t`}})},SV=({attributes:e,children:t,img:n})=>{const{elements:o}=e;return o?.img&&(0,l.jsx)("div",{className:"authorImg",children:(0,l.jsxs)("div",{className:"img",children:[(0,l.jsx)("img",{src:n?.url,alt:n?.title}),t]})})},TV=({attributes:e,itemEls:t})=>{const{elements:n}=e;return n.reviewText&&t?.reviewText},NV=({attributes:e,getStar:t,rating:n,starIconColor:o})=>{const{elements:i}=e;return i?.icon&&(0,l.jsx)("div",{className:"rating",children:t(n,o)})},MV=({item:e,index:t,itemEls:n,attributes:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r}=o,{img:c,reviewText:d,rating:u}=e;return(0,l.jsxs)("div",{className:"single "+(s&&t===i?"btbNowEditing":""),onClick:()=>s&&a(t),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(SV,{attributes:o,img:c,children:n.img}),(0,l.jsxs)("div",{className:"info",children:[n.name,n.deg]})]}),(0,l.jsx)(NV,{attributes:o,getStar:bV,rating:u,starIconColor:r}),(0,l.jsx)("div",{className:"body",children:(0,l.jsx)(TV,{attributes:o,itemEls:n,isBackend:s,reviewText:d})})]},t)},LV=({attributes:e,itemEls:t,item:n,index:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r}=e,{img:c,reviewText:d,rating:u}=n;return(0,l.jsxs)("div",{className:"single "+(s&&o===i?"btbNowEditing":""),onClick:()=>s&&a(o),children:[(0,l.jsx)("div",{className:"top",children:(0,l.jsx)(SV,{attributes:e,img:c,children:t.img})}),(0,l.jsx)("div",{className:"body",children:(0,l.jsx)(TV,{itemEls:t,attributes:e,isBackend:s,reviewText:d})}),(0,l.jsxs)("div",{className:"footer",children:[(0,l.jsxs)("div",{className:"info",children:[t.name,t.deg]}),(0,l.jsx)(NV,{attributes:e,getStar:bV,rating:u,starIconColor:r})]})]},o)},PV=({attributes:e,itemEls:t,item:n,index:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r,grid2Bg:c}=e,{img:d,reviewText:u,rating:p}=n;return(0,l.jsxs)("div",{className:"single "+(s&&o===i?"btbNowEditing":""),onClick:()=>s&&a(o),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(NV,{attributes:e,getStar:bV,rating:p,starIconColor:r}),(0,l.jsx)(TV,{attributes:e,itemEls:t,isBackend:s,reviewText:u}),(0,l.jsx)("div",{className:"icon",children:(h=c,(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20px",height:"20px",viewBox:"0 0 19 13",fill:h,style:{left:"24px"},children:(0,l.jsx)("path",{d:"M0.965704 0.000125914H10.3736L19 5.15272e-05C19 5.15272e-05 16.2331 5.15665 10.3736 8.99489C6.68171 11.4132 3.12703 12.3741 1.00222 12.7541C0.488597 12.8459 0.227225 12.1436 0.617463 11.7973C2.03909 10.5355 3.88298 8.3072 3.88294 5.23718C3.88287 9.44134e-05 0.965704 0.000125914 0.965704 0.000125914Z"})}))})]}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsx)(SV,{attributes:e,img:d,children:t.img}),(0,l.jsxs)("div",{className:"info",children:[t.name,t.deg]})]})]},o);var h},EV=({attributes:e,itemEls:t,item:n,index:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r}=e,{img:c,reviewText:d,rating:u}=n;return(0,l.jsxs)("div",{className:"single "+(s&&o===i?"btbNowEditing":""),onClick:()=>s&&a(o),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(TV,{attributes:e,itemEls:t,isBackend:s,reviewText:d},o),(0,l.jsx)(NV,{attributes:e,getStar:bV,rating:u,starIconColor:r},o)]}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsxs)("div",{className:"info",children:[t.name,t.deg]}),(0,l.jsx)(SV,{attributes:e,img:c,children:t.img})]})]},o)},AV=({itemEls:e,item:t,index:n,attributes:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{nameColor:r,quoteIcon:c}=o,{img:d,reviewText:u}=t;return(0,l.jsxs)("div",{className:"single "+(s&&n===i?"btbNowEditing":""),onClick:()=>s&&a(n),children:[(0,l.jsx)("div",{className:"top",children:(0,l.jsx)(SV,{attributes:o,img:d,children:e.img})}),(0,l.jsx)("div",{className:"body",children:(0,l.jsx)(TV,{attributes:o,itemEls:e,isBackend:s,reviewText:u})}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsx)("div",{className:"rightQuote",children:(p=r,h=c?.size,(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:p,width:h,height:h,viewBox:"0 0 512 512",children:(0,l.jsx)("path",{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"})}))}),(0,l.jsxs)("div",{className:"info",children:[e.name,e.deg]})]})]},n);var p,h},BV=({itemEls:e,item:t,index:n,attributes:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r}=o,{img:c,reviewText:d,rating:u}=t;return(0,l.jsxs)("div",{className:"single "+(s&&n===i?"btbNowEditing":""),onClick:()=>s&&a(n),children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(SV,{attributes:o,img:c,children:e.img}),(0,l.jsx)("div",{className:"right",children:(0,l.jsx)(TV,{attributes:o,itemEls:e,isBackend:s,reviewText:d})})]}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsxs)("div",{className:"info",children:[e.name,e.deg]}),(0,l.jsx)(NV,{attributes:o,getStar:bV,rating:u,starIconColor:r})]})]},n)},IV=({itemEls:e,item:t,index:n,attributes:o,activeIndex:i,setActiveIndex:a,isBackend:s})=>{const{starIconColor:r}=o,{img:c,reviewText:d,rating:u}=t;return(0,l.jsxs)("div",{className:"single "+(s&&n===i?"btbNowEditing":""),onClick:()=>s&&a(n),children:[(0,l.jsx)("div",{className:"top",children:(0,l.jsx)(TV,{attributes:o,itemEls:e,isBackend:s,reviewText:d})}),(0,l.jsxs)("div",{className:"bottom",children:[(0,l.jsx)(SV,{attributes:o,img:c,children:e.img}),(0,l.jsxs)("div",{className:"info",children:[e.name,e.deg,(0,l.jsx)(NV,{attributes:o,getStar:bV,rating:u,starIconColor:r},n)]})]})]},n)},OV=({attributes:e,itemsEls:t,itemProps:n})=>{const{items:o,slider:i,columnGap:a,theme:s,columns:r}=e,{desktop:c,tablet:d,mobile:u}=r,{autoPlay:p,mouseWheel:h,navigation:g}=i,[b,f]=(0,m.useState)(!0),x=()=>(0,l.jsx)(Ux,{modules:[Pf,If,Of,Mf],spaceBetween:a,slidesPerView:u,breakpoints:{576:{slidesPerView:d},768:{slidesPerView:c}},autoplay:p,mousewheel:h,navigation:g,pagination:!0,scrollbar:{draggable:!0},loop:!0,children:o.map(((e,o)=>{const i={item:e,index:o,itemEls:t[o],...n};switch(s){case"default":return(0,l.jsx)(Gx,{children:(0,l.jsx)(MV,{...i})},o);case"theme_1":return(0,l.jsx)(Gx,{children:(0,l.jsx)(LV,{...i})},o);case"theme_2":return(0,l.jsx)(Gx,{children:(0,l.jsx)(PV,{...i})},o);case"theme_3":return(0,l.jsx)(Gx,{children:(0,l.jsx)(EV,{...i})},o);case"theme_4":return(0,l.jsx)(Gx,{children:(0,l.jsx)(AV,{...i})},o);case"theme_5":return(0,l.jsx)(Gx,{children:(0,
585 +l.jsx)(BV,{...i})},o);case"theme_6":return(0,l.jsx)(Gx,{children:(0,l.jsx)(IV,{...i})},o);default:return null}}))});return(0,m.useEffect)((()=>{f(!b)}),[o,i,a,s,r]),(0,l.jsx)(x,{})},RV=({itemsEls:e,ToolbarButton:t,MediaUpload:n,MediaUploadCheck:o,attributes:i,setActiveIndex:a,activeIndex:s,updateItem:r,isBackend:c=!1,__,RichText:d})=>{const{items:u,columnGap:p,rowGap:h,layout:g,theme:m,columns:b}=i,{desktop:f,tablet:x,mobile:y}=b,v={attributes:i,setActiveIndex:a,activeIndex:s,updateItem:r,isBackend:c,__,RichText:d,MediaUpload:n,MediaUploadCheck:o,ToolbarButton:t},k=(t,n)=>{const o={item:t,index:n,itemEls:e[n],...v};switch(m){case"default":return(0,l.jsx)(MV,{...o});case"theme_1":return(0,l.jsx)(LV,{...o});case"theme_2":return(0,l.jsx)(PV,{...o});case"theme_3":return(0,l.jsx)(EV,{...o});case"theme_4":return(0,l.jsx)(AV,{...o});case"theme_5":return(0,l.jsx)(BV,{...o});case"theme_6":return(0,l.jsx)(IV,{...o});default:return null}};return(0,l.jsx)("div",{className:`layoutSection ${g}-layout ${m} columns-${f} columns-tablet-${x} columns-mobile-${y}`,children:(()=>{switch(g){case"masonry":return(0,l.jsx)(rR,{columnsCountBreakPoints:{0:y,576:x,768:f},children:(0,l.jsx)(lR,{columnsCount:3,gutter:`${h} ${p}`,children:u.map(((e,t)=>k(e,t)))})});case"slider":return(0,l.jsx)(OV,{attributes:i,itemsEls:e,itemProps:v});case"default":return u.map(((e,t)=>k(e,t)));default:return null}})()})},zV=(0,f.withDispatch)(((e,t)=>({selectBlock:()=>{e("core/block-editor").selectBlock(t.clientId)}})))((e=>{const{attributes:t,setAttributes:n,clientId:o,isSelected:i,selectBlock:a}=e,{items:s,elements:r,textLength:c}=t;(0,m.useEffect)((()=>{o&&n({cId:o.substring(0,10)})}),[o]),(0,m.useEffect)((()=>me()),[i]);const[d,u]=(0,m.useState)(0),p=(e,t,o=!1)=>{const i=zb(s,(n=>{o?n[d][e][o]=t:n[d][e]=t}));n({items:i})},g=s.map((e=>{const{name:n,deg:o,img:i,reviewText:a}=e,s=(d=a,d.replace(/(<([^>]+)>)/gi,"")).length;var d;return{img:(0,l.jsx)("div",{className:"upload",children:(0,l.jsx)(h.MediaUploadCheck,{children:(0,l.jsx)(h.MediaUpload,{allowedTypes:["image"],value:i,onSelect:({id:e,url:t,alt:n,title:o})=>p("img",{id:e,url:t,alt:n,title:o}),render:({open:e})=>(0,l.jsx)(y.ToolbarButton,{label:"upload",icon:gV,onClick:e})})})}),name:r?.name&&(0,l.jsx)(h.RichText,{tagName:"h3",className:"name",value:n,onChange:e=>p("name",e),placeholder:(0,x.__)("Enter your name","b-testimonials-block"),inlineToolbar:!0}),deg:r?.deg&&(0,l.jsx)(h.RichText,{tagName:"h5",className:"deg",value:o,onChange:e=>p("deg",e),placeholder:(0,x.__)("Enter your designation","b-testimonials-block"),inlineToolbar:!0}),reviewText:(0,l.jsx)(DV,{attributes:t,elements:r,contentLength:s,textLength:c,reviewText:a,updateItem:p})}}));return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(jV,{attributes:t,setAttributes:n,updateItem:p,activeIndex:d,setActiveIndex:u}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),onClick:()=>a(o),children:[(0,l.jsx)($V,{attributes:t,id:`block-${o}`}),(0,l.jsx)("div",{className:"btbTestimonialsDir",children:(0,l.jsx)(RV,{itemsEls:g,ToolbarButton:y.ToolbarButton,MediaUpload:h.MediaUpload,MediaUploadCheck:h.MediaUploadCheck,isBackend:!0,attributes:t,activeIndex:d,setActiveIndex:u,updateItem:p,__:x.__,RichText:h.RichText})})]})]})})),DV=({attributes:e,elements:t,contentLength:n,textLength:o,reviewText:i,updateItem:a})=>{const[s,r]=(0,m.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[t?.reviewText&&(0,l.jsx)(h.RichText,{tagName:"p",className:"reviewText",value:i,onChange:e=>a("reviewText",e),placeholder:(0,x.__)("Enter your review","b-testimonials-block"),inlineToolbar:!0}),n>o&&(0,l.jsx)(hV,{attributes:e,reviewText:i,expanded:s,onChange:()=>r(!s)})]})};Pl(pV.UU)&&(0,p.registerBlockType)(pV.UU,{icon:Xr,edit:zV})
586 +;const FV=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/timeline","title":"Timeline","category":"bBlocks","description":"A vertical timeline. Each entry is a Timeline Item child block holding a date, an icon marker and any inner blocks you like.","keywords":["timeline","history","roadmap","events","milestones","steps"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"layout":{"type":"object","default":{"desktop":{"direction":"vertical","side":"alternate","itemGap":"10px","cardWidth":"100%","cardGap":"0px","markerGap":"10px"},"tablet":{"direction":"","side":"","itemGap":"","cardWidth":"","cardGap":"","markerGap":""},"mobile":{"direction":"","side":"","itemGap":"","cardWidth":"","cardGap":"","markerGap":""}}},"connector":{"type":"object","default":{"line":{"show":true,"style":"solid","bg":{"type":"solid","color":"#d9d9d9"},"progress":false,"activeBg":{"type":"solid","color":"#1e1e1e"},"progressFade":false,"extent":"markers","desktop":{"width":"2px","dash":"8px","gap":"6px"},"tablet":{"width":"","dash":"","gap":""},"mobile":{"width":"","dash":"","gap":""}},"arrow":{"show":true,"align":"center","color":"","desktop":{"size":"14px","offset":"16px"},"tablet":{"size":"","offset":""},"mobile":{"size":"","offset":""}}}},"marker":{"type":"object","default":{"shape":"circle","transition":300,"pulse":{"show":false,"bg":{"type":"solid","color":""},"speed":2400},"normal":{"bg":{"type":"solid","color":"#efefef"},"color":{"icon":"#1e1e1e"},"border":{"width":"0px"},"ring":{"width":"0px","style":"solid","offset":"0px","color":""},"shadow":[]},"hover":{"bg":{"type":"solid","color":""},"color":{"icon":""},"border":{},"ring":{"width":"","style":"","offset":"","color":""},"shadow":[]},"desktop":{"size":"34px","iconSize":"16px","radius":{}},"tablet":{"size":"","iconSize":"","radius":{}},"mobile":{"size":"","iconSize":"","radius":{}}}},"card":{"type":"object","default":{"normal":{"bg":{"type":"solid","color":"#efefef"},"border":{"width":"0px"},"shadow":[{"hOffset":"0px","vOffset":"0px","blur":"0px","spreed":"0px","color":"#7090b000","isInset":false}]},"hover":{"bg":{"type":"solid","color":""},"border":{}},"desktop":{"padding":{"top":"16px","right":"16px","bottom":"16px","left":"16px"},"radius":{"top":"4px","right":"4px","bottom":"4px","left":"4px"}},"tablet":{"padding":{},"radius":{}},"mobile":{"padding":{},"radius":{}}}},"date":{"type":"object","default":{"show":true,"color":"#1e1e1e","typo":{"fontSize":{"desktop":"16px"}},"desktop":{"gap":"16px"},"tablet":{"gap":""},"mobile":{"gap":""}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"align":["wide","full"],"html":false,"anchor":true},"example":{"attributes":{}},"editorScript":"file:../index.js","style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),HV=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],WV=[{label:(0,x.__)("Vertical","b-blocks"),value:"vertical"},{label:(0,x.__)("Horizontal","b-blocks"),value:"horizontal"}],UV=WV.map((e=>e.value)),GV=[{label:(0,x.__)("Alternate","b-blocks"),value:"alternate"},{label:(0,x.__)("Left","b-blocks"),value:"left"},{label:(0,x.__)("Right","b-blocks"),value:"right"}].map((e=>e.value)),VV=[{label:(0,x.__)("Between markers","b-blocks"),value:"markers"},{label:(0,x.__)("Full length","b-blocks"),value:"full"}],qV=VV.map((e=>e.value)),YV=["start","center","end"],KV=[{label:(0,x.__)("Circle","b-blocks"),value:"circle"},{label:(0,x.__)("Rounded","b-blocks"),value:"rounded"},{label:(0,x.__)("Square","b-blocks"),value:"square"},{label:(0,x.__)("Diamond","b-blocks"),value:"diamond"},{label:(0,x.__)("Hexagon","b-blocks"),value:"hexagon"}],QV=(KV.map((e=>e.value)),{circle:"50%",rounded:"25%",square:"0",diamond:"0",hexagon:"0"}),ZV=["hexagon"],XV={diamond:45},JV=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"},{label:(0,x.__)("Double","b-blocks"),value:"double"}],eq=(JV.map((e=>e.value)),(e={})=>{const{width:t,style:n,offset:o,color:i}=e;return[t?`outline-width: ${t};`:"",n?`outline-style: ${n};`:"",i?`outline-color: ${i};`:"",o?`outline-offset: ${o};`:""].filter(Boolean).join(" ")}),tq=[{label:(0,x.__)("Solid","b-blocks"),value:"solid"},{label:(0,x.__)("Dashed","b-blocks"),value:"dashed"},{label:(0,x.__)("Dotted","b-blocks"),value:"dotted"}],nq=tq.map((e=>e.value)),oq=["dashed","dotted"],iq=((0,x.__)("Auto (follow layout)","b-blocks"),(0,x.__)("Left","b-blocks"),(0,x.__)("Right","b-blocks"),"b-blocks/timeline"),aq="b-blocks/timeline-item",sq=[aq],rq="<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'><path d='M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z'/></svg>",lq=e=>[["core/heading",{level:3,content:e}],["core/paragraph",{content:(0,x.__)("Describe what happened at this point on the timeline.","b-blocks")}]],cq=[[aq,{date:"01-01-2026",icon:rq},lq((0,x.__)("First milestone","b-blocks"))],[aq,{date:"01-01-2026",icon:rq},lq((0,x.__)("Second milestone","b-blocks"))],[aq,{date:"01-01-2026",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z'/></svg>"},lq((0,x.__)("Third milestone","b-blocks"))]],dq=(e,t)=>{if(null==t)return e;if(Array.isArray(t)){
587 +const n=e&&"object"==typeof e&&!Array.isArray(e);return 0===t.length&&n?e:t}if("object"!=typeof t)return t;if(!e||"object"!=typeof e||Array.isArray(e))return t;const n={...e};return Object.keys(t).forEach((o=>{n[o]=dq(e[o],t[o])})),n},uq=Object.fromEntries(Object.entries(FV.attributes).map((([e,t])=>[e,t.default]))),pq=(e={})=>dq(uq,e),hq=(e={})=>{const{layout:t={},connector:n={},date:o={}}=e,{line:i={},arrow:a={}}=n,s=(e,n,o,i)=>("desktop"===e?[t.desktop?.[n]]:"tablet"===e?[t.tablet?.[n],t.desktop?.[n]]:[t.mobile?.[n],t.tablet?.[n],t.desktop?.[n]]).find((e=>o.includes(e)))||i,r=e=>s(e,"side",GV,"alternate"),l=e=>s(e,"direction",UV,"vertical"),c=qV.includes(i.extent)?i.extent:"markers",d=nq.includes(i.style)?i.style:"solid",u=YV.includes(a.align)?a.align:"center";return["b-blocks-timeline",`b-blocks-timeline-desktop-${l("desktop")}`,`b-blocks-timeline-tablet-${l("tablet")}`,`b-blocks-timeline-mobile-${l("mobile")}`,`b-blocks-timeline-desktop-${r("desktop")}`,`b-blocks-timeline-tablet-${r("tablet")}`,`b-blocks-timeline-mobile-${r("mobile")}`,!1===i.show?"b-blocks-timeline-no-line":"",`b-blocks-timeline-line-${d}`,i.progress?"b-blocks-timeline-progress":"",i.progress&&i.progressFade?"b-blocks-timeline-progress-fade":"","full"===c?"b-blocks-timeline-line-full":"",!1===a.show?"b-blocks-timeline-no-arrow":"",`b-blocks-timeline-arrow-${u}`,!1===o.show?"b-blocks-timeline-no-date":""].filter(Boolean).join(" ")},gq=(e={})=>["b-blocks-timeline-item",["left","right"].includes(e.side)?`b-blocks-timeline-side-${e.side}`:"",YV.includes(e.arrowAlign)?`b-blocks-timeline-item-arrow-${e.arrowAlign}`:""].filter(Boolean).join(" "),mq=e=>{const t=QV[e];return`${void 0===t?"":`border-radius: ${t};`} ${ZV.includes(e)?"clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);":""}`},bq=({attributes:e,id:o,isBackend:i=!1})=>{const{layout:a,connector:s,marker:r,card:c,date:d,advanced:u}=pq(e),{line:p,arrow:h}=s,g=XV[r.shape]||0,m=ZV.includes(r.shape),b=os(r.pulse?.bg,!0,!0,!1)||os(r.normal.bg,!0,!0,!1),f=`#${o}`,x=`${f} .b-blocks-timeline-items`,y=`${f} .b-blocks-timeline-item`,v=`${f} .b-blocks-timeline-content`,k=`${f} .b-blocks-timeline-card`,w=`${f} .b-blocks-timeline-marker`,_=`${f} .b-blocks-timeline-date`,C=e=>"horizontal"!==(e=>("desktop"===e?a.desktop?.direction:"tablet"===e?a.tablet?.direction||a.desktop?.direction:a.mobile?.direction||a.tablet?.direction||a.desktop?.direction)||"vertical")(e),j=(e,t)=>"desktop"===e?p.desktop[t]:"tablet"===e?p.tablet[t]||p.desktop[t]:p.mobile[t]||p.tablet[t]||p.desktop[t],$=oq.includes(p.style),S=(e,t,n,o)=>`\n\t\t${f} .b-blocks-timeline-item ${t}{ ${n} }\n\t\t${f}.b-blocks-timeline-${e}-right .b-blocks-timeline-item ${t}{ ${o} }\n\t\t${f}.b-blocks-timeline-${e}-alternate .b-blocks-timeline-item:where(:nth-of-type(even)) ${t}{ ${o} }\n\t\t${f} .b-blocks-timeline-item.b-blocks-timeline-side-left ${t}{ ${n} }\n\t\t${f} .b-blocks-timeline-item.b-blocks-timeline-side-right ${t}{ ${o} }\n\t`,T=e=>{const t=C(e),n=r[e].size,o=g&&n?`calc(${n} / 1.4142)`:n,i=j(e,"width"),s=n?`calc(${n} / 2)`:"17px",l="full"===p.extent?"0px":s,u=`var(--bb-tl-line-start, ${l})`,m=`var(--bb-tl-line-end, ${l})`,b=t?`top: ${u}; bottom: ${m}; left: 50%; right: auto; transform: translateX(-50%);`:`left: ${u}; right: ${m}; top: var(--bb-tl-line-cross, 50%); bottom: auto; transform: translateY(-50%);`,_=a[e].cardGap||"0px",T=h[e].size||"14px",N=h[e].offset||"16px",M=d[e].gap||"16px",L="solid"===(c.normal.bg?.type||"solid")?c.normal.bg?.color:"",P=h.color||L||"#efefef",E=!1===h.show?"0px":T,A=(e,n)=>t?`padding-inline: ${e} ${n};`:`padding-block: ${e} ${n};`,B=`\n\t\t\t${S(e,".b-blocks-timeline-content",A("0",`calc(${_} + ${E})`),A(`calc(${_} + ${E})`,"0"))}\n\t\t\t${S(e,".b-blocks-timeline-date",A(M,"0"),A("0",M))}\n\t\t`,I=(n,o)=>{const i=(n=>{const o=`calc((100% - ${((e,t)=>"desktop"===e?a.desktop[t]:"tablet"===e?a.tablet[t]||a.desktop[t]:a.mobile[t]||a.tablet[t]||a.desktop[t])(e,"cardWidth")||"100%"}) / 2)`,i=t?`calc(${N} + ${T})`:`calc(${o} + ${N} + ${T})`,s=(e,n)=>t?`margin-block: ${e} ${n};`:`margin-inline: ${e} ${n};`;return"center"===n?{arrow:"",anchor:`${s("0","0")}`}:{arrow:(r=n,(t?"start"===r?`top: ${N}; bottom: auto;`:`top: auto; bottom: ${N};`:"start"===r?`inset-inline-start: ${N}; inset-inline-end: auto;`:`inset-inline-start: auto; inset-inline-end: ${N};`)+" transform: none;"),anchor:"start"===n?s(i,"0"):s("0",i)};var r})(o);return`\n\t\t\t\t${n} .b-blocks-timeline-card::after{ ${i.arrow} }\n\t\t\t\t${n} .b-blocks-timeline-marker,\n\t\t\t\t${n} .b-blocks-timeline-date{ ${i.anchor} }\n\t\t\t`};return`\n\t\t${B}\n\t\t${k}::after{\n\t\t\t${ns("width",t?T:`calc(${T} * 2)`)}\n\t\t\t${ns("height",t?`calc(${T} * 2)`:T)}\n\t\t\t${ns("background",P)}\n\t\t}\n\t\t${I(`${f} .b-blocks-timeline-item`,h.align||"center")}\n\t\t${["start","center","end"].map((e=>I(`${f} .b-blocks-timeline-item.b-blocks-timeline-item-arrow-${e}`,e))).join("")}\n\n\t\t${x}{\n\t\t\t${ns(t?"row-gap":"column-gap",a[e].itemGap)}\n\t\t}\n\t\t${x}::before,\n\t\t${x}::after{\n\t\t\t${(e=>{return $?(t=(e=>{const t=C(e),n=j(e,"gap")||"6px";if("dotted"===p.style){const o=j(e,"width")||"2px";return{image:"radial-gradient(circle closest-side, #000 99%, transparent 100%)",size:t?`${o} calc(${o} + ${n})`:`calc(${o} + ${n}) ${o}`,repeat:t?"repeat-y":"repeat-x"}}const o=j(e,"dash")||"8px";return{image:`repeating-linear-gradient(${t?"to bottom":"to right"}, #000 0 ${o}, transparent ${o} calc(${o} + ${n}))`,size:"auto",repeat:"repeat"}})(e),`\n\t\t\t-webkit-mask-image: ${t.image};\n\t\t\tmask-image: ${t.image};\n\t\t\t-webkit-mask-size: ${t.size};\n\t\t\tmask-size: ${t.size};\n\t\t\t-webkit-mask-repeat: ${t.repeat};\n\t\t\tmask-repeat: ${t.repeat};\n\t\t\t-webkit-mask-position: center;\n\t\t\tmask-position: center;\n\t`):"";var t})(e)}\n\t\t}\n\t\t${x}::before{\n\t\t\t${b}\n\t\t\t${os(p.bg)}\n\t\t\t${ns("width",t?i:"auto")}\n\t\t\t${ns("height",t?"auto":i)}\n\t\t}\n\t\t${x}::after{\n\t\t\t${b}\n\t\t\t${os(p.activeBg)}\n\t\t\t${ns("width",t?i:"auto")}\n\t\t\t${ns("height",t?"auto":i)}\n\t\t}\n\t\t${y}{\n\t\t\t${ns(t?"column-gap":"row-gap",a[e].markerGap)}\n\t\t}\n\t\t${v}{\n\n\t\t}\n\t\t${k}{\n\t\t\t${ns("width",a[e].cardWidth)}\n\t\t\t${ns("padding",hs(c[e].padding))}\n\t\t\t${ns("border-radius",hs(c[e].radius))}\n\t\t}\n\t\t${w}{\n\t\t\t${ns("width",o)}\n\t\t\t${ns("height",o)}\n\t\t\t${ns("font-size",r[e].iconSize)}\n\t\t\t${ns("border-radius",hs(r[e].radius))}\n\t\t}\n\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{
588 +__html:`\n\t\t\t${ps("",d.typo).googleFontLink}\n\t\t\t${ps(_,d.typo).styles}\n\n\t\t\t${k}{\n\t\t\t\t${os(c.normal.bg)}\n\t\t\t\t${as(c.normal.border)}\n\t\t\t\t${ns("box-shadow",ls(c.normal.shadow||[]))}\n\t\t\t}\n\t\t\t${k}:hover{\n\t\t\t\t${os(c.hover.bg)}\n\t\t\t\t${as(c.hover.border)}\n\t\t\t}\n\t\t\t${w}{\n\t\t\t\t${os(r.normal.bg)}\n\t\t\t\t${ns("color",r.normal.color.icon)}\n\t\t\t\t${as(r.normal.border)}\n\t\t\t\t${mq(r.shape)}\n\t\t\t\t${m?"":eq(r.normal.ring)}\n\t\t\t\t${ns("box-shadow",ls(r.normal.shadow||[]))}\n\t\t\t\t${g?`rotate: ${g}deg;`:""}\n\t\t\t\t${r.transition?`transition: background ${r.transition}ms ease, color ${r.transition}ms ease, border-color ${r.transition}ms ease, outline-color ${r.transition}ms ease, outline-offset ${r.transition}ms ease, box-shadow ${r.transition}ms ease;`:""}\n\t\t\t}\n\t\t\t${g?`${w} svg{ rotate: -${g}deg; }`:""}\n\t\t\t${w}:hover{\n\t\t\t\t${os(r.hover.bg)}\n\t\t\t\t${ns("color",r.hover.color.icon)}\n\t\t\t\t${as(r.hover.border)}\n\t\t\t\t${m?"":eq(r.hover.ring)}\n\t\t\t\t${ns("box-shadow",ls(r.hover.shadow||[]))}\n\t\t\t}\n\t\t\t${r.pulse?.show&&!m?`\n\t\t\t\t${w}::after{\n\t\t\t\t\t${b}\n\t\t\t\t\tanimation-name: bb-tl-marker-pulse;\n\t\t\t\t\t${ns("animation-duration",r.pulse.speed?`${r.pulse.speed}ms`:"")}\n\t\t\t\t}\n\t\t\t`:""}\n\t\t\t${_}{\n\t\t\t\t${ns("color",d.color)}\n\t\t\t}\n\n\t\t\t${T("desktop")}\n\n\t\t\t${t}{\n\t\t\t\t${T("tablet")}\n\t\t\t}\n\n\t\t\t${n}{\n\t\t\t\t${T("mobile")}\n\t\t\t}\n\n\t\t\t${_s(o,u,i,!1)}\n\t\t\t`}})},fq=e=>Math.round(1e3*e)/1e3,xq=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{layout:o}=e,i="horizontal"===(e=>("desktop"===e?o.desktop.direction:"tablet"===e?o.tablet.direction||o.desktop.direction:o.mobile.direction||o.tablet.direction||o.desktop.direction)||"vertical")(t),a=[..."desktop"===t?[]:[{label:(0,x.__)("Default","b-blocks"),value:""}],{label:(0,x.__)("Alternate","b-blocks"),value:"alternate"},{label:i?(0,x.__)("Above","b-blocks"):(0,x.__)("Left","b-blocks"),value:"left"},{label:i?(0,x.__)("Below","b-blocks"):(0,x.__)("Right","b-blocks"),value:"right"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Layout","b-blocks"),children:[(0,l.jsx)(y.__experimentalToggleGroupControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Direction","b-blocks")," ",(0,l.jsx)(_,{})]}),help:i?(0,x.__)("Entries run left to right along a horizontal line. Set a narrower breakpoint to turn it upright on smaller screens.","b-blocks"):(0,x.__)("Entries run top to bottom along a vertical line.","b-blocks"),value:o[t].direction||"",onChange:e=>n("layout",e,t,"direction"),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[..."desktop"===t?[]:[{label:(0,x.__)("Default","b-blocks"),value:""}],...WV].map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.__experimentalToggleGroupControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Side","b-blocks")," ",(0,l.jsx)(_,{})]}),help:(0,x.__)("Alternate places entries on opposite sides. Set a narrower breakpoint to change it there — one card per row on phones, say. Any single entry can override this from its own settings.","b-blocks"),value:o[t].side||"",onChange:e=>n("layout",e,t,"side"),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:a.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap Between Entries","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",units:[Pe(),Ae(),Ee()],isUnitSelectTabbable:!0,value:o[t].itemGap,onChange:e=>n("layout",e,t,"itemGap")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Card Width","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Ee(),Pe(),Ae()],isUnitSelectTabbable:!0,value:o[t].cardWidth,onChange:e=>n("layout",e,t,"cardWidth")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Card Offset From Line","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",units:[Pe(),Ae(),Ee()],isUnitSelectTabbable:!0,value:o[t].cardGap,onChange:e=>n("layout",e,t,"cardGap")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Marker Spacing","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:o[t].markerGap,onChange:e=>n("layout",e,t,"markerGap")})]})})),yq=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{layout:o,connector:i}=e,{line:a,arrow:s}=i,r="horizontal"===(("desktop"===t?o.desktop.direction:"tablet"===t?o.tablet.direction||o.desktop.direction:o.mobile.direction||o.tablet.direction||o.desktop.direction)||"vertical"),c=oq.includes(a.style),d=[{label:r?(0,x.__)("Left","b-blocks"):(0,x.__)("Top","b-blocks"),value:"start"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:r?(0,x.__)("Right","b-blocks"):(0,x.__)("Bottom","b-blocks"),value:"end"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Connectors","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Line","b-blocks"),checked:!!a.show,onChange:e=>n("connector",e,"line","show"),__nextHasNoMarginBottom:!0}),a.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.SelectControl,{className:"mt10",labelPosition:"edge",label:(0,x.__)("Line Style","b-blocks"),value:a.style,options:tq,onChange:e=>n("connector",e,"line","style"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Line Length","b-blocks"),labelPosition:"edge",help:(0,x.__)("Between markers stops the line at the first and last marker; full length runs it edge to edge.","b-blocks"),value:a.extent,options:VV,onChange:e=>n("connector",e,"line","extent"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Line Thickness","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:a[t].width,onChange:e=>n("connector",e,"line",t,"width")}),c&&(0,l.jsxs)(l.Fragment,{children:["dashed"===a.style&&(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Dash Length","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:a[t].dash,onChange:e=>n("connector",e,"line",t,"dash")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Gap","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,help:"dotted"===a.style?(0,x.__)("Space between dots. The dot size follows the line thickness.","b-blocks"):(0,x.__)("Space between dashes.","b-blocks"),value:a[t].gap,onChange:e=>n("connector",e,"line",t,"gap")})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Progress","b-blocks"),help:(0,x.__)("Fills the line as the reader scrolls down it. Works with any line style — the fill follows the same shape.","b-blocks"),checked:!!a.progress,onChange:e=>n("connector",e,"line","progress"),__nextHasNoMarginBottom:!0}),a.progress&&(0,l.jsx)(y.ToggleControl,{className:"mt10",label:(0,x.__)("Fade Trailing End","b-blocks"),help:(0,x.__)("Dissolves the far end of the fill into the track, so it reads as a beam following the reader rather than a filled bar.","b-blocks"),checked:!!a.progressFade,onChange:e=>n("connector",e,"line","progressFade"),__nextHasNoMarginBottom:!0})]}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Show Arrow","b-blocks"),help:(0,
589 +x.__)("The small arrow that points from a card back to the line.","b-blocks"),checked:!!s.show,onChange:e=>n("connector",e,"arrow","show"),__nextHasNoMarginBottom:!0}),(0,l.jsx)("br",{}),s.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalToggleGroupControl,{label:(0,x.__)("Arrow Alignment","b-blocks"),value:s.align,onChange:e=>n("connector",e,"arrow","align"),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:d.map((e=>(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Arrow Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:s[t].size,onChange:e=>n("connector",e,"arrow",t,"size")}),"center"!==s.align&&(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Arrow Offset","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae(),Ee()],isUnitSelectTabbable:!0,help:(0,x.__)("Distance from the edge the arrow is aligned to.","b-blocks"),value:s[t].offset,onChange:e=>n("connector",e,"arrow",t,"offset")})]})]})})),vq=({attributes:e,updateObj:t})=>{const{marker:n}=e,o=ZV.includes(n.shape);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Shape","b-blocks"),labelPosition:"edge",help:o?(0,x.__)("The hexagon is cut to shape, so it cannot carry a ring or a pulse.","b-blocks"):(0,x.__)("Sets the corners. Border Radius in the Style tab takes them over as soon as you set one of them.","b-blocks"),value:n.shape,options:KV,onChange:e=>t("marker",e,"shape"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),!o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Pulse","b-blocks"),help:(0,x.__)("A halo that spreads out from behind every marker. It follows the marker’s shape and stops for readers who ask for reduced motion.","b-blocks"),checked:!!n.pulse.show,onChange:e=>t("marker",e,"pulse","show"),__nextHasNoMarginBottom:!0}),n.pulse.show&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Pulse Color:","b-blocks"),value:n.pulse.bg,onChange:e=>t("marker",e,"pulse","bg"),isImage:!1}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Pulse Speed (ms)","b-blocks"),value:n.pulse.speed,onChange:e=>t("marker",e,"pulse","speed"),min:600,max:6e3,step:100,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]})},kq=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{card:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Card","b-blocks"),children:[(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks")," ",(0,l.jsx)(_,{})]}),values:o[t].padding,resetValues:{top:"16px",right:"16px",bottom:"16px",left:"16px"},units:[Pe(),Ae(),Ee()],onChange:e=>n("card",e,t,"padding")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{top:"4px",right:"4px",bottom:"4px",left:"4px"},units:[Pe(),Ee(),Ae()],onChange:e=>n("card",e,t,"radius")})]})})),wq=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{date:o}=e;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Date","b-blocks"),children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Date","b-blocks"),checked:!!o.show,onChange:e=>n("date",e,"show"),__nextHasNoMarginBottom:!0}),o.show&&(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Distance From Marker","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:o[t].gap,onChange:e=>n("date",e,t,"gap")})]})})),_q=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(xq,{...e}),(0,l.jsx)(vq,{...e}),(0,l.jsx)(kq,{...e}),(0,l.jsx)(yq,{...e}),(0,l.jsx)(wq,{...e})]}),Cq=({attributes:e,updateObj:t})=>{const{connector:n}=e,{line:o,arrow:i}=n;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Connectors","b-blocks"),children:[o.show&&(0,l.jsx)(An,{label:o.progress?(0,x.__)("Track Color:","b-blocks"):(0,x.__)("Line Color:","b-blocks"),value:o.bg,onChange:e=>t("connector",e,"line","bg"),isImage:!1}),o.show&&o.progress&&(0,l.jsx)(An,{label:(0,x.__)("Progress Color:","b-blocks"),value:o.activeBg,onChange:e=>t("connector",e,"line","activeBg"),isImage:!1}),i.show&&(0,l.jsx)(Ue,{label:(0,x.__)("Arrow Color","b-blocks"),value:i.color,onChange:e=>t("connector",e,"arrow","color")}),i.show&&(0,l.jsx)("p",{className:"description",children:(0,x.__)("Leave the arrow color empty to keep it matching the card background.","b-blocks")})]})},jq=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((({attributes:e,device:t,updateObj:n})=>{const{marker:o}=e,i=ZV.includes(o.shape);return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:o[t].size,onChange:e=>n("marker",e,t,"size")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Icon Size","b-blocks")," ",(0,l.jsx)(_,{})]}),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:o[t].iconSize,onChange:e=>n("marker",e,t,"iconSize")}),(0,l.jsx)(k,{label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Border Radius","b-blocks")," ",(0,l.jsx)(_,{})]}),className:"mt10",values:o[t].radius,resetValues:{top:"",right:"",bottom:"",left:""},units:[Ee(),Pe(),Ae()],onChange:e=>n("marker",e,t,"radius")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small mt10",activeClass:"activeTab",tabs:Me,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:o[e].bg,onChange:t=>n("marker",t,e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:o[e].color.icon,onChange:t=>n("marker",t,e,"color","icon")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:o[e].border,onChange:t=>n("marker",t,e,"border")}),!i&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Width","b-blocks"),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,help:"normal"===e?(0,x.__)("A halo drawn outside the border. It follows the marker’s shape, takes no space in the layout, and uses the icon colour unless you set one below.","b-blocks"):void 0,value:o[e].ring.width,onChange:t=>n("marker",t,e,"ring","width")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Ring Style","b-blocks"),labelPosition:"edge",value:o[e].ring.style||"",options:"normal"===e?JV:[{label:(0,x.__)("Default","b-blocks"),value:""},...JV],onChange:t=>n("marker",t,e,"ring","style"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Offset","b-blocks"),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,help:"normal"===e?(0,x.__)("Gap between the marker and its ring.","b-blocks"):void 0,value:o[e].ring.offset,onChange:t=>n("marker",t,e,"ring","offset")}),(0,l.jsx)(Ue,{label:(0,x.__)("Ring Color","b-blocks"),value:o[e].ring.color,onChange:t=>n("marker",t,e,"ring","color")})]}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:o[e].shadow,onChange:t=>n("marker",t,e,"shadow")})]})}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,
590 +x.__)("Transition Speed (ms)","b-blocks"),help:(0,x.__)("How long the marker takes to settle into its hover state.","b-blocks"),value:o.transition,onChange:e=>n("marker",e,"transition"),min:0,max:1200,step:50,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})})),$q=({attributes:e,updateObj:t})=>{const{card:n}=e;return(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Card","b-blocks"),children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:Me,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n[e].bg,onChange:n=>t("card",n,e,"bg")}),(0,l.jsx)(y.__experimentalBorderBoxControl,{label:(0,x.__)("Border","b-blocks"),value:n[e].border,onChange:n=>t("card",n,e,"border")}),"normal"===e&&(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:n.normal.shadow,onChange:e=>t("card",e,"normal","shadow")})]})})})},Sq=({attributes:e,updateObj:t})=>{const{date:n}=e;return n.show?(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Date","b-blocks"),children:[(0,l.jsx)(Oa,{label:(0,x.__)("Typography","b-blocks"),value:n.typo,onChange:e=>t("date",e,"typo")}),(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.color,onChange:e=>t("date",e,"color")})]}):null},Tq=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Cq,{...e}),(0,l.jsx)(jq,{...e}),(0,l.jsx)($q,{...e}),(0,l.jsx)(Sq,{...e})]}),Nq=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:HV,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(_q,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Tq,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})},Mq=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=pq(t),{layout:s,connector:r,marker:c}=a,d=bBlocksPremiumChecker,u=fe(t,n),p=(0,h.useBlockProps)({className:hq(a)}),g=(0,f.useSelect)((e=>{const{getBlockOrder:t,getBlockAttributes:n}=e("core/block-editor");return t(o).map((e=>{const t=n(e)?.item;return`${t?.side||""}.${t?.arrowAlign||""}`})).join("|")}),[o]),m=(0,Qa.useRef)(null);(0,Qa.useEffect)((()=>{if(m.current)return((e,t={})=>{if(!e)return()=>{};let n=null;const o=()=>{null===n&&(n=requestAnimationFrame((()=>{n=null,((e,t={})=>{if(!e)return;const n=getComputedStyle(e),o="grid"===n.display?!n.gridAutoFlow.includes("column"):"row"!==n.flexDirection,i=e.getBoundingClientRect(),a=o?i.height:i.width;if(!a)return;const s=Array.from(e.querySelectorAll(":scope > * > .b-blocks-timeline-marker")),r=s.map((e=>{const t=e.getBoundingClientRect();return o?t.top-i.top+t.height/2:t.left-i.left+t.width/2})).sort(((e,t)=>e-t));if(s.length){const t=s[0].getBoundingClientRect(),n=o?t.left-i.left+t.width/2:t.top-i.top+t.height/2;e.style.setProperty("--bb-tl-line-cross",`${fq(n)}px`)}const l="full"!==t.extent&&r.length>0,c=l?r[0]:0,d=l?r[r.length-1]:a;e.style.setProperty("--bb-tl-line-start",`${fq(c)}px`),e.style.setProperty("--bb-tl-line-end",`${fq(a-d)}px`)})(e,t)})))};o();const i="undefined"!=typeof ResizeObserver?new ResizeObserver(o):null;return i?(i.observe(e),e.querySelectorAll(":scope > *").forEach((e=>i.observe(e)))):window.addEventListener("resize",o),()=>{null!==n&&cancelAnimationFrame(n),i?i.disconnect():window.removeEventListener("resize",o)}})(m.current,{extent:r.line.extent})}),[s,r,c,g]),(0,Qa.useEffect)((()=>{if(r.line.progress&&m.current)return(e=>{const t=e.ownerDocument?.defaultView||window;let n=null,o=!0;const i=()=>{n=null;const o=e.getBoundingClientRect(),i=(t.innerHeight||e.ownerDocument.documentElement.clientHeight)/2-o.top,a=o.height||1,s=Math.min(Math.max(i/a,0),1);e.style.setProperty("--bb-tl-line-progress",s.toFixed(4))},a=()=>{null===n&&o&&(n=requestAnimationFrame(i))},s=void 0!==t.IntersectionObserver?new t.IntersectionObserver((e=>{o=e.some((e=>e.isIntersecting)),a()})):null;return s&&s.observe(e),t.addEventListener("scroll",a,{passive:!0}),t.addEventListener("resize",a,{passive:!0}),i(),()=>{null!==n&&cancelAnimationFrame(n),s&&s.disconnect(),t.removeEventListener("scroll",a),t.removeEventListener("resize",a)}})(m.current)}),[r.line.progress,g]);const b=(0,h.useInnerBlocksProps)({className:"b-blocks-timeline-items"},{allowedBlocks:sq,template:cq,templateLock:!1,orientation:"vertical",renderAppender:h.InnerBlocks.ButtonBlockAppender});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Nq,{attributes:a,setAttributes:n,updateObj:u,isPremium:d,device:i}),(0,l.jsxs)("div",{...p,children:[(0,l.jsx)(bq,{attributes:a,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{...b,ref:m})]})]})}));Pl(FV.name)&&(0,p.registerBlockType)(FV,{icon:Ml,edit:Mq,save:h.InnerBlocks.Content})
591 +;const Lq=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/timeline-item","version":"1.0.0","title":"Timeline Item","category":"bBlocks","description":"A single entry on a Timeline: a date, an icon marker and any inner blocks you want inside its card.","keywords":["timeline item","timeline entry","milestone","event"],"parent":["b-blocks/timeline"],"textdomain":"b-blocks","attributes":{"date":{"type":"string","default":""},"icon":{"type":"string","default":"<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 384 512\'><path d=\'M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z\'/></svg>"},"item":{"type":"object","default":{"side":"","arrowAlign":"","marker":{"normal":{"bg":{"type":"solid","color":""},"color":{"icon":""},"ring":{"width":"","style":"","offset":"","color":""},"shadow":[]},"hover":{"bg":{"type":"solid","color":""},"color":{"icon":""},"ring":{"width":"","style":"","offset":"","color":""},"shadow":[]}},"pulse":{"show":"","bg":{"type":"solid","color":""},"speed":""},"card":{"normal":{"bg":{"type":"solid","color":""}}},"date":{"color":""},"arrow":{"bg":{"type":"solid","color":""}}}},"advanced":{"type":"object","default":{"dimension":{"padding":{"desktop":{"top":"","right":"","bottom":"","left":""},"tablet":{"top":"","right":"","bottom":"","left":""},"mobile":{"top":"","right":"","bottom":"","left":""}}},"transform":{"normal":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"hover":{"rotate":{"desktop":{"z":"","y":"","x":""},"tablet":{"z":"","y":"","x":""},"mobile":{"z":"","y":"","x":""},"threeDRotate":false},"offset":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"scale":{"isProportion":true,"desktop":{"x":"","y":"","scale":""},"tablet":{"x":"","y":"","scale":""},"mobile":{"x":"","y":"","scale":""}},"skew":{"desktop":{"x":"","y":""},"tablet":{"x":"","y":""},"mobile":{"x":"","y":""}},"flipX":false,"flipY":false},"transition":200},"borderShadow":{"normal":{"radius":{"top":"","right":"","bottom":"","left":""},"shadow":[{"hOffset":"","vOffset":"","blur":"","spreed":"","color":"","isInset":false}],"border":{"top":{"style":"none","width":"0px"},"right":{"style":"none","width":"0px"},"bottom":{"style":"none","width":"0px"},"left":{"style":"none","width":"0px"}}}},"background":{"normal":{"type":"color","color":"","gradient":{"type":"radial","radialType":"ellipse","colors":[{"color":"rgba(58, 66, 222, 1)","position":"0"},{"color":"rgba(176, 195, 235, 1)","position":"80"}],"centerPositions":{"x":50,"y":50},"angel":90},"img":{"url":"","desktop":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"tablet":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"},"mobile":{"position":"center center","xPosition":0,"yPosition":0,"attachment":"","repeat":"no-repeat","size":"","customSize":"0px"}},"video":{"url":"","loop":false},"transition":0.3}}}}},"supports":{"html":false,"reusable":false,"inserter":true},"example":{"attributes":{}},"editorScript":"file:../index.js","render":"file:./render.php","viewScript":"file:./view.js"}'),Pq=Object.fromEntries(Object.entries(Lq.attributes).map((([e,t])=>[e,t.default]))),Eq=(e={})=>dq(Pq,e),Aq=({attributes:e,id:t,isBackend:n=!1})=>{const{item:o,advanced:i}=Eq(e),{marker:a,pulse:s,card:r,date:c,arrow:d}=o,u=`#${t}`,p=`${u}.b-blocks-timeline-item`,h=`${u} .b-blocks-timeline-card`,g=`${u} .b-blocks-timeline-marker`,m=`${u} .b-blocks-timeline-date`,b=os(d.bg)||os(r.normal.bg),f=["on"===s.show?"animation-name: bb-tl-marker-pulse;":"","off"===s.show?"animation-name: none;":"","off"===s.show?"":os(s.bg,!0,!0,!1),"off"===s.show?"":ns("animation-duration",s.speed?`${s.speed}ms`:"")].filter(Boolean).join(" "),x=n?`#${t}>div>div:first-child`:`#${t}>div`,y=_s(t,i,n,!0).split(x).join(`#${t}`);return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${h}{\n\t\t\t\t${os(r.normal.bg)}\n\t\t\t}\n\t\t\t${p} .b-blocks-timeline-card::after{\n\t\t\t\t${b}\n\t\t\t}\n\t\t\t${g}{\n\t\t\t\t${os(a.normal.bg)}\n\t\t\t\t${ns("color",a.normal.color.icon)}\n\t\t\t\t${eq(a.normal.ring)}\n\t\t\t\t${ns("box-shadow",ls(a.normal.shadow||[]))}\n\t\t\t}\n\t\t\t${g}:hover{\n\t\t\t\t${os(a.hover.bg)}\n\t\t\t\t${ns("color",a.hover.color.icon)}\n\t\t\t\t${eq(a.hover.ring)}\n\t\t\t\t${ns("box-shadow",ls(a.hover.shadow||[]))}\n\t\t\t}\n\t\t\t${f?`${g}::after{ ${f} }`:""}\n\t\t\t${m}{\n\t\t\t\t${ns("color",c.color)}\n\t\t\t}\n\t\t\t${y}\n\t\t\t`}})},Bq=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")},{name:"advanced",title:(0,x.__)("Advanced","b-blocks")}],Iq=({attributes:e,setAttributes:t,updateObj:n,clientId:o})=>{const{icon:i,item:a}=e,s="horizontal"===(0,f.useSelect)((e=>{const{getBlockParentsByBlockName:t,getBlock:n}=e("core/block-editor"),i=t(o,iq);return i?.length&&n(i[i.length-1])?.attributes?.layout?.desktop?.direction||"vertical"}),[o]),r=[{label:(0,x.__)("Auto (follow layout)","b-blocks"),value:""},{label:s?(0,x.__)("Above","b-blocks"):(0,x.__)("Left","b-blocks"),value:"left"},{label:s?(0,x.__)("Below","b-blocks"):(0,x.__)("Right","b-blocks"),value:"right"}],c=[{label:(0,x.__)("Auto (follow Timeline)","b-blocks"),value:""},{label:s?(0,x.__)("Left","b-blocks"):(0,x.__)("Top","b-blocks"),value:"start"},{label:(0,x.__)("Center","b-blocks"),value:"center"},{label:s?(0,x.__)("Right","b-blocks"):(0,x.__)("Bottom","b-blocks"),value:"end"}];return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Entry","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Side","b-blocks"),labelPosition:"edge",help:(0,x.__)("Overrides the side this entry would get from the Timeline layout.","b-blocks"),value:a.side||"",options:r,onChange:e=>n("item",e,"side"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Arrow Alignment","b-blocks"),labelPosition:"edge",help:(0,x.__)("Overrides where this entry’s arrow sits along its card edge. Arrow size and offset stay with the Timeline.","b-blocks"),value:a.arrowAlign||"",options:c,onChange:e=>n("item",e,"arrowAlign"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(Zn,{label:(0,x.__)("Marker Icon","b-blocks"),value:i,onChange:e=>t({icon:e})})]})},Oq=({attributes:e,updateObj:t,clientId:n})=>{const{item:o}=e,{pulse:i}=o,a=(0,f.useSelect)((e=>{const{getBlockParentsByBlockName:t,getBlock:o}=e("core/block-editor"),i=t(n,iq);return i?.length&&o(i[i.length-1])?.attributes?.marker||{}}),[n]);if(ZV.includes(a.shape))return null;const s=[{label:a.pulse?.show?(0,x.__)("Default — on, from the Timeline","b-blocks"):(0,x.__)("Default — off, from the Timeline","b-blocks"),value:""},{label:(0,x.__)("On","b-blocks"),value:"on"},{label:(0,x.__)("Off","b-blocks"),value:"off"}],r=""===i.show?!!a.pulse?.show:"on"===i.show;return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Pulse","b-blocks"),help:(0,x.__)("A halo that spreads out from behind this entry’s marker.","b-blocks"),value:i.show||"",options:s,onChange:e=>t("item",e,"pulse","show"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Pulse Color:","b-blocks"),value:i.bg,
592 +onChange:e=>t("item",e,"pulse","bg"),isImage:!1}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Pulse Speed (ms)","b-blocks"),help:(0,x.__)("Leave unset to follow the Timeline.","b-blocks"),value:i.speed||void 0,onChange:e=>t("item",e||"","pulse","speed"),min:600,max:6e3,step:100,allowReset:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})},Rq=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Iq,{...e}),(0,l.jsx)(Oq,{...e})]}),zq=({attributes:e,updateObj:t})=>{const{item:n}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!0,title:(0,x.__)("Marker","b-blocks"),children:[(0,l.jsx)(y.Notice,{className:"mb10",status:"info",isDismissible:!1,children:(0,x.__)("Empty values follow the Timeline.","b-blocks")}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel small",activeClass:"activeTab",tabs:Me,children:({name:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n.marker[e].bg,onChange:n=>t("item",n,"marker",e,"bg")}),(0,l.jsx)(Ue,{label:(0,x.__)("Icon Color","b-blocks"),value:n.marker[e].color.icon,onChange:n=>t("item",n,"marker",e,"color","icon")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Width","b-blocks"),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:n.marker[e].ring.width,onChange:n=>t("item",n,"marker",e,"ring","width")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Ring Style","b-blocks"),labelPosition:"edge",value:n.marker[e].ring.style||"",options:[{label:(0,x.__)("Default (follow Timeline)","b-blocks"),value:""},...JV],onChange:n=>t("item",n,"marker",e,"ring","style"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Ring Offset","b-blocks"),labelPosition:"edge",className:"mt10",units:[Pe(),Ae()],isUnitSelectTabbable:!0,value:n.marker[e].ring.offset,onChange:n=>t("item",n,"marker",e,"ring","offset")}),(0,l.jsx)(Ue,{label:(0,x.__)("Ring Color","b-blocks"),value:n.marker[e].ring.color,onChange:n=>t("item",n,"marker",e,"ring","color")}),(0,l.jsx)(yt,{label:(0,x.__)("Box Shadow","b-blocks"),value:n.marker[e].shadow,onChange:n=>t("item",n,"marker",e,"shadow")})]})})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Card","b-blocks"),children:(0,l.jsx)(An,{label:(0,x.__)("Background:","b-blocks"),value:n.card.normal.bg,onChange:e=>t("item",e,"card","normal","bg")})}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Arrow","b-blocks"),children:[(0,l.jsx)(An,{label:(0,x.__)("Arrow Color:","b-blocks"),value:n.arrow.bg,onChange:e=>t("item",e,"arrow","bg"),isImage:!1}),(0,l.jsx)("p",{className:"description",children:(0,x.__)("Leave empty to keep the arrow matching this entry’s card background.","b-blocks")})]}),(0,l.jsx)(y.PanelBody,{className:"bPlPanelBody",initialOpen:!1,title:(0,x.__)("Date","b-blocks"),children:(0,l.jsx)(Ue,{label:(0,x.__)("Color","b-blocks"),value:n.date.color,onChange:e=>t("item",e,"date","color")})})]})},Dq=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(zq,{...e})}),Fq=e=>{const{attributes:t,setAttributes:n,isPremium:o}=e,{advanced:i}=t;return(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsxs)("div",{className:"bPlInspectorInfo",children:["Need more block like this? Checkout the bundle ➡",(0,l.jsx)("a",{href:"https://wordpress.org/plugins/b-blocks",target:"_blank",rel:"noopener noreferrer",children:" bBlocks "})]}),(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:Bq,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Rq,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Dq,{...e})}),"advanced"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qt,{advanced:i,onChange:e=>n({advanced:e}),isPremium:o})})]})})]})},Hq=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()||"desktop"}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=Eq(t),{date:s,icon:r,item:c}=a,d=bBlocksPremiumChecker,u=fe(t,n),p=(0,f.useSelect)((e=>0===e("core/block-editor").getBlockCount(o)),[o]),g=(0,h.useBlockProps)({className:gq(c)}),m=(0,h.useInnerBlocksProps)({className:"b-blocks-timeline-card"},{templateLock:!1,renderAppender:p?h.InnerBlocks.ButtonBlockAppender:h.InnerBlocks.DefaultBlockAppender});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Fq,{attributes:a,setAttributes:n,updateObj:u,isPremium:d,device:i,clientId:o}),(0,l.jsxs)("div",{...g,children:[(0,l.jsx)(Aq,{attributes:a,id:`block-${o}`,isBackend:!0}),(0,l.jsx)("div",{className:"b-blocks-timeline-content",children:(0,l.jsx)("div",{...m})}),(0,l.jsx)("div",{className:"b-blocks-timeline-marker",children:r&&(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:r}})}),(0,l.jsx)(h.RichText,{tagName:"div",className:"b-blocks-timeline-date",value:s,onChange:e=>n({date:e}),placeholder:(0,x.__)("Add a date…","b-blocks")})]})]})}));Pl(iq)&&(0,p.registerBlockType)(Lq,{icon:Ll,edit:Hq,save:h.InnerBlocks.Content});const Wq=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/toggle-content","title":"Toggle Content","category":"bBlocks","description":"A clean toggle switch lets users click to switch between two content sections below the heading.","keywords":["toggle content","toggle switch","toggle content switch","toggle content switcher","toggle content switcher block","toggle"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"toggle":{"type":"object","default":{"contentType":"primary","switchType":"rounded"}},"label":{"type":"object","default":{"left":"First","right":"Second"}},"styles":{"type":"object","default":{"header":{"desktop":{"padding":{"top":"","right":"","bottom":"","left":""},"headingGap":"10px"},"tablet":{"padding":{"top":"","right":"","bottom":"","left":""},"headingGap":""},"mobile":{"padding":{"top":"","right":"","bottom":"","left":""},"headingGap":""},"normal":{"bg":"","border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}}},"hover":{"bg":"","border":{},"desktop":{"radius":{"top":"","right":"","bottom":"","left":""}},"tablet":{"radius":{"top":"","right":"","bottom":"","left":""}},"mobile":{"radius":{"top":"","right":"","bottom":"","left":""}},"transition":0.3}},"toggle":{"direction":"row","width":"","height":"","desktop":{"align":"center"},"tablet":{"align":""},"mobile":{"align":""},"active":{"color":{},"bg":{}},"inactive":{"color":{},"bg":{}}},"label":{"gap":"","typo":{"fontSize":{"desktop":"","tablet":"","mobile":""}},"active":{"first":{"color":""},"second":{"color":""}},"inactive":{"first":{"color":""},"second":{"color":""}}}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),Uq=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],Gq=[{value:"rounded",label:(0,x.__)("Rounded","b-blocks")},{value:"rectangle",label:(0,x.__)("Rectangle","b-blocks")}],Vq=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),qq=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",
593 +strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),Yq=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),Kq=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i,label:a,toggle:s}=t,{toggle:r,header:c,label:d}=i;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Toggle","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Switch Type","b-blocks"),labelPosition:"edge",options:Gq,value:s?.switchType,onChange:e=>n("toggle",e,"switchType")}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r?.[o]?.align,onChange:e=>n("styles",e,"toggle",o,"align"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:Vq}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:qq}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:Yq})]})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsx)(v,{className:"flex1 mb0",children:(0,x.__)("Direction","b-blocks")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:r?.direction,onChange:e=>n("styles",e,"toggle","direction"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Horizontal",value:"row"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Vertical",value:"column"})]})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsxs)(v,{className:"flex2 mb0",children:[(0,x.__)("Heading Gap","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:c?.[o]?.headingGap,onChange:e=>n("styles",e,"header",o,"headingGap")})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Label Gap","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:d?.[o]?.gap,onChange:e=>n("styles",e,"label",o,"gap")})]})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Label","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Left Label","b-blocks"),value:a?.left,onChange:e=>n("label",e,"left")}),(0,l.jsx)(y.TextControl,{label:(0,x.__)("Right Label","b-blocks"),value:a?.right,onChange:e=>n("label",e,"right")})]})]})},Qq=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Kq,{...e})}),Zq=e=>{const{attributes:t,updateObj:n,device:o}=e,{styles:i}=t,{header:a}=i,[s,r]=(0,m.useState)("normal");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Header","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(k,{values:a[o].padding,label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Padding","b-blocks"),(0,l.jsx)(_,{})]}),onChange:e=>n("styles",e,"header",o,"padding")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>r(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(An,{value:a[s].bg,onChange:e=>n("styles",e,"header",s,"bg")}),(0,l.jsx)(y.BorderBoxControl,{className:"mt10",value:a[s].border,onChange:e=>n("styles",e,"header",s,"border")}),(0,l.jsx)(k,{values:a[s][o].radius,className:"mt10",label:(0,l.jsxs)(y.Flex,{children:[(0,x.__)("Radius","b-blocks"),(0,l.jsx)(_,{})]}),onChange:e=>n("styles",e,"header",s,o,"radius")})]})},Xq=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{label:i}=o,[a,s]=(0,m.useState)("inactive");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Label Styles","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Oa,{value:i.typo,onChange:e=>n("styles",e,"label","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"inactive"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsx)(Ue,{label:(0,x.__)("Left Label Color","b-blocks"),value:i[a].first.color,onChange:e=>n("styles",e,"label",a,"first","color")}),(0,l.jsx)(Ue,{label:(0,x.__)("Right Label Color","b-blocks"),value:i[a].second.color,onChange:e=>n("styles",e,"label",a,"second","color")})]})},Jq=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{toggle:i}=o,[a,s]=(0,m.useState)("inactive");return(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Switcher","b-blocks"),initialOpen:!1,children:[(0,l.jsxs)(y.Flex,{align:"center",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Width","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i?.width,onChange:e=>n("styles",e,"toggle","width")})]}),(0,l.jsxs)(y.Flex,{align:"center",className:"mt10",children:[(0,l.jsx)(v,{className:"flex2 mb0",children:(0,x.__)("Height","b-blocks")}),(0,l.jsx)(y.__experimentalUnitControl,{className:"flex1",value:i?.height,onChange:e=>n("styles",e,"toggle","height")})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1 mt10",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:a,onChange:e=>s(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"inactive"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Active",value:"active"})]}),(0,l.jsx)(An,{label:(0,x.__)("Color","b-blocks"),value:i[a].color,onChange:e=>n("styles",e,"toggle",a,"color"),isImage:!1}),(0,l.jsx)(An,{label:(0,x.__)("Background","b-blocks"),value:i[a].bg,onChange:e=>n("styles",e,"toggle",a,"bg")})]})},eY=e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Zq,{...e}),(0,l.jsx)(Jq,{...e}),(0,l.jsx)(Xq,{...e})]}),tY=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",initialTabName:"general",tabs:Uq,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Qq,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(eY,{...e})})]})})})}),nY=(e,o)=>{
594 +const{styles:i}=e,{toggle:a,header:s,label:r}=i,l=`#${o}`,c=`${l} .b-blocks-toggle-content__wrapper .b-blocks-toggle-content__head`,d=`${c} .b-blocks-toggle-content-switch__wrapper`,u=`${d} .b-blocks-toggle-content__switch`,p=`${l} .is-b .b-blocks-toggle-content__switch`,h=`${l} .is-a .b-blocks-toggle-content__switch`,g=`${u} .b-blocks-toggle-content__knob`,m=`${l} .is-b .b-blocks-toggle-content__knob`,b=`${l} .is-a .b-blocks-toggle-content__knob`,f=`${d} .b-blocks-toggle-content__label`;return`\n\t\t${ps("",r.typo).googleFontLink}\n\t\t${ps(f,r.typo).styles}\n\n\t\t${c}{\n\t\t\t${ns("justify-content",a?.desktop?.align)}\n\t\t\t${ns("margin-bottom",s?.desktop?.headingGap)}\n\t\t\t${ns("padding",hs(s?.desktop?.padding))}\n\t\t\t${os(s.normal.bg)}\n\t\t\t${as(s.normal.border)}\n\t\t\t${ns("border-radius",hs(s.normal.desktop.radius))}\n\t\t}\n\n\t\t${c}:hover{\n\t\t\t${os(s.hover.bg)}\n\t\t\t${as(s.hover.border)}\n\t\t\t${ns("border-radius",hs(s.hover.desktop.radius))}\n\t\t}\n\n\t\t${d}{\n\t\t\t${ns("flex-direction",a?.direction)}\n\t\t\t${ns("gap",r?.desktop?.gap)}\n\t\t}\n\n\t\t${u}{\n\t\t\t${ns("width",a.width)}\n\t\t\t${ns("height",a.height)}\n\t\t}\n\n\t\t${p}{\n\t\t\t${os(a.active.bg)}\n\t\t}\n\n\t\t${h}{\n\t\t\t${os(a.inactive.bg)}\n\t\t}\n\n\t\t${g}{\n\t\t\t${ns("width",a.height?`calc(${a.height} - 6px)`:"")}\n\t\t\t${ns("height",a.height?`calc(${a.height} - 6px)`:"")}\n\t\t\t\n\t\t}\n\t\t${m}{\n\t\t\t${ns("transform",a.width?`translateX(calc(${a.width?a.width:"60px"} - ${a.height?a.height:"30px"}))`:"")}\n\t\t\t${os(a.active.color)}\n\t\t}\n\t\t${b}{\n\t\t\t${os(a.inactive.color)}\n\t\t}\n\n\t\t${f}.b-blocks-toggle-content__label--left {\n\t\t\t${ns("color",r.inactive.first.color)}\n\t\t}\n\n\t\t${f}.b-blocks-toggle-content__label--right{\n\t\t\t${ns("color",r.inactive.second.color)}\n\t\t}\n\t\t${f}.b-blocks-toggle-content__label--left.is-active {\n\t\t\t${ns("color",r.active.first.color)}\n\t\t}\n\n\t\t${f}.b-blocks-toggle-content__label--right.is-active{\n\t\t\t${ns("color",r.active.second.color)}\n\t\t}\n\n\t\t${t}{\n\t\t\t${c}{\n\t\t\t\t${ns("justify-content",a?.tablet?.align)}\n\t\t\t\t${ns("margin-bottom",s?.tablet?.headingGap)}\n\t\t\t\t${ns("padding",hs(s?.tablet?.padding))}\n\t\t\t\t${ns("border-radius",hs(s.normal.tablet.radius))}\n\t\t\t}\n\n\t\t\t${c}:hover{\n\t\t\t\t${ns("border-radius",hs(s.hover.tablet.radius))}\n\t\t\t}\n\n\t\t\t${d}{\n\t\t\t\t${ns("gap",r?.tablet?.gap)}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t${c}{\n\t\t\t\t${ns("justify-content",a?.mobile?.align)}\n\t\t\t\t${ns("margin-bottom",s?.mobile?.headingGap)}\n\t\t\t\t${ns("padding",hs(s?.mobile?.padding))}\n\t\t\t\t${ns("border-radius",hs(s.normal.mobile.radius))}\n\t\t\t}\n\n\t\t\t${c}:hover{\n\t\t\t\t${ns("border-radius",hs(s.hover.mobile.radius))}\n\t\t\t}\n\n\t\t\t${d}{\n\t\t\t\t${ns("gap",r?.mobile?.gap)}\n\t\t\t}\n\t\t}\n\n\t`},oY=[["b-blocks/container",{className:"b-blocks-toggle-content__panel b-blocks-toggle-content__panel--a",lock:{remove:!0,move:!0}},[]],["b-blocks/container",{className:"b-blocks-toggle-content__panel b-blocks-toggle-content__panel--b",lock:{remove:!0,move:!0}},[]]],iY=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((({attributes:e,setAttributes:t,className:n,device:o,clientId:i})=>{const{label:a,toggle:s}=e,[r,c]=(0,Qa.useState)(!0),d=(0,h.useBlockProps)({className:n}),u=fe(e,t);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tY,{attributes:e,updateObj:u,device:o}),(0,l.jsxs)("div",{...d,children:[(0,l.jsx)("style",{children:nY(e,`block-${i}`)}),(0,l.jsxs)("div",{className:"b-blocks-toggle-content__wrapper "+(r?"is-a":"is-b"),children:[(0,l.jsx)("div",{className:"b-blocks-toggle-content__head",children:(0,l.jsxs)("div",{className:"b-blocks-toggle-content-switch__wrapper",children:[(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-toggle-content__label b-blocks-toggle-content__label--left "+(r?"":"is-active"),value:a.left,onChange:e=>u("label",e,"left"),onClick:()=>c(!0),placeholder:(0,x.__)("First","b-blocks"),allowedFormats:[]}),(0,l.jsx)("div",{className:`b-blocks-toggle-content__switch b-blocks-toggle-content-switch-${s.switchType} ${r?"":"is-b"}`,role:"button",tabIndex:0,"aria-label":(0,x.__)("Toggle content","b-blocks"),onClick:()=>c((e=>!e)),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||c((e=>!e))},children:(0,l.jsx)("div",{className:"b-blocks-toggle-content__knob"})}),(0,l.jsx)(h.RichText,{tagName:"span",className:"b-blocks-toggle-content__label b-blocks-toggle-content__label--right "+(r?"":"is-active"),value:a.right,onChange:e=>u("label",e,"right"),onClick:()=>c(!1),placeholder:(0,x.__)("Second","b-blocks"),allowedFormats:[]})]})}),(0,l.jsx)("div",{className:"b-blocks-toggle-content__content",children:(0,l.jsx)(h.InnerBlocks,{template:oY,renderAppender:!1})})]})]})]})}));Pl(Wq.name)&&(0,p.registerBlockType)(Wq,{icon:al,edit:iY,save:h.InnerBlocks.Content});const aY={none:{label:(0,x.__)("None","accordion-block"),items:[]},faq:{label:(0,x.__)("FAQ","accordion-block"),items:[{title:(0,x.__)("What is your return policy?","accordion-block"),content:(0,x.__)("We offer a 30-day money-back guarantee. If you're not satisfied with your purchase, contact our support team for a full refund.","accordion-block"),isOpen:!1},{title:(0,x.__)("How long does shipping take?","accordion-block"),content:(0,x.__)("Standard shipping takes 5-7 business days. Express shipping options are available at checkout for faster delivery.","accordion-block"),isOpen:!1},{title:(0,x.__)("Do you offer customer support?","accordion-block"),content:(0,x.__)("Yes! Our customer support team is available 24/7 via email, phone, and live chat to assist you with any questions.","accordion-block"),isOpen:!1}]},features:{label:(0,x.__)("Product Features","accordion-block"),items:[{title:(0,x.__)("Easy to Use","accordion-block"),content:(0,x.__)("Our intuitive interface makes it simple to get started. No technical knowledge required - just install and start creating.","accordion-block"),isOpen:!1},{title:(0,x.__)("Fully Customizable","accordion-block"),content:(0,x.__)("Customize every aspect of your accordion with our powerful theme editor. Colors, spacing, fonts - it's all under your control.","accordion-block"),isOpen:!1},{title:(0,x.__)("Mobile Responsive","accordion-block"),content:(0,x.__)("Works perfectly on all devices. Your accordions will look great whether viewed on desktop, tablet, or mobile.","accordion-block"),isOpen:!1}]},timeline:{label:(0,x.__)("Timeline","accordion-block"),items:[{title:(0,x.__)("2020 - Foundation","accordion-block"),content:(0,x.__)("Our company was founded with a vision to create innovative solutions that make a difference in people's lives.","accordion-block"),isOpen:!1},{title:(0,x.__)("2021 - Growth","accordion-block"),content:(0,x.__)("Expanded our team and launched three major products that received excellent feedback from customers worldwide.","accordion-block"),isOpen:!1},{title:(0,x.__)("2022 - Innovation","accordion-block"),content:(0,x.__)("Introduced cutting-edge features and won multiple industry awards for innovation and customer satisfaction.","accordion-block"),isOpen:!1},{title:(0,x.__)("2023 - Global Expansion","accordion-block"),content:(0,x.__)("Opened offices in 5 new countries and reached 1 million satisfied customers across the globe.","accordion-block"),isOpen:!1}]},pricing:{label:(0,x.__)("Pricing Details","accordion-block"),items:[{title:(0,x.__)("Basic Plan - $9/month","accordion-block"),content:(0,x.__)("Perfect for individuals and small projects. Includes 10 GB storage, basic support, and access to core features.","accordion-block"),isOpen:!1},{title:(0,x.__)("Pro Plan - $29/month","accordion-block"),content:(0,x.__)("Ideal for professionals and growing businesses. Includes 100 GB storage, priority support, and all premium features.","accordion-block"),isOpen:!1},{title:(0,x.__)("Enterprise Plan - Custom","accordion-block"),content:(0,
595 +x.__)("For large organizations with specific needs. Unlimited storage, dedicated support team, custom integrations, and SLA guarantees.","accordion-block"),isOpen:!1}]},steps:{label:(0,x.__)("Steps Guide","accordion-block"),items:[{title:(0,x.__)("Step 1: Sign Up","accordion-block"),content:(0,x.__)("Create your free account in seconds. Just enter your email address and choose a secure password to get started.","accordion-block"),isOpen:!1},{title:(0,x.__)("Step 2: Configure Settings","accordion-block"),content:(0,x.__)("Customize your preferences and connect your existing tools. Our setup wizard will guide you through the process.","accordion-block"),isOpen:!1},{title:(0,x.__)("Step 3: Add Content","accordion-block"),content:(0,x.__)("Start adding your content using our intuitive editor. Import existing data or create new content from scratch.","accordion-block"),isOpen:!1},{title:(0,x.__)("Step 4: Publish & Share","accordion-block"),content:(0,x.__)("When you're ready, publish your work and share it with your audience. Track performance with built-in analytics.","accordion-block"),isOpen:!1}]}},sY=[{name:"Black",color:"#000000"},{name:"White",color:"#FFFFFF"},{name:"Light Gray",color:"#f8f9fa"},{name:"Gray",color:"#6c757d"},{name:"Dark Gray",color:"#343a40"},{name:"Blue",color:"#0d6efd"},{name:"Indigo",color:"#6610f2"},{name:"Purple",color:"#6f42c1"},{name:"Pink",color:"#d63384"},{name:"Red",color:"#dc3545"},{name:"Orange",color:"#fd7e14"},{name:"Yellow",color:"#ffc107"},{name:"Green",color:"#198754"},{name:"Teal",color:"#20c997"},{name:"Cyan",color:"#0dcaf0"}],rY=JSON.parse('{"UU":"b-blocks/accordion-block"}');Pl(rY.UU)&&(0,p.registerBlockType)(rY.UU,{icon:Qr,edit:({attributes:e,setAttributes:t})=>{const{items:n,theme:o,template:i,customStyles:a}=e,[s,r]=(0,m.useState)(n.map(((e,t)=>0===t))),c=(0,h.useBlockProps)({className:`accordion-block accordion-theme-${o}`}),d=()=>{const e=[...n,{title:(0,x.__)("New Accordion Item","accordion-block"),content:(0,x.__)("Add your content here.","accordion-block"),isOpen:!1}];t({items:e}),r([...s,!1])},u=(e,o,i)=>{const a=[...n];a[e]={...a[e],[o]:i},t({items:a})},p=(e,n)=>{t({customStyles:{...a,[e]:n}})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(h.InspectorControls,{children:[(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Accordion Items","accordion-block"),initialOpen:!0,children:(0,l.jsx)(y.Button,{variant:"primary",onClick:d,style:{width:"100%"},children:(0,x.__)("Add Item","accordion-block")})}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Theme Settings","accordion-block"),initialOpen:!1,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Theme","accordion-block"),value:o,options:[{label:(0,x.__)("Modern","accordion-block"),value:"modern"},{label:(0,x.__)("Classic","accordion-block"),value:"classic"},{label:(0,x.__)("Minimal","accordion-block"),value:"minimal"},{label:(0,x.__)("Custom","accordion-block"),value:"custom"}],onChange:e=>t({theme:e})})}),(0,l.jsx)(y.PanelBody,{title:(0,x.__)("Templates","accordion-block"),initialOpen:!1,children:(0,l.jsx)(y.SelectControl,{label:(0,x.__)("Apply Template","accordion-block"),value:i,options:Object.keys(aY).map((e=>({label:aY[e].label,value:e}))),onChange:e=>{"none"!==e&&aY[e]&&(t({template:e,items:aY[e].items}),r(aY[e].items.map((()=>!1))))},help:(0,x.__)("Select a pre-built template to get started quickly","accordion-block")})}),"custom"===o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Header Styles","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Background Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:sY,value:a.headerBgColor,onChange:e=>p("headerBgColor",e||"#f8f9fa")}),(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Text Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:sY,value:a.headerTextColor,onChange:e=>p("headerTextColor",e||"#212529")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Font Size","accordion-block"),value:a.headerFontSize,onChange:e=>p("headerFontSize",e),min:12,max:32}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Padding","accordion-block"),value:a.headerPadding,onChange:e=>p("headerPadding",e),min:8,max:40})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Content Styles","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Background Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:sY,value:a.contentBgColor,onChange:e=>p("contentBgColor",e||"#ffffff")}),(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Text Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:sY,value:a.contentTextColor,onChange:e=>p("contentTextColor",e||"#495057")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Font Size","accordion-block"),value:a.contentFontSize,onChange:e=>p("contentFontSize",e),min:12,max:24}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Padding","accordion-block"),value:a.contentPadding,onChange:e=>p("contentPadding",e),min:8,max:40})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Border & Spacing","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Border Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:sY,value:a.borderColor,onChange:e=>p("borderColor",e||"#dee2e6")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Border Width","accordion-block"),value:a.borderWidth,onChange:e=>p("borderWidth",e),min:0,max:5}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Border Radius","accordion-block"),value:a.borderRadius,onChange:e=>p("borderRadius",e),min:0,max:30})]}),(0,l.jsxs)(y.PanelBody,{title:(0,x.__)("Icon & Animation","accordion-block"),initialOpen:!1,children:[(0,l.jsx)("p",{children:(0,l.jsx)("strong",{children:(0,x.__)("Icon Color","accordion-block")})}),(0,l.jsx)(y.ColorPalette,{colors:sY,value:a.iconColor,onChange:e=>p("iconColor",e||"#212529")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Animation Speed (ms)","accordion-block"),value:a.animationSpeed,onChange:e=>p("animationSpeed",e),min:100,max:1e3,step:50})]})]})]}),(0,l.jsxs)("div",{...c,style:"custom"!==o?{}:{"--bBlocks-accordion-header-bg":a.headerBgColor,"--bBlocks-accordion-header-text":a.headerTextColor,"--bBlocks-accordion-content-bg":a.contentBgColor,"--bBlocks-accordion-content-text":a.contentTextColor,"--bBlocks-accordion-border-color":a.borderColor,"--bBlocks-accordion-borderWidth":`${a.borderWidth}px`,"--bBlocks-accordion-borderRadius":`${a.borderRadius}px`,"--bBlocks-accordion-headerPadding":`${a.headerPadding}px`,"--bBlocks-accordion-content-padding":`${a.contentPadding}px`,"--bBlocks-accordion-header-font-size":`${a.headerFontSize}px`,"--bBlocks-accordion-content-font-size":`${a.contentFontSize}px`,"--bBlocks-accordion-icon-color":a.iconColor,"--bBlocks-accordion-animation-speed":`${a.animationSpeed}ms`},children:[(0,l.jsx)("div",{className:"accordion-items",children:n.map(((e,o)=>(0,l.jsxs)("div",{className:"accordion-item "+(s[o]?"is-open":""),children:[(0,l.jsxs)("div",{className:"accordion-header",children:[(0,l.jsxs)("button",{className:"accordion-toggle",onClick:()=>(e=>{const t=[...s];t[e]=!t[e],r(t)})(o),type:"button",children:[(0,l.jsx)(h.RichText,{tagName:"span",value:e.title,onChange:e=>u(o,"title",e),placeholder:(0,x.__)("Accordion title...","accordion-block"),className:"accordion-title"}),(0,l.jsx)("span",{className:"accordion-icon",children:s[o]?"−":"+"})]}),(0,l.jsx)(y.Button,{isDestructive:!0,isSmall:!0,onClick:()=>(e=>{const o=n.filter(((t,n)=>n!==e));t({items:o});const i=s.filter(((t,n)=>n!==e));r(i)})(o),className:"accordion-remove",children:(0,x.__)("Remove Item","accordion-block")})]}),s[o]&&(0,l.jsx)("div",{className:"accordion-content",style:{maxHeight:"unset"},children:(0,l.jsx)(h.RichText,{tagName:"div",value:e.content,onChange:e=>u(o,"content",e),placeholder:(0,x.__)("Accordion content...","accordion-block"),className:"accordion-text"})})]},o)))}),0===n.length&&(0,l.jsxs)("div",{
596 +className:"accordion-empty",children:[(0,l.jsx)("p",{children:(0,x.__)('No accordion items yet. Click "Add Item" to get started.',"accordion-block")}),(0,l.jsx)(y.Button,{variant:"primary",onClick:d,children:(0,x.__)("Add Item","accordion-block")})]})]})]})}});const lY=JSON.parse('{"apiVersion":3,"name":"b-blocks/video","title":"Video","description":"A Simple, accessible, Easy to Use & fully Customizable video player.","icon":"video-alt2","category":"bBlocks","keywords":["video embed","mp4 ogg player","any video play"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"source":{"type":"string","default":""},"poster":{"type":"string","default":""},"controls":{"type":"object","default":{"play-large":true,"restart":false,"rewind":true,"play":true,"fast-forward":true,"progress":true,"current-time":true,"duration":false,"mute":true,"volume":true,"pip":false,"airplay":false,"settings":true,"download":false,"fullscreen":true}},"width":{"type":"string","default":"100%"},"radius":{"type":"string","default":"0px"},"repeat":{"type":"boolean","default":false},"autoplay":{"type":"boolean","default":false},"muted":{"type":"boolean","default":false},"resetOnEnd":{"type":"boolean","default":false},"autoHideControl":{"type":"boolean","default":true}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{"preview":true,"sourceType":"link"}},"editorScript":["file:../index.js","plyr"],"style":["file:./view.css","plyr"],"render":"file:./render.php","viewScript":["file:./view.js","plyr"]}'),cY=({attributes:e,setAttributes:t})=>{const{source:n,poster:o,controls:i,width:a,radius:s,repeat:r,autoplay:c,muted:d,resetOnEnd:u,autoHideControl:p}=e,{restart:g,rewind:m,play:b,progress:f,duration:v,mute:k,volume:w,pip:_,airplay:C,settings:j,download:$,fullscreen:S}=i,T=(e,n)=>{const o={...i};o[e]=n,t({controls:o})};return(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:[{name:"settings",title:(0,x.__)("Settings","b-blocks")},{name:"controls",title:(0,x.__)("Controls","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],children:e=>(0,l.jsxs)(l.Fragment,{children:["settings"===e.name&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Dn,{slug:nn}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Settings","b-blocks"),children:[(0,l.jsx)(ve,{value:n,types:["video"],onChange:e=>t({source:e}),placeholder:(0,x.__)("Video url","b-blocks")}),(0,l.jsx)(ve,{value:o,types:["image"],onChange:e=>t({poster:e}),placeholder:(0,x.__)("Poster url","b-blocks")}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Repeat","b-blocks"),checked:r,onChange:e=>t({repeat:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Autoplay","b-blocks"),checked:c,onChange:e=>t({autoplay:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Muted","b-blocks"),checked:d,onChange:e=>t({muted:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Reset On End","b-blocks"),checked:u,onChange:e=>t({resetOnEnd:e})}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Auto Hide Control","b-blocks"),checked:p,onChange:e=>t({autoHideControl:e})})]})]}),"controls"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Play Large","b-blocks"),checked:i["play-large"],onChange:e=>T("play-large",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Restart","b-blocks"),checked:g,onChange:e=>T("restart",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Rewind","b-blocks"),checked:m,onChange:e=>T("rewind",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Play","b-blocks"),checked:b,onChange:e=>T("play",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Fast Forward","b-blocks"),checked:i["fast-forward"],onChange:e=>T("fast-forward",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Progress","b-blocks"),checked:f,onChange:e=>T("progress",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Current Time","b-blocks"),checked:i["current-time"],onChange:e=>T("current-time",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Duration","b-blocks"),checked:v,onChange:e=>T("duration",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Mute","b-blocks"),checked:k,onChange:e=>T("mute",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Volume","b-blocks"),checked:w,onChange:e=>T("volume",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("PIP","b-blocks"),checked:_,onChange:e=>T("pip",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Airplay","b-blocks"),checked:C,onChange:e=>T("airplay",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Settings","b-blocks"),checked:j,onChange:e=>T("settings",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Download","b-blocks"),checked:$,onChange:e=>T("download",e)}),(0,l.jsx)(y.ToggleControl,{className:"mt20",label:(0,x.__)("Fullscreen","b-blocks"),checked:S,onChange:e=>T("fullscreen",e)})]}),"style"===e.name&&(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",children:[(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Width:","b-blocks"),labelPosition:"left",value:a,onChange:e=>t({width:e}),units:[Pe(),Ae(),Ee()]}),(0,l.jsx)(y.__experimentalUnitControl,{className:"mt20",label:(0,x.__)("Round Corner:","b-blocks"),labelPosition:"left",value:s,onChange:e=>t({radius:e}),units:[Pe()]})]})]})})})},dY="bBlocksVideo",uY=({attributes:e,id:t})=>{const{width:n,radius:o}=e;return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t#${t} .${dY}{\n\t\t\twidth: ${["0px","0%","0em"].includes(n)?"100%":n};\n\t\t\tborder-radius: ${o};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},pY=e=>{const t=[];return Object.keys(e).map((n=>{e[n]&&t.push(n)})),t},hY=({attributes:e})=>{const{source:t,poster:n,controls:o,repeat:i,autoplay:a,muted:s,resetOnEnd:r,autoHideControl:c}=e,d=(0,m.useRef)(null);return(0,m.useEffect)((()=>{const e=window?.bBlocksGlobal?.assetsUrl||"",t=new Plyr(d.current,{controls:pY(o),clickToPlay:!1,loop:{active:i},muted:s,autoplay:a,resetOnEnd:r,hideControls:c,loadSprite:!1,iconUrl:`${e}plyr.svg`});return()=>t?.destroy()}),[]),(0,l.jsx)("div",{className:dY,children:(0,l.jsx)("div",{className:"videoWrapper",children:(0,l.jsxs)("video",{controls:!0,playsinline:!0,"data-poster":n,preload:"metadata",ref:d,children:["Your browser does not support the video tag.",(0,l.jsx)("source",{src:t,type:"video/mp4"})]})})})};Pl(lY.name)&&(0,p.registerBlockType)(lY,{icon:qr,transforms:{from:[{type:"block",blocks:["vpb/video"],transform:e=>(0,p.createBlock)("b-blocks/video",e)},{type:"prefix",prefix:"video",transform:()=>(0,p.createBlock)("b-blocks/video")}],to:[{type:"block",blocks:["vpb/video"],isMatch:e=>!!e,transform:e=>(0,p.createBlock)("vpb/video",e)}]},edit:e=>{const{attributes:t,setAttributes:n,clientId:o}=e,{source:i}=t,a=()=>(0,l.jsx)(hY,{attributes:t});return i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(cY,{attributes:t,setAttributes:n}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(uY,{attributes:t,id:`block-${o}`}),(0,l.jsx)(a,{})]})]}):(0,l.jsx)(_e,{type:"video",icon:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",className:"html5-block-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("polygon",{points:"23 7 16 12 23 17 23 7"}),(0,l.jsx)("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"})]}),onChange:e=>n({source:e.url})})},save:()=>null})
597 +;const gY=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"b-blocks/text-path","version":"1.0.0","title":"Text Path","category":"bBlocks","description":"Craft eye-catching text paths with interactive visual effects.","keywords":["path","text path","text on path","svg","svg path","text on svg path"],"textdomain":"b-blocks","attributes":{"align":{"type":"string","default":""},"icon":{"type":"object","default":{"type":"wave","iconType":"library","library":"","upload":"","title":"Add Your Text Here"}},"styles":{"type":"object","default":{"container":{"desktop":{"alignment":"flex-start"},"tablet":{"alignment":""},"mobile":{"alignment":""}},"path":{"color":"#000","thickness":1,"staringPoint":0,"rotate":0,"size":"250px"},"title":{"typo":{"fontSize":{"desktop":"16px"}},"normal":{"color":"","textShadow":[],"textStroke":{"isStroke":false,"size":0,"color":""}},"hover":{"color":"","textShadow":[],"textStroke":{"isStroke":false,"size":0,"color":""}},"transition":0.2}}}},"supports":{"align":["wide","full"],"html":false},"example":{"attributes":{}},"editorScript":["file:../index.js","aos"],"style":"file:./view.css","render":"file:./render.php","viewScript":"file:./view.js"}'),mY=[{name:"general",title:(0,x.__)("General","b-blocks")},{name:"style",title:(0,x.__)("Style","b-blocks")}],bY=[{Label:(0,x.__)("Wave","b-blocks"),value:"wave"},{Label:(0,x.__)("Arc","b-blocks"),value:"arc"},{Label:(0,x.__)("Circle","b-blocks"),value:"circle"},{Label:(0,x.__)("Custom","b-blocks"),value:"custom"}],fY=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M288 64c0 17.7-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32L32 352c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),xY=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z"})}),yY=(0,l.jsx)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"})}),vY=e=>{const{attributes:t,updateObj:n,device:o}=e,{icon:i,styles:a}=t,{container:s}=a,{data:r}=$d("bBlocksUtils"),{refetch:c}=jd("b-blocks-enable-svg-mime-type",{_wpnonce:r?.nonce},!1),d=new Tt;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Text Path","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(y.TextControl,{label:(0,x.__)("Title","b-blocks"),value:i.title,onChange:e=>n("icon",e,"title")}),(0,l.jsx)(y.SelectControl,{className:"mt10",label:(0,x.__)("Path Type","b-blocks"),labelPosition:"edge",options:bY,value:i.type,onChange:e=>n("icon",e,"type")}),"custom"===i.type&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ve,{label:(0,x.__)("Icon Type","b-blocks"),value:i.iconType,onChange:e=>n("icon",e,"iconType"),options:[{label:(0,x.__)("Library","b-blocks"),value:"library"},{label:(0,x.__)("Upload","b-blocks"),value:"upload"}]}),"library"===i.iconType&&(0,l.jsx)(Zn,{value:i.library,onChange:e=>n("icon",e,"library")}),"upload"===i.iconType&&(0,l.jsx)(we,{types:["image/svg+xml"],onClick:async()=>{Sd(),await c()},label:(0,x.__)("Upload SVG","b-blocks"),value:{url:i.upload},onChange:async e=>{const t=e?.url?await d.sanitizeFile(e?.url):"";n("icon",t,"upload")},isSvgEnabled:!0})]}),(0,l.jsxs)(y.Flex,{className:"mt10",children:[(0,l.jsxs)(v,{className:"flex1 mb0",children:[(0,x.__)("Alignment","b-blocks"),(0,l.jsx)(_,{})]}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s[o]?.alignment,onChange:e=>n("styles",e,"container",o,"alignment"),isDeselectable:!0,children:[(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Left",value:"flex-start",icon:fY}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Center",value:"center",icon:xY}),(0,l.jsx)(y.__experimentalToggleGroupControlOptionIcon,{label:"Right",value:"flex-end",icon:yY})]})]})]})})},kY=e=>{const{attributes:t,updateObj:n}=e,{styles:o}=t,{title:i,path:a}=o,[s,r]=(0,m.useState)("normal");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Title","b-blocks"),initialOpen:!0,children:[(0,l.jsx)(Oa,{value:i.typo,onChange:e=>n("styles",e,"title","typo")}),(0,l.jsxs)(y.__experimentalToggleGroupControl,{className:"flex1",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,value:s,onChange:e=>r(e),children:[(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Normal",value:"normal"}),(0,l.jsx)(y.__experimentalToggleGroupControlOption,{label:"Hover",value:"hover"})]}),(0,l.jsx)(Ue,{value:i[s]?.color,onChange:e=>n("styles",e,"title",s,"color")}),(0,l.jsx)(yt,{value:i[s]?.textShadow,onChange:e=>n("styles",e,"title",s,"textShadow"),type:"text"}),(0,l.jsx)(y.ToggleControl,{label:(0,x.__)("Show Stroke","b-blocks"),checked:i[s]?.textStroke?.isStroke,value:i[s]?.textStroke?.isStroke,onChange:e=>n("styles",e,"title",s,"textStroke","isStroke")}),i[s]?.textStroke?.isStroke&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.RangeControl,{step:.1,className:"mt10",label:(0,x.__)("Stroke Size","b-blocks"),value:i[s]?.textStroke?.size,min:0,max:10,onChange:e=>n("styles",e,"title",s,"textStroke","size")}),(0,l.jsx)(Ue,{label:(0,x.__)("Stroke Color","b-blocks"),value:i[s]?.textStroke?.color,onChange:e=>n("styles",e,"title",s,"textStroke","color")})]}),"hover"===s&&(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Transition","b-blocks"),min:0,max:5,step:.01,value:i.transition,onChange:e=>n("styles",e,"title","transition")})]}),(0,l.jsxs)(y.PanelBody,{className:"bPlPanelBody",title:(0,x.__)("Path","b-blocks"),initialOpen:!1,children:[(0,l.jsx)(Ue,{value:a.color,onChange:e=>n("styles",e,"path","color")}),(0,l.jsx)(y.__experimentalUnitControl,{label:(0,x.__)("Size","b-blocks"),value:a.size,onChange:e=>n("styles",e,"path","size")}),(0,l.jsx)(y.RangeControl,{className:"mt10",label:(0,x.__)("Thickness","b-blocks"),value:a.thickness,step:.1,min:0,max:20,onChange:e=>n("styles",e,"path","thickness")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Starting Point","b-blocks"),value:a.staringPoint,step:.1,min:0,max:2e3,onChange:e=>n("styles",e,"path","staringPoint")}),(0,l.jsx)(y.RangeControl,{label:(0,x.__)("Rotate","b-blocks"),value:a.rotate,step:.1,min:0,max:360,onChange:e=>n("styles",e,"path","rotate")})]})]})},wY=e=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(h.InspectorControls,{children:(0,l.jsx)(y.TabPanel,{className:"bPlTabPanel",activeClass:"activeTab",tabs:mY,onSelect:me,children:t=>(0,l.jsxs)(l.Fragment,{children:["general"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(vY,{...e})}),"style"===t.name&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(kY,{...e})})]})})
598 +})}),_Y=({attributes:e,id:o})=>{const{styles:i}=e,{container:a,title:s,path:r}=i,c=`#${o} .b-blocks-text-path-container`,d=`${c} .b-blocks-text-path-svg`,u=`${d} .b-blocks-text-path-title`,p=(e="normal")=>{const t=s[e],n=t?.textStroke.isStroke?`${ns("stroke-width",t.textStroke.size?t.textStroke.size+"px":"")}\n\t\t\t${ns("stroke",t.textStroke.color)}`:"";return`\n\t\t\t${ns("color",t.color)}\n\t\t\t${ns("fill",t.color)}\n\t\t\t${ns("text-shadow",ls(t.textShadow,"text"))}\n\t\t\t${n}\n\t\t`};return(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${ps("",s.typo).googleFontLink}\n\n\t\t${ps(u,s.typo).styles}\n\n\t\t${c}{\n\t\t\t${ns("justify-content",a.desktop.alignment)}\n\t\t}\n\n\t\t${d}{\n\t\t\t${ns("rotate",r.rotate?r.rotate+"deg":"")}\n\t\t\t${ns("width",r.size)}\n\t\t\t${ns("width",r.size)}\n\t\t}\n\n\t\t${u}{\n\t\t\t${p("normal")}\t\t\n\t\t\ttransition: all ${s.transition}s ease-in-out;\n\t\t}\n\n\t\t${u}:hover{\n\t\t\t${p("hover")}\t\t\n\t\t}\n\t\t\n\t\t${t}{\n\t\t\t\t${c}{\n\t\t\t${ns("justify-content",a.tablet.alignment)}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t\t${c}{\n\t\t\t${ns("justify-content",a.mobile.alignment)}\n\t\t\t}\n\t\t}\n\t\t\n\t`}})};function CY(e,t,n){return Math.max(t,Math.min(n,e))}function jY(e){if("number"==typeof e)return CY(e,0,1);const t=String(e).trim();if(t.endsWith("%"))return CY(parseFloat(t.slice(0,-1))/100,0,1);const n=Number(t);return Number.isFinite(n)?CY(n,0,1):0}const $Y=({pathSize:e=300,alignment:t="start",customPath:n="",customSvgPathSelector:o="",showIcon:i=!1,icon:a=null,iconSize:s=24,iconStartOffset:r="5%",iconEndOffset:c="95%",attributes:d})=>{const{icon:u,styles:p}=d,{type:h,iconType:g,title:f}=u,{path:x}=p,y="custom"===h?"library"===g?u.library:u.upload:"",v=(0,m.useMemo)((()=>`textPath-${Math.random().toString(36).slice(2)}`),[]),k=(0,m.useRef)(null),[w,_]=(0,m.useState)(null),[C,j]=(0,m.useState)(null),$=(0,m.useMemo)((()=>y?function(e,t){if(!e||"string"!=typeof e)return null;if("undefined"==typeof window)return null;try{const n=(new DOMParser).parseFromString(e,"image/svg+xml"),o=n.querySelector("svg");if(!o)return null;const i=o.getAttribute("viewBox")||null,a=(t?n.querySelector(t):null)||n.querySelector("path"),s=a?.getAttribute("d")||null;return s?{viewBox:i,d:s}:null}catch{return null}}(y,o||null):null),[y,o]),S="custom"===h&&$?.viewBox||$?.viewBox||`0 0 ${e} ${e}`;(0,m.useEffect)((()=>{if(!i)return;const e=k.current;if(!e)return;let t=0;try{t=e.getTotalLength()}catch{return}if(!t||!Number.isFinite(t))return;const n=jY(r),o=jY(c),a=e.getPointAtLength(t*n),s=e.getPointAtLength(t*o);_({x:a.x,y:a.y}),j({x:s.x,y:s.y})}),[i,r,c,e,h,n,y,$?.d]);const T=()=>a&&b().isValidElement(a)?b().cloneElement(a,{...a.props,width:s,height:s,fill:a.props.fill??"currentColor",stroke:a.props.stroke??"currentColor",style:{display:"block",...a.props.style||{}}}):null;return(0,l.jsx)("div",{className:"b-blocks-text-path-container",children:(0,l.jsxs)("svg",{viewBox:S,style:{transition:"transform 0.3s ease"},className:"b-blocks-text-path-svg",children:[(0,l.jsx)("defs",{children:(0,l.jsx)("path",{ref:k,id:v,d:(()=>{const t=e,o=e,i=t/2,a=o/2;switch(h){case"arc":return`M 50,${a+50} Q ${i},${a-100} ${t-50},${a+50}`;case"wave":{const e=40,n=2;let o=`M 0,${a}`;for(let i=0;i<=t;i+=5)o+=` L ${i},${a+e*Math.sin(i/t*Math.PI*n)}`;return o}case"circle":{const e=Math.min(t,o)/2-20;return`M ${i-e},${a}\n A ${e},${e} 0 1,1 ${i+e},${a}\n A ${e},${e} 0 1,1 ${i-e},${a}`}case"custom":return y&&$?.d?$.d:n||`M 50,${a} L ${t-50},${a}`;case"line":return`M 50,${a} L ${t-50},${a}`}})(),fill:"none",stroke:x.color,strokeWidth:x.thickness,strokeLinecap:"round",style:{transition:"stroke 0.3s ease"}})}),(0,l.jsx)("use",{href:`#${v}`}),i&&w&&(0,l.jsx)("g",{transform:`translate(${w.x}, ${w.y})`,children:(0,l.jsx)("g",{transform:`translate(${-s/2}, ${-s/2})`,fill:x.color,stroke:x.color,children:T()})}),i&&C&&(0,l.jsx)("g",{transform:`translate(${C.x}, ${C.y})`,children:(0,l.jsx)("g",{transform:`translate(${-s/2}, ${-s/2})`,fill:x.color,stroke:x.color,children:T()})}),(0,l.jsx)("text",{className:"b-blocks-text-path-title",textAnchor:t,children:(0,l.jsx)("textPath",{href:`#${v}`,startOffset:x.staringPoint,style:{textAnchor:t},children:f})})]})})},SY=(0,f.withSelect)((e=>{const{getDeviceType:t}=e("core/editor");return{device:t()?.toLowerCase()}}))((e=>{const{attributes:t,setAttributes:n,clientId:o,device:i}=e,a=fe(t,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(wY,{attributes:t,setAttributes:n,updateObj:a,device:i}),(0,l.jsxs)("div",{...(0,h.useBlockProps)(),children:[(0,l.jsx)(_Y,{attributes:t,id:`block-${o}`}),(0,l.jsx)($Y,{attributes:t})]})]})}));Pl(gY.name)&&(0,p.registerBlockType)(gY,{icon:il,edit:SY});const TY=window.wp.richText,NY=(0,x.__)("B Remove All Formats","b-blocks");(0,TY.registerFormatType)("b-blocks/remove-inline-formats",{title:NY,tagName:"none",className:null,edit:({value:e,onChange:t})=>(0,l.jsx)(h.RichTextToolbarButton,{icon:"editor-removeformatting",title:NY,onClick:()=>t({...e,formats:Array(e.formats.length)})})});[{type:"b-blocks/text-highlight",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 1024 1024",children:(0,l.jsx)("path",{d:"M957.6 507.4L603.2 158.2a7.9 7.9 0 0 0-11.2 0L353.3 393.4a8.03 8.03 0 0 0-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 0 0-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0 0 11.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0 0 11.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2z"})}),title:(0,x.__)("B Text Highlight","b-blocks"),tagName:"mark",className:"bBlocksTextHighlight"},{type:"b-blocks/text-uppercase",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 32 32",children:(0,l.jsx)("path",{d:"M 1 6 L 1 8 L 7 8 L 7 26 L 9 26 L 9 8 L 15 8 L 15 6 L 1 6 z M 17 6 L 17 8 L 23 8 L 23 26 L 25 26 L 25 8 L 31 8 L 31 6 L 17 6 z"})}),title:(0,x.__)("B Text Uppercase","b-blocks"),tagName:"span",className:"bBlocksTextUppercase"},{type:"b-blocks/text-underline",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 16 16",children:(0,l.jsx)("path",{d:"M3,13l10,0l0,2l-10,0l0,-2Zm8,-12l2,0l0,6c0,2.76 -2.24,5 -5,5c-2.76,0 -5,-2.24 -5,-5l0,-6l2,0l-0,6c-0,1.656 1.344,3 3,3c1.656,0 3,-1.344 3,-3l0,-6Z"})}),title:(0,x.__)("B Text Underline","b-blocks"),tagName:"span",className:"bBlocksTextUnderline"},{type:"b-blocks/text-overline",icon:e=>(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:24,height:24,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M19,3v2H5V3H19z M12,7c-3.87,0-7,3.13-7,7c0,3.87,3.13,7,7,7s7-3.13,7-7C19,10.13,15.87,7,12,7z M12,18.5 c-2.49,0-4.5-2.01-4.5-4.5S9.51,9.5,12,9.5s4.5,2.01,4.5,4.5S14.49,18.5,12,18.5z"})}),title:(0,x.__)("B Text Overline","b-blocks"),tagName:"span",className:"bBlocksTextOverline"}].forEach((e=>{const{type:t,icon:n,title:o,tagName:i,className:a}=e;(0,TY.registerFormatType)(t,{title:o,tagName:i,className:a,edit:({isActive:e,value:i,onChange:a})=>(0,l.jsx)(h.RichTextToolbarButton,{title:o,onClick:()=>{a((0,TY.toggleFormat)(i,{type:t}))},isActive:e,icon:n("bBlocksInlineIcon "+(e?"bBlocksInlineIconActive":""))})})})),wp.blocks.updateCategory("bBlocks",{icon:c})})()})();