@edugate/ai-agent 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +995 -59
- package/dist/index.d.ts +995 -59
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var to=Object.create;var ce=Object.defineProperty;var ao=Object.getOwnPropertyDescriptor;var no=Object.getOwnPropertyNames;var io=Object.getPrototypeOf,ro=Object.prototype.hasOwnProperty;var y=(i,r)=>()=>{try{return r||i((r={exports:{}}).exports,r),r.exports}catch(n){throw r=0,n}},co=(i,r)=>{for(var n in r)ce(i,n,{get:r[n],enumerable:!0})},Ae=(i,r,n,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of no(r))!ro.call(i,s)&&s!==n&&ce(i,s,{get:()=>r[s],enumerable:!(l=ao(r,s))||l.enumerable});return i};var Ie=(i,r,n)=>(n=i!=null?to(io(i)):{},Ae(r||!i||!i.__esModule?ce(n,"default",{value:i,enumerable:!0}):n,i)),lo=i=>Ae(ce({},"__esModule",{value:!0}),i);var be=y(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.BlockTypeSchema=Z.BLOCK_TYPES=void 0;var yo=require("zod");Z.BLOCK_TYPES=["Quiz","Editor","Hotpoint","Embed","Media","DragAndDrop","Anagram","Dice","Crossword","WordSearch","Puzzle","Memory","Flashcard","SpinningWheel","Chart","MatchPairs","Shape","Arrow","Cloze","CardDeck"];Z.BlockTypeSchema=yo.z.enum(Z.BLOCK_TYPES)});var q=y(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.MediaRefSchema=b.MediaItemSchema=b.VideoSettingsSchema=b.CropDataSchema=b.MediaSourceSchema=b.MediaTypeSchema=b.GridSizeSchema=b.SizeSchema=b.PositionSchema=void 0;var h=require("zod");b.PositionSchema=h.z.object({x:h.z.number(),y:h.z.number(),z:h.z.number().optional()});b.SizeSchema=h.z.object({width:h.z.number().optional(),height:h.z.number().optional()});b.GridSizeSchema=h.z.object({rows:h.z.number(),cols:h.z.number()});b.MediaTypeSchema=h.z.enum(["image","color","gif","shape","illustration","video","audio"]);b.MediaSourceSchema=h.z.enum(["unsplash","pexels","upload","url","library","tenor"]);b.CropDataSchema=h.z.object({x:h.z.number(),y:h.z.number(),width:h.z.number(),height:h.z.number(),zoom:h.z.number().optional(),rotation:h.z.number().optional(),aspect:h.z.number().optional()});b.VideoSettingsSchema=h.z.object({autoplay:h.z.boolean().optional(),loop:h.z.boolean().optional(),muted:h.z.boolean().optional(),controls:h.z.boolean().optional(),poster:h.z.string().optional(),volume:h.z.number().optional()});b.MediaItemSchema=h.z.object({id:h.z.string().optional(),url:h.z.string().optional(),title:h.z.string().optional(),type:b.MediaTypeSchema,source:b.MediaSourceSchema.optional(),alt:h.z.string().optional(),width:h.z.number().optional(),height:h.z.number().optional(),format:h.z.enum(["cover","contain"]).optional(),color:h.z.string().optional(),cropData:b.CropDataSchema.optional(),duration:h.z.number().optional(),videoSettings:b.VideoSettingsSchema.optional()});b.MediaRefSchema=b.MediaItemSchema});var se=y(c=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});c.ShapeBlockThemeSchema=c.MatchPairsBlockThemeSchema=c.FlashcardBlockThemeSchema=c.CardDeckBlockThemeSchema=c.ClozeBlockThemeSchema=c.SpinningWheelBlockThemeSchema=c.MemoryBlockThemeSchema=c.WordSearchBlockThemeSchema=c.CrosswordBlockThemeSchema=c.DiceBlockThemeSchema=c.AnagramBlockThemeSchema=c.EditorBlockThemeSchema=c.DragAndDropBlockThemeSchema=c.QuizBlockThemeSchema=c.HotpointBlockThemeSchema=c.BlockThemeSchema=c.TextStylesSchema=c.BoxStylesSchema=c.RadiusSchema=c.BoxSideSchema=c.AnimationSchema=void 0;var t=require("zod"),ge=q();c.AnimationSchema=t.z.object({type:t.z.union([t.z.enum(["none","fade","direction","bounce","scale","rotate"]),t.z.string()]),duration:t.z.number().optional(),delay:t.z.number().optional(),phase:t.z.enum(["in","both","out"]).optional(),direction:t.z.enum(["up","right","down","left"]).optional()});c.BoxSideSchema=t.z.object({top:t.z.union([t.z.string(),t.z.number()]).optional(),right:t.z.union([t.z.string(),t.z.number()]).optional(),bottom:t.z.union([t.z.string(),t.z.number()]).optional(),left:t.z.union([t.z.string(),t.z.number()]).optional()});c.RadiusSchema=t.z.object({topLeft:t.z.union([t.z.string(),t.z.number()]).optional(),topRight:t.z.union([t.z.string(),t.z.number()]).optional(),bottomRight:t.z.union([t.z.string(),t.z.number()]).optional(),bottomLeft:t.z.union([t.z.string(),t.z.number()]).optional()});c.BoxStylesSchema=t.z.object({background:t.z.boolean().optional(),backgroundColor:t.z.string().optional(),backgroundOpacity:t.z.number().optional(),backgroundMedia:ge.MediaItemSchema.optional(),border:t.z.boolean().optional(),borderColor:t.z.string().optional(),borderWidth:c.BoxSideSchema.optional(),borderRadius:c.RadiusSchema.optional(),padding:t.z.union([t.z.string(),t.z.number(),c.BoxSideSchema]).optional()});c.TextStylesSchema=t.z.object({color:t.z.string().optional(),fontSize:t.z.number().optional(),fontFamily:t.z.string().optional(),fontStyle:t.z.string().optional(),fontWeight:t.z.union([t.z.string(),t.z.number()]).optional(),textAlign:t.z.enum(["left","center","right","justify"]).optional()});var N=c.BoxStylesSchema.merge(c.TextStylesSchema);c.BlockThemeSchema=t.z.object({spacing:t.z.enum(["no-spacing","small","medium","large"]).optional(),animation:c.AnimationSchema.optional(),styles:t.z.record(t.z.record(t.z.any())).optional()});c.HotpointBlockThemeSchema=c.BlockThemeSchema.extend({styles:t.z.object({hotpoint:t.z.object({icon:t.z.string().optional(),iconPosition:t.z.enum(["left","right"]).optional(),iconSize:t.z.string().optional(),iconColor:t.z.string().optional(),image:ge.MediaItemSchema.optional(),imageFormat:t.z.enum(["circle","square","custom"]).optional(),border:t.z.boolean().optional(),borderColor:t.z.string().optional(),borderWidth:t.z.string().optional(),borderRadius:t.z.string().optional(),glow:t.z.boolean().optional(),glowColor:t.z.string().optional(),background:t.z.boolean().optional(),backgroundColor:t.z.string().optional(),fontSize:t.z.number().optional(),fontFamily:t.z.string().optional(),fontStyle:t.z.string().optional(),textColor:t.z.string().optional()}).optional()}).optional()});c.QuizBlockThemeSchema=c.BlockThemeSchema.extend({layout:t.z.enum(["horizontal","vertical","grid"]),gridColumns:t.z.number().optional(),preset:t.z.enum(["default","modern","trivia","custom"]),styles:t.z.object({general:N,question:N,answers:N.extend({customStyles:t.z.array(t.z.object({color:t.z.string().optional(),backgroundColor:t.z.string().optional(),targets:t.z.string().optional()})).optional(),hover:N.optional()}),button:N.extend({variant:t.z.enum(["default","outline","ghost"]).optional(),hover:N.optional()})}).optional()});c.DragAndDropBlockThemeSchema=c.BlockThemeSchema.extend({layoutPosition:t.z.enum(["left","right","top","bottom"]).optional(),splitRatio:t.z.number().optional(),gridColumns:t.z.number().optional(),gridGap:t.z.number().optional().describe("Gap in pixels between auto-laid items (list/grid)."),pool:t.z.object({x:t.z.number().optional(),y:t.z.number().optional(),width:t.z.number().optional(),height:t.z.number().optional()}).optional().describe("Movable/resizable frame for the list/grid item pool (sandbox px)."),styles:t.z.object({title:c.TextStylesSchema.optional(),sandbox:c.BoxStylesSchema.optional(),item:N.optional(),group:c.BoxStylesSchema.optional(),container:c.BoxStylesSchema.extend({url:t.z.string().optional(),type:ge.MediaTypeSchema.optional()}).optional(),groups:N.optional(),feedback:t.z.object({correct:t.z.string().optional(),incorrect:t.z.string().optional(),active:t.z.string().optional()}).optional(),referenceSize:t.z.object({width:t.z.number(),height:t.z.number()}).optional()}).optional()});c.EditorBlockThemeSchema=c.BlockThemeSchema.extend({styles:t.z.object({editor:c.BoxStylesSchema.optional()}).optional()});c.AnagramBlockThemeSchema=c.BlockThemeSchema.extend({styles:t.z.object({letter:c.BoxStylesSchema.optional(),letterText:c.TextStylesSchema.optional(),slot:c.BoxStylesSchema.optional(),container:c.BoxStylesSchema.optional()}).optional()});c.DiceBlockThemeSchema=c.BlockThemeSchema.extend({styles:t.z.object({button:c.BoxStylesSchema.extend({hover:N.optional()}).optional(),buttonText:c.TextStylesSchema.optional(),container:c.BoxStylesSchema.optional()}).optional()});c.CrosswordBlockThemeSchema=c.BlockThemeSchema.extend({primaryColor:t.z.string().optional(),layoutPosition:t.z.enum(["left","right","top","bottom"]).optional(),splitRatio:t.z.number().optional(),styles:t.z.object({text:c.TextStylesSchema.optional(),cell:c.BoxStylesSchema.optional(),grid:c.BoxStylesSchema.optional(),clueContainer:c.BoxStylesSchema.optional(),clueText:c.TextStylesSchema.optional(),clueTitle:c.TextStylesSchema.optional()}).optional()});c.WordSearchBlockThemeSchema=c.BlockThemeSchema.extend({layoutPosition:t.z.enum(["left","right","top","bottom"]).optional(),splitRatio:t.z.number().optional(),styles:t.z.object({wordSearch:t.z.object({primaryColor:t.z.string().optional(),highlightColor:t.z.string().optional(),fontSize:t.z.number().optional(),fontFamily:t.z.string().optional(),textColor:t.z.string().optional(),cellBackgroundColor:t.z.string().optional()}).optional(),text:c.TextStylesSchema.optional(),cell:c.BoxStylesSchema.optional(),grid:c.BoxStylesSchema.optional(),wordListContainer:c.BoxStylesSchema.optional(),wordListText:c.TextStylesSchema.optional(),wordListTitle:c.TextStylesSchema.optional()}).optional()});c.MemoryBlockThemeSchema=c.BlockThemeSchema.extend({styles:t.z.object({text:c.TextStylesSchema.optional(),container:c.BoxStylesSchema.optional(),infoContainer:c.BoxStylesSchema.optional(),infoText:c.TextStylesSchema.optional(),card:c.BoxStylesSchema.optional()}).optional()});c.SpinningWheelBlockThemeSchema=c.BlockThemeSchema.extend({styles:t.z.object({wheelText:c.TextStylesSchema.optional()}).optional()});c.ClozeBlockThemeSchema=c.BlockThemeSchema.extend({layoutPosition:t.z.enum(["left","right","top","bottom"]).optional(),styles:t.z.object({text:c.TextStylesSchema.optional(),container:c.BoxStylesSchema.optional(),wordBank:c.BoxStylesSchema.optional(),word:c.BoxStylesSchema.optional(),blank:c.BoxStylesSchema.optional()}).optional()});c.CardDeckBlockThemeSchema=c.BlockThemeSchema.extend({styles:t.z.object({card:c.BoxStylesSchema.optional(),cardText:c.TextStylesSchema.optional(),container:c.BoxStylesSchema.optional()}).optional()});c.FlashcardBlockThemeSchema=c.BlockThemeSchema.extend({styles:t.z.object({cardFront:c.BoxStylesSchema.optional(),cardBack:c.BoxStylesSchema.optional(),frontText:c.TextStylesSchema.optional(),backText:c.TextStylesSchema.optional(),navigation:c.BoxStylesSchema.optional(),navigationText:c.TextStylesSchema.optional()}).optional()});c.MatchPairsBlockThemeSchema=c.BlockThemeSchema.extend({layoutPosition:t.z.enum(["left","right","top","bottom"]).optional(),styles:t.z.object({text:c.TextStylesSchema.optional(),card:c.BoxStylesSchema.optional(),container:c.BoxStylesSchema.optional()}).optional()});c.ShapeBlockThemeSchema=c.BlockThemeSchema.extend({styles:t.z.object({shape:N.extend({fillColor:t.z.string().optional(),textColor:t.z.string().optional(),borderStyle:t.z.enum(["solid","dashed","dotted"]).optional(),padding:t.z.number().optional()}).optional()}).optional()})});var Pe=y(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.UNSTYLEABLE_BLOCKS=w.BLOCK_STYLE_KEYS=w.STYLE_TARGET_MAP=void 0;w.realStyleKeysFor=fo;w.styleTargetsHelpFor=ko;w.mapLogicalThemeStyles=ye;w.mergeTheme=Bo;w.STYLE_TARGET_MAP={quiz:{title:["question"],answers:["answers"],button:["button"],general:["general"]},poll:{title:["question"],answers:["answers"],button:["button"],general:["general"]},flashcard:{title:["frontText","backText"],answers:["cardFront","cardBack"],general:["cardFront","cardBack"]},memory:{title:["text"],answers:["card"],general:["container"]},matchpairs:{title:["text"],answers:["card"],general:["container"]},cloze:{title:["text"],answers:["word","blank"],general:["container"]},carddeck:{title:["cardText"],answers:["card"],general:["container"]},anagram:{title:["letterText"],answers:["letter","slot"],general:["container"]},dice:{title:["buttonText"],answers:["button"],button:["button"],general:["container"]},crossword:{title:["clueTitle","text"],answers:["cell"],general:["grid"]},wordsearch:{title:["wordListTitle","text"],answers:["cell"],general:["grid"]},spinningwheel:{title:["wheelText"],answers:["wheelText"],general:["wheelText"]},shape:{title:["shape"],answers:["shape"],general:["shape"]},hotpoint:{title:["hotpoint"],answers:["hotpoint"],general:["hotpoint"]},editor:{title:["editor"],answers:["editor"],general:["editor"]},draganddrop:{title:["title"],answers:["item"],general:["container"]}};function fo(i){let r=w.STYLE_TARGET_MAP[i.toLowerCase()];if(!r)return[];let n=new Set;for(let l of Object.values(r))for(let s of l??[])n.add(s);return[...n]}w.BLOCK_STYLE_KEYS={quiz:["general","question","answers","button"],poll:["general","question","answers","button"],flashcard:["cardFront","cardBack","frontText","backText","navigation","navigationText"],memory:["container","card","text","infoContainer","infoText"],matchpairs:["container","card","text"],cloze:["container","text","wordBank","word","blank"],carddeck:["container","card","cardText"],anagram:["container","letter","letterText","slot"],dice:["container","button","buttonText"],crossword:["grid","cell","text","clueContainer","clueTitle","clueText"],wordsearch:["grid","cell","text","wordListContainer","wordListTitle","wordListText"],spinningwheel:["wheelText"],shape:["shape"],editor:["editor"],hotpoint:["hotpoint"],draganddrop:["container","title","sandbox","groups","item","group"]};w.UNSTYLEABLE_BLOCKS=new Set(["chart","media","image","puzzle"]);function ko(i){if(!i)return"";let r=i.toLowerCase();if(w.UNSTYLEABLE_BLOCKS.has(r))return`
|
|
2
|
-
[STYLE TARGETS] Il blocco "${
|
|
3
|
-
[STYLE TARGETS for ${i}] Logical targets (update_block_theme): ${s}. Real sub-element keys (update_block_style 'target'): ${n.join(", ")}.`}function ye(i,r){if(!i)return i;let n={...i};for(let[J,R]of Object.entries(n))if(R&&typeof R=="object"){let E={...R},B=!1;E.backgroundColor!==void 0&&E.background===void 0&&(E.background=!0,B=!0),E.borderColor!==void 0&&E.border===void 0&&(E.border=!0,B=!0),B&&(n[J]=E)}if(!r)return n;let l=w.STYLE_TARGET_MAP[r.toLowerCase()];if(!l)return n;let s=(J,R)=>{R&&(n[J]={...n[J]||{},...R})},S=["title","answers","button","general"],u={title:n.title,answers:n.answers,button:n.button??n.buttons,general:n.general};for(let J of S){let R=u[J],E=l[J];if(R&&E)for(let B of E)s(B,R)}return n}function Bo(i,r,n){if(!i){let u={...r};return u.styles&&(u.styles=ye(u.styles,n)),u}if(!r)return i;let l={...i,...r},s=ye(r.styles,n),S=i.styles||{};if(i.styles||s){l.styles={...S,...s};for(let u of Object.keys(l.styles))S[u]&&s?.[u]&&(l.styles[u]={...S[u],...s[u]})}return l}});var fe=y(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.BlockEventSchema=d.ActivityVariableSchema=d.ActionSchema=d.ActionVariableSchema=d.ActionTypeSchema=d.MathOperationSchema=d.ActionConditionSchema=d.KeyPressConditionSchema=d.ClickConditionSchema=d.TimerConditionSchema=d.QuizConditionSchema=d.ConditionOperatorSchema=d.BlockEventTypeSchema=void 0;var m=require("zod");d.BlockEventTypeSchema=m.z.enum(["quiz_submit","timer_complete","click","scored","keypress","variable","custom","item_dropped","item_removed","group_filled","media_ended"]);d.ConditionOperatorSchema=m.z.enum(["equals","not_equals","greater_than","less_than","greater_than_or_equal","less_than_or_equal","contains"]);d.QuizConditionSchema=m.z.enum(["all_correct","incorrect","all_wrong","score_perfect","score_above_75","score_above_50","failed"]);d.TimerConditionSchema=m.z.enum(["completed","half_way"]);d.ClickConditionSchema=m.z.enum(["single_click","double_click"]);d.KeyPressConditionSchema=m.z.literal("key_pressed");d.ActionConditionSchema=m.z.object({event:d.BlockEventTypeSchema.optional(),variableName:m.z.string().optional(),operator:d.ConditionOperatorSchema.optional(),value:m.z.any()});d.MathOperationSchema=m.z.enum(["set","add","subtract","multiply","divide"]);d.ActionTypeSchema=m.z.enum(["navigate","modal","audio","reveal","hide","toggle_visibility","link","refresh","complete","set_variable","math_variable","move"]);d.ActionVariableSchema=m.z.object({name:m.z.string(),value:m.z.union([m.z.number(),m.z.string(),m.z.boolean()]),operation:d.MathOperationSchema.optional()});d.ActionSchema=m.z.object({id:m.z.string(),type:d.ActionTypeSchema,condition:d.ActionConditionSchema.optional(),conditions:m.z.array(d.ActionConditionSchema).optional(),conditionsOperator:m.z.enum(["and","or"]).optional(),modalContent:m.z.string().optional(),audioUrl:m.z.string().optional(),linkUrl:m.z.string().optional(),targetSceneId:m.z.string().optional(),targetBlockId:m.z.string().optional(),direction:m.z.enum(["up","down","left","right"]).optional(),distance:m.z.number().optional(),variable:d.ActionVariableSchema.optional()});d.ActivityVariableSchema=m.z.object({name:m.z.string(),defaultValue:m.z.union([m.z.string(),m.z.number(),m.z.boolean()])});d.BlockEventSchema=m.z.object({type:d.BlockEventTypeSchema,blockId:m.z.string(),data:m.z.record(m.z.any()).optional()})});var me=y(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.QuestionSchema=z.TextQuestionSchema=z.TrueFalseQuestionSchema=z.ChoiceQuestionSchema=z.QuestionOptionSchema=z.ImageSizeSchema=z.ImageAlignSchema=z.QuestionTypeSchema=void 0;var g=require("zod"),Ee=q();z.QuestionTypeSchema=g.z.enum(["single-choice","multiple-choice","true-false","short-answers","long-answers"]);z.ImageAlignSchema=g.z.enum(["left","right","center"]);z.ImageSizeSchema=g.z.object({width:g.z.number().optional(),height:g.z.number().optional()});z.QuestionOptionSchema=g.z.object({id:g.z.string(),text:g.z.string(),isCorrect:g.z.boolean(),image:Ee.MediaItemSchema.optional(),imageAlign:z.ImageAlignSchema.optional(),imageSize:z.ImageSizeSchema.optional()});var ke={id:g.z.string(),text:g.z.string(),score:g.z.number().optional(),image:Ee.MediaItemSchema.optional(),imageAlign:z.ImageAlignSchema.optional(),imageSize:z.ImageSizeSchema.optional()};z.ChoiceQuestionSchema=g.z.object({...ke,type:g.z.enum(["single-choice","multiple-choice"]),options:g.z.array(z.QuestionOptionSchema)});z.TrueFalseQuestionSchema=g.z.object({...ke,type:g.z.literal("true-false"),correctAnswer:g.z.boolean()});z.TextQuestionSchema=g.z.object({...ke,type:g.z.enum(["short-answers","long-answers"]),minCharacters:g.z.number().optional(),maxCharacters:g.z.number().optional()});z.QuestionSchema=g.z.discriminatedUnion("type",[z.ChoiceQuestionSchema,z.TrueFalseQuestionSchema,z.TextQuestionSchema])});var Be=y(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.PuzzleContentSchema=H.PuzzleTypeSchema=H.PuzzleGameModeSchema=void 0;var K=require("zod"),To=q();H.PuzzleGameModeSchema=K.z.enum(["scattered","rotated","scattered_rotated"]);H.PuzzleTypeSchema=K.z.enum(["swap","slide"]);H.PuzzleContentSchema=K.z.object({image:K.z.union([K.z.string(),To.MediaItemSchema]).optional().describe("Image URL or MediaItem for puzzle."),pieces:K.z.number().int().optional().describe("Number of pieces (e.g. 9, 16, 25)."),gameMode:H.PuzzleGameModeSchema.optional(),puzzleType:H.PuzzleTypeSchema.optional(),showNumbers:K.z.union([K.z.boolean(),K.z.string()]).optional().describe("Show helper numbers on puzzle pieces."),seed:K.z.string().optional().describe("Deterministic seed for piece placement.")})});var qe=y(a=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.CanvasDragItemSchema=a.ActivityContentSchema=a.SceneSchema=a.BlockGroupSchema=a.BlockSchema=a.ArrowBlockSchema=a.ShapeBlockSchema=a.CardDeckBlockSchema=a.ClozeBlockSchema=a.MatchPairsBlockSchema=a.ChartBlockSchema=a.SpinningWheelBlockSchema=a.FlashcardBlockSchema=a.MemoryBlockSchema=a.WordSearchBlockSchema=a.WordSearchDifficultySchema=a.CrosswordBlockSchema=a.PuzzleBlockSchema=a.DiceBlockSchema=a.AnagramBlockSchema=a.DragAndDropBlockSchema=a.EmbedBlockSchema=a.MediaBlockSchema=a.EditorBlockSchema=a.HotpointBlockSchema=a.QuizBlockSchema=a.ArrowLabelSchema=a.ArrowHeadTypeSchema=a.ShapeTypeSchema=a.MatchPairsPairSchema=a.CardItemSchema=a.FlashcardItemSchema=a.FlashcardContentSchema=a.WheelSliceSchema=a.MemoryPairSchema=a.WordSearchDataSchema=a.CrosswordLayoutOutputSchema=a.CrosswordLayoutWordSchema=a.CrosswordCellSchema=a.DiceTypeSchema=a.DragAndDropGroupSchema=a.DragAndDropItemSchema=a.ActionBlockSchema=a.SceneTypeSchema=void 0;var o=require("zod"),Co=be(),T=q(),f=se(),xo=me(),wo=fe(),_o=Be();a.SceneTypeSchema=o.z.enum(["2D","360\xB0"]);var re={id:o.z.string(),type:Co.BlockTypeSchema,title:o.z.string(),showTitle:o.z.boolean().optional(),locked:o.z.boolean().optional(),groupId:o.z.string().optional(),position:T.PositionSchema.optional(),rotation:o.z.number(),hidden:o.z.boolean().optional(),draggable:o.z.boolean().optional(),size:T.SizeSchema.optional(),minSize:T.SizeSchema.optional(),maxSize:T.SizeSchema.optional(),theme:f.BlockThemeSchema.optional()},_={...re,actions:o.z.array(wo.ActionSchema).optional(),score:o.z.number().optional()};a.ActionBlockSchema=o.z.object(_);a.DragAndDropItemSchema=o.z.object({id:o.z.string(),text:o.z.string(),background:T.MediaItemSchema.optional(),opacity:o.z.number().optional(),x:o.z.number().optional(),y:o.z.number().optional(),width:o.z.number().optional(),height:o.z.number().optional(),styles:f.BoxStylesSchema.optional(),textStyles:f.TextStylesSchema.optional()});a.DragAndDropGroupSchema=o.z.object({id:o.z.string(),name:o.z.string(),background:T.MediaItemSchema.optional(),x:o.z.number().optional(),y:o.z.number().optional(),width:o.z.number().optional(),height:o.z.number().optional(),singleItem:o.z.boolean().optional(),opacity:o.z.number().optional(),styles:f.BoxStylesSchema.optional(),textStyles:f.TextStylesSchema.optional(),items:o.z.array(a.DragAndDropItemSchema)});a.DiceTypeSchema=o.z.enum(["d4","d6","d8","d10","d12","d20"]);a.CrosswordCellSchema=o.z.object({char:o.z.string(),isBlack:o.z.boolean(),number:o.z.number().optional(),row:o.z.number(),col:o.z.number()});a.CrosswordLayoutWordSchema=o.z.object({answer:o.z.string(),clue:o.z.string(),image:T.MediaItemSchema.optional(),startx:o.z.number(),starty:o.z.number(),orientation:o.z.enum(["across","down","none"]),position:o.z.number()});a.CrosswordLayoutOutputSchema=o.z.object({grid:o.z.array(o.z.array(a.CrosswordCellSchema)),rows:o.z.number(),cols:o.z.number(),words:o.z.array(a.CrosswordLayoutWordSchema)});a.WordSearchDataSchema=o.z.object({grid:o.z.array(o.z.array(o.z.string())),placedWords:o.z.array(o.z.object({word:o.z.string(),clean:o.z.string(),path:o.z.array(o.z.object({x:o.z.number(),y:o.z.number()}))}))});a.MemoryPairSchema=o.z.object({id:o.z.string(),type:o.z.enum(["img-img","img-word","word-word"]),content:o.z.tuple([o.z.string(),o.z.string()])});a.WheelSliceSchema=o.z.object({id:o.z.string(),text:o.z.string(),color:o.z.string().optional(),image:T.MediaItemSchema.optional()});a.FlashcardContentSchema=o.z.object({type:o.z.enum(["text","image"]),content:o.z.any()});a.FlashcardItemSchema=o.z.object({id:o.z.string(),front:a.FlashcardContentSchema,back:a.FlashcardContentSchema});a.CardItemSchema=o.z.object({id:o.z.string(),frontImage:T.MediaItemSchema.optional(),frontText:o.z.string().optional()});a.MatchPairsPairSchema=o.z.object({id:o.z.string(),leftLabel:o.z.string(),rightLabel:o.z.string(),leftImage:o.z.any().optional(),rightImage:o.z.any().optional()});a.ShapeTypeSchema=o.z.enum(["rectangle","rounded-rectangle","circle","triangle","triangle-inverted","pentagon","hexagon","heptagon","octagon","decagon","star","star-4","star-5","star-6","star-8","star-12","star-24","arrow-block-right","arrow-block-left","arrow-block-up","arrow-block-down","arrow-block-left-right","flow-process","flow-decision","flow-data","flow-document","flow-start-stop","callout-rect","callout-round","callout-cloud","cloud","heart","banner","tear","gear","asterisk"]);a.ArrowHeadTypeSchema=o.z.enum(["none","arrow","circle","square"]);a.ArrowLabelSchema=o.z.object({id:o.z.string(),text:o.z.string(),t:o.z.number(),offsetX:o.z.number().optional(),offsetY:o.z.number().optional(),fontSize:o.z.number().optional(),color:o.z.string().optional(),backgroundColor:o.z.string().optional()});a.QuizBlockSchema=o.z.object({..._,type:o.z.literal("Quiz"),questions:o.z.array(xo.QuestionSchema).optional(),previewIndex:o.z.number().optional(),required:o.z.boolean().optional(),showResults:o.z.boolean().optional(),allowRetry:o.z.boolean().optional(),maxRetry:o.z.string().optional(),submitText:o.z.string().optional(),timer:o.z.string().optional(),showQuestionCount:o.z.boolean().optional(),theme:f.QuizBlockThemeSchema});a.HotpointBlockSchema=o.z.object({..._,type:o.z.literal("Hotpoint"),showIcon:o.z.boolean().optional(),element:o.z.enum(["image","button"]),theme:f.HotpointBlockThemeSchema.optional()});a.EditorBlockSchema=o.z.object({..._,type:o.z.literal("Editor"),content:o.z.any().optional(),readonly:o.z.boolean().optional(),theme:f.EditorBlockThemeSchema.optional()});a.MediaBlockSchema=o.z.object({...re,type:o.z.literal("Media"),media:T.MediaItemSchema.optional()});a.EmbedBlockSchema=o.z.object({...re,type:o.z.literal("Embed"),url:o.z.string().optional(),readOnly:o.z.boolean().optional()});a.DragAndDropBlockSchema=o.z.object({..._,type:o.z.literal("DragAndDrop"),groups:o.z.array(a.DragAndDropGroupSchema),theme:f.DragAndDropBlockThemeSchema.optional(),showResults:o.z.boolean().optional(),layout:o.z.enum(["manual","split"]).optional(),itemArrangement:o.z.enum(["random","list","grid"]).optional(),groupBackground:T.MediaItemSchema.optional(),enableWrongAnswers:o.z.boolean().optional(),itemBackground:T.MediaItemSchema.optional(),groupBackgroundOpacity:o.z.number().optional(),itemBackgroundOpacity:o.z.number().optional(),splitRatio:o.z.number().optional()});a.AnagramBlockSchema=o.z.object({..._,type:o.z.literal("Anagram"),letters:o.z.array(o.z.string()),correctWord:o.z.string(),theme:f.AnagramBlockThemeSchema.optional(),clue:o.z.string().optional(),allowRetry:o.z.boolean().optional(),maxRetry:o.z.string().optional()});a.DiceBlockSchema=o.z.object({..._,type:o.z.literal("Dice"),rollHistory:o.z.array(o.z.number()).optional(),diceType:a.DiceTypeSchema.optional(),faceOverrides:o.z.any().optional(),color:o.z.string().optional(),showNumber:o.z.boolean().optional(),diceCount:o.z.number().optional(),dicePool:o.z.record(o.z.number()).optional(),persistent:o.z.boolean().optional(),theme:f.DiceBlockThemeSchema.optional()});a.PuzzleBlockSchema=o.z.object({..._,type:o.z.literal("Puzzle"),image:T.MediaItemSchema.optional(),pieces:o.z.number().optional(),gameMode:_o.PuzzleGameModeSchema.optional(),puzzleType:o.z.enum(["swap","slide"]).optional(),showNumbers:o.z.union([o.z.boolean(),o.z.string()]).optional(),seed:o.z.string().optional()});a.CrosswordBlockSchema=o.z.object({..._,type:o.z.literal("Crossword"),words:o.z.array(o.z.object({answer:o.z.string(),clue:o.z.string(),image:T.MediaItemSchema.optional()})).optional(),layout:a.CrosswordLayoutOutputSchema.optional(),theme:f.CrosswordBlockThemeSchema.optional()});a.WordSearchDifficultySchema=o.z.enum(["easy","medium","hard"]);a.WordSearchBlockSchema=o.z.object({..._,type:o.z.literal("WordSearch"),words:o.z.array(o.z.string()).optional(),gridSize:T.GridSizeSchema.optional(),difficulty:a.WordSearchDifficultySchema.optional(),data:a.WordSearchDataSchema.optional(),theme:f.WordSearchBlockThemeSchema.optional()});a.MemoryBlockSchema=o.z.object({..._,type:o.z.literal("Memory"),pairs:o.z.array(a.MemoryPairSchema),gridSize:T.GridSizeSchema.optional(),hideScore:o.z.boolean().optional(),theme:f.MemoryBlockThemeSchema.optional()});a.FlashcardBlockSchema=o.z.object({..._,type:o.z.literal("Flashcard"),cards:o.z.array(a.FlashcardItemSchema),theme:f.FlashcardBlockThemeSchema.optional()});a.SpinningWheelBlockSchema=o.z.object({..._,type:o.z.literal("SpinningWheel"),slices:o.z.array(a.WheelSliceSchema),spinDuration:o.z.number().optional(),theme:f.SpinningWheelBlockThemeSchema.optional()});a.ChartBlockSchema=o.z.object({..._,type:o.z.literal("Chart"),chartType:o.z.enum(["line","bar","pie","doughnut","radar","area","scatter"]),chartData:o.z.array(o.z.any()),chartConfig:o.z.object({colors:o.z.array(o.z.string()).optional(),xAxisLabel:o.z.string().optional(),yAxisLabel:o.z.string().optional(),showLegend:o.z.boolean().optional(),showTooltip:o.z.boolean().optional(),stacked:o.z.boolean().optional(),seriesNames:o.z.record(o.z.string()).optional()})});a.MatchPairsBlockSchema=o.z.object({..._,type:o.z.literal("MatchPairs"),instructions:o.z.string().optional(),pairs:o.z.array(a.MatchPairsPairSchema),theme:f.MatchPairsBlockThemeSchema.optional()});a.ClozeBlockSchema=o.z.object({..._,type:o.z.literal("Cloze"),templateText:o.z.string().optional(),theme:f.ClozeBlockThemeSchema.optional(),mode:o.z.enum(["write","drag-drop"]).optional()});a.CardDeckBlockSchema=o.z.object({..._,type:o.z.literal("CardDeck"),cards:o.z.array(a.CardItemSchema),backImage:T.MediaItemSchema.optional(),discardLogic:o.z.enum(["delete","return"]),theme:f.CardDeckBlockThemeSchema.optional()});a.ShapeBlockSchema=o.z.object({...re,type:o.z.literal("Shape"),shapeType:a.ShapeTypeSchema.optional(),text:o.z.string().optional(),theme:f.ShapeBlockThemeSchema.optional()});a.ArrowBlockSchema=o.z.object({...re,type:o.z.literal("Arrow"),startBlockId:o.z.string(),endBlockId:o.z.string().optional(),endPos:o.z.object({x:o.z.number(),y:o.z.number()}).optional(),startHandle:o.z.enum(["top","right","bottom","left"]),endHandle:o.z.enum(["top","right","bottom","left"]).optional(),connectionType:o.z.enum(["straight","orthogonal","curved"]),strokeColor:o.z.string().optional(),strokeWidth:o.z.number().optional(),strokeStyle:o.z.enum(["solid","dashed","dotted"]).optional(),showHead:o.z.boolean().optional(),startHead:a.ArrowHeadTypeSchema.optional(),endHead:a.ArrowHeadTypeSchema.optional(),bendOffsetX:o.z.number().optional(),bendOffsetY:o.z.number().optional(),segmentCount:o.z.number().optional(),bendOffsets:o.z.array(o.z.number()).optional(),labels:o.z.array(a.ArrowLabelSchema).optional()});a.BlockSchema=o.z.discriminatedUnion("type",[a.QuizBlockSchema,a.HotpointBlockSchema,a.EditorBlockSchema,a.EmbedBlockSchema,a.MediaBlockSchema,a.DragAndDropBlockSchema,a.AnagramBlockSchema,a.DiceBlockSchema,a.PuzzleBlockSchema,a.CrosswordBlockSchema,a.WordSearchBlockSchema,a.MemoryBlockSchema,a.FlashcardBlockSchema,a.SpinningWheelBlockSchema,a.ChartBlockSchema,a.MatchPairsBlockSchema,a.ShapeBlockSchema,a.ArrowBlockSchema,a.ClozeBlockSchema,a.CardDeckBlockSchema]);a.BlockGroupSchema=o.z.object({id:o.z.string(),name:o.z.string(),locked:o.z.boolean().optional()});a.SceneSchema=o.z.object({id:o.z.string(),title:o.z.string(),type:a.SceneTypeSchema,background:o.z.union([o.z.string(),o.z.array(o.z.string()),T.MediaItemSchema]).optional(),backgroundColor:o.z.string().optional(),backgroundAutoplay:o.z.boolean().optional(),backgroundLoop:o.z.boolean().optional(),secretCode:o.z.string().optional(),hidden:o.z.boolean().optional(),blocks:o.z.array(a.BlockSchema),groups:o.z.array(a.BlockGroupSchema).optional(),canvas:o.z.object({width:o.z.number().optional(),height:o.z.number().optional(),preset:o.z.enum(["landscape","mobile","infographics","square","custom"]).optional()}).optional()});a.ActivityContentSchema=o.z.object({id:o.z.string(),title:o.z.string(),hasTimer:o.z.boolean(),timer:o.z.string().optional(),allowNavigation:o.z.boolean(),scenes:o.z.array(a.SceneSchema),variables:o.z.array(o.z.object({name:o.z.string(),defaultValue:o.z.union([o.z.string(),o.z.number(),o.z.boolean()])})).optional(),audio:o.z.array(o.z.object({id:o.z.string(),media:T.MediaItemSchema.optional(),scenes:o.z.string().optional(),autoplay:o.z.boolean().optional(),loop:o.z.boolean().optional()})).optional()});a.CanvasDragItemSchema=o.z.object({id:o.z.string(),type:o.z.literal("BLOCK"),sceneId:o.z.string(),blockData:a.BlockSchema})});var Le=y(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.ActivityContextSchema=Y.SceneSummarySchema=Y.SceneBlockRefSchema=void 0;var A=require("zod");Y.SceneBlockRefSchema=A.z.object({id:A.z.string(),type:A.z.string(),title:A.z.string()});Y.SceneSummarySchema=A.z.object({id:A.z.string(),title:A.z.string(),position:A.z.number(),blocks:A.z.array(Y.SceneBlockRefSchema).default([])});Y.ActivityContextSchema=A.z.object({activity:A.z.object({id:A.z.string(),title:A.z.string(),scenes:A.z.array(Y.SceneSummarySchema).default([])}),activeSceneId:A.z.string().nullable().optional()})});var Qe=y(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.QuizContentSchema=O.QuizQuestionSchema=O.QuizOptionSchema=O.QuizQuestionTypeSchema=void 0;var k=require("zod"),Fe=q(),he=me();O.QuizQuestionTypeSchema=k.z.enum(["single-choice","multiple-choice","true-false","short-answers","long-answers"]);O.QuizOptionSchema=k.z.object({id:k.z.string().optional(),text:k.z.string(),isCorrect:k.z.boolean(),image:Fe.MediaItemSchema.optional().describe("Option image."),imageAlign:he.ImageAlignSchema.optional().describe("Option image alignment."),imageSize:he.ImageSizeSchema.optional().describe("Option image size.")});O.QuizQuestionSchema=k.z.object({id:k.z.string().optional().describe("Question ID. Auto-generated if omitted."),type:O.QuizQuestionTypeSchema,text:k.z.string().describe("The question text."),score:k.z.number().optional(),options:k.z.array(O.QuizOptionSchema).optional().describe("Required for single-choice and multiple-choice."),correctAnswer:k.z.boolean().optional().describe("Required for true-false."),image:Fe.MediaItemSchema.optional().describe("Question image."),imageAlign:he.ImageAlignSchema.optional().describe("Question image alignment."),imageSize:he.ImageSizeSchema.optional().describe("Question image size.")});O.QuizContentSchema=k.z.object({questions:k.z.array(O.QuizQuestionSchema).describe("Array of question objects."),showResults:k.z.boolean().optional(),allowRetry:k.z.boolean().optional(),maxRetry:k.z.string().optional(),required:k.z.boolean().optional(),submitText:k.z.string().optional().describe("Label for submit button."),timer:k.z.string().optional().describe("Timer duration in seconds as a string."),showQuestionCount:k.z.boolean().optional().describe("Show current/total questions count.")})});var Re=y(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.ClozeContentSchema=ee.ClozeModeSchema=void 0;var Te=require("zod");ee.ClozeModeSchema=Te.z.enum(["write","drag-drop"]);ee.ClozeContentSchema=Te.z.object({templateText:Te.z.string().describe('Template text with blanks in [brackets]. E.g. "The capital of Italy is [Rome]."'),mode:ee.ClozeModeSchema.optional().describe("Input mode. Default: write.")})});var Ge=y(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.AnagramContentSchema=D.WordSearchContentSchema=D.CrosswordContentSchema=D.CrosswordWordSchema=D.WordGameBlockTypeSchema=void 0;var I=require("zod"),We=q();D.WordGameBlockTypeSchema=I.z.enum(["Crossword","WordSearch","Anagram"]);D.CrosswordWordSchema=I.z.object({answer:I.z.string(),clue:I.z.string(),image:We.MediaItemSchema.optional().describe("Clue image.")});D.CrosswordContentSchema=I.z.object({words:I.z.array(D.CrosswordWordSchema)});D.WordSearchContentSchema=I.z.object({words:I.z.array(I.z.string()),gridSize:We.GridSizeSchema.optional().describe("Grid dimensions."),difficulty:I.z.enum(["easy","medium","hard"]).optional()});D.AnagramContentSchema=I.z.object({correctWord:I.z.string().describe("The correct word."),letters:I.z.array(I.z.string()).optional(),clue:I.z.string().optional().describe("A hint.")})});var Ne=y(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.PairGameContentSchema=L.PairSchema=L.MemoryPairTypeSchema=L.PairGameBlockTypeSchema=void 0;var W=require("zod"),Ce=q();L.PairGameBlockTypeSchema=W.z.enum(["Memory","MatchPairs"]);L.MemoryPairTypeSchema=W.z.enum(["img-img","img-word","word-word"]);L.PairSchema=W.z.object({id:W.z.string().optional(),type:L.MemoryPairTypeSchema.optional().describe("For Memory: pair type."),content:W.z.array(W.z.string()).optional().describe("For Memory: [item1, item2]."),leftLabel:W.z.string().optional().describe("For MatchPairs: left side text."),rightLabel:W.z.string().optional().describe("For MatchPairs: right side text."),leftImage:Ce.MediaItemSchema.optional().describe("For MatchPairs: left side image."),rightImage:Ce.MediaItemSchema.optional().describe("For MatchPairs: right side image.")});L.PairGameContentSchema=W.z.object({pairs:W.z.array(L.PairSchema).describe("Array of pair objects."),gridSize:Ce.GridSizeSchema.optional().describe("For Memory: grid dimensions."),instructions:W.z.string().optional().describe("For MatchPairs: instruction text.")})});var Ke=y(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.DeckContentSchema=P.CardSchema=P.CardFaceSchema=P.DeckBlockTypeSchema=void 0;var F=require("zod");P.DeckBlockTypeSchema=F.z.enum(["Flashcard","CardDeck"]);P.CardFaceSchema=F.z.object({type:F.z.enum(["text","image"]),content:F.z.any()});P.CardSchema=F.z.object({id:F.z.string().optional(),front:P.CardFaceSchema.optional().describe("For Flashcard: front side."),back:P.CardFaceSchema.optional().describe("For Flashcard: back side."),frontText:F.z.string().optional().describe("For CardDeck: front text."),frontImage:F.z.any().optional().describe("For CardDeck: front image.")});P.DeckContentSchema=F.z.object({cards:F.z.array(P.CardSchema).describe("Array of card objects."),backImage:F.z.any().optional().describe("For CardDeck: shared back image."),discardLogic:F.z.enum(["delete","return"]).optional().describe("For CardDeck.")})});var He=y(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.DiceContentSchema=oe.DieTypeSchema=void 0;var ne=require("zod");oe.DieTypeSchema=ne.z.enum(["d4","d6","d8","d10","d12","d20"]);oe.DiceContentSchema=ne.z.object({diceType:oe.DieTypeSchema.optional(),diceCount:ne.z.number().int().min(1).max(10).optional(),color:ne.z.string().optional().describe("CSS color for dice."),showNumber:ne.z.boolean().optional(),persistent:ne.z.boolean().optional().describe("Keep dice visible after roll.")})});var Ye=y(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.SpinnerContentSchema=ae.SpinnerSliceSchema=void 0;var te=require("zod"),jo=q();ae.SpinnerSliceSchema=te.z.object({id:te.z.string().optional(),text:te.z.string(),color:te.z.string().optional().describe("CSS color for slice."),image:jo.MediaItemSchema.optional().describe("Slice image.")});ae.SpinnerContentSchema=te.z.object({slices:te.z.array(ae.SpinnerSliceSchema).min(2).describe("Wheel slices (min 2)."),spinDuration:te.z.number().optional().describe("Spin duration in seconds.")})});var Ve=y(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.DragAndDropContentSchema=V.DragGroupSchema=V.DragItemSchema=void 0;var p=require("zod"),de=q(),pe=se();V.DragItemSchema=p.z.object({id:p.z.string().optional(),text:p.z.string(),background:de.MediaItemSchema.optional().describe("Background image/color for item."),opacity:p.z.number().optional().describe("Opacity of the item (0-1)."),x:p.z.number().optional().describe("Manual x position in pixels (sandbox space, origin top-left; sandbox size = block.size)."),y:p.z.number().optional().describe("Manual y position in pixels (sandbox space, origin top-left)."),fx:p.z.number().optional().describe("Resize-invariant x as a fraction (0-1) of sandbox width. Preferred over x when present."),fy:p.z.number().optional().describe("Resize-invariant y as a fraction (0-1) of sandbox height. Preferred over y when present."),width:p.z.number().optional().describe("Manual width in pixels."),height:p.z.number().optional().describe("Manual height in pixels."),styles:pe.BoxStylesSchema.optional().describe("Box custom styling styles."),textStyles:pe.TextStylesSchema.optional().describe("Text custom styling styles.")});V.DragGroupSchema=p.z.object({id:p.z.string().optional(),name:p.z.string().describe("Group/dropzone name."),singleItem:p.z.boolean().optional().describe("Accept only one item inside."),background:de.MediaItemSchema.optional().describe("Background image/color for group."),x:p.z.number().optional().describe("Manual x position in pixels (sandbox space, origin top-left; sandbox size = block.size)."),y:p.z.number().optional().describe("Manual y position in pixels (sandbox space, origin top-left)."),fx:p.z.number().optional().describe("Resize-invariant x as a fraction (0-1) of sandbox width. Preferred over x when present."),fy:p.z.number().optional().describe("Resize-invariant y as a fraction (0-1) of sandbox height. Preferred over y when present."),width:p.z.number().optional().describe("Manual width in pixels."),height:p.z.number().optional().describe("Manual height in pixels."),opacity:p.z.number().optional().describe("Opacity of the group (0-1)."),styles:pe.BoxStylesSchema.optional().describe("Box custom styling styles."),textStyles:pe.TextStylesSchema.optional().describe("Text custom styling styles."),items:p.z.array(V.DragItemSchema).describe("Items that belong in this group.")});V.DragAndDropContentSchema=p.z.object({groups:p.z.array(V.DragGroupSchema).min(1).describe("Drag-and-drop groups."),layout:p.z.enum(["manual","split"]).optional().describe("Layout mode: manual placements or split areas."),itemArrangement:p.z.enum(["random","list","grid"]).optional().describe("Initial item arrangement inside sandbox."),showResults:p.z.boolean().optional().describe("Show result feedback immediately."),requireSubmit:p.z.boolean().optional().describe("Require an explicit 'Check' button to grade instead of auto-grading when all items are placed."),enableWrongAnswers:p.z.boolean().optional().describe("Allow placing items in incorrect groups."),groupBackground:de.MediaItemSchema.optional().describe("Shared background image/color for all groups."),itemBackground:de.MediaItemSchema.optional().describe("Shared background image/color for all items."),groupBackgroundOpacity:p.z.number().optional().describe("Shared group background opacity (0-1)."),itemBackgroundOpacity:p.z.number().optional().describe("Shared item background opacity (0-1)."),splitRatio:p.z.number().optional().describe("Proportion ratio for split layout.")})});var $e=y($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.ChartContentSchema=$.ChartConfigSchema=$.ChartTypeSchema=void 0;var v=require("zod");$.ChartTypeSchema=v.z.enum(["line","bar","pie","doughnut","radar","area","scatter"]);$.ChartConfigSchema=v.z.object({colors:v.z.array(v.z.string()).optional(),xAxisLabel:v.z.string().optional(),yAxisLabel:v.z.string().optional(),showLegend:v.z.boolean().optional(),showTooltip:v.z.boolean().optional(),stacked:v.z.boolean().optional(),seriesNames:v.z.record(v.z.string()).optional().describe("Dictionary mapping series keys to custom labels.")});$.ChartContentSchema=v.z.object({chartType:$.ChartTypeSchema.optional(),chartData:v.z.array(v.z.record(v.z.any())).optional().describe("Data array, e.g. [{name:'A', value:10}]."),chartConfig:$.ChartConfigSchema.optional()})});var Ue=y(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.BasicContentSchema=void 0;var ue=require("zod"),Mo=q();Se.BasicContentSchema=ue.z.object({content:ue.z.any().optional().describe("For Editor: Plate JSON content array."),url:ue.z.string().optional().describe("For Media or Embed: content URL."),text:ue.z.string().optional().describe("For Shape: text inside shape."),mediaType:Mo.MediaTypeSchema.optional().describe("For Media: media type.")})});var xe=y(j=>{"use strict";var Ao=j&&j.__createBinding||(Object.create?(function(i,r,n,l){l===void 0&&(l=n);var s=Object.getOwnPropertyDescriptor(r,n);(!s||("get"in s?!r.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(i,l,s)}):(function(i,r,n,l){l===void 0&&(l=n),i[l]=r[n]})),G=j&&j.__exportStar||function(i,r){for(var n in i)n!=="default"&&!Object.prototype.hasOwnProperty.call(r,n)&&Ao(r,i,n)};Object.defineProperty(j,"__esModule",{value:!0});G(Qe(),j);G(Re(),j);G(Ge(),j);G(Ne(),j);G(Ke(),j);G(He(),j);G(Ye(),j);G(Ve(),j);G($e(),j);G(Be(),j);G(Ue(),j)});var Je=y(Q=>{"use strict";var Io=Q&&Q.__createBinding||(Object.create?(function(i,r,n,l){l===void 0&&(l=n);var s=Object.getOwnPropertyDescriptor(r,n);(!s||("get"in s?!r.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(i,l,s)}):(function(i,r,n,l){l===void 0&&(l=n),i[l]=r[n]})),vo=Q&&Q.__setModuleDefault||(Object.create?(function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}):function(i,r){i.default=r}),Oo=Q&&Q.__importStar||(function(){var i=function(r){return i=Object.getOwnPropertyNames||function(n){var l=[];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(l[l.length]=s);return l},i(r)};return function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var l=i(r),s=0;s<l.length;s++)l[s]!=="default"&&Io(n,r,l[s]);return vo(n,r),n}})();Object.defineProperty(Q,"__esModule",{value:!0});Q.BLOCK_CONTENT_SCHEMAS=void 0;Q.generateBlockReference=qo;var Do=Oo(require("zod-to-json-schema")),Po=Do.zodToJsonSchema,C=xe();Q.BLOCK_CONTENT_SCHEMAS={Quiz:C.QuizContentSchema,Cloze:C.ClozeContentSchema,Crossword:C.CrosswordContentSchema,WordSearch:C.WordSearchContentSchema,Anagram:C.AnagramContentSchema,Memory:C.PairGameContentSchema,MatchPairs:C.PairGameContentSchema,Flashcard:C.DeckContentSchema,CardDeck:C.DeckContentSchema,Dice:C.DiceContentSchema,SpinningWheel:C.SpinnerContentSchema,DragAndDrop:C.DragAndDropContentSchema,Chart:C.ChartContentSchema,Puzzle:C.PuzzleContentSchema,Editor:C.BasicContentSchema,Media:C.BasicContentSchema,Embed:C.BasicContentSchema,Shape:C.BasicContentSchema};function Eo(i,r,n,l){let s=n?"*required*":"optional",S=we(r),u=r.description?` \u2014 ${r.description}`:"";return`${l}- \`${i}\` (${S}, ${s})${u}`}function we(i){return i.enum?`enum: ${i.enum.map(r=>JSON.stringify(r)).join(" | ")}`:i.anyOf||i.oneOf?(i.anyOf||i.oneOf).map(we).join(" | "):Array.isArray(i.type)?i.type.join(" | "):i.type==="array"&&i.items?`array<${we(i.items)}>`:i.type==="object"?"object":i.type??"any"}function _e(i,r){let n=[],l=new Set(i.required??[]),s=i.properties??{};for(let[S,u]of Object.entries(s))n.push(Eo(S,u,l.has(S),r)),u.type==="object"&&u.properties?n.push(_e(u,r+" ")):u.type==="array"&&u.items?.type==="object"&&n.push(_e(u.items,r+" "));return n.join(`
|
|
4
|
-
`)}function
|
|
5
|
-
${
|
|
1
|
+
"use strict";var Cr=Object.create;var Ve=Object.defineProperty;var zr=Object.getOwnPropertyDescriptor;var wr=Object.getOwnPropertyNames;var Ar=Object.getPrototypeOf,Dr=Object.prototype.hasOwnProperty;var Ir=(o,i)=>{for(var n in i)Ve(o,n,{get:i[n],enumerable:!0})},po=(o,i,n,c)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of wr(i))!Dr.call(o,a)&&a!==n&&Ve(o,a,{get:()=>i[a],enumerable:!(c=zr(i,a))||c.enumerable});return o};var jr=(o,i,n)=>(n=o!=null?Cr(Ar(o)):{},po(i||!o||!o.__esModule?Ve(n,"default",{value:o,enumerable:!0}):n,o)),Mr=o=>po(Ve({},"__esModule",{value:!0}),o);var un={};Ir(un,{ActionBlockSchema:()=>Io,ActionConditionSchema:()=>Ze,ActionSchema:()=>et,ActionTypeSchema:()=>Bt,ActionVariableSchema:()=>Tt,ActivityContentMigrationError:()=>Qe,ActivityContentSchema:()=>jo,ActivityContextSchema:()=>vo,ActivityVariableSchema:()=>zo,AnagramBlockSchema:()=>Ie,AnagramBlockThemeSchema:()=>Y,AnagramContentSchema:()=>_o,AnimationSchema:()=>yt,ArrowBlockSchema:()=>Fe,ArrowHeadTypeSchema:()=>ot,ArrowLabelSchema:()=>_t,BASE_BLOCK_FIELDS:()=>rt,BLOCK_CONTENT_SCHEMAS:()=>pe,BLOCK_REGISTRY:()=>P,BLOCK_STYLE_KEYS:()=>gt,BLOCK_TYPES:()=>R,BasicContentSchema:()=>qo,BlockEventSchema:()=>wo,BlockEventTypeSchema:()=>Xe,BlockGroupSchema:()=>Ft,BlockSchema:()=>nt,BlockThemeSchema:()=>C,BlockTypeSchema:()=>$e,BoxSideSchema:()=>Je,BoxStylesSchema:()=>h,CANVAS_OP_NAMES:()=>vr,CANVAS_OP_REQUIRED:()=>He,CURRENT_SCHEMA_VERSION:()=>st,CanvasDragItemSchema:()=>Mo,CanvasOpSchema:()=>dt,CardDeckBlockSchema:()=>_e,CardDeckBlockThemeSchema:()=>oe,CardFaceSchema:()=>at,CardItemSchema:()=>xe,CardSchema:()=>Ut,ChartBlockSchema:()=>Ee,ChartConfigSchema:()=>ro,ChartContentSchema:()=>Ho,ChartTypeSchema:()=>oo,ChoiceQuestionSchema:()=>wt,ClickConditionSchema:()=>To,ClozeBlockSchema:()=>Re,ClozeBlockThemeSchema:()=>te,ClozeContentSchema:()=>Po,ClozeModeSchema:()=>qt,ConditionOperatorSchema:()=>kt,CropDataSchema:()=>ut,CrosswordBlockSchema:()=>se,CrosswordBlockThemeSchema:()=>U,CrosswordCellSchema:()=>Ot,CrosswordContentSchema:()=>Lo,CrosswordLayoutOutputSchema:()=>Et,CrosswordLayoutWordSchema:()=>Pt,CrosswordWordSchema:()=>$t,DeckBlockTypeSchema:()=>No,DeckContentSchema:()=>Qo,DiceBlockSchema:()=>je,DiceBlockThemeSchema:()=>J,DiceContentSchema:()=>Go,DiceTypeSchema:()=>vt,DieTypeSchema:()=>Zt,DragAndDropBlockSchema:()=>De,DragAndDropBlockThemeSchema:()=>q,DragAndDropContentSchema:()=>Vo,DragAndDropGroupSchema:()=>be,DragAndDropItemSchema:()=>Mt,DragGroupSchema:()=>to,DragItemSchema:()=>eo,EditorBlockSchema:()=>ze,EditorBlockThemeSchema:()=>$,EmbedBlockSchema:()=>Ae,FlashcardBlockSchema:()=>Oe,FlashcardBlockThemeSchema:()=>re,FlashcardContentSchema:()=>tt,FlashcardItemSchema:()=>ke,GridSizeSchema:()=>E,HotpointBlockSchema:()=>Ce,HotpointBlockThemeSchema:()=>V,ImageAlignSchema:()=>N,ImageSizeSchema:()=>Q,KeyPressConditionSchema:()=>Co,MatchPairsBlockSchema:()=>Le,MatchPairsBlockThemeSchema:()=>ne,MatchPairsPairSchema:()=>Be,MathOperationSchema:()=>xt,MediaBlockSchema:()=>we,MediaItemSchema:()=>p,MediaRefSchema:()=>bo,MediaSourceSchema:()=>ht,MediaTypeSchema:()=>F,MemoryBlockSchema:()=>ve,MemoryBlockThemeSchema:()=>X,MemoryPairSchema:()=>ge,MemoryPairTypeSchema:()=>Yt,PairGameBlockTypeSchema:()=>Wo,PairGameContentSchema:()=>Fo,PairSchema:()=>Jt,PositionSchema:()=>Ye,PuzzleBlockSchema:()=>Me,PuzzleContentSchema:()=>Do,PuzzleGameModeSchema:()=>ye,PuzzleTypeSchema:()=>It,QuestionOptionSchema:()=>Ct,QuestionSchema:()=>ae,QuestionTypeSchema:()=>Ao,QuizBlockSchema:()=>Te,QuizBlockThemeSchema:()=>H,QuizConditionSchema:()=>xo,QuizContentSchema:()=>Oo,QuizOptionSchema:()=>Vt,QuizQuestionSchema:()=>Ht,QuizQuestionTypeSchema:()=>Kt,REGISTRY_CONTENT_SCHEMAS:()=>ct,REGISTRY_STYLE_TARGETS:()=>fr,RadiusSchema:()=>bt,STYLE_TARGET_MAP:()=>fe,SceneBlockRefSchema:()=>Qt,SceneSchema:()=>Nt,SceneSummarySchema:()=>Gt,SceneTypeSchema:()=>jt,ShapeBlockSchema:()=>We,ShapeBlockThemeSchema:()=>ie,ShapeTypeSchema:()=>Rt,SizeSchema:()=>K,SpinnerContentSchema:()=>Ko,SpinnerSliceSchema:()=>Xt,SpinningWheelBlockSchema:()=>Pe,SpinningWheelBlockThemeSchema:()=>ee,TextQuestionSchema:()=>Dt,TextStylesSchema:()=>f,TimerConditionSchema:()=>Bo,TrueFalseQuestionSchema:()=>At,UNSTYLEABLE_BLOCKS:()=>St,VideoSettingsSchema:()=>ft,WheelSliceSchema:()=>Se,WordGameBlockTypeSchema:()=>Eo,WordSearchBlockSchema:()=>le,WordSearchBlockThemeSchema:()=>Z,WordSearchContentSchema:()=>Ro,WordSearchDataSchema:()=>Lt,WordSearchDifficultySchema:()=>Wt,actionsV1toV2:()=>kr,applyItemPatch:()=>Pr,createCanvasOpValidator:()=>en,defineBlock:()=>x,detectConflict:()=>rn,entitySignature:()=>fo,generateBlockReference:()=>br,getAllBlockJsonSchemas:()=>hn,getBlockDefinition:()=>ur,getBlockJsonSchema:()=>Tr,getCapabilitiesManifest:()=>pn,isKnownCanvasOp:()=>mo,listBlockTypes:()=>Br,mapLogicalThemeStyles:()=>Ue,mergeTheme:()=>ko,migrateActivityContent:()=>Sr,opConflictStamp:()=>nn,opTarget:()=>uo,parseMentions:()=>mn,realStyleKeysFor:()=>go,resolveMentions:()=>dn,stableStringify:()=>ue,styleTargetsHelpFor:()=>So,validateCanvasOp:()=>Or});module.exports=Mr(un);var He={createScene:[],deleteScene:["sceneId"],addBlock:["sceneId","block"],updateScene:["sceneId"],deleteBlock:["sceneId","blockId"],updateBlock:["sceneId","blockId","updates"],duplicateBlock:["sceneId","blockId"],groupBlocks:["blockIds"],updateBlockTheme:["sceneId","blockId","theme"],updateBlockElementStyle:["sceneId","blockId","elementId","customStyle"],addAction:["sceneId","blockId","action"],removeAction:["sceneId","blockId","actionId"],manageVariables:["operation","name"],configureTimer:[],reorderScenes:["sceneId","newIndex"],insertItem:["blockId","collection","item"],updateItem:["blockId","collection","itemId","item"],deleteItem:["blockId","collection","itemId"]},vr=Object.keys(He);function mo(o){return Object.prototype.hasOwnProperty.call(He,o)}function Or(o,i){if(!mo(o))return{ok:!1,code:"UNKNOWN_OP",errors:[`unknown op "${o}"`]};if(typeof i!="object"||i===null||Array.isArray(i))return{ok:!1,code:"NOT_OBJECT",errors:["op data must be an object"]};let n=i,c=He[o].filter(a=>n[a]===void 0||n[a]===null);return c.length>0?{ok:!1,code:"MISSING_FIELDS",errors:c.map(a=>`missing field: ${a}`)}:o==="groupBlocks"&&(!Array.isArray(n.blockIds)||n.blockIds.length<2)?{ok:!1,code:"MISSING_FIELDS",errors:["groupBlocks requires a blockIds array with >= 2 ids"]}:{ok:!0}}function Pr(o,i,n){let c=Array.isArray(o)?[...o]:[];if(i==="insertItem"){if(n.item===void 0||n.item===null)return c;let a=typeof n.at=="number"?n.at:c.length;return c.splice(Math.max(0,Math.min(a,c.length)),0,n.item),c}return i==="updateItem"?c.map(a=>a&&typeof a=="object"&&a.id===n.itemId?{...a,...n.item??{}}:a):c.filter(a=>!(a&&typeof a=="object"&&a.id===n.itemId))}var r=require("zod"),W=()=>r.z.record(r.z.string(),r.z.unknown()),Er=r.z.object({scene:W().optional(),newIndex:r.z.number().optional()}).passthrough(),Lr=r.z.object({sceneId:r.z.string()}),Rr=r.z.object({sceneId:r.z.string(),block:W()}),_r=r.z.object({sceneId:r.z.string(),updates:W().optional(),newIndex:r.z.number().optional()}),Wr=r.z.object({sceneId:r.z.string(),blockId:r.z.string()}),Fr=r.z.object({sceneId:r.z.string(),blockId:r.z.string(),updates:W()}),Nr=r.z.object({sceneId:r.z.string(),blockId:r.z.string()}),Qr=r.z.object({blockIds:r.z.array(r.z.string())}),Gr=r.z.object({sceneId:r.z.string(),blockId:r.z.string(),theme:W()}),Kr=r.z.object({sceneId:r.z.string(),blockId:r.z.string(),elementId:r.z.string(),customStyle:W()}),Vr=r.z.object({sceneId:r.z.string(),blockId:r.z.string(),action:W()}),Hr=r.z.object({sceneId:r.z.string(),blockId:r.z.string(),actionId:r.z.string()}),qr=r.z.object({operation:r.z.string(),name:r.z.string(),defaultValue:r.z.unknown().optional()}).passthrough(),$r=r.z.object({scope:r.z.string().optional(),sceneId:r.z.string().optional(),blockId:r.z.string().optional(),hasTimer:r.z.boolean().optional(),timer:r.z.unknown().optional()}).passthrough(),Yr=r.z.object({sceneId:r.z.string(),newIndex:r.z.number()}),Jr=r.z.object({sceneId:r.z.string().optional(),blockId:r.z.string(),collection:r.z.string(),item:r.z.unknown(),at:r.z.number().optional()}),Ur=r.z.object({sceneId:r.z.string().optional(),blockId:r.z.string(),collection:r.z.string(),itemId:r.z.string(),item:r.z.unknown()}),Zr=r.z.object({sceneId:r.z.string().optional(),blockId:r.z.string(),collection:r.z.string(),itemId:r.z.string()}),Xr=r.z.object({activity:r.z.unknown()}),dt=r.z.discriminatedUnion("action",[r.z.object({action:r.z.literal("createScene"),data:Er}),r.z.object({action:r.z.literal("deleteScene"),data:Lr}),r.z.object({action:r.z.literal("addBlock"),data:Rr}),r.z.object({action:r.z.literal("updateScene"),data:_r}),r.z.object({action:r.z.literal("deleteBlock"),data:Wr}),r.z.object({action:r.z.literal("updateBlock"),data:Fr}),r.z.object({action:r.z.literal("duplicateBlock"),data:Nr}),r.z.object({action:r.z.literal("groupBlocks"),data:Qr}),r.z.object({action:r.z.literal("updateBlockTheme"),data:Gr}),r.z.object({action:r.z.literal("updateBlockElementStyle"),data:Kr}),r.z.object({action:r.z.literal("addAction"),data:Vr}),r.z.object({action:r.z.literal("removeAction"),data:Hr}),r.z.object({action:r.z.literal("manageVariables"),data:qr}),r.z.object({action:r.z.literal("configureTimer"),data:$r}),r.z.object({action:r.z.literal("reorderScenes"),data:Yr}),r.z.object({action:r.z.literal("insertItem"),data:Jr}),r.z.object({action:r.z.literal("updateItem"),data:Ur}),r.z.object({action:r.z.literal("deleteItem"),data:Zr}),r.z.object({action:r.z.literal("replaceActivity"),data:Xr})]);var ho=require("zod");function qe(o){return o.issues.map(i=>{let n=i.path.join(".");return n?`${n}: ${i.message}`:i.message})}function en(o,i){return n=>{let c=dt.safeParse(n);if(!c.success)return{ok:!1,code:"SHAPE_INVALID",errors:qe(c.error)};let{action:a,data:l}=c.data;if(a==="addBlock"){let s=l.block,y=typeof s.type=="string"?s.type:void 0,b=y?o.getContentSchema(y):void 0;if(!y||!b)return{ok:!1,code:"UNKNOWN_BLOCK_TYPE",errors:[`addBlock: unknown block type "${String(s.type)}"`]};let g=b.safeParse(s);return g.success?{ok:!0}:{ok:!1,code:"CONTENT_INVALID",errors:qe(g.error)}}if(a==="insertItem"||a==="updateItem"||a==="deleteItem"){let s=i?.(l.blockId);if(!s)return{ok:!0};let y=o.getCollectionSchema(s,l.collection);if(!y)return{ok:!1,code:"UNKNOWN_COLLECTION",errors:[`unknown collection "${l.collection}" for block type "${s}"`]};if(a==="insertItem"||a==="updateItem"){let b=y.safeParse(l.item);if(!b.success)return{ok:!1,code:"ITEM_INVALID",errors:qe(b.error)}}return{ok:!0}}if(a==="updateBlock"){let s=i?.(l.blockId),y=s?o.getContentSchema(s):void 0;if(!y)return{ok:!0};if(y instanceof ho.z.ZodObject){let g=y.deepPartial().safeParse(l.updates);if(!g.success)return{ok:!1,code:"CONTENT_INVALID",errors:qe(g.error)}}return{ok:!0}}return{ok:!0}}}var tn=new Set(["position","size","rotation","zIndex","z"]);function ue(o){return o===null||typeof o!="object"?JSON.stringify(o)??"null":Array.isArray(o)?"["+o.map(ue).join(",")+"]":"{"+Object.keys(o).sort().map(n=>JSON.stringify(n)+":"+ue(o[n])).join(",")+"}"}function uo(o,i){let n=i??{};switch(o){case"updateBlock":case"updateBlockTheme":case"updateBlockElementStyle":case"deleteBlock":case"duplicateBlock":case"removeAction":return n.blockId?{kind:"block",blockId:n.blockId}:{kind:"untracked"};case"updateItem":case"deleteItem":return n.blockId&&n.collection&&n.itemId?{kind:"item",blockId:n.blockId,collection:n.collection,itemId:n.itemId}:{kind:"untracked"};default:return{kind:"untracked"}}}function on(o,i){if(Array.isArray(o))for(let n of o){let c=n?.blocks?.find?.(a=>a&&a.id===i);if(c)return c}}function fo(o,i){if(i.kind==="untracked")return null;let n=i.blockId?on(o,i.blockId):void 0;if(!n)return null;if(i.kind==="block"){let l={};for(let s of Object.keys(n))tn.has(s)||(l[s]=n[s]);return ue(l)}let c=n[i.collection];if(!Array.isArray(c))return null;let a=c.find(l=>l&&l.id===i.itemId);return a?ue(a):null}function rn(o,i){return o==null?"apply":i==null?"missing":o===i?"apply":"stale"}function nn(o,i,n){let c=uo(o,i);return{target:c,baseSignature:fo(n,c)}}var yo=require("zod"),R=["Quiz","Editor","Hotpoint","Embed","Media","DragAndDrop","Anagram","Dice","Crossword","WordSearch","Puzzle","Memory","Flashcard","SpinningWheel","Chart","MatchPairs","Shape","Arrow","Cloze","CardDeck"],$e=yo.z.enum(R);var d=require("zod"),Ye=d.z.object({x:d.z.number(),y:d.z.number(),z:d.z.number().optional()}),K=d.z.object({width:d.z.number().optional(),height:d.z.number().optional()}),E=d.z.object({rows:d.z.number(),cols:d.z.number()}),F=d.z.enum(["image","color","gif","shape","illustration","video","audio"]),ht=d.z.enum(["unsplash","pexels","upload","url","library","tenor"]),ut=d.z.object({x:d.z.number(),y:d.z.number(),width:d.z.number(),height:d.z.number(),zoom:d.z.number().optional(),rotation:d.z.number().optional(),aspect:d.z.number().optional()}),ft=d.z.object({autoplay:d.z.boolean().optional(),loop:d.z.boolean().optional(),muted:d.z.boolean().optional(),controls:d.z.boolean().optional(),poster:d.z.string().optional(),volume:d.z.number().optional()}),p=d.z.object({id:d.z.string().optional(),url:d.z.string().optional(),title:d.z.string().optional(),type:F.describe("Media type (image, color, gif, shape, illustration, video, audio)."),source:ht.optional(),alt:d.z.string().optional(),width:d.z.number().optional(),height:d.z.number().optional(),format:d.z.enum(["cover","contain"]).optional(),color:d.z.string().optional(),cropData:ut.optional(),duration:d.z.number().optional(),videoSettings:ft.optional()}),bo=p;var t=require("zod");var yt=t.z.object({type:t.z.union([t.z.enum(["none","fade","direction","bounce","scale","rotate"]),t.z.string()]),duration:t.z.number().optional(),delay:t.z.number().optional(),phase:t.z.enum(["in","both","out"]).optional(),direction:t.z.enum(["up","right","down","left"]).optional()}),Je=t.z.object({top:t.z.union([t.z.string(),t.z.number()]).optional(),right:t.z.union([t.z.string(),t.z.number()]).optional(),bottom:t.z.union([t.z.string(),t.z.number()]).optional(),left:t.z.union([t.z.string(),t.z.number()]).optional()}),bt=t.z.object({topLeft:t.z.union([t.z.string(),t.z.number()]).optional(),topRight:t.z.union([t.z.string(),t.z.number()]).optional(),bottomRight:t.z.union([t.z.string(),t.z.number()]).optional(),bottomLeft:t.z.union([t.z.string(),t.z.number()]).optional()}),h=t.z.object({background:t.z.boolean().optional(),backgroundColor:t.z.string().optional(),backgroundOpacity:t.z.number().optional(),backgroundMedia:p.optional(),border:t.z.boolean().optional(),borderColor:t.z.string().optional(),borderWidth:Je.optional(),borderRadius:bt.optional(),padding:t.z.union([t.z.string(),t.z.number(),Je]).optional()}),f=t.z.object({color:t.z.string().optional(),fontSize:t.z.number().optional(),fontFamily:t.z.string().optional(),fontStyle:t.z.string().optional(),fontWeight:t.z.union([t.z.string(),t.z.number()]).optional(),textAlign:t.z.enum(["left","center","right","justify"]).optional()}),O=h.merge(f),C=t.z.object({spacing:t.z.enum(["no-spacing","small","medium","large"]).optional(),animation:yt.optional(),styles:t.z.record(t.z.record(t.z.any())).optional()}),V=C.extend({styles:t.z.object({hotpoint:t.z.object({icon:t.z.string().optional(),iconPosition:t.z.enum(["left","right"]).optional(),iconSize:t.z.string().optional(),iconColor:t.z.string().optional(),image:p.optional(),imageFormat:t.z.enum(["circle","square","custom"]).optional(),border:t.z.boolean().optional(),borderColor:t.z.string().optional(),borderWidth:t.z.string().optional(),borderRadius:t.z.string().optional(),glow:t.z.boolean().optional(),glowColor:t.z.string().optional(),background:t.z.boolean().optional(),backgroundColor:t.z.string().optional(),fontSize:t.z.number().optional(),fontFamily:t.z.string().optional(),fontStyle:t.z.string().optional(),textColor:t.z.string().optional()}).optional()}).optional()}),H=C.extend({layout:t.z.enum(["horizontal","vertical","grid"]),gridColumns:t.z.number().optional(),preset:t.z.enum(["default","modern","trivia","custom"]),styles:t.z.object({general:O,question:O,answers:O.extend({customStyles:t.z.array(t.z.object({color:t.z.string().optional(),backgroundColor:t.z.string().optional(),targets:t.z.string().optional()})).optional(),hover:O.optional()}),button:O.extend({variant:t.z.enum(["default","outline","ghost"]).optional(),hover:O.optional()})}).optional()}),q=C.extend({layoutPosition:t.z.enum(["left","right","top","bottom"]).optional(),splitRatio:t.z.number().optional(),gridColumns:t.z.number().optional(),gridGap:t.z.number().optional().describe("Gap in pixels between auto-laid items (list/grid)."),pool:t.z.object({x:t.z.number().optional(),y:t.z.number().optional(),width:t.z.number().optional(),height:t.z.number().optional()}).optional().describe("Movable/resizable frame for the list/grid item pool (sandbox px)."),styles:t.z.object({title:f.optional(),sandbox:h.optional(),item:O.optional(),group:h.optional(),container:h.extend({url:t.z.string().optional(),type:F.optional()}).optional(),groups:O.optional(),feedback:t.z.object({correct:t.z.string().optional(),incorrect:t.z.string().optional(),active:t.z.string().optional()}).optional(),referenceSize:t.z.object({width:t.z.number(),height:t.z.number()}).optional()}).optional()}),$=C.extend({styles:t.z.object({editor:h.optional()}).optional()}),Y=C.extend({styles:t.z.object({letter:h.optional(),letterText:f.optional(),slot:h.optional(),container:h.optional()}).optional()}),J=C.extend({styles:t.z.object({button:h.extend({hover:O.optional()}).optional(),buttonText:f.optional(),container:h.optional()}).optional()}),U=C.extend({primaryColor:t.z.string().optional(),layoutPosition:t.z.enum(["left","right","top","bottom"]).optional(),splitRatio:t.z.number().optional(),styles:t.z.object({text:f.optional(),cell:h.optional(),grid:h.optional(),clueContainer:h.optional(),clueText:f.optional(),clueTitle:f.optional()}).optional()}),Z=C.extend({layoutPosition:t.z.enum(["left","right","top","bottom"]).optional(),splitRatio:t.z.number().optional(),styles:t.z.object({wordSearch:t.z.object({primaryColor:t.z.string().optional(),highlightColor:t.z.string().optional(),fontSize:t.z.number().optional(),fontFamily:t.z.string().optional(),textColor:t.z.string().optional(),cellBackgroundColor:t.z.string().optional()}).optional(),text:f.optional(),cell:h.optional(),grid:h.optional(),wordListContainer:h.optional(),wordListText:f.optional(),wordListTitle:f.optional()}).optional()}),X=C.extend({styles:t.z.object({text:f.optional(),container:h.optional(),infoContainer:h.optional(),infoText:f.optional(),card:h.optional()}).optional()}),ee=C.extend({styles:t.z.object({wheelText:f.optional()}).optional()}),te=C.extend({layoutPosition:t.z.enum(["left","right","top","bottom"]).optional(),styles:t.z.object({text:f.optional(),container:h.optional(),wordBank:h.optional(),word:h.optional(),blank:h.optional()}).optional()}),oe=C.extend({styles:t.z.object({card:h.optional(),cardText:f.optional(),container:h.optional()}).optional()}),re=C.extend({styles:t.z.object({cardFront:h.optional(),cardBack:h.optional(),frontText:f.optional(),backText:f.optional(),navigation:h.optional(),navigationText:f.optional()}).optional()}),ne=C.extend({layoutPosition:t.z.enum(["left","right","top","bottom"]).optional(),styles:t.z.object({text:f.optional(),card:h.optional(),container:h.optional()}).optional()}),ie=C.extend({styles:t.z.object({shape:O.extend({fillColor:t.z.string().optional(),textColor:t.z.string().optional(),borderStyle:t.z.enum(["solid","dashed","dotted"]).optional(),padding:t.z.number().optional()}).optional()}).optional()});var fe={quiz:{title:["question"],answers:["answers"],button:["button"],general:["general"]},poll:{title:["question"],answers:["answers"],button:["button"],general:["general"]},flashcard:{title:["frontText","backText"],answers:["cardFront","cardBack"],general:["cardFront","cardBack"]},memory:{title:["text"],answers:["card"],general:["container"]},matchpairs:{title:["text"],answers:["card"],general:["container"]},cloze:{title:["text"],answers:["word","blank"],general:["container"]},carddeck:{title:["cardText"],answers:["card"],general:["container"]},anagram:{title:["letterText"],answers:["letter","slot"],general:["container"]},dice:{title:["buttonText"],answers:["button"],button:["button"],general:["container"]},crossword:{title:["clueTitle","text"],answers:["cell"],general:["grid"]},wordsearch:{title:["wordListTitle","text"],answers:["cell"],general:["grid"]},spinningwheel:{title:["wheelText"],answers:["wheelText"],general:["wheelText"]},shape:{title:["shape"],answers:["shape"],general:["shape"]},hotpoint:{title:["hotpoint"],answers:["hotpoint"],general:["hotpoint"]},editor:{title:["editor"],answers:["editor"],general:["editor"]},draganddrop:{title:["title"],answers:["item"],general:["container"]}};function go(o){let i=fe[o.toLowerCase()];if(!i)return[];let n=new Set;for(let c of Object.values(i))for(let a of c??[])n.add(a);return[...n]}var gt={quiz:["general","question","answers","button"],poll:["general","question","answers","button"],flashcard:["cardFront","cardBack","frontText","backText","navigation","navigationText"],memory:["container","card","text","infoContainer","infoText"],matchpairs:["container","card","text"],cloze:["container","text","wordBank","word","blank"],carddeck:["container","card","cardText"],anagram:["container","letter","letterText","slot"],dice:["container","button","buttonText"],crossword:["grid","cell","text","clueContainer","clueTitle","clueText"],wordsearch:["grid","cell","text","wordListContainer","wordListTitle","wordListText"],spinningwheel:["wheelText"],shape:["shape"],editor:["editor"],hotpoint:["hotpoint"],draganddrop:["container","title","sandbox","groups","item","group"]},St=new Set(["chart","media","image","puzzle"]);function So(o){if(!o)return"";let i=o.toLowerCase();if(St.has(i))return`
|
|
2
|
+
[STYLE TARGETS] Il blocco "${o}" non ha sotto-elementi tematizzabili: NON puoi cambiarne colori/bordi via update_block_theme. Puoi solo cambiare lo sfondo della SCENA \u2014 sii onesto col l'utente.`;let n=gt[i];if(!n||n.length===0)return"";let c=fe[i]??{},a=["general","title","answers","button"].filter(l=>c[l]).map(l=>`${l}\u2192${c[l].join("/")}`).join(", ");return`
|
|
3
|
+
[STYLE TARGETS for ${o}] Logical targets (update_block_theme): ${a}. Real sub-element keys (update_block_style 'target'): ${n.join(", ")}.`}function Ue(o,i){if(!o)return o;let n={...o};for(let[y,b]of Object.entries(n))if(b&&typeof b=="object"){let g={...b},S=!1;g.backgroundColor!==void 0&&g.background===void 0&&(g.background=!0,S=!0),g.borderColor!==void 0&&g.border===void 0&&(g.border=!0,S=!0),S&&(n[y]=g)}if(!i)return n;let c=fe[i.toLowerCase()];if(!c)return n;let a=(y,b)=>{b&&(n[y]={...n[y]||{},...b})},l=["title","answers","button","general"],s={title:n.title,answers:n.answers,button:n.button??n.buttons,general:n.general};for(let y of l){let b=s[y],g=c[y];if(b&&g)for(let S of g)a(S,b)}return n}function ko(o,i,n){if(!o){let s={...i};return s.styles&&(s.styles=Ue(s.styles,n)),s}if(!i)return o;let c={...o,...i},a=Ue(i.styles,n),l=o.styles||{};if(o.styles||a){c.styles={...l,...a};for(let s of Object.keys(c.styles))l[s]&&a?.[s]&&(c.styles[s]={...l[s],...a[s]})}return c}var m=require("zod"),Xe=m.z.enum(["quiz_submit","timer_complete","click","scored","keypress","variable","custom","item_dropped","item_removed","group_filled","media_ended"]),kt=m.z.enum(["equals","not_equals","greater_than","less_than","greater_than_or_equal","less_than_or_equal","contains"]),xo=m.z.enum(["all_correct","incorrect","all_wrong","score_perfect","score_above_75","score_above_50","failed"]),Bo=m.z.enum(["completed","half_way"]),To=m.z.enum(["single_click","double_click"]),Co=m.z.literal("key_pressed"),Ze=m.z.object({event:Xe.optional(),variableName:m.z.string().optional(),operator:kt.optional(),value:m.z.any()}),xt=m.z.enum(["set","add","subtract","multiply","divide"]),Bt=m.z.enum(["navigate","modal","audio","reveal","hide","toggle_visibility","link","refresh","complete","set_variable","math_variable","move"]),Tt=m.z.object({name:m.z.string(),value:m.z.union([m.z.number(),m.z.string(),m.z.boolean()]),operation:xt.optional()}),et=m.z.object({id:m.z.string(),type:Bt,condition:Ze.optional(),conditions:m.z.array(Ze).optional(),conditionsOperator:m.z.enum(["and","or"]).optional(),modalContent:m.z.string().optional(),audioUrl:m.z.string().optional(),linkUrl:m.z.string().optional(),targetSceneId:m.z.string().optional(),targetBlockId:m.z.string().optional(),direction:m.z.enum(["up","down","left","right"]).optional(),distance:m.z.number().optional(),variable:Tt.optional()}),zo=m.z.object({name:m.z.string(),defaultValue:m.z.union([m.z.string(),m.z.number(),m.z.boolean()])}),wo=m.z.object({type:Xe,blockId:m.z.string(),data:m.z.record(m.z.any()).optional()});var k=require("zod");var Ao=k.z.enum(["single-choice","multiple-choice","true-false","short-answers","long-answers"]),N=k.z.enum(["left","right","center"]),Q=k.z.object({width:k.z.number().optional(),height:k.z.number().optional()}),Ct=k.z.object({id:k.z.string(),text:k.z.string().describe("The option's answer text."),isCorrect:k.z.boolean().describe("Whether this option is a correct answer."),image:p.optional().describe("Option image."),imageAlign:N.optional().describe("Option image alignment."),imageSize:Q.optional().describe("Option image size.")}),zt={id:k.z.string(),text:k.z.string().describe("The question text."),score:k.z.number().optional(),image:p.optional().describe("Question image."),imageAlign:N.optional().describe("Question image alignment."),imageSize:Q.optional().describe("Question image size.")},wt=k.z.object({...zt,type:k.z.enum(["single-choice","multiple-choice"]),options:k.z.array(Ct).describe("Answer options for this choice question.")}),At=k.z.object({...zt,type:k.z.literal("true-false"),correctAnswer:k.z.boolean().describe("The correct answer (true or false).")}),Dt=k.z.object({...zt,type:k.z.enum(["short-answers","long-answers"]),minCharacters:k.z.number().optional().describe("Minimum number of characters required in the answer."),maxCharacters:k.z.number().optional().describe("Maximum number of characters allowed in the answer.")}),ae=k.z.discriminatedUnion("type",[wt,At,Dt]);var e=require("zod");var M=require("zod");var ye=M.z.enum(["scattered","rotated","scattered_rotated"]),It=M.z.enum(["swap","slide"]),Do=M.z.object({image:M.z.union([M.z.string(),p]).optional().describe("Image URL or MediaItem for puzzle."),pieces:M.z.number().int().optional().describe("Number of pieces (e.g. 9, 16, 25)."),gameMode:ye.optional(),puzzleType:It.optional(),showNumbers:M.z.union([M.z.boolean(),M.z.string()]).optional().describe("Show helper numbers on puzzle pieces."),seed:M.z.string().optional().describe("Deterministic seed for piece placement.")});var jt=e.z.enum(["2D","360\xB0"]),ce={id:e.z.string(),type:$e,title:e.z.string(),showTitle:e.z.boolean().optional(),locked:e.z.boolean().optional(),groupId:e.z.string().optional(),position:Ye.optional(),rotation:e.z.number(),hidden:e.z.boolean().optional(),draggable:e.z.boolean().optional(),size:K.optional(),minSize:K.optional(),maxSize:K.optional(),theme:C.optional()},z={...ce,actions:e.z.array(et).optional(),score:e.z.number().optional()},rt=Object.freeze(Object.keys(ce)),Io=e.z.object(z),Mt=e.z.object({id:e.z.string(),text:e.z.string(),background:p.optional().describe("Background image/color for item."),opacity:e.z.number().optional().describe("Opacity of the item (0-1)."),x:e.z.number().optional().describe("Manual x position in pixels (sandbox space, origin top-left; sandbox size = block.size)."),y:e.z.number().optional().describe("Manual y position in pixels (sandbox space, origin top-left)."),width:e.z.number().optional().describe("Manual width in pixels."),height:e.z.number().optional().describe("Manual height in pixels."),styles:h.optional().describe("Box custom styling styles."),textStyles:f.optional().describe("Text custom styling styles.")}),be=e.z.object({id:e.z.string(),name:e.z.string().describe("Group/dropzone name."),background:p.optional().describe("Background image/color for group."),x:e.z.number().optional().describe("Manual x position in pixels (sandbox space, origin top-left; sandbox size = block.size)."),y:e.z.number().optional().describe("Manual y position in pixels (sandbox space, origin top-left)."),width:e.z.number().optional().describe("Manual width in pixels."),height:e.z.number().optional().describe("Manual height in pixels."),singleItem:e.z.boolean().optional().describe("Accept only one item inside."),opacity:e.z.number().optional().describe("Opacity of the group (0-1)."),styles:h.optional().describe("Box custom styling styles."),textStyles:f.optional().describe("Text custom styling styles."),items:e.z.array(Mt).describe("Items that belong in this group.")}),vt=e.z.enum(["d4","d6","d8","d10","d12","d20"]),Ot=e.z.object({char:e.z.string(),isBlack:e.z.boolean(),number:e.z.number().optional(),row:e.z.number(),col:e.z.number()}),Pt=e.z.object({answer:e.z.string(),clue:e.z.string(),image:p.optional(),startx:e.z.number(),starty:e.z.number(),orientation:e.z.enum(["across","down","none"]),position:e.z.number()}),Et=e.z.object({grid:e.z.array(e.z.array(Ot)),rows:e.z.number(),cols:e.z.number(),words:e.z.array(Pt)}),Lt=e.z.object({grid:e.z.array(e.z.array(e.z.string())),placedWords:e.z.array(e.z.object({word:e.z.string(),clean:e.z.string(),path:e.z.array(e.z.object({x:e.z.number(),y:e.z.number()}))}))}),ge=e.z.object({id:e.z.string(),type:e.z.enum(["img-img","img-word","word-word"]).describe("Pair type."),content:e.z.tuple([e.z.string(),e.z.string()]).describe("Pair content [item1, item2].")}),Se=e.z.object({id:e.z.string(),text:e.z.string(),color:e.z.string().optional().describe("CSS color for the slice."),image:p.optional().describe("Slice image.")}),tt=e.z.object({type:e.z.enum(["text","image"]).describe("Content type: text or image."),content:e.z.any().describe("The content value: a string for text, or a MediaItem for image.")}),ke=e.z.object({id:e.z.string(),front:tt.describe("Front side."),back:tt.describe("Back side.")}),xe=e.z.object({id:e.z.string(),frontImage:p.optional().describe("Front image."),frontText:e.z.string().optional().describe("Front text.")}),Be=e.z.object({id:e.z.string(),leftLabel:e.z.string().describe("Left side text."),rightLabel:e.z.string().describe("Right side text."),leftImage:e.z.any().optional().describe("Left side image."),rightImage:e.z.any().optional().describe("Right side image.")}),Rt=e.z.enum(["rectangle","rounded-rectangle","circle","triangle","triangle-inverted","pentagon","hexagon","heptagon","octagon","decagon","star","star-4","star-5","star-6","star-8","star-12","star-24","arrow-block-right","arrow-block-left","arrow-block-up","arrow-block-down","arrow-block-left-right","flow-process","flow-decision","flow-data","flow-document","flow-start-stop","callout-rect","callout-round","callout-cloud","cloud","heart","banner","tear","gear","asterisk"]),ot=e.z.enum(["none","arrow","circle","square"]),_t=e.z.object({id:e.z.string(),text:e.z.string().describe("Label text."),t:e.z.number().describe("Position along the arrow path, from 0 (start) to 1 (end)."),offsetX:e.z.number().optional().describe("Pixel offset from the arrow path on the x axis."),offsetY:e.z.number().optional().describe("Pixel offset from the arrow path on the y axis."),fontSize:e.z.number().optional().describe("Label font size."),color:e.z.string().optional().describe("Label text color."),backgroundColor:e.z.string().optional().describe("Label background color.")}),Te=e.z.object({...z,type:e.z.literal("Quiz"),questions:e.z.array(ae).optional().describe("Array of question objects."),previewIndex:e.z.number().optional().describe("Index of the question currently previewed in the editor."),required:e.z.boolean().optional().describe("Whether answering this quiz is required to proceed."),showResults:e.z.boolean().optional().describe("Show correct/incorrect feedback after submitting."),allowRetry:e.z.boolean().optional().describe("Allow the learner to retry the quiz."),maxRetry:e.z.string().optional().describe("Maximum number of retry attempts allowed."),submitText:e.z.string().optional().describe("Label for submit button."),timer:e.z.string().optional().describe("Timer duration in seconds as a string."),showQuestionCount:e.z.boolean().optional().describe("Show current/total questions count."),theme:H}),Ce=e.z.object({...z,type:e.z.literal("Hotpoint"),showIcon:e.z.boolean().optional().describe("Show an icon marker on the hotpoint."),element:e.z.enum(["image","button"]).describe("Underlying element type for the hotpoint."),theme:V.optional()}),ze=e.z.object({...z,type:e.z.literal("Editor"),content:e.z.any().optional().describe("Rich-text editor content (Plate.js JSON document)."),readonly:e.z.boolean().optional().describe("Make the editor content read-only during play."),theme:$.optional()}),we=e.z.object({...ce,type:e.z.literal("Media"),media:p.optional().describe("Media asset displayed by this block.")}),Ae=e.z.object({...ce,type:e.z.literal("Embed"),url:e.z.string().optional().describe("Embed content URL."),readOnly:e.z.boolean().optional().describe("Prevent interaction with the embedded content.")}),De=e.z.object({...z,type:e.z.literal("DragAndDrop"),groups:e.z.array(be).describe("Drag-and-drop groups."),theme:q.optional(),showResults:e.z.boolean().optional().describe("Show result feedback immediately."),layout:e.z.enum(["manual","split"]).optional().describe("Layout mode: manual placements or split areas."),itemArrangement:e.z.enum(["random","list","grid"]).optional().describe("Initial item arrangement inside the sandbox."),groupBackground:p.optional().describe("Shared background image/color for all groups."),enableWrongAnswers:e.z.boolean().optional().describe("Allow placing items in incorrect groups."),itemBackground:p.optional().describe("Shared background image/color for all items."),groupBackgroundOpacity:e.z.number().optional().describe("Shared group background opacity (0-1)."),itemBackgroundOpacity:e.z.number().optional().describe("Shared item background opacity (0-1)."),splitRatio:e.z.number().optional().describe("Proportion ratio for split layout.")}),Ie=e.z.object({...z,type:e.z.literal("Anagram"),letters:e.z.array(e.z.string()).describe("Letters to unscramble (shuffled tiles the learner rearranges)."),correctWord:e.z.string().describe("The correct word."),theme:Y.optional(),clue:e.z.string().optional().describe("A hint."),allowRetry:e.z.boolean().optional().describe("Allow the learner to retry after an incorrect answer."),maxRetry:e.z.string().optional().describe("Maximum number of retry attempts allowed.")}),je=e.z.object({...z,type:e.z.literal("Dice"),rollHistory:e.z.array(e.z.number()).optional().describe("History of previous roll results."),diceType:vt.optional().describe("Type of die (number of faces)."),faceOverrides:e.z.any().optional().describe("Custom overrides for individual die faces."),color:e.z.string().optional().describe("CSS color for dice."),showNumber:e.z.boolean().optional().describe("Show the numeric value on the die face."),diceCount:e.z.number().optional().describe("Number of dice to roll together."),dicePool:e.z.record(e.z.number()).optional().describe("Named pool of dice configurations."),persistent:e.z.boolean().optional().describe("Keep dice visible after roll."),theme:J.optional()}),Me=e.z.object({...z,type:e.z.literal("Puzzle"),image:p.optional().describe("Image URL or MediaItem for puzzle."),pieces:e.z.number().optional().describe("Number of pieces (e.g. 9, 16, 25)."),gameMode:ye.optional().describe("Arrangement mode for scattered puzzle pieces (scattered, rotated, or both)."),puzzleType:e.z.enum(["swap","slide"]).optional().describe("Puzzle interaction type: swap adjacent pieces or slide into an empty space."),showNumbers:e.z.union([e.z.boolean(),e.z.string()]).optional().describe("Show helper numbers on puzzle pieces."),seed:e.z.string().optional().describe("Deterministic seed for piece placement.")}),se=e.z.object({...z,type:e.z.literal("Crossword"),words:e.z.array(e.z.object({answer:e.z.string().describe("The answer for this clue."),clue:e.z.string().describe("The clue text shown to the learner."),image:p.optional().describe("Clue image.")})).optional(),layout:Et.optional(),theme:U.optional()}),Wt=e.z.enum(["easy","medium","hard"]),le=e.z.object({...z,type:e.z.literal("WordSearch"),words:e.z.array(e.z.string()).optional().describe("List of words to hide in the grid."),gridSize:E.optional().describe("Grid dimensions."),difficulty:Wt.optional().describe("Difficulty level, affecting word placement and grid noise."),data:Lt.optional(),theme:Z.optional()}),ve=e.z.object({...z,type:e.z.literal("Memory"),pairs:e.z.array(ge).describe("Array of pair objects."),gridSize:E.optional().describe("Grid dimensions."),hideScore:e.z.boolean().optional().describe("Hide the score display during play."),theme:X.optional()}),Oe=e.z.object({...z,type:e.z.literal("Flashcard"),cards:e.z.array(ke).describe("Array of card objects."),theme:re.optional()}),Pe=e.z.object({...z,type:e.z.literal("SpinningWheel"),slices:e.z.array(Se).describe("Wheel slices (min 2)."),spinDuration:e.z.number().optional().describe("Spin duration in seconds."),theme:ee.optional()}),Ee=e.z.object({...z,type:e.z.literal("Chart"),chartType:e.z.enum(["line","bar","pie","doughnut","radar","area","scatter"]).describe("Chart visualization type."),chartData:e.z.array(e.z.any()).describe("Data array, e.g. [{name:'A', value:10}]."),chartConfig:e.z.object({colors:e.z.array(e.z.string()).optional().describe("Custom color palette for chart series."),xAxisLabel:e.z.string().optional().describe("Label for the X axis."),yAxisLabel:e.z.string().optional().describe("Label for the Y axis."),showLegend:e.z.boolean().optional().describe("Show the chart legend."),showTooltip:e.z.boolean().optional().describe("Show tooltips on hover."),stacked:e.z.boolean().optional().describe("Stack series values instead of grouping them."),seriesNames:e.z.record(e.z.string()).optional().describe("Dictionary mapping series keys to custom labels.")})}),Le=e.z.object({...z,type:e.z.literal("MatchPairs"),instructions:e.z.string().optional().describe("Instruction text."),pairs:e.z.array(Be).describe("Array of pair objects."),theme:ne.optional()}),Re=e.z.object({...z,type:e.z.literal("Cloze"),templateText:e.z.string().optional().describe('Template text with blanks in [brackets]. E.g. "The capital of Italy is [Rome]."'),theme:te.optional(),mode:e.z.enum(["write","drag-drop"]).optional().describe("Input mode. Default: write.")}),_e=e.z.object({...z,type:e.z.literal("CardDeck"),cards:e.z.array(xe).describe("Array of card objects."),backImage:p.optional().describe("Shared back image for all cards."),discardLogic:e.z.enum(["delete","return"]).describe("What happens to a card after it's used: delete it or return it to the deck."),theme:oe.optional()}),We=e.z.object({...ce,type:e.z.literal("Shape"),shapeType:Rt.optional().describe("Shape outline to render."),text:e.z.string().optional().describe("Text inside shape."),theme:ie.optional()}),Fe=e.z.object({...ce,type:e.z.literal("Arrow"),startBlockId:e.z.string().describe("ID of the block this arrow starts from."),endBlockId:e.z.string().optional().describe("ID of the block this arrow ends at, if connected to a block."),endPos:e.z.object({x:e.z.number(),y:e.z.number()}).optional().describe("Free-floating end point coordinates, used when not connected to a block."),startHandle:e.z.enum(["top","right","bottom","left"]).describe("Anchor side on the start block."),endHandle:e.z.enum(["top","right","bottom","left"]).optional().describe("Anchor side on the end block."),connectionType:e.z.enum(["straight","orthogonal","curved"]).describe("Line routing style."),strokeColor:e.z.string().optional().describe("Line color."),strokeWidth:e.z.number().optional().describe("Line thickness in pixels."),strokeStyle:e.z.enum(["solid","dashed","dotted"]).optional().describe("Line dash style."),showHead:e.z.boolean().optional().describe("Show arrowheads on the line."),startHead:ot.optional().describe("Arrowhead style at the start."),endHead:ot.optional().describe("Arrowhead style at the end."),bendOffsetX:e.z.number().optional().describe("Manual bend offset on the x axis, for curved/orthogonal routing."),bendOffsetY:e.z.number().optional().describe("Manual bend offset on the y axis, for curved/orthogonal routing."),segmentCount:e.z.number().optional().describe("Number of segments for orthogonal routing."),bendOffsets:e.z.array(e.z.number()).optional().describe("Per-segment bend offsets for orthogonal routing."),labels:e.z.array(_t).optional().describe("Text labels placed along the arrow.")}),nt=e.z.discriminatedUnion("type",[Te,Ce,ze,Ae,we,De,Ie,je,Me,se,le,ve,Oe,Pe,Ee,Le,We,Fe,Re,_e]),Ft=e.z.object({id:e.z.string(),name:e.z.string(),locked:e.z.boolean().optional()}),Nt=e.z.object({id:e.z.string(),title:e.z.string(),type:jt,background:e.z.union([e.z.string(),e.z.array(e.z.string()),p]).optional(),backgroundColor:e.z.string().optional(),backgroundAutoplay:e.z.boolean().optional(),backgroundLoop:e.z.boolean().optional(),secretCode:e.z.string().optional(),hidden:e.z.boolean().optional(),blocks:e.z.array(nt),groups:e.z.array(Ft).optional(),canvas:e.z.object({width:e.z.number().optional(),height:e.z.number().optional(),preset:e.z.enum(["landscape","mobile","infographics","square","custom"]).optional()}).optional()}),jo=e.z.object({id:e.z.string(),title:e.z.string(),schemaVersion:e.z.number().optional(),hasTimer:e.z.boolean(),timer:e.z.string().optional(),allowNavigation:e.z.boolean(),scenes:e.z.array(Nt),variables:e.z.array(e.z.object({name:e.z.string(),defaultValue:e.z.union([e.z.string(),e.z.number(),e.z.boolean()])})).optional(),audio:e.z.array(e.z.object({id:e.z.string(),media:p.optional(),scenes:e.z.string().optional(),autoplay:e.z.boolean().optional(),loop:e.z.boolean().optional()})).optional()}),Mo=e.z.object({id:e.z.string(),type:e.z.literal("BLOCK"),sceneId:e.z.string(),blockData:nt});var w=require("zod"),Qt=w.z.object({id:w.z.string(),type:w.z.string(),title:w.z.string()}),Gt=w.z.object({id:w.z.string(),title:w.z.string(),position:w.z.number(),blocks:w.z.array(Qt).default([])}),vo=w.z.object({activity:w.z.object({id:w.z.string(),title:w.z.string(),scenes:w.z.array(Gt).default([])}),activeSceneId:w.z.string().nullable().optional()});var B=require("zod");var Kt=B.z.enum(["single-choice","multiple-choice","true-false","short-answers","long-answers"]),Vt=B.z.object({id:B.z.string().optional(),text:B.z.string(),isCorrect:B.z.boolean(),image:p.optional().describe("Option image."),imageAlign:N.optional().describe("Option image alignment."),imageSize:Q.optional().describe("Option image size.")}),Ht=B.z.object({id:B.z.string().optional().describe("Question ID. Auto-generated if omitted."),type:Kt,text:B.z.string().describe("The question text."),score:B.z.number().optional(),options:B.z.array(Vt).optional().describe("Required for single-choice and multiple-choice."),correctAnswer:B.z.boolean().optional().describe("Required for true-false."),image:p.optional().describe("Question image."),imageAlign:N.optional().describe("Question image alignment."),imageSize:Q.optional().describe("Question image size.")}),Oo=B.z.object({questions:B.z.array(Ht).describe("Array of question objects."),showResults:B.z.boolean().optional(),allowRetry:B.z.boolean().optional(),maxRetry:B.z.string().optional(),required:B.z.boolean().optional(),submitText:B.z.string().optional().describe("Label for submit button."),timer:B.z.string().optional().describe("Timer duration in seconds as a string."),showQuestionCount:B.z.boolean().optional().describe("Show current/total questions count.")});var it=require("zod"),qt=it.z.enum(["write","drag-drop"]),Po=it.z.object({templateText:it.z.string().describe('Template text with blanks in [brackets]. E.g. "The capital of Italy is [Rome]."'),mode:qt.optional().describe("Input mode. Default: write.")});var A=require("zod");var Eo=A.z.enum(["Crossword","WordSearch","Anagram"]),$t=A.z.object({answer:A.z.string(),clue:A.z.string(),image:p.optional().describe("Clue image.")}),Lo=A.z.object({words:A.z.array($t)}),Ro=A.z.object({words:A.z.array(A.z.string()),gridSize:E.optional().describe("Grid dimensions."),difficulty:A.z.enum(["easy","medium","hard"]).optional()}),_o=A.z.object({correctWord:A.z.string().describe("The correct word."),letters:A.z.array(A.z.string()).optional(),clue:A.z.string().optional().describe("A hint.")});var j=require("zod");var Wo=j.z.enum(["Memory","MatchPairs"]),Yt=j.z.enum(["img-img","img-word","word-word"]),Jt=j.z.object({id:j.z.string().optional(),type:Yt.optional().describe("For Memory: pair type."),content:j.z.array(j.z.string()).optional().describe("For Memory: [item1, item2]."),leftLabel:j.z.string().optional().describe("For MatchPairs: left side text."),rightLabel:j.z.string().optional().describe("For MatchPairs: right side text."),leftImage:p.optional().describe("For MatchPairs: left side image."),rightImage:p.optional().describe("For MatchPairs: right side image.")}),Fo=j.z.object({pairs:j.z.array(Jt).describe("Array of pair objects."),gridSize:E.optional().describe("For Memory: grid dimensions."),instructions:j.z.string().optional().describe("For MatchPairs: instruction text.")});var I=require("zod"),No=I.z.enum(["Flashcard","CardDeck"]),at=I.z.object({type:I.z.enum(["text","image"]),content:I.z.any()}),Ut=I.z.object({id:I.z.string().optional(),front:at.optional().describe("For Flashcard: front side."),back:at.optional().describe("For Flashcard: back side."),frontText:I.z.string().optional().describe("For CardDeck: front text."),frontImage:I.z.any().optional().describe("For CardDeck: front image.")}),Qo=I.z.object({cards:I.z.array(Ut).describe("Array of card objects."),backImage:I.z.any().optional().describe("For CardDeck: shared back image."),discardLogic:I.z.enum(["delete","return"]).optional().describe("For CardDeck.")});var G=require("zod"),Zt=G.z.enum(["d4","d6","d8","d10","d12","d20"]),Go=G.z.object({diceType:Zt.optional(),diceCount:G.z.number().int().min(1).max(10).optional(),color:G.z.string().optional().describe("CSS color for dice."),showNumber:G.z.boolean().optional(),persistent:G.z.boolean().optional().describe("Keep dice visible after roll.")});var _=require("zod");var Xt=_.z.object({id:_.z.string().optional(),text:_.z.string(),color:_.z.string().optional().describe("CSS color for slice."),image:p.optional().describe("Slice image.")}),Ko=_.z.object({slices:_.z.array(Xt).min(2).describe("Wheel slices (min 2)."),spinDuration:_.z.number().optional().describe("Spin duration in seconds.")});var u=require("zod");var eo=u.z.object({id:u.z.string().optional(),text:u.z.string(),background:p.optional().describe("Background image/color for item."),opacity:u.z.number().optional().describe("Opacity of the item (0-1)."),x:u.z.number().optional().describe("Manual x position in pixels (sandbox space, origin top-left; sandbox size = block.size)."),y:u.z.number().optional().describe("Manual y position in pixels (sandbox space, origin top-left)."),fx:u.z.number().optional().describe("Resize-invariant x as a fraction (0-1) of sandbox width. Preferred over x when present."),fy:u.z.number().optional().describe("Resize-invariant y as a fraction (0-1) of sandbox height. Preferred over y when present."),width:u.z.number().optional().describe("Manual width in pixels."),height:u.z.number().optional().describe("Manual height in pixels."),styles:h.optional().describe("Box custom styling styles."),textStyles:f.optional().describe("Text custom styling styles.")}),to=u.z.object({id:u.z.string().optional(),name:u.z.string().describe("Group/dropzone name."),singleItem:u.z.boolean().optional().describe("Accept only one item inside."),background:p.optional().describe("Background image/color for group."),x:u.z.number().optional().describe("Manual x position in pixels (sandbox space, origin top-left; sandbox size = block.size)."),y:u.z.number().optional().describe("Manual y position in pixels (sandbox space, origin top-left)."),fx:u.z.number().optional().describe("Resize-invariant x as a fraction (0-1) of sandbox width. Preferred over x when present."),fy:u.z.number().optional().describe("Resize-invariant y as a fraction (0-1) of sandbox height. Preferred over y when present."),width:u.z.number().optional().describe("Manual width in pixels."),height:u.z.number().optional().describe("Manual height in pixels."),opacity:u.z.number().optional().describe("Opacity of the group (0-1)."),styles:h.optional().describe("Box custom styling styles."),textStyles:f.optional().describe("Text custom styling styles."),items:u.z.array(eo).describe("Items that belong in this group.")}),Vo=u.z.object({groups:u.z.array(to).min(1).describe("Drag-and-drop groups."),layout:u.z.enum(["manual","split"]).optional().describe("Layout mode: manual placements or split areas."),itemArrangement:u.z.enum(["random","list","grid"]).optional().describe("Initial item arrangement inside sandbox."),showResults:u.z.boolean().optional().describe("Show result feedback immediately."),requireSubmit:u.z.boolean().optional().describe("Require an explicit 'Check' button to grade instead of auto-grading when all items are placed."),enableWrongAnswers:u.z.boolean().optional().describe("Allow placing items in incorrect groups."),groupBackground:p.optional().describe("Shared background image/color for all groups."),itemBackground:p.optional().describe("Shared background image/color for all items."),groupBackgroundOpacity:u.z.number().optional().describe("Shared group background opacity (0-1)."),itemBackgroundOpacity:u.z.number().optional().describe("Shared item background opacity (0-1)."),splitRatio:u.z.number().optional().describe("Proportion ratio for split layout.")});var D=require("zod"),oo=D.z.enum(["line","bar","pie","doughnut","radar","area","scatter"]),ro=D.z.object({colors:D.z.array(D.z.string()).optional(),xAxisLabel:D.z.string().optional(),yAxisLabel:D.z.string().optional(),showLegend:D.z.boolean().optional(),showTooltip:D.z.boolean().optional(),stacked:D.z.boolean().optional(),seriesNames:D.z.record(D.z.string()).optional().describe("Dictionary mapping series keys to custom labels.")}),Ho=D.z.object({chartType:oo.optional(),chartData:D.z.array(D.z.record(D.z.any())).optional().describe("Data array, e.g. [{name:'A', value:10}]."),chartConfig:ro.optional()});var Ne=require("zod");var qo=Ne.z.object({content:Ne.z.any().optional().describe("For Editor: Plate JSON content array."),url:Ne.z.string().optional().describe("For Media or Embed: content URL."),text:Ne.z.string().optional().describe("For Shape: text inside shape."),mediaType:F.optional().describe("For Media: media type.")});var yr=jr(require("zod-to-json-schema"));function x(o){return o}var $o={type:"Quiz",contentSchema:Te,themeSchema:H,defaultContent:{id:"",type:"Quiz",title:"Quiz",rotation:0,size:{width:300,height:200},questions:[],theme:{layout:"vertical",preset:"default"}},capabilities:{hasActions:!0,hasScore:!0,collections:{questions:ae},styleTargets:{title:["question"],answers:["answers"],button:["button"],general:["general"]},vrMode:"interactive",analytics:{scorable:!0}},version:1};var Yo={type:"Editor",contentSchema:ze,themeSchema:$,defaultContent:{id:"",type:"Editor",title:"Editor",rotation:0,size:{width:100,height:50}},capabilities:{hasActions:!0,hasScore:!0,styleTargets:{title:["editor"],answers:["editor"],general:["editor"]},vrMode:"raster",analytics:{scorable:!1}},version:1};var Jo={type:"Hotpoint",contentSchema:Ce,themeSchema:V,defaultContent:{id:"",type:"Hotpoint",title:"Hotpoint",rotation:0,size:{width:50,height:50},element:"button"},capabilities:{hasActions:!0,hasScore:!0,styleTargets:{title:["hotpoint"],answers:["hotpoint"],general:["hotpoint"]},vrMode:"custom",analytics:{scorable:!1}},version:1};var Uo={type:"Embed",contentSchema:Ae,defaultContent:{id:"",type:"Embed",title:"Embed",rotation:0,size:{width:250,height:150}},capabilities:{hasActions:!1,hasScore:!1,styleTargets:void 0,vrMode:"interactive",analytics:{scorable:!1}},version:1};var Zo={type:"Media",contentSchema:we,defaultContent:{id:"",type:"Media",title:"Media",rotation:0,size:{width:100,height:100}},capabilities:{hasActions:!1,hasScore:!1,styleTargets:void 0,vrMode:"raster",analytics:{scorable:!1}},version:1};var Xo={type:"DragAndDrop",contentSchema:De,themeSchema:q,defaultContent:{id:"",type:"DragAndDrop",title:"DragAndDrop",rotation:0,size:{width:150,height:150},groups:[]},capabilities:{hasActions:!0,hasScore:!0,collections:{groups:be},styleTargets:{title:["title"],answers:["item"],general:["container"]},vrMode:"raster",analytics:{scorable:!0}},version:1};var er={type:"Anagram",contentSchema:Ie,themeSchema:Y,defaultContent:{id:"",type:"Anagram",title:"Anagram",rotation:0,size:{width:150,height:100},letters:[],correctWord:""},capabilities:{hasActions:!0,hasScore:!0,styleTargets:{title:["letterText"],answers:["letter","slot"],general:["container"]},vrMode:"interactive",analytics:{scorable:!0}},version:1};var tr={type:"Dice",contentSchema:je,themeSchema:J,defaultContent:{id:"",type:"Dice",title:"Dice",rotation:0,size:{width:100,height:100}},capabilities:{hasActions:!0,hasScore:!0,styleTargets:{title:["buttonText"],answers:["button"],button:["button"],general:["container"]},vrMode:"interactive",analytics:{scorable:!1}},version:1};var an=se.shape.words.unwrap().element,or={type:"Crossword",contentSchema:se,themeSchema:U,defaultContent:{id:"",type:"Crossword",title:"Crossword",rotation:0,size:{width:300,height:300}},capabilities:{hasActions:!0,hasScore:!0,collections:{words:an},styleTargets:{title:["clueTitle","text"],answers:["cell"],general:["grid"]},vrMode:"interactive",analytics:{scorable:!0}},version:1};var cn=le.shape.words.unwrap().element,rr={type:"WordSearch",contentSchema:le,themeSchema:Z,defaultContent:{id:"",type:"WordSearch",title:"WordSearch",rotation:0,size:{width:500,height:400}},capabilities:{hasActions:!0,hasScore:!0,collections:{words:cn},styleTargets:{title:["wordListTitle","text"],answers:["cell"],general:["grid"]},vrMode:"interactive",analytics:{scorable:!0}},version:1};var nr={type:"Puzzle",contentSchema:Me,defaultContent:{id:"",type:"Puzzle",title:"Puzzle",rotation:0,size:{width:250,height:250}},capabilities:{hasActions:!0,hasScore:!0,styleTargets:void 0,vrMode:"raster",analytics:{scorable:!0}},version:1};var ir={type:"Memory",contentSchema:ve,themeSchema:X,defaultContent:{id:"",type:"Memory",title:"Memory",rotation:0,size:{width:400,height:400},pairs:[]},capabilities:{hasActions:!0,hasScore:!0,collections:{pairs:ge},styleTargets:{title:["text"],answers:["card"],general:["container"]},vrMode:"interactive",analytics:{scorable:!0}},version:1};var ar={type:"Flashcard",contentSchema:Oe,themeSchema:re,defaultContent:{id:"",type:"Flashcard",title:"Flashcard",rotation:0,size:{width:400,height:300},cards:[]},capabilities:{hasActions:!0,hasScore:!0,collections:{cards:ke},styleTargets:{title:["frontText","backText"],answers:["cardFront","cardBack"],general:["cardFront","cardBack"]},vrMode:"interactive",analytics:{scorable:!0}},version:1};var cr={type:"SpinningWheel",contentSchema:Pe,themeSchema:ee,defaultContent:{id:"",type:"SpinningWheel",title:"SpinningWheel",rotation:0,size:{width:350,height:450},slices:[]},capabilities:{hasActions:!0,hasScore:!0,collections:{slices:Se},styleTargets:{title:["wheelText"],answers:["wheelText"],general:["wheelText"]},vrMode:"interactive",analytics:{scorable:!0}},version:1};var sr={type:"Chart",contentSchema:Ee,defaultContent:{id:"",type:"Chart",title:"Chart",rotation:0,size:{width:300,height:200},chartType:"bar",chartData:[],chartConfig:{}},capabilities:{hasActions:!0,hasScore:!0,styleTargets:void 0,vrMode:"interactive",analytics:{scorable:!1}},version:1};var lr={type:"MatchPairs",contentSchema:Le,themeSchema:ne,defaultContent:{id:"",type:"MatchPairs",title:"MatchPairs",rotation:0,size:{width:600,height:400},pairs:[]},capabilities:{hasActions:!0,hasScore:!0,collections:{pairs:Be},styleTargets:{title:["text"],answers:["card"],general:["container"]},vrMode:"interactive",analytics:{scorable:!0}},version:1};var pr={type:"Shape",contentSchema:We,themeSchema:ie,defaultContent:{id:"",type:"Shape",title:"Shape",rotation:0,size:{width:50,height:50}},capabilities:{hasActions:!1,hasScore:!1,styleTargets:{title:["shape"],answers:["shape"],general:["shape"]},vrMode:"raster",analytics:{scorable:!1}},version:1};var mr={type:"Arrow",contentSchema:Fe,defaultContent:{id:"",type:"Arrow",title:"Arrow",rotation:0,startBlockId:"",startHandle:"top",connectionType:"straight",strokeColor:"#000000",strokeWidth:2,showHead:!0},capabilities:{hasActions:!1,hasScore:!1,styleTargets:void 0,vrMode:"raster",analytics:{scorable:!1}},version:1};var dr={type:"Cloze",contentSchema:Re,themeSchema:te,defaultContent:{id:"",type:"Cloze",title:"Cloze",rotation:0,size:{width:450,height:250}},capabilities:{hasActions:!0,hasScore:!0,styleTargets:{title:["text"],answers:["word","blank"],general:["container"]},vrMode:"interactive",analytics:{scorable:!0}},version:1};var hr={type:"CardDeck",contentSchema:_e,themeSchema:oe,defaultContent:{id:"",type:"CardDeck",title:"CardDeck",rotation:0,size:{width:180,height:260},cards:[],discardLogic:"delete"},capabilities:{hasActions:!0,hasScore:!0,collections:{cards:xe},styleTargets:{title:["cardText"],answers:["card"],general:["container"]},vrMode:"interactive",analytics:{scorable:!0}},version:1};var P={Quiz:$o,Editor:Yo,Hotpoint:Jo,Embed:Uo,Media:Zo,DragAndDrop:Xo,Anagram:er,Dice:tr,Crossword:or,WordSearch:rr,Puzzle:nr,Memory:ir,Flashcard:ar,SpinningWheel:cr,Chart:sr,MatchPairs:lr,Shape:pr,Arrow:mr,Cloze:dr,CardDeck:hr};function ur(o){return P[o]}var ct=Object.fromEntries(R.map(o=>[o,P[o].contentSchema])),fr=Object.fromEntries(R.map(o=>[o,P[o].capabilities.styleTargets??{}]));var sn=yr.zodToJsonSchema,pe=ct;function ln(o,i,n,c){let a=n?"*required*":"optional",l=no(i),s=i.description?` \u2014 ${i.description}`:"";return`${c}- \`${o}\` (${l}, ${a})${s}`}function no(o){return o.enum?`enum: ${o.enum.map(i=>JSON.stringify(i)).join(" | ")}`:o.anyOf||o.oneOf?(o.anyOf||o.oneOf).map(no).join(" | "):Array.isArray(o.type)?o.type.join(" | "):o.type==="array"&&o.items?`array<${no(o.items)}>`:o.type==="object"?"object":o.type??"any"}function io(o,i){let n=[],c=new Set(o.required??[]),a=o.properties??{};for(let[l,s]of Object.entries(a))n.push(ln(l,s,c.has(l),i)),s.type==="object"&&s.properties?n.push(io(s,i+" ")):s.type==="array"&&s.items?.type==="object"&&n.push(io(s.items,i+" "));return n.join(`
|
|
4
|
+
`)}function br(o={}){let i=[],n=new Map,c=Object.fromEntries(rt.map(a=>[a,!0]));for(let[a,l]of Object.entries(pe)){let s=o.contentOnly?l.omit(c):l,y=n.get(s)??[];y.push(a),n.set(s,y)}for(let[a,l]of n.entries()){let s=l.join(" / "),y=sn(a,{target:"jsonSchema7"}),b=io(y,"");i.push(`### ${s}
|
|
5
|
+
${b||"_(no configurable fields)_"}`)}return i.join(`
|
|
6
6
|
|
|
7
|
-
`)}});var je=y(M=>{"use strict";var Lo=M&&M.__createBinding||(Object.create?(function(i,r,n,l){l===void 0&&(l=n);var s=Object.getOwnPropertyDescriptor(r,n);(!s||("get"in s?!r.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(i,l,s)}):(function(i,r,n,l){l===void 0&&(l=n),i[l]=r[n]})),U=M&&M.__exportStar||function(i,r){for(var n in i)n!=="default"&&!Object.prototype.hasOwnProperty.call(r,n)&&Lo(r,i,n)};Object.defineProperty(M,"__esModule",{value:!0});U(be(),M);U(q(),M);U(se(),M);U(Pe(),M);U(fe(),M);U(me(),M);U(qe(),M);U(Le(),M);U(xe(),M);U(Je(),M)});var Qo={};co(Qo,{ActionBlockSchema:()=>e.ActionBlockSchema,ActionConditionSchema:()=>e.ActionConditionSchema,ActionSchema:()=>e.ActionSchema,ActionTypeSchema:()=>e.ActionTypeSchema,ActionVariableSchema:()=>e.ActionVariableSchema,ActivityContentSchema:()=>e.ActivityContentSchema,ActivityContextSchema:()=>e.ActivityContextSchema,ActivityVariableSchema:()=>e.ActivityVariableSchema,AnagramBlockSchema:()=>e.AnagramBlockSchema,AnagramBlockThemeSchema:()=>e.AnagramBlockThemeSchema,AnagramContentSchema:()=>e.AnagramContentSchema,AnimationSchema:()=>e.AnimationSchema,ArrowBlockSchema:()=>e.ArrowBlockSchema,ArrowHeadTypeSchema:()=>e.ArrowHeadTypeSchema,ArrowLabelSchema:()=>e.ArrowLabelSchema,BLOCK_CONTENT_SCHEMAS:()=>e.BLOCK_CONTENT_SCHEMAS,BLOCK_STYLE_KEYS:()=>e.BLOCK_STYLE_KEYS,BLOCK_TYPES:()=>e.BLOCK_TYPES,BasicContentSchema:()=>e.BasicContentSchema,BlockEventSchema:()=>e.BlockEventSchema,BlockEventTypeSchema:()=>e.BlockEventTypeSchema,BlockGroupSchema:()=>e.BlockGroupSchema,BlockSchema:()=>e.BlockSchema,BlockThemeSchema:()=>e.BlockThemeSchema,BlockTypeSchema:()=>e.BlockTypeSchema,BoxSideSchema:()=>e.BoxSideSchema,BoxStylesSchema:()=>e.BoxStylesSchema,CANVAS_OP_NAMES:()=>so,CANVAS_OP_REQUIRED:()=>le,CanvasDragItemSchema:()=>e.CanvasDragItemSchema,CardDeckBlockSchema:()=>e.CardDeckBlockSchema,CardDeckBlockThemeSchema:()=>e.CardDeckBlockThemeSchema,CardFaceSchema:()=>e.CardFaceSchema,CardItemSchema:()=>e.CardItemSchema,CardSchema:()=>e.CardSchema,ChartBlockSchema:()=>e.ChartBlockSchema,ChartConfigSchema:()=>e.ChartConfigSchema,ChartContentSchema:()=>e.ChartContentSchema,ChartTypeSchema:()=>e.ChartTypeSchema,ChoiceQuestionSchema:()=>e.ChoiceQuestionSchema,ClickConditionSchema:()=>e.ClickConditionSchema,ClozeBlockSchema:()=>e.ClozeBlockSchema,ClozeBlockThemeSchema:()=>e.ClozeBlockThemeSchema,ClozeContentSchema:()=>e.ClozeContentSchema,ClozeModeSchema:()=>e.ClozeModeSchema,ConditionOperatorSchema:()=>e.ConditionOperatorSchema,CropDataSchema:()=>e.CropDataSchema,CrosswordBlockSchema:()=>e.CrosswordBlockSchema,CrosswordBlockThemeSchema:()=>e.CrosswordBlockThemeSchema,CrosswordCellSchema:()=>e.CrosswordCellSchema,CrosswordContentSchema:()=>e.CrosswordContentSchema,CrosswordLayoutOutputSchema:()=>e.CrosswordLayoutOutputSchema,CrosswordLayoutWordSchema:()=>e.CrosswordLayoutWordSchema,CrosswordWordSchema:()=>e.CrosswordWordSchema,DeckBlockTypeSchema:()=>e.DeckBlockTypeSchema,DeckContentSchema:()=>e.DeckContentSchema,DiceBlockSchema:()=>e.DiceBlockSchema,DiceBlockThemeSchema:()=>e.DiceBlockThemeSchema,DiceContentSchema:()=>e.DiceContentSchema,DiceTypeSchema:()=>e.DiceTypeSchema,DieTypeSchema:()=>e.DieTypeSchema,DragAndDropBlockSchema:()=>e.DragAndDropBlockSchema,DragAndDropBlockThemeSchema:()=>e.DragAndDropBlockThemeSchema,DragAndDropContentSchema:()=>e.DragAndDropContentSchema,DragAndDropGroupSchema:()=>e.DragAndDropGroupSchema,DragAndDropItemSchema:()=>e.DragAndDropItemSchema,DragGroupSchema:()=>e.DragGroupSchema,DragItemSchema:()=>e.DragItemSchema,EditorBlockSchema:()=>e.EditorBlockSchema,EditorBlockThemeSchema:()=>e.EditorBlockThemeSchema,EmbedBlockSchema:()=>e.EmbedBlockSchema,FlashcardBlockSchema:()=>e.FlashcardBlockSchema,FlashcardBlockThemeSchema:()=>e.FlashcardBlockThemeSchema,FlashcardContentSchema:()=>e.FlashcardContentSchema,FlashcardItemSchema:()=>e.FlashcardItemSchema,GridSizeSchema:()=>e.GridSizeSchema,HotpointBlockSchema:()=>e.HotpointBlockSchema,HotpointBlockThemeSchema:()=>e.HotpointBlockThemeSchema,ImageAlignSchema:()=>e.ImageAlignSchema,ImageSizeSchema:()=>e.ImageSizeSchema,KeyPressConditionSchema:()=>e.KeyPressConditionSchema,MatchPairsBlockSchema:()=>e.MatchPairsBlockSchema,MatchPairsBlockThemeSchema:()=>e.MatchPairsBlockThemeSchema,MatchPairsPairSchema:()=>e.MatchPairsPairSchema,MathOperationSchema:()=>e.MathOperationSchema,MediaBlockSchema:()=>e.MediaBlockSchema,MediaItemSchema:()=>e.MediaItemSchema,MediaRefSchema:()=>e.MediaRefSchema,MediaSourceSchema:()=>e.MediaSourceSchema,MediaTypeSchema:()=>e.MediaTypeSchema,MemoryBlockSchema:()=>e.MemoryBlockSchema,MemoryBlockThemeSchema:()=>e.MemoryBlockThemeSchema,MemoryPairSchema:()=>e.MemoryPairSchema,MemoryPairTypeSchema:()=>e.MemoryPairTypeSchema,PairGameBlockTypeSchema:()=>e.PairGameBlockTypeSchema,PairGameContentSchema:()=>e.PairGameContentSchema,PairSchema:()=>e.PairSchema,PositionSchema:()=>e.PositionSchema,PuzzleBlockSchema:()=>e.PuzzleBlockSchema,PuzzleContentSchema:()=>e.PuzzleContentSchema,PuzzleGameModeSchema:()=>e.PuzzleGameModeSchema,PuzzleTypeSchema:()=>e.PuzzleTypeSchema,QuestionOptionSchema:()=>e.QuestionOptionSchema,QuestionSchema:()=>e.QuestionSchema,QuestionTypeSchema:()=>e.QuestionTypeSchema,QuizBlockSchema:()=>e.QuizBlockSchema,QuizBlockThemeSchema:()=>e.QuizBlockThemeSchema,QuizConditionSchema:()=>e.QuizConditionSchema,QuizContentSchema:()=>e.QuizContentSchema,QuizOptionSchema:()=>e.QuizOptionSchema,QuizQuestionSchema:()=>e.QuizQuestionSchema,QuizQuestionTypeSchema:()=>e.QuizQuestionTypeSchema,RadiusSchema:()=>e.RadiusSchema,STYLE_TARGET_MAP:()=>e.STYLE_TARGET_MAP,SceneBlockRefSchema:()=>e.SceneBlockRefSchema,SceneSchema:()=>e.SceneSchema,SceneSummarySchema:()=>e.SceneSummarySchema,SceneTypeSchema:()=>e.SceneTypeSchema,ShapeBlockSchema:()=>e.ShapeBlockSchema,ShapeBlockThemeSchema:()=>e.ShapeBlockThemeSchema,ShapeTypeSchema:()=>e.ShapeTypeSchema,SizeSchema:()=>e.SizeSchema,SpinnerContentSchema:()=>e.SpinnerContentSchema,SpinnerSliceSchema:()=>e.SpinnerSliceSchema,SpinningWheelBlockSchema:()=>e.SpinningWheelBlockSchema,SpinningWheelBlockThemeSchema:()=>e.SpinningWheelBlockThemeSchema,TextQuestionSchema:()=>e.TextQuestionSchema,TextStylesSchema:()=>e.TextStylesSchema,TimerConditionSchema:()=>e.TimerConditionSchema,TrueFalseQuestionSchema:()=>e.TrueFalseQuestionSchema,UNSTYLEABLE_BLOCKS:()=>e.UNSTYLEABLE_BLOCKS,VideoSettingsSchema:()=>e.VideoSettingsSchema,WheelSliceSchema:()=>e.WheelSliceSchema,WordGameBlockTypeSchema:()=>e.WordGameBlockTypeSchema,WordSearchBlockSchema:()=>e.WordSearchBlockSchema,WordSearchBlockThemeSchema:()=>e.WordSearchBlockThemeSchema,WordSearchContentSchema:()=>e.WordSearchContentSchema,WordSearchDataSchema:()=>e.WordSearchDataSchema,WordSearchDifficultySchema:()=>e.WordSearchDifficultySchema,applyItemPatch:()=>ho,detectConflict:()=>So,entitySignature:()=>De,generateBlockReference:()=>e.generateBlockReference,getAllBlockJsonSchemas:()=>Fo,getBlockJsonSchema:()=>eo,isKnownCanvasOp:()=>ve,listBlockTypes:()=>Ze,mapLogicalThemeStyles:()=>e.mapLogicalThemeStyles,mergeTheme:()=>e.mergeTheme,opConflictStamp:()=>zo,opTarget:()=>Oe,parseMentions:()=>bo,realStyleKeysFor:()=>e.realStyleKeysFor,resolveMentions:()=>go,stableStringify:()=>ie,styleTargetsHelpFor:()=>e.styleTargetsHelpFor,validateCanvasOp:()=>mo});module.exports=lo(Qo);var le={createScene:[],deleteScene:["sceneId"],addBlock:["sceneId","block"],updateScene:["sceneId"],deleteBlock:["sceneId","blockId"],updateBlock:["sceneId","blockId","updates"],duplicateBlock:["sceneId","blockId"],groupBlocks:["blockIds"],updateBlockTheme:["sceneId","blockId","theme"],updateBlockElementStyle:["sceneId","blockId","elementId","customStyle"],addAction:["sceneId","blockId","action"],removeAction:["sceneId","blockId","actionId"],manageVariables:["operation","name"],configureTimer:[],reorderScenes:["sceneId","newIndex"],insertItem:["blockId","collection","item"],updateItem:["blockId","collection","itemId","item"],deleteItem:["blockId","collection","itemId"]},so=Object.keys(le);function ve(i){return Object.prototype.hasOwnProperty.call(le,i)}function mo(i,r){if(!ve(i))return{ok:!1,code:"UNKNOWN_OP",errors:[`unknown op "${i}"`]};if(typeof r!="object"||r===null||Array.isArray(r))return{ok:!1,code:"NOT_OBJECT",errors:["op data must be an object"]};let n=r,l=le[i].filter(s=>n[s]===void 0||n[s]===null);return l.length>0?{ok:!1,code:"MISSING_FIELDS",errors:l.map(s=>`missing field: ${s}`)}:i==="groupBlocks"&&(!Array.isArray(n.blockIds)||n.blockIds.length<2)?{ok:!1,code:"MISSING_FIELDS",errors:["groupBlocks requires a blockIds array with >= 2 ids"]}:{ok:!0}}function ho(i,r,n){let l=Array.isArray(i)?[...i]:[];if(r==="insertItem"){if(n.item===void 0||n.item===null)return l;let s=typeof n.at=="number"?n.at:l.length;return l.splice(Math.max(0,Math.min(s,l.length)),0,n.item),l}return r==="updateItem"?l.map(s=>s&&typeof s=="object"&&s.id===n.itemId?{...s,...n.item??{}}:s):l.filter(s=>!(s&&typeof s=="object"&&s.id===n.itemId))}var po=new Set(["position","size","rotation","zIndex","z"]);function ie(i){return i===null||typeof i!="object"?JSON.stringify(i)??"null":Array.isArray(i)?"["+i.map(ie).join(",")+"]":"{"+Object.keys(i).sort().map(n=>JSON.stringify(n)+":"+ie(i[n])).join(",")+"}"}function Oe(i,r){let n=r??{};switch(i){case"updateBlock":case"updateBlockTheme":case"updateBlockElementStyle":case"deleteBlock":case"duplicateBlock":case"removeAction":return n.blockId?{kind:"block",blockId:n.blockId}:{kind:"untracked"};case"updateItem":case"deleteItem":return n.blockId&&n.collection&&n.itemId?{kind:"item",blockId:n.blockId,collection:n.collection,itemId:n.itemId}:{kind:"untracked"};default:return{kind:"untracked"}}}function uo(i,r){if(Array.isArray(i))for(let n of i){let l=n?.blocks?.find?.(s=>s&&s.id===r);if(l)return l}}function De(i,r){if(r.kind==="untracked")return null;let n=r.blockId?uo(i,r.blockId):void 0;if(!n)return null;if(r.kind==="block"){let S={};for(let u of Object.keys(n))po.has(u)||(S[u]=n[u]);return ie(S)}let l=n[r.collection];if(!Array.isArray(l))return null;let s=l.find(S=>S&&S.id===r.itemId);return s?ie(s):null}function So(i,r){return i==null?"apply":r==null?"missing":i===r?"apply":"stale"}function zo(i,r,n){let l=Oe(i,r);return{target:l,baseSignature:De(n,l)}}var ze=/@\[([^\]|]+)\|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})\]/g;function bo(i){let r=[];for(let n of(i??"").matchAll(ze))r.push({name:n[1].trim(),id:n[2]});return r}function go(i,r){let n=new Map,l=new Map;for(let B of r?.scenes??[]){B?.id&&n.set(B.id,B);for(let x of B?.blocks??[])x?.id&&l.set(x.id,{block:x,sceneId:B.id})}let s=[],S=new Set,u=B=>l.has(B)?"il blocco selezionato":n.has(B)?"la scena selezionata":"l'elemento selezionato",J=(B,x)=>{if(!S.has(x))if(l.has(x)){let{block:X,sceneId:oo}=l.get(x);s.push({id:x,name:B,kind:"block",blockType:X?.type,sceneId:oo}),S.add(x)}else n.has(x)&&(s.push({id:x,name:B,kind:"scene"}),S.add(x))},R=(i??"").replace(ze,(B,x,X)=>(J(x.trim(),X),x.trim())),E=(i??"").replace(ze,(B,x,X)=>l.has(X)||n.has(X)?u(X):x.trim());return{cleanedText:R,agentText:E,entities:s}}var Xe=require("zod-to-json-schema"),Me=Ie(je()),e=Ie(je());function Ze(){return Object.keys(Me.BLOCK_CONTENT_SCHEMAS)}function eo(i){let r=Me.BLOCK_CONTENT_SCHEMAS[i];if(r)return(0,Xe.zodToJsonSchema)(r,{target:"jsonSchema7",$refStrategy:"none"})}function Fo(){return Object.fromEntries(Ze().map(i=>[i,eo(i)]))}0&&(module.exports={ActionBlockSchema,ActionConditionSchema,ActionSchema,ActionTypeSchema,ActionVariableSchema,ActivityContentSchema,ActivityContextSchema,ActivityVariableSchema,AnagramBlockSchema,AnagramBlockThemeSchema,AnagramContentSchema,AnimationSchema,ArrowBlockSchema,ArrowHeadTypeSchema,ArrowLabelSchema,BLOCK_CONTENT_SCHEMAS,BLOCK_STYLE_KEYS,BLOCK_TYPES,BasicContentSchema,BlockEventSchema,BlockEventTypeSchema,BlockGroupSchema,BlockSchema,BlockThemeSchema,BlockTypeSchema,BoxSideSchema,BoxStylesSchema,CANVAS_OP_NAMES,CANVAS_OP_REQUIRED,CanvasDragItemSchema,CardDeckBlockSchema,CardDeckBlockThemeSchema,CardFaceSchema,CardItemSchema,CardSchema,ChartBlockSchema,ChartConfigSchema,ChartContentSchema,ChartTypeSchema,ChoiceQuestionSchema,ClickConditionSchema,ClozeBlockSchema,ClozeBlockThemeSchema,ClozeContentSchema,ClozeModeSchema,ConditionOperatorSchema,CropDataSchema,CrosswordBlockSchema,CrosswordBlockThemeSchema,CrosswordCellSchema,CrosswordContentSchema,CrosswordLayoutOutputSchema,CrosswordLayoutWordSchema,CrosswordWordSchema,DeckBlockTypeSchema,DeckContentSchema,DiceBlockSchema,DiceBlockThemeSchema,DiceContentSchema,DiceTypeSchema,DieTypeSchema,DragAndDropBlockSchema,DragAndDropBlockThemeSchema,DragAndDropContentSchema,DragAndDropGroupSchema,DragAndDropItemSchema,DragGroupSchema,DragItemSchema,EditorBlockSchema,EditorBlockThemeSchema,EmbedBlockSchema,FlashcardBlockSchema,FlashcardBlockThemeSchema,FlashcardContentSchema,FlashcardItemSchema,GridSizeSchema,HotpointBlockSchema,HotpointBlockThemeSchema,ImageAlignSchema,ImageSizeSchema,KeyPressConditionSchema,MatchPairsBlockSchema,MatchPairsBlockThemeSchema,MatchPairsPairSchema,MathOperationSchema,MediaBlockSchema,MediaItemSchema,MediaRefSchema,MediaSourceSchema,MediaTypeSchema,MemoryBlockSchema,MemoryBlockThemeSchema,MemoryPairSchema,MemoryPairTypeSchema,PairGameBlockTypeSchema,PairGameContentSchema,PairSchema,PositionSchema,PuzzleBlockSchema,PuzzleContentSchema,PuzzleGameModeSchema,PuzzleTypeSchema,QuestionOptionSchema,QuestionSchema,QuestionTypeSchema,QuizBlockSchema,QuizBlockThemeSchema,QuizConditionSchema,QuizContentSchema,QuizOptionSchema,QuizQuestionSchema,QuizQuestionTypeSchema,RadiusSchema,STYLE_TARGET_MAP,SceneBlockRefSchema,SceneSchema,SceneSummarySchema,SceneTypeSchema,ShapeBlockSchema,ShapeBlockThemeSchema,ShapeTypeSchema,SizeSchema,SpinnerContentSchema,SpinnerSliceSchema,SpinningWheelBlockSchema,SpinningWheelBlockThemeSchema,TextQuestionSchema,TextStylesSchema,TimerConditionSchema,TrueFalseQuestionSchema,UNSTYLEABLE_BLOCKS,VideoSettingsSchema,WheelSliceSchema,WordGameBlockTypeSchema,WordSearchBlockSchema,WordSearchBlockThemeSchema,WordSearchContentSchema,WordSearchDataSchema,WordSearchDifficultySchema,applyItemPatch,detectConflict,entitySignature,generateBlockReference,getAllBlockJsonSchemas,getBlockJsonSchema,isKnownCanvasOp,listBlockTypes,mapLogicalThemeStyles,mergeTheme,opConflictStamp,opTarget,parseMentions,realStyleKeysFor,resolveMentions,stableStringify,styleTargetsHelpFor,validateCanvasOp});
|
|
7
|
+
`)}var st=1,gr="__blockSchemaVersion",Qe=class extends Error{constructor(i){super(i),this.name="ActivityContentMigrationError"}};function Sr(o,i=P){if(typeof o!="object"||o===null||Array.isArray(o))throw new Qe(`migrateActivityContent expects a non-null, non-array object; got ${o===null?"null":typeof o}`);let n=[],c=!1,a=o,s=(Array.isArray(a.scenes)?a.scenes:[]).map((b,g)=>{if(typeof b!="object"||b===null||Array.isArray(b))return n.push(`scenes[${g}]: not an object, left intact`),b;let S=b,T=Array.isArray(S.blocks)?S.blocks:[],v=!1,lt=T.map((me,Ge)=>{if(typeof me!="object"||me===null||Array.isArray(me))return n.push(`scenes[${g}].blocks[${Ge}]: not an object, left intact`),me;let de=me,he=de.type,pt=typeof he=="string"?i[he]:void 0;if(!pt)return n.push(`scenes[${g}].blocks[${Ge}]: unknown block type "${String(he)}", left intact`),de;let co=de[gr],L=typeof co=="number"?co:1,mt=de,so=!1;for(;L<pt.version;){let lo=pt.migrations?.[L];if(!lo){n.push(`scenes[${g}].blocks[${Ge}]: missing migration from v${L} for type "${he}", stopped at v${L}`);break}let Ke=lo(mt);if(typeof Ke!="object"||Ke===null||Array.isArray(Ke)){n.push(`scenes[${g}].blocks[${Ge}]: migration from v${L} for type "${he}" returned a non-object, stopped at v${L}`);break}mt={...Ke},so=!0,L+=1}return so?(v=!0,{...mt,[gr]:L}):de});return v?(c=!0,{...S,blocks:lt}):S});return a.schemaVersion!==st&&(c=!0),{content:{...a,scenes:s,schemaVersion:st},changed:c,issues:n}}var kr=o=>{if(typeof o!="object"||o===null||Array.isArray(o))return o;let i=o;if(!Array.isArray(i.actions))return o;let n=i.actions.map(c=>{if(typeof c!="object"||c===null||Array.isArray(c))return c;let a=c;if(a.condition===void 0||Array.isArray(a.conditions))return a;let{condition:l,...s}=a;return{...s,conditions:[l],conditionsOperator:a.conditionsOperator??"and"}});return{...i,actions:n}};function pn(){return R.map(o=>{let i=P[o];return{type:o,version:i.version,hasActions:i.capabilities.hasActions,hasScore:i.capabilities.hasScore,collections:Object.keys(i.capabilities.collections??{}),styleTargets:i.capabilities.styleTargets??{},vrMode:i.capabilities.vrMode}})}var ao=/@\[([^\]|]+)\|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})\]/g;function mn(o){let i=[];for(let n of(o??"").matchAll(ao))i.push({name:n[1].trim(),id:n[2]});return i}function dn(o,i){let n=new Map,c=new Map;for(let S of i?.scenes??[]){S?.id&&n.set(S.id,S);for(let T of S?.blocks??[])T?.id&&c.set(T.id,{block:T,sceneId:S.id})}let a=[],l=new Set,s=S=>c.has(S)?"il blocco selezionato":n.has(S)?"la scena selezionata":"l'elemento selezionato",y=(S,T)=>{if(!l.has(T))if(c.has(T)){let{block:v,sceneId:lt}=c.get(T);a.push({id:T,name:S,kind:"block",blockType:v?.type,sceneId:lt}),l.add(T)}else n.has(T)&&(a.push({id:T,name:S,kind:"scene"}),l.add(T))},b=(o??"").replace(ao,(S,T,v)=>(y(T.trim(),v),T.trim())),g=(o??"").replace(ao,(S,T,v)=>c.has(v)||n.has(v)?s(v):T.trim());return{cleanedText:b,agentText:g,entities:a}}var xr=require("zod-to-json-schema");function Br(){return Object.keys(pe)}function Tr(o){let i=pe[o];if(i)return(0,xr.zodToJsonSchema)(i,{target:"jsonSchema7",$refStrategy:"none"})}function hn(){return Object.fromEntries(Br().map(o=>[o,Tr(o)]))}0&&(module.exports={ActionBlockSchema,ActionConditionSchema,ActionSchema,ActionTypeSchema,ActionVariableSchema,ActivityContentMigrationError,ActivityContentSchema,ActivityContextSchema,ActivityVariableSchema,AnagramBlockSchema,AnagramBlockThemeSchema,AnagramContentSchema,AnimationSchema,ArrowBlockSchema,ArrowHeadTypeSchema,ArrowLabelSchema,BASE_BLOCK_FIELDS,BLOCK_CONTENT_SCHEMAS,BLOCK_REGISTRY,BLOCK_STYLE_KEYS,BLOCK_TYPES,BasicContentSchema,BlockEventSchema,BlockEventTypeSchema,BlockGroupSchema,BlockSchema,BlockThemeSchema,BlockTypeSchema,BoxSideSchema,BoxStylesSchema,CANVAS_OP_NAMES,CANVAS_OP_REQUIRED,CURRENT_SCHEMA_VERSION,CanvasDragItemSchema,CanvasOpSchema,CardDeckBlockSchema,CardDeckBlockThemeSchema,CardFaceSchema,CardItemSchema,CardSchema,ChartBlockSchema,ChartConfigSchema,ChartContentSchema,ChartTypeSchema,ChoiceQuestionSchema,ClickConditionSchema,ClozeBlockSchema,ClozeBlockThemeSchema,ClozeContentSchema,ClozeModeSchema,ConditionOperatorSchema,CropDataSchema,CrosswordBlockSchema,CrosswordBlockThemeSchema,CrosswordCellSchema,CrosswordContentSchema,CrosswordLayoutOutputSchema,CrosswordLayoutWordSchema,CrosswordWordSchema,DeckBlockTypeSchema,DeckContentSchema,DiceBlockSchema,DiceBlockThemeSchema,DiceContentSchema,DiceTypeSchema,DieTypeSchema,DragAndDropBlockSchema,DragAndDropBlockThemeSchema,DragAndDropContentSchema,DragAndDropGroupSchema,DragAndDropItemSchema,DragGroupSchema,DragItemSchema,EditorBlockSchema,EditorBlockThemeSchema,EmbedBlockSchema,FlashcardBlockSchema,FlashcardBlockThemeSchema,FlashcardContentSchema,FlashcardItemSchema,GridSizeSchema,HotpointBlockSchema,HotpointBlockThemeSchema,ImageAlignSchema,ImageSizeSchema,KeyPressConditionSchema,MatchPairsBlockSchema,MatchPairsBlockThemeSchema,MatchPairsPairSchema,MathOperationSchema,MediaBlockSchema,MediaItemSchema,MediaRefSchema,MediaSourceSchema,MediaTypeSchema,MemoryBlockSchema,MemoryBlockThemeSchema,MemoryPairSchema,MemoryPairTypeSchema,PairGameBlockTypeSchema,PairGameContentSchema,PairSchema,PositionSchema,PuzzleBlockSchema,PuzzleContentSchema,PuzzleGameModeSchema,PuzzleTypeSchema,QuestionOptionSchema,QuestionSchema,QuestionTypeSchema,QuizBlockSchema,QuizBlockThemeSchema,QuizConditionSchema,QuizContentSchema,QuizOptionSchema,QuizQuestionSchema,QuizQuestionTypeSchema,REGISTRY_CONTENT_SCHEMAS,REGISTRY_STYLE_TARGETS,RadiusSchema,STYLE_TARGET_MAP,SceneBlockRefSchema,SceneSchema,SceneSummarySchema,SceneTypeSchema,ShapeBlockSchema,ShapeBlockThemeSchema,ShapeTypeSchema,SizeSchema,SpinnerContentSchema,SpinnerSliceSchema,SpinningWheelBlockSchema,SpinningWheelBlockThemeSchema,TextQuestionSchema,TextStylesSchema,TimerConditionSchema,TrueFalseQuestionSchema,UNSTYLEABLE_BLOCKS,VideoSettingsSchema,WheelSliceSchema,WordGameBlockTypeSchema,WordSearchBlockSchema,WordSearchBlockThemeSchema,WordSearchContentSchema,WordSearchDataSchema,WordSearchDifficultySchema,actionsV1toV2,applyItemPatch,createCanvasOpValidator,defineBlock,detectConflict,entitySignature,generateBlockReference,getAllBlockJsonSchemas,getBlockDefinition,getBlockJsonSchema,getCapabilitiesManifest,isKnownCanvasOp,listBlockTypes,mapLogicalThemeStyles,mergeTheme,migrateActivityContent,opConflictStamp,opTarget,parseMentions,realStyleKeysFor,resolveMentions,stableStringify,styleTargetsHelpFor,validateCanvasOp});
|