{
  "version": 3,
  "sources": ["../../../src/components/canvas-loader/index.jsx"],
  "sourcesContent": ["import { ProgressBar } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { unlock } from '../../lock-unlock';\n\nconst { useStyle } = unlock( editorPrivateApis );\n\nexport default function CanvasLoader( { id } ) {\n\tconst textColor = useStyle( 'color.text' );\n\tconst { elapsed, total } = useSelect( ( select ) => {\n\t\tconst selectorsByStatus = select( coreStore ).countSelectorsByStatus();\n\t\tconst resolving = selectorsByStatus.resolving ?? 0;\n\t\tconst finished = selectorsByStatus.finished ?? 0;\n\t\treturn {\n\t\t\telapsed: finished,\n\t\t\ttotal: finished + resolving,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"edit-site-canvas-loader\"\n\t\t\tstyle={ textColor ? { '--color': textColor } : undefined }\n\t\t>\n\t\t\t<ProgressBar id={ id } max={ total } value={ elapsed } />\n\t\t</div>\n\t);\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA4B;AAC5B,uBAAmC;AACnC,kBAA0B;AAC1B,oBAAiD;AACjD,yBAAuB;AAqBpB;AAnBH,IAAM,EAAE,SAAS,QAAI,2BAAQ,cAAAA,WAAkB;AAEhC,SAAR,aAA+B,EAAE,GAAG,GAAI;AAC9C,QAAM,YAAY,SAAU,YAAa;AACzC,QAAM,EAAE,SAAS,MAAM,QAAI,uBAAW,CAAE,WAAY;AACnD,UAAM,oBAAoB,OAAQ,iBAAAC,KAAU,EAAE,uBAAuB;AACrE,UAAM,YAAY,kBAAkB,aAAa;AACjD,UAAM,WAAW,kBAAkB,YAAY;AAC/C,WAAO;AAAA,MACN,SAAS;AAAA,MACT,OAAO,WAAW;AAAA,IACnB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,OAAQ,YAAY,EAAE,WAAW,UAAU,IAAI;AAAA,MAE/C,sDAAC,iCAAY,IAAU,KAAM,OAAQ,OAAQ,SAAU;AAAA;AAAA,EACxD;AAEF;",
  "names": ["editorPrivateApis", "coreStore"]
}
