for(var __=wp.i18n.__,el=wp.element.createElement,registerBlockType=wp.blocks.registerBlockType,InspectorControls=wp.editor.InspectorControls,ServerSideRender=wp.components.ServerSideRender,Button=wp.components.Button,Dashicon=wp.components.Dashicon,IconButton=wp.components.IconButton,RichText=wp.editor.RichText,Editable=wp.blocks.Editable,MediaUpload=wp.editor.MediaUpload,MediaUploadCheck=wp.editor.MediaUploadCheck,TextControl=wp.components.TextControl,SelectControl=wp.components.SelectControl,RadioControl=wp.components.RadioControl,Toolbar=wp.components.Toolbar,r3dfb=jQuery.parseJSON(r3dfb[0]),r3dfb_selectFlipbok=[{label:"Select Flipbook",value:""}],i=r3dfb.length-1;i>=0;i--){var b=r3dfb[i];b.id&&(""==b.name&&(b.name="(no title)"),r3dfb_selectFlipbok.push({label:b.id+" "+b.name,value:b.id}))}registerBlockType("r3dfb/embed",{title:"Real3D FlipBook",description:"Display PDF or images as flipbook",icon:{src:"book"},category:"common",attributes:{id:{type:"string"},pdf:{type:"string"},mode:{type:"string",default:"normal"},pages:{type:"string",default:""}},edit:function(e){var{attributes:o,setAttributes:t,focus:l,className:n}=e;function r(e){t({id:e})}var o;(o=e.attributes||"").pdf;return[el("div",null,"Real3D Flipbook"),el(SelectControl,{value:o.id,options:r3dfb_selectFlipbok,onChange:r}),el(InspectorControls,{key:"inspector"},el("div",{className:"r3dfb_div_main"},el("hr",{}),el(SelectControl,{label:"Select Flipbook",value:o.id,options:r3dfb_selectFlipbok,onChange:r}),el(SelectControl,{label:"Mode",value:o.mode,options:[{label:"Normal",value:"normal"},{label:"Lightbox",value:"lightbox"},{label:"Fullscreen",value:"fullscreen"}],onChange:function(e){t({mode:e})}})))]},save:function(e){var o=e.attributes,t=o.id,l=o.pdf,n=o.mode,r=o.pages,i="[real3dflipbook";return t&&(i+=' id="'+t+'"'),l&&(i+=' pdf="'+l+'"'),r&&(i+=' pages="'+r+'"'),n&&(i+=' mode ="'+n+'"'),i+="]"}});