{
  "version": 3,
  "sources": ["../../src/shapes/TLBookmarkShape.ts"],
  "sourcesContent": ["import { defineMigrations } from '@bigbluebutton/store'\nimport { T } from '@bigbluebutton/validate'\nimport { assetIdValidator } from '../assets/TLBaseAsset'\nimport { ShapePropsType, TLBaseShape } from './TLBaseShape'\n\n/** @public */\nexport const bookmarkShapeProps = {\n\tw: T.nonZeroNumber,\n\th: T.nonZeroNumber,\n\tassetId: assetIdValidator.nullable(),\n\turl: T.string,\n}\n\n/** @public */\nexport type TLBookmarkShapeProps = ShapePropsType<typeof bookmarkShapeProps>\n\n/** @public */\nexport type TLBookmarkShape = TLBaseShape<'bookmark', TLBookmarkShapeProps>\n\nconst Versions = {\n\tNullAssetId: 1,\n} as const\n\n/** @internal */\nexport const bookmarkShapeMigrations = defineMigrations({\n\tcurrentVersion: Versions.NullAssetId,\n\tmigrators: {\n\t\t[Versions.NullAssetId]: {\n\t\t\tup: (shape: TLBookmarkShape) => {\n\t\t\t\tif (shape.props.assetId === undefined) {\n\t\t\t\t\treturn { ...shape, props: { ...shape.props, assetId: null } } as typeof shape\n\t\t\t\t}\n\t\t\t\treturn shape\n\t\t\t},\n\t\t\tdown: (shape: TLBookmarkShape) => {\n\t\t\t\tif (shape.props.assetId === null) {\n\t\t\t\t\tconst { assetId: _, ...props } = shape.props\n\t\t\t\t\treturn { ...shape, props } as typeof shape\n\t\t\t\t}\n\t\t\t\treturn shape\n\t\t\t},\n\t\t},\n\t},\n})\n"],
  "mappings": "AAAA,SAAS,wBAAwB;AACjC,SAAS,SAAS;AAClB,SAAS,wBAAwB;AAI1B,MAAM,qBAAqB;AAAA,EACjC,GAAG,EAAE;AAAA,EACL,GAAG,EAAE;AAAA,EACL,SAAS,iBAAiB,SAAS;AAAA,EACnC,KAAK,EAAE;AACR;AAQA,MAAM,WAAW;AAAA,EAChB,aAAa;AACd;AAGO,MAAM,0BAA0B,iBAAiB;AAAA,EACvD,gBAAgB,SAAS;AAAA,EACzB,WAAW;AAAA,IACV,CAAC,SAAS,WAAW,GAAG;AAAA,MACvB,IAAI,CAAC,UAA2B;AAC/B,YAAI,MAAM,MAAM,YAAY,QAAW;AACtC,iBAAO,EAAE,GAAG,OAAO,OAAO,EAAE,GAAG,MAAM,OAAO,SAAS,KAAK,EAAE;AAAA,QAC7D;AACA,eAAO;AAAA,MACR;AAAA,MACA,MAAM,CAAC,UAA2B;AACjC,YAAI,MAAM,MAAM,YAAY,MAAM;AACjC,gBAAM,EAAE,SAAS,GAAG,GAAG,MAAM,IAAI,MAAM;AACvC,iBAAO,EAAE,GAAG,OAAO,MAAM;AAAA,QAC1B;AACA,eAAO;AAAA,MACR;AAAA,IACD;AAAA,EACD;AACD,CAAC;",
  "names": []
}
