(()=>{"use strict";const e=window.React,t=JSON.parse('{"NQ":"hakoniwa-blocks"}'),a=t.NQ,{__}=wp.i18n,{registerFormatType:r,applyFormat:o,removeFormat:i,getActiveFormat:l}=wp.richText,{InspectorControls:n,PanelColorSettings:s}=wp.blockEditor,{select:c}=wp.data,p=__("Marker","hakoniwa-blocks"),d=t.NQ+"/marker";r(d,{title:p,category:a,tagName:"span",className:t.NQ+"-marker",keywords:[__(a),__("Marker","hakoniwa-blocks")],attributes:{data:"data-color",style:"style"},edit({isActive:t,value:a,onChange:r}){let k;return c("core/editor").getEditorSettings().colors,t&&(k=l(a,d).attributes.data),(0,e.createElement)(n,{group:"styles"},(0,e.createElement)(s,{__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,title:p,initialOpen:!0,colorSettings:[{value:k,onChange:e=>{r(e?o(a,{type:d,attributes:{data:e,style:`background: linear-gradient( transparent 65%, ${e} 65% );`}}):i(a,d))},label:__("Marker color","hakoniwa-blocks")}]}))}})})();