clipoox-render 0.3.0 → 0.4.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/server-text/titleRaster.js +23 -4
- package/package.json +1 -1
- package/scripts/render-local.mjs +229 -229
- package/shared/transitionStarterPack.json +355 -0
- package/web/assets/{FxEmbed-D7k1ThAF.js → FxEmbed-CGqGi2Lw.js} +1 -1
- package/web/assets/{MotionEmbed-DFni5IAh.js → MotionEmbed-C3CZ3_y_.js} +1 -1
- package/web/assets/{PluginStore-BrupM_8E.js → PluginStore-DKXZ-jBj.js} +1 -1
- package/web/assets/{ShotComposer-BLztjSKy.js → ShotComposer-DFfaYLoV.js} +4 -4
- package/web/assets/{TemplateEmbed-BbAimhLj.js → TemplateEmbed-C8pXcPsc.js} +1 -1
- package/web/assets/{TimelinePlugins-BI1bE9pX.js → TimelinePlugins-DnkV3i4G.js} +3 -3
- package/web/assets/{TimelineShotFx-CQN3WIfN.js → TimelineShotFx-foiuuogg.js} +2 -2
- package/web/assets/{TransitionEmbed-CmoIrHVr.js → TransitionEmbed-BueDilY0.js} +1 -1
- package/web/assets/{Whiteboard-DMk0unYK.js → Whiteboard-zBsNHh5h.js} +1 -1
- package/web/assets/aerial-z34Nww_T.js +2 -0
- package/web/assets/{agentTools-qOww5RUs.js → agentTools-ALxghYpf.js} +2 -2
- package/web/assets/{analyzerRun-B2FLUp4G.js → analyzerRun-DNwryAlU.js} +1 -1
- package/web/assets/{analyzerSandbox-CJVsEhrg.js → analyzerSandbox-A1oFsCrO.js} +1 -1
- package/web/assets/{api-QBI5GJTZ.js → api-DUp403BK.js} +57 -57
- package/web/assets/auraTrack-BKVZCwNt.js +1 -0
- package/web/assets/breakthrough-Cwt8gEwK.js +2 -0
- package/web/assets/{cameraPresets-4pFeF2YG.js → cameraPresets-DSOPj4oy.js} +1 -1
- package/web/assets/{captionLayout-C67EMVI1.js → captionLayout-EuB59pN_.js} +1 -1
- package/web/assets/clientExport-BL1XMTF0.js +1 -0
- package/web/assets/{depthEstimate-mnXDZMW-.js → depthEstimate-DOvsY8mn.js} +1 -1
- package/web/assets/{directorTools-BOHZjcww.js → directorTools-BkbNYbSq.js} +1 -1
- package/web/assets/{distortFrames-Csuj2jHE.js → distortFrames-Drch0LhT.js} +2 -2
- package/web/assets/{distortGL-BaXfN0IK.js → distortGL-BlmBZKRU.js} +2 -2
- package/web/assets/{editTools-m0VGPmfF.js → editTools-BcGinqHC.js} +1 -1
- package/web/assets/exportEncode-MUwVTI52.js +1 -0
- package/web/assets/{exportGlb-CLfTnbMG.js → exportGlb-SIXFRRJM.js} +1 -1
- package/web/assets/{faceTracker-W0iZSiMe.js → faceTracker-DCbZbLMc.js} +1 -1
- package/web/assets/fightDirector-hlF1JS_z.js +1 -0
- package/web/assets/fightDrama-fHN5EXk3.js +2 -0
- package/web/assets/{frameSink-BGRj7wqY.js → frameSink-BvOXjLuw.js} +3 -3
- package/web/assets/{gpuCompose-CIEoLFem.js → gpuCompose-CNkLwpbZ.js} +1 -1
- package/web/assets/gpuExport-DQB6x4eh.js +194 -0
- package/web/assets/{handMatte-mHxZwLZD.js → handMatte-BD7OE3Zc.js} +1 -1
- package/web/assets/{handTracker-dTVeSUzt.js → handTracker-BumGtRCW.js} +2 -2
- package/web/assets/{index-D7M5t2re.js → index-CuaB7Y0L.js} +1 -1
- package/web/assets/{layer-worker-Cp0pjurp.js → layer-worker-DxPMMKIZ.js} +3 -3
- package/web/assets/library-CyjJ8nGG.js +1 -0
- package/web/assets/{lottieLayer-CDCGeJyv.js → lottieLayer-1ET89OUr.js} +5 -5
- package/web/assets/{lottie_light_canvas-BblLU4nU.js → lottie_light_canvas-DD9pkFL8.js} +1 -1
- package/web/assets/{main-CVRIuDW2.js → main-BKjBWQik.js} +91 -91
- package/web/assets/{main-BQ8IY0WV.css → main-Ca_CVxMz.css} +1 -1
- package/web/assets/mapBake-DLoBt_k5.js +1 -0
- package/web/assets/{maskTrack-Dtv6Jr06.js → maskTrack-C2SJbDGO.js} +1 -1
- package/web/assets/{matteFixRun-BLDH2AjH.js → matteFixRun-BdHKC3m5.js} +1 -1
- package/web/assets/{objectLocate-Cy3IFBSF.js → objectLocate-bZtc5AJo.js} +1 -1
- package/web/assets/{pendingMatte-C2AWApuv.js → pendingMatte-mlyLLZCT.js} +2 -2
- package/web/assets/{personAi-DPUnoymj.js → personAi-CUNQeseG.js} +2 -2
- package/web/assets/plateCamera-_jP1xXnj.js +1 -0
- package/web/assets/{plateCameraMatch-Chk-ZjDi.js → plateCameraMatch-rr0oUwQ2.js} +2 -2
- package/web/assets/{plateFollow-B9_QTgvo.js → plateFollow-BjvtcT8q.js} +2 -2
- package/web/assets/{plateMatte-BiqyI_8x.js → plateMatte-BqyL8cQZ.js} +2 -2
- package/web/assets/{pluginAutomation-5DYldFrb.js → pluginAutomation-Dp188qm7.js} +1 -1
- package/web/assets/{poseTracker-PuI8vWpR.js → poseTracker-DDGDhhMF.js} +1 -1
- package/web/assets/{productTools-B1h5cgyt.js → productTools-CRgI88-O.js} +2 -2
- package/web/assets/remote-Dva2qg58.js +1241 -0
- package/web/assets/{rigTrack-CUt4O67J.js → rigTrack-UYZU4P-e.js} +1 -1
- package/web/assets/{rotoMaskStore-DIi45swK.js → rotoMaskStore-BxyxB2bD.js} +1 -1
- package/web/assets/{rotoMatte-013RKqHu.js → rotoMatte-BdYa8FSB.js} +1 -1
- package/web/assets/{rotoscope-d_TUxa-J.js → rotoscope-DDixNQCt.js} +1 -1
- package/web/assets/{shot-worker-B1iZT6F5.js → shot-worker-D9sZS6bn.js} +1 -1
- package/web/assets/{shotFxAgent-BDfe73TP.js → shotFxAgent-7RQNtEe4.js} +2 -2
- package/web/assets/{skin-GDY3QPkV.js → skin-CVwmK130.js} +1 -1
- package/web/assets/{spark.module-DdwuJ_hb.js → spark.module-B34aiScb.js} +1 -1
- package/web/assets/{spellDuel-DjNN00bv.js → spellDuel-BkweL6pI.js} +2 -2
- package/web/assets/{store-2zneEhhu.js → store-75tQUvPT.js} +1 -1
- package/web/assets/surfaceLight-DhU-zgNL.js +1 -0
- package/web/assets/{surfacePin-zDPmq-hH.js → surfacePin-ObK6QgDm.js} +2 -2
- package/web/assets/textAnimators-nVSz_sZo.js +1 -0
- package/web/assets/{thumb-byAKvhQP.js → thumb-r6dlZprA.js} +1 -1
- package/web/assets/{timeline3d-YIIk_Kn2.js → timeline3d-246tBEJl.js} +2 -2
- package/web/assets/timeline3dExport-T57qnWi9.js +1 -0
- package/web/assets/{timelineComp-B73i_8vD.js → timelineComp-BcewYGR2.js} +1 -1
- package/web/assets/{timelineProps-B2pnudeT.js → timelineProps-CJzzAWWO.js} +1 -1
- package/web/assets/{timelineText-BcL4Pw3C.js → timelineText-BzUhNWPB.js} +1 -1
- package/web/assets/titleArt-B8DVR58F.js +5 -0
- package/web/assets/{titleFrameBudget-Cml-MO53.js → titleFrameBudget-BYRZAQPs.js} +260 -260
- package/web/assets/titleFrames-BVgm601q.js +1 -0
- package/web/assets/{tool-Bt9bclIf.js → tool-CAGU3dUa.js} +1 -1
- package/web/assets/{tools-BXeJbgZJ.js → tools-DVaOkokV.js} +1 -1
- package/web/assets/{toonTools-u7Y9fdEZ.js → toonTools-CfGTR_H1.js} +2 -2
- package/web/assets/{trackAnchor-9MnVHe4S.js → trackAnchor-DzUt1r5Q.js} +1 -1
- package/web/assets/{userFonts-BHduCNtc.js → userFonts-DzY0A4bD.js} +1 -1
- package/web/assets/{vfxAlpha-DpV4rbI-.js → vfxAlpha-DQJOaZ9v.js} +2 -2
- package/web/assets/{vfxBackground-Ddviync5.js → vfxBackground-DiktQFOD.js} +2 -2
- package/web/assets/{videoExport-z5WjM0hw.js → videoExport-Ce0ElSQR.js} +1 -1
- package/web/assets/{views-CsrYzCSR.js → views-V3si1lOz.js} +1 -1
- package/web/assets/weaponDuel-D6sLVGmG.js +1 -0
- package/web/assets/{windowFrames-BQEWQkEs.js → windowFrames-D_2QJCJJ.js} +1 -1
- package/web/layer-worker.html +3 -3
- package/web/assets/aerial-DT_gUtSh.js +0 -2
- package/web/assets/auraTrack-CEs_Q9EP.js +0 -1
- package/web/assets/breakthrough-DvkxvNK9.js +0 -2
- package/web/assets/clientExport-C4VgAJtO.js +0 -1
- package/web/assets/exportEncode-D9OT7_5k.js +0 -1
- package/web/assets/fightDirector-CECPf2iH.js +0 -1
- package/web/assets/fightDrama-CqNoa5XI.js +0 -2
- package/web/assets/gpuExport-uyOAyrhm.js +0 -190
- package/web/assets/library-Dsz_MLyd.js +0 -1
- package/web/assets/mapBake-CNMOKXA7.js +0 -1
- package/web/assets/plateCamera-C96L5GKm.js +0 -1
- package/web/assets/remote-BJdzzFZg.js +0 -1241
- package/web/assets/surfaceLight-B_SYg_f8.js +0 -1
- package/web/assets/textAnimators-Bdt5LWXk.js +0 -1
- package/web/assets/timeline3dExport-CEH1RjNf.js +0 -1
- package/web/assets/titleArt-hb_T45WJ.js +0 -5
- package/web/assets/titleFrames-Dw0PEBdV.js +0 -1
- package/web/assets/weaponDuel-CLLgv5A4.js +0 -1
|
@@ -4257,6 +4257,361 @@
|
|
|
4257
4257
|
}
|
|
4258
4258
|
]
|
|
4259
4259
|
}
|
|
4260
|
+
},
|
|
4261
|
+
{
|
|
4262
|
+
"id": "kit-slide-right",
|
|
4263
|
+
"name": "Trượt phải (Speed Kit)",
|
|
4264
|
+
"category": "Trượt/Đẩy",
|
|
4265
|
+
"duration": 0.45,
|
|
4266
|
+
"tags": [
|
|
4267
|
+
"speed kit",
|
|
4268
|
+
"slide",
|
|
4269
|
+
"motion blur",
|
|
4270
|
+
"car"
|
|
4271
|
+
],
|
|
4272
|
+
"a": {
|
|
4273
|
+
"x": [
|
|
4274
|
+
{
|
|
4275
|
+
"t": 0,
|
|
4276
|
+
"v": 0,
|
|
4277
|
+
"ease": "expo-in"
|
|
4278
|
+
},
|
|
4279
|
+
{
|
|
4280
|
+
"t": 1,
|
|
4281
|
+
"v": 1
|
|
4282
|
+
}
|
|
4283
|
+
],
|
|
4284
|
+
"dirBlur": [
|
|
4285
|
+
{
|
|
4286
|
+
"t": 0,
|
|
4287
|
+
"v": 0,
|
|
4288
|
+
"ease": "expo-in"
|
|
4289
|
+
},
|
|
4290
|
+
{
|
|
4291
|
+
"t": 1,
|
|
4292
|
+
"v": 1
|
|
4293
|
+
}
|
|
4294
|
+
]
|
|
4295
|
+
},
|
|
4296
|
+
"b": {
|
|
4297
|
+
"x": [
|
|
4298
|
+
{
|
|
4299
|
+
"t": 0,
|
|
4300
|
+
"v": -1,
|
|
4301
|
+
"ease": "expo-out"
|
|
4302
|
+
},
|
|
4303
|
+
{
|
|
4304
|
+
"t": 1,
|
|
4305
|
+
"v": 0
|
|
4306
|
+
}
|
|
4307
|
+
],
|
|
4308
|
+
"dirBlur": [
|
|
4309
|
+
{
|
|
4310
|
+
"t": 0,
|
|
4311
|
+
"v": 1,
|
|
4312
|
+
"ease": "expo-out"
|
|
4313
|
+
},
|
|
4314
|
+
{
|
|
4315
|
+
"t": 1,
|
|
4316
|
+
"v": 0
|
|
4317
|
+
}
|
|
4318
|
+
]
|
|
4319
|
+
},
|
|
4320
|
+
"version": 1,
|
|
4321
|
+
"sortOrder": 1300
|
|
4322
|
+
},
|
|
4323
|
+
{
|
|
4324
|
+
"id": "kit-slide-left",
|
|
4325
|
+
"name": "Trượt trái (Speed Kit)",
|
|
4326
|
+
"category": "Trượt/Đẩy",
|
|
4327
|
+
"duration": 0.45,
|
|
4328
|
+
"tags": [
|
|
4329
|
+
"speed kit",
|
|
4330
|
+
"slide",
|
|
4331
|
+
"motion blur",
|
|
4332
|
+
"car"
|
|
4333
|
+
],
|
|
4334
|
+
"a": {
|
|
4335
|
+
"x": [
|
|
4336
|
+
{
|
|
4337
|
+
"t": 0,
|
|
4338
|
+
"v": 0,
|
|
4339
|
+
"ease": "expo-in"
|
|
4340
|
+
},
|
|
4341
|
+
{
|
|
4342
|
+
"t": 1,
|
|
4343
|
+
"v": -1
|
|
4344
|
+
}
|
|
4345
|
+
],
|
|
4346
|
+
"dirBlur": [
|
|
4347
|
+
{
|
|
4348
|
+
"t": 0,
|
|
4349
|
+
"v": 0,
|
|
4350
|
+
"ease": "expo-in"
|
|
4351
|
+
},
|
|
4352
|
+
{
|
|
4353
|
+
"t": 1,
|
|
4354
|
+
"v": 1
|
|
4355
|
+
}
|
|
4356
|
+
]
|
|
4357
|
+
},
|
|
4358
|
+
"b": {
|
|
4359
|
+
"x": [
|
|
4360
|
+
{
|
|
4361
|
+
"t": 0,
|
|
4362
|
+
"v": 1,
|
|
4363
|
+
"ease": "expo-out"
|
|
4364
|
+
},
|
|
4365
|
+
{
|
|
4366
|
+
"t": 1,
|
|
4367
|
+
"v": 0
|
|
4368
|
+
}
|
|
4369
|
+
],
|
|
4370
|
+
"dirBlur": [
|
|
4371
|
+
{
|
|
4372
|
+
"t": 0,
|
|
4373
|
+
"v": 1,
|
|
4374
|
+
"ease": "expo-out"
|
|
4375
|
+
},
|
|
4376
|
+
{
|
|
4377
|
+
"t": 1,
|
|
4378
|
+
"v": 0
|
|
4379
|
+
}
|
|
4380
|
+
]
|
|
4381
|
+
},
|
|
4382
|
+
"version": 1,
|
|
4383
|
+
"sortOrder": 1302
|
|
4384
|
+
},
|
|
4385
|
+
{
|
|
4386
|
+
"id": "kit-slide-up",
|
|
4387
|
+
"name": "Trượt lên (Speed Kit)",
|
|
4388
|
+
"category": "Trượt/Đẩy",
|
|
4389
|
+
"duration": 0.45,
|
|
4390
|
+
"tags": [
|
|
4391
|
+
"speed kit",
|
|
4392
|
+
"slide",
|
|
4393
|
+
"motion blur",
|
|
4394
|
+
"car"
|
|
4395
|
+
],
|
|
4396
|
+
"a": {
|
|
4397
|
+
"y": [
|
|
4398
|
+
{
|
|
4399
|
+
"t": 0,
|
|
4400
|
+
"v": 0,
|
|
4401
|
+
"ease": "expo-in"
|
|
4402
|
+
},
|
|
4403
|
+
{
|
|
4404
|
+
"t": 1,
|
|
4405
|
+
"v": -1
|
|
4406
|
+
}
|
|
4407
|
+
],
|
|
4408
|
+
"dirBlurV": [
|
|
4409
|
+
{
|
|
4410
|
+
"t": 0,
|
|
4411
|
+
"v": 0,
|
|
4412
|
+
"ease": "expo-in"
|
|
4413
|
+
},
|
|
4414
|
+
{
|
|
4415
|
+
"t": 1,
|
|
4416
|
+
"v": 1
|
|
4417
|
+
}
|
|
4418
|
+
]
|
|
4419
|
+
},
|
|
4420
|
+
"b": {
|
|
4421
|
+
"y": [
|
|
4422
|
+
{
|
|
4423
|
+
"t": 0,
|
|
4424
|
+
"v": 1,
|
|
4425
|
+
"ease": "expo-out"
|
|
4426
|
+
},
|
|
4427
|
+
{
|
|
4428
|
+
"t": 1,
|
|
4429
|
+
"v": 0
|
|
4430
|
+
}
|
|
4431
|
+
],
|
|
4432
|
+
"dirBlurV": [
|
|
4433
|
+
{
|
|
4434
|
+
"t": 0,
|
|
4435
|
+
"v": 1,
|
|
4436
|
+
"ease": "expo-out"
|
|
4437
|
+
},
|
|
4438
|
+
{
|
|
4439
|
+
"t": 1,
|
|
4440
|
+
"v": 0
|
|
4441
|
+
}
|
|
4442
|
+
]
|
|
4443
|
+
},
|
|
4444
|
+
"version": 1,
|
|
4445
|
+
"sortOrder": 1304
|
|
4446
|
+
},
|
|
4447
|
+
{
|
|
4448
|
+
"id": "kit-slide-down",
|
|
4449
|
+
"name": "Trượt xuống (Speed Kit)",
|
|
4450
|
+
"category": "Trượt/Đẩy",
|
|
4451
|
+
"duration": 0.45,
|
|
4452
|
+
"tags": [
|
|
4453
|
+
"speed kit",
|
|
4454
|
+
"slide",
|
|
4455
|
+
"motion blur",
|
|
4456
|
+
"car"
|
|
4457
|
+
],
|
|
4458
|
+
"a": {
|
|
4459
|
+
"y": [
|
|
4460
|
+
{
|
|
4461
|
+
"t": 0,
|
|
4462
|
+
"v": 0,
|
|
4463
|
+
"ease": "expo-in"
|
|
4464
|
+
},
|
|
4465
|
+
{
|
|
4466
|
+
"t": 1,
|
|
4467
|
+
"v": 1
|
|
4468
|
+
}
|
|
4469
|
+
],
|
|
4470
|
+
"dirBlurV": [
|
|
4471
|
+
{
|
|
4472
|
+
"t": 0,
|
|
4473
|
+
"v": 0,
|
|
4474
|
+
"ease": "expo-in"
|
|
4475
|
+
},
|
|
4476
|
+
{
|
|
4477
|
+
"t": 1,
|
|
4478
|
+
"v": 1
|
|
4479
|
+
}
|
|
4480
|
+
]
|
|
4481
|
+
},
|
|
4482
|
+
"b": {
|
|
4483
|
+
"y": [
|
|
4484
|
+
{
|
|
4485
|
+
"t": 0,
|
|
4486
|
+
"v": -1,
|
|
4487
|
+
"ease": "expo-out"
|
|
4488
|
+
},
|
|
4489
|
+
{
|
|
4490
|
+
"t": 1,
|
|
4491
|
+
"v": 0
|
|
4492
|
+
}
|
|
4493
|
+
],
|
|
4494
|
+
"dirBlurV": [
|
|
4495
|
+
{
|
|
4496
|
+
"t": 0,
|
|
4497
|
+
"v": 1,
|
|
4498
|
+
"ease": "expo-out"
|
|
4499
|
+
},
|
|
4500
|
+
{
|
|
4501
|
+
"t": 1,
|
|
4502
|
+
"v": 0
|
|
4503
|
+
}
|
|
4504
|
+
]
|
|
4505
|
+
},
|
|
4506
|
+
"version": 1,
|
|
4507
|
+
"sortOrder": 1306
|
|
4508
|
+
},
|
|
4509
|
+
{
|
|
4510
|
+
"id": "kit-gravity",
|
|
4511
|
+
"name": "Hút tâm (Speed Kit)",
|
|
4512
|
+
"category": "Zoom/Xoay",
|
|
4513
|
+
"duration": 0.5,
|
|
4514
|
+
"tags": [
|
|
4515
|
+
"speed kit",
|
|
4516
|
+
"zoom",
|
|
4517
|
+
"pull",
|
|
4518
|
+
"gravity",
|
|
4519
|
+
"car"
|
|
4520
|
+
],
|
|
4521
|
+
"a": {
|
|
4522
|
+
"zoom": [
|
|
4523
|
+
{
|
|
4524
|
+
"t": 0,
|
|
4525
|
+
"v": 1,
|
|
4526
|
+
"ease": "expo-in"
|
|
4527
|
+
},
|
|
4528
|
+
{
|
|
4529
|
+
"t": 1,
|
|
4530
|
+
"v": 3.2
|
|
4531
|
+
}
|
|
4532
|
+
],
|
|
4533
|
+
"zoomBlur": [
|
|
4534
|
+
{
|
|
4535
|
+
"t": 0,
|
|
4536
|
+
"v": 0,
|
|
4537
|
+
"ease": "expo-in"
|
|
4538
|
+
},
|
|
4539
|
+
{
|
|
4540
|
+
"t": 1,
|
|
4541
|
+
"v": 1
|
|
4542
|
+
}
|
|
4543
|
+
],
|
|
4544
|
+
"rot": [
|
|
4545
|
+
{
|
|
4546
|
+
"t": 0,
|
|
4547
|
+
"v": 0,
|
|
4548
|
+
"ease": "expo-in"
|
|
4549
|
+
},
|
|
4550
|
+
{
|
|
4551
|
+
"t": 1,
|
|
4552
|
+
"v": 18
|
|
4553
|
+
}
|
|
4554
|
+
],
|
|
4555
|
+
"opacity": [
|
|
4556
|
+
{
|
|
4557
|
+
"t": 0,
|
|
4558
|
+
"v": 1,
|
|
4559
|
+
"ease": "hold"
|
|
4560
|
+
},
|
|
4561
|
+
{
|
|
4562
|
+
"t": 0.5,
|
|
4563
|
+
"v": 0
|
|
4564
|
+
}
|
|
4565
|
+
]
|
|
4566
|
+
},
|
|
4567
|
+
"b": {
|
|
4568
|
+
"zoom": [
|
|
4569
|
+
{
|
|
4570
|
+
"t": 0,
|
|
4571
|
+
"v": 0.45,
|
|
4572
|
+
"ease": "expo-out"
|
|
4573
|
+
},
|
|
4574
|
+
{
|
|
4575
|
+
"t": 1,
|
|
4576
|
+
"v": 1
|
|
4577
|
+
}
|
|
4578
|
+
],
|
|
4579
|
+
"zoomBlur": [
|
|
4580
|
+
{
|
|
4581
|
+
"t": 0,
|
|
4582
|
+
"v": 1,
|
|
4583
|
+
"ease": "expo-out"
|
|
4584
|
+
},
|
|
4585
|
+
{
|
|
4586
|
+
"t": 1,
|
|
4587
|
+
"v": 0
|
|
4588
|
+
}
|
|
4589
|
+
],
|
|
4590
|
+
"rot": [
|
|
4591
|
+
{
|
|
4592
|
+
"t": 0,
|
|
4593
|
+
"v": -18,
|
|
4594
|
+
"ease": "expo-out"
|
|
4595
|
+
},
|
|
4596
|
+
{
|
|
4597
|
+
"t": 1,
|
|
4598
|
+
"v": 0
|
|
4599
|
+
}
|
|
4600
|
+
],
|
|
4601
|
+
"opacity": [
|
|
4602
|
+
{
|
|
4603
|
+
"t": 0,
|
|
4604
|
+
"v": 0,
|
|
4605
|
+
"ease": "hold"
|
|
4606
|
+
},
|
|
4607
|
+
{
|
|
4608
|
+
"t": 0.5,
|
|
4609
|
+
"v": 1
|
|
4610
|
+
}
|
|
4611
|
+
]
|
|
4612
|
+
},
|
|
4613
|
+
"version": 1,
|
|
4614
|
+
"sortOrder": 1308
|
|
4260
4615
|
}
|
|
4261
4616
|
]
|
|
4262
4617
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as d,
|
|
1
|
+
import{j as d,dy as y,dz as w}from"./remote-Dva2qg58.js";import{r as p}from"./api-DUp403BK.js";import{t as b,a as E,d as u}from"./thumb-r6dlZprA.js";import"./three.module-Bx43vjkH.js";import"./GLTFLoader-BHWu1lKg.js";import"./store-75tQUvPT.js";import"./titleFrameBudget-BYRZAQPs.js";import"./rotoMaskStore-BxyxB2bD.js";import"./textAnimators-nVSz_sZo.js";import"./timelineComp-BcewYGR2.js";import"./rigTrack-UYZU4P-e.js";const j=["https://admin.clipoox.com","http://localhost:3000","http://localhost:5173"],x=960,h=540;function F(i){const r=i&&typeof i=="object"?i:{},m=y({...r,name:String(r.name||"preview").slice(0,60),category:r.category||"tu-tien"});let o=5381;for(const l of JSON.stringify(m))o=(o<<5)+o+l.charCodeAt(0)|0;return w({id:(o>>>0).toString(16).padStart(32,"0"),...m})}function D(){const i=p.useRef(null),[r,m]=p.useState(null),[o,l]=p.useState("");return p.useEffect(()=>{const s=(t,a)=>t.source?.postMessage(a,{targetOrigin:t.origin}),c=t=>{if(!j.includes(t.origin)||t.source!==window.parent||!t.data||typeof t.data!="object")return;const a="id"in t.data?t.data.id:null;let n;try{n=F(t.data.fx)}catch(e){t.data.type==="clipoox-fx-play"&&l(e.message),s(t,{type:"clipoox-fx-error",id:a,error:e.message});return}if(t.data.type==="clipoox-fx-play"){l(""),m(n);return}if(t.data.type==="clipoox-fx-thumb")try{const e=Object.assign(document.createElement("canvas"),{width:480,height:270}),f=e.getContext("2d");if(!f)throw Error("canvas");const g=Number.isFinite(t.data.t)?Math.max(0,Number(t.data.t)):E(n);u(f,n,g,480,270),s(t,{type:"clipoox-fx-thumb",id:a,webp:e.toDataURL("image/webp",.85)})}catch(e){s(t,{type:"clipoox-fx-error",id:a,error:e.message})}};return window.addEventListener("message",c),window.parent?.postMessage({type:"clipoox-fx-ready"},"*"),()=>window.removeEventListener("message",c)},[]),p.useEffect(()=>{const s=i.current,c=s?.getContext("2d");if(!r||!s||!c)return;let t=0;const a=performance.now(),n=b(r),e=()=>{u(c,r,(performance.now()-a)/1e3%n,x,h),t=requestAnimationFrame(e)};return t=requestAnimationFrame(e),()=>cancelAnimationFrame(t)},[r]),d.jsxs("div",{style:{margin:0,background:"#0a0e14",width:"100vw",height:"100vh",display:"grid",placeItems:"center"},children:[d.jsx("canvas",{ref:i,width:x,height:h,style:{maxWidth:"100%",maxHeight:"100vh",objectFit:"contain"},"aria-label":"FX preview"}),o&&d.jsx("p",{role:"alert",style:{position:"fixed",bottom:8,left:8,right:8,color:"#ff8080",font:"12px sans-serif"},children:o})]})}export{D as default,F as previewEntry};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as w,
|
|
1
|
+
import{j as w,dx as F}from"./remote-Dva2qg58.js";import{r as l}from"./api-DUp403BK.js";import{d as M,m as E}from"./lottieLayer-1ET89OUr.js";import"./three.module-Bx43vjkH.js";import"./GLTFLoader-BHWu1lKg.js";import"./store-75tQUvPT.js";import"./titleFrameBudget-BYRZAQPs.js";import"./rotoMaskStore-BxyxB2bD.js";import"./textAnimators-nVSz_sZo.js";import"./timelineComp-BcewYGR2.js";import"./rigTrack-UYZU4P-e.js";const I=["https://admin.clipoox.com","http://localhost:3000","http://localhost:5173"],j={"16:9":[1280,720],"9:16":[720,1280],"1:1":[960,960],"4:5":[768,960]},L=f=>j[f.aspect??"16:9"]??j["16:9"];function z(){const f=l.useRef(null),[o,R]=l.useState(null),[x,y]=l.useState(""),b=l.useRef(Promise.resolve());return l.useEffect(()=>{const a=(t,i)=>t.source?.postMessage(i,{targetOrigin:t.origin}),h=async t=>{if(!I.includes(t.origin)||t.source!==window.parent||!t.data||typeof t.data!="object")return;const i="id"in t.data?t.data.id:null;let e;try{e=F(t.data.motion)}catch(n){a(t,{type:"clipoox-motion-error",id:i,error:n.message});return}if(t.data.type==="clipoox-motion-play"){y(""),R(e);return}if(t.data.type==="clipoox-motion-thumb"){const[n,u]=L(e),m=480/Math.max(n,u),s=Math.round(n*m),d=Math.round(u*m);try{const p=await E({layer:"embed:thumb",motion:{v:1,code:e.code,params:e.params},t:Number.isFinite(t.data.t)?Math.max(0,Math.min(e.duration,Number(t.data.t))):e.duration*.55,width:s,height:d,duration:e.duration}),c=Object.assign(document.createElement("canvas"),{width:s,height:d}),g=c.getContext("2d");if(!g)throw Error("canvas");g.fillStyle="#16181c",g.fillRect(0,0,s,d),g.drawImage(p,0,0),p.close(),a(t,{type:"clipoox-motion-thumb",id:i,webp:c.toDataURL("image/webp",.85)})}catch(p){a(t,{type:"clipoox-motion-error",id:i,error:p.message})}finally{M("embed:thumb")}}},r=t=>{b.current=b.current.then(()=>h(t)).catch(()=>{})};return window.addEventListener("message",r),window.parent?.postMessage({type:"clipoox-motion-ready"},"*"),()=>window.removeEventListener("message",r)},[]),l.useEffect(()=>{const a=f.current,h=a?.getContext("2d");if(!o||!a||!h)return;let r=!0,t=0;const i=performance.now(),[e,n]=L(o),u=Math.min(1,960/Math.max(e,n)),m=Math.round(e*u),s=Math.round(n*u);a.width=m,a.height=s;const d=async()=>{if(!r)return;const p=(performance.now()-i)/1e3%(o.duration+.8);try{const c=await E({layer:"embed:play",motion:{v:1,code:o.code,params:o.params},t:Math.min(p,o.duration),width:m,height:s,duration:o.duration});r&&(h.clearRect(0,0,m,s),h.drawImage(c,0,0)),c.close()}catch(c){if(r){y(c.message);return}}r&&(t=requestAnimationFrame(()=>void d()))};return d(),()=>{r=!1,cancelAnimationFrame(t),M("embed:play")}},[o]),w.jsxs("div",{style:{margin:0,background:"repeating-conic-gradient(#1d2026 0 25%,#16181c 0 50%) 0 0/24px 24px",width:"100vw",height:"100vh",display:"grid",placeItems:"center"},children:[w.jsx("canvas",{ref:f,width:1280,height:720,style:{maxWidth:"100%",maxHeight:"100vh",objectFit:"contain"},"aria-label":"Motion preview"}),x&&w.jsx("p",{role:"alert",style:{position:"fixed",bottom:8,left:8,color:"#ff8080",font:"12px sans-serif"},children:x})]})}export{z as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as bn,j as s}from"./remote-BJdzzFZg.js";import{u as hn,r as d,t as a}from"./api-QBI5GJTZ.js";import{at as kn,au as Nn,av as un,aw as pn,ax as W,ay as R,R as H,az as wn,N as yn,aA as Cn,z as Sn,M as Ln,aB as Mn,o as Dn,aC as Un,aD as q,aE as $n,aF as Pn,e as Tn,aG as An}from"./main-CVRIuDW2.js";import{d as Vn,k as Kn,m as En,l as In}from"./lottieLayer-CDCGeJyv.js";import{p as Fn}from"./TimelinePlugins-BI1bE9pX.js";import"./three.module-Bx43vjkH.js";import"./GLTFLoader-BHWu1lKg.js";import"./store-2zneEhhu.js";import"./titleFrameBudget-Cml-MO53.js";import"./rotoMaskStore-DIi45swK.js";import"./textAnimators-Bdt5LWXk.js";import"./timelineComp-B73i_8vD.js";import"./rigTrack-CUt4O67J.js";import"./spark.module-DdwuJ_hb.js";import"./userFonts-BHduCNtc.js";import"./timeline3d-YIIk_Kn2.js";import"./RoomEnvironment-Dmv_G5ka.js";import"./exportEncode-D9OT7_5k.js";import"./captionLayout-C67EMVI1.js";import"./timelineText-BcL4Pw3C.js";import"./titleArt-hb_T45WJ.js";import"./rotoMatte-013RKqHu.js";import"./distortGL-BaXfN0IK.js";import"./motionBlur-uAm030t9.js";import"./pluginAutomation-5DYldFrb.js";const mn=[{id:"all",vi:"Tất cả",en:"All"},{id:"motion",vi:"Motion",en:"Motion"},{id:"lottie",vi:"Lottie",en:"Lottie"},{id:"recipe",vi:"Công thức",en:"Recipe"},{id:"sfx",vi:"Âm thanh",en:"Sounds"},{id:"pack",vi:"Gói ngách",en:"Niche pack"},{id:"kit",vi:"Bộ 3D",en:"3D kit"},{id:"sfxlib",vi:"Kho âm thanh",en:"Sound library"},{id:"link",vi:"Cho AI agent",en:"AI agents"}],I=e=>e.kind==="pack"&&!!e.kit?.modelAssets,Q=e=>I(e)?"kit":e.kind,F=e=>e.kind==="link"&&!!e.link,Bn=e=>{e.link&&window.open(e.link.url,"_blank","noopener,noreferrer")},gn=(e,l)=>e>=1024*1024?`${(e/1024/1024).toFixed(e>=10*1024*1024?0:1).replace(".",l==="en"?".":",")} MB`:`${Math.max(1,Math.round(e/1024))} KB`,Y=({n:e=28})=>s.jsx("span",{className:"ps-wave","aria-hidden":!0,children:Array.from({length:e},(l,r)=>s.jsx("i",{style:{height:`${18+Math.round(72*Math.abs(Math.sin(r*1.37)*Math.cos(r*.41)))}%`}},r))}),xn=(e,l)=>mn.find(r=>r.id===e)?.[l==="en"?"en":"vi"]??e,On=5e3,Rn=600*1e3,on=e=>e.normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/đ/gi,"d").toLowerCase(),z=e=>(e.passVnd??0)>0||(e.passUsd??0)>0,Gn=e=>{const l=(r,o)=>r>0&&o>0?Math.min(r,o):r>0?r:o;return R({priceVnd:l(e.priceVnd,e.passVnd??0),priceUsd:l(e.priceUsd,e.passUsd??0)})};function Ns({installed:e,initialId:l=null,onClose:r,onInstalled:o,onUse:j,toast:c}){const m=hn(),u=m==="en"?"en":"vi",[f,L]=d.useState(null),[p,N]=d.useState([]),[M,A]=d.useState(""),[C,t]=d.useState("all"),[h,v]=d.useState("all"),[D,K]=d.useState(""),[x,w]=d.useState(null),[$,P]=d.useState(""),[T,b]=d.useState({}),[U,S]=d.useState(""),y=d.useCallback(()=>kn().then(n=>(N(n.owned),n.owned)).catch(()=>[]),[]),[V,G]=d.useState(!1);d.useEffect(()=>{Nn().then(n=>L(n.items),n=>{L([]),A(n.message)}),y().finally(()=>G(!0))},[y]);const E=d.useRef(!1);d.useEffect(()=>{if(!l||E.current||f===null||!V)return;E.current=!0;const n=f.find(i=>i.id===l)??p.find(i=>i.storeId===l&&i.item)?.item;n?w(n):c(a("Không tìm thấy plug-in này trong kho."),"error")},[l,f,p,V,c]),d.useEffect(()=>{const n=i=>{i.key==="Escape"&&(i.stopPropagation(),x?w(null):r())};return window.addEventListener("keydown",n,!0),()=>window.removeEventListener("keydown",n,!0)},[x,r]);const Z=Object.keys(T).join(",");d.useEffect(()=>{if(!Z)return;const n=window.setInterval(()=>{y().then(i=>{b(g=>{const k={...g};for(const O of Object.keys(k))(tn(i,O)||Date.now()-k[O]>Rn)&&delete k[O];return k})})},On);return()=>window.clearInterval(n)},[Z,y]);const B=n=>p.some(i=>i.storeId===n&&i.owned),_=n=>p.find(i=>i.storeId===n),nn=n=>p.some(i=>i.storeId===n&&i.status==="refunded"),sn=n=>e.some(i=>i.id===n&&i.source?.store===n),X=async n=>{P(n.id);try{await Mn(n.id),o(),Dn(),S(n.id),c(a("Đã cài “{0}” vào Plug-in của tôi",[n.name[u]]),"ok")}catch(i){const g=Fn(i);c(g.text,"error")}finally{P("")}},en=d.useRef({}),an=n=>n?.owned?n.expiresAt?String(n.expiresAt):"life":"none",tn=(n,i)=>{const g=n.find(k=>k.storeId===i);return!!g?.owned&&an(g)!==(en.current[i]??"none")},ln=(n,i)=>{en.current[n.id]=an(_(n.id)),Ln(n.id,i),b(g=>({...g,[n.id]:Date.now()}))},jn=async n=>{const i=await y();tn(i,n)?(b(g=>{const k={...g};return delete k[n],k}),c(a("Thanh toán xong — plug-in đã thuộc về bạn"),"ok")):c(a("Chưa thấy thanh toán. Nếu bạn vừa chuyển khoản, đợi một chút rồi kiểm tra lại."),"error")},fn=p.filter(n=>n.item).map(n=>n.item),J=(C==="owned"?fn:(f??[]).filter(n=>C==="all"||(C==="free"?n.free:!n.free))).filter(n=>(h==="all"||Q(n)===h)&&(!D.trim()||on(D).split(/\s+/).every(i=>on(`${n.name.vi} ${n.name.en} ${n.description.vi} ${n.description.en} ${n.author.name} ${n.tags.join(" ")}`).includes(i)))),vn=[{id:"all",label:a("Plug-in")},{id:"free",label:a("Miễn phí")},{id:"paid",label:a("Trả phí")},{id:"owned",label:a("Đã sở hữu")}],rn=(n,i)=>$===n.id?s.jsxs("button",{className:i,disabled:!0,children:[s.jsx("i",{className:"spin"})," ",a("Đang cài…")]}):sn(n.id)||U===n.id?s.jsxs(s.Fragment,{children:[j?s.jsxs("button",{className:`${i} ps-use`,onClick:()=>j(n.id),children:["✓ ",a("Đã cài · Dùng ngay")]}):s.jsxs("span",{className:`${i} ps-use`,role:"status",children:["✓ ",a("Đã cài")]}),s.jsx("button",{className:"ps-reinstall",title:a("Cài lại plug-in"),onClick:()=>void X(n),children:a("Cài lại")})]}):s.jsx("button",{className:i,onClick:()=>void X(n),children:a("Cài plug-in")}),cn=(n,i=!1)=>{const g=`ad-use${i?" ps-big":""}`;if(F(n))return s.jsxs("button",{className:g,onClick:()=>Bn(n),children:[n.link.label?.[u]||a("Hướng dẫn cài")," ↗"]});if(n.free)return rn(n,g);if(T[n.id])return s.jsx("button",{className:`${g} ps-wait`,onClick:()=>void jn(n.id),children:a("Đã thanh toán? Kiểm tra lại")});if(n.kind==="sfxlib"||z(n)){const k=_(n.id);if(!i&&!k?.owned)return s.jsx("button",{className:g,onClick:()=>w(n),children:k?.expiresAt?a("Gia hạn"):a("Xem & mua")});if(i)return s.jsx(Xn,{item:n,owned:k,busy:$===n.id,installed:sn(n.id),onInstall:()=>void X(n),onBuy:O=>ln(n,O)})}return B(n.id)?rn(n,g):s.jsx("button",{className:g,onClick:()=>ln(n),children:a("Mua · {0}",[R(n)])})},dn=n=>{if(n.free)return s.jsx("span",{className:"ps-price free",children:a("Miễn phí")});const i=_(n.id);return i?.owned?s.jsxs("span",{className:"ps-price owned",children:["✓ ",i.expiresAt?a("Vé đến {0}",[H(i.expiresAt,m)]):a("Đã sở hữu")]}):s.jsx("span",{className:"ps-price",children:n.kind==="sfxlib"||z(n)?(n.passVnd||n.passUsd)&&!(n.priceVnd||n.priceUsd)?a("{0} / 30 ngày",[W(n)]):a("từ {0}",[Gn(n)]):R(n)})};return bn.createPortal(s.jsx("div",{className:"ad-backdrop",role:"dialog","aria-modal":"true","aria-label":a("Kho Plug-in"),onMouseDown:n=>{n.target===n.currentTarget&&r()},children:s.jsxs("section",{className:"ad-drawer ps-drawer",onMouseDown:n=>n.stopPropagation(),children:[s.jsxs("header",{className:"ad-head",children:[s.jsxs("div",{className:"ad-title",children:["🛍 ",a("Kho Plug-in")]}),s.jsxs("span",{className:"ad-count",children:[J.length," ",a("mục")]}),s.jsx("div",{className:"grow"}),s.jsx("button",{className:"ad-iconbtn",title:a("Đóng"),"aria-label":a("Đóng"),onClick:r,children:"✕"})]}),s.jsx("nav",{className:"ad-sources",children:vn.map(n=>s.jsxs("button",{className:`ad-tab${C===n.id?" on":""}`,"aria-pressed":C===n.id,onClick:()=>t(n.id),children:[n.id==="all"&&s.jsx("span",{className:"ad-pin",children:"⧉"}),n.label,n.id==="owned"&&p.filter(i=>i.owned).length>0&&s.jsx("span",{className:"ps-n",children:p.filter(i=>i.owned).length})]},n.id))}),s.jsxs("div",{className:"ad-tools",children:[s.jsx("input",{className:"ad-search","aria-label":a("Tìm plug-in"),placeholder:a("Tìm plug-in, tác giả, thẻ…"),value:D,onChange:n=>K(n.target.value),onKeyDown:n=>n.stopPropagation()}),s.jsx("div",{className:"ad-chips",role:"group","aria-label":a("Loại plug-in"),children:mn.map(n=>s.jsx("button",{className:`ad-chip${h===n.id?" on":""}`,"aria-pressed":h===n.id,onClick:()=>v(n.id),children:n[u]},n.id))})]}),s.jsxs("div",{className:"ad-notice",children:[s.jsxs("b",{children:["⧉ ",a("Plug-in không tốn credit.")]})," ",h==="sfxlib"?a("Kho âm thanh: mua một lần hoặc vé 30 ngày trên clipoox.com, tính là 1 plug-in; âm chỉ chép vào dự án khi bạn dùng."):a("Bản miễn phí cài ngay; bản trả phí mua một lần hoặc vé 30 ngày trên clipoox.com (chuyển khoản / thẻ), không tự trừ tiền.")]}),s.jsxs("div",{className:"ad-content",children:[M&&s.jsx("p",{role:"alert",className:"ad-alert",children:M}),f===null&&s.jsx("p",{className:"ad-muted",children:a("Đang tải…")}),f!==null&&!J.length&&s.jsx("div",{className:"ad-empty",children:C==="owned"?a("Bạn chưa mua plug-in nào."):D?a("Không có plug-in khớp tìm kiếm."):a("Kho chưa có plug-in nào trong nhóm này.")}),s.jsx("div",{className:"ad-grid",children:J.map(n=>s.jsxs("article",{className:"ad-card ps-card","data-store":n.id,children:[s.jsxs("button",{className:"ad-prev ps-open","aria-label":a("Xem {0}",[n.name[u]]),onClick:()=>w(n),children:[n.thumbnailUrl?s.jsx("img",{src:n.thumbnailUrl,alt:"",loading:"lazy"}):n.kind==="sfx"||n.kind==="sfxlib"?s.jsx(Y,{}):s.jsx("span",{className:"ad-ph",children:"⧉"}),s.jsx("span",{className:"ad-badge",children:(F(n)?n.link.platform:xn(Q(n),m)).toUpperCase()}),n.featured&&s.jsxs("span",{className:"ps-featured",title:a("Đối tác tiên phong của Clipoox"),children:["★ ",a("Đối tác tiên phong")]}),n.private&&s.jsxs("span",{className:"ps-private",title:a("Chỉ các tài khoản được Clipoox chọn mới thấy gói này"),children:["🔒 ",a("Gói riêng")]})]}),s.jsxs("div",{className:"ad-meta",children:[s.jsx("div",{className:"ad-name",title:n.name[u],children:n.name[u]}),s.jsxs("div",{className:"ad-sub ps-sub",children:[s.jsxs("span",{className:"ps-by",children:[n.author.name," · v",n.version]}),dn(n)]}),n.kind==="pack"&&!I(n)&&s.jsxs("div",{className:"ps-sounds-meta",children:["⧉ ",a("{0} mục trong gói",[n.itemCount??0])]}),I(n)&&s.jsxs("div",{className:"ps-kit-meta",children:["◈ ",s.jsx("b",{children:n.kit.items})," ",a("mục")," · ",s.jsx("b",{children:n.kit.models})," ",a("mô hình 3D")," · ",s.jsx("b",{children:n.kit.looks})," ",a("look")," · ",gn(n.kit.bytes,u)]}),F(n)&&s.jsxs("div",{className:"ps-sounds-meta",children:["↗ ",a("Cài trong {0} trên máy bạn",[n.link.platform])]}),n.kind==="sfx"&&s.jsxs("div",{className:"ps-sounds-meta",children:["♪ ",a("{0} âm thanh",[n.soundCount??0])," · ",un(n.totalDuration)]}),n.kind==="sfxlib"&&s.jsxs("div",{className:"ps-sounds-meta",children:["📚 ",a("{0} âm thanh",[(n.soundCount??0).toLocaleString(u==="en"?"en-US":"vi-VN")])," · ",pn(n.totalDuration,u)]}),(n.kind==="sfxlib"||z(n))&&!n.free&&!B(n.id)&&s.jsx("div",{className:"ps-sounds-meta ps-lib-prices",children:[n.passVnd||n.passUsd?a("{0} / 30 ngày",[W(n)]):"",n.priceVnd||n.priceUsd?a("{0} trọn đời",[R(n)]):""].filter(Boolean).join(" · ")}),U===n.id&&s.jsxs("div",{className:"ps-installed",role:"status",children:["✓ ",a("Đã cài vào Plug-in của tôi")]}),T[n.id]&&s.jsxs("div",{className:"ps-waiting",role:"status",children:[s.jsx("i",{className:"spin"}),a("Đang chờ thanh toán…")]}),nn(n.id)&&!B(n.id)&&s.jsx("div",{className:"ps-waiting bad",children:a("Đơn đã hoàn tiền")}),s.jsx("div",{className:"ad-actions",children:cn(n)})]})]},n.id))})]}),x&&s.jsx(Hn,{item:x,locale:u,owned:B(x.id),free:x.free,waiting:!!T[x.id],refunded:nn(x.id),action:cn(x,!0),price:dn(x),installed:U===x.id,onClose:()=>w(null)},`${x.id}:${B(x.id)}`)]})}),document.body)}function Hn({item:e,locale:l,owned:r,free:o,waiting:j,refunded:c,action:m,price:u,installed:f,onClose:L}){const p=d.useRef(null),[N,M]=d.useState(!1),[A,C]=d.useState(!1);return d.useEffect(()=>{if(!(o||r)||e.kind==="recipe"||e.kind==="sfx"||e.kind==="pack"||e.kind==="sfxlib"||e.kind==="link")return;let t=!0,h=0,v=null;const D=`store-preview:${e.id}`,K={v:""},x=performance.now();return(async()=>{try{v=await wn(e.id)}catch{t&&C(!0);return}if(!t||!v)return;const w=v.manifest,$=640,P=360;if(w.kind==="motion"){const T=yn(w,v.entry,{}),b=w.duration,U=async()=>{if(t){try{const S=await En({layer:D,motion:T,t:(performance.now()-x)/1e3%b,width:$,height:P,duration:b}),y=p.current?.getContext("2d");y&&t&&(y.clearRect(0,0,$,P),y.drawImage(S,0,0),M(!0)),S.close()}catch{}h=requestAnimationFrame(()=>void U())}};U()}else{const T=await Cn(v.lottie,w,Sn(w,{}));K.v=URL.createObjectURL(new Blob([JSON.stringify(T)],{type:"application/json"}));const b=v.lottie.meta,U=Math.min($/b.w,P/b.h),S={W:Math.max(2,Math.round(b.w*U/2)*2),H:Math.max(2,Math.round(b.h*U/2)*2)},y=b.op-b.ip,V=document.createElement("canvas");V.width=S.W,V.height=S.H;const G=async()=>{if(t){try{await In(D,K.v,S,Math.floor((performance.now()-x)/1e3*b.fr%y),V);const E=p.current?.getContext("2d");E&&t&&(E.clearRect(0,0,$,P),E.drawImage(V,($-S.W)/2,(P-S.H)/2),M(!0))}catch{}h=requestAnimationFrame(()=>void G())}};G()}})(),()=>{t=!1,cancelAnimationFrame(h),Vn(D),Kn(D),K.v&&URL.revokeObjectURL(K.v)}},[e.id,e.kind,o,r]),s.jsx("div",{className:"ad-preview-modal",onMouseDown:t=>{t.target===t.currentTarget&&L()},children:s.jsxs("div",{className:"ad-preview-box ps-detail",role:"dialog","aria-label":e.name[l],children:[s.jsxs("header",{children:[s.jsx("b",{children:e.name[l]}),s.jsx("button",{className:"ad-iconbtn","aria-label":a("Đóng"),onClick:L,children:"✕"})]}),e.kind==="sfxlib"?s.jsx(_n,{item:e,locale:l}):e.kind==="sfx"?s.jsx(Wn,{item:e,locale:l,owned:r,free:o}):s.jsxs("div",{className:"ps-stage",children:[s.jsx("canvas",{ref:p,width:640,height:360,style:{display:N?"block":"none"}}),!N&&(e.previewUrl&&/\.(mp4|webm)(\?|$)/.test(e.previewUrl)?s.jsx("video",{src:e.previewUrl,autoPlay:!0,muted:!0,loop:!0,playsInline:!0}):e.previewUrl||e.thumbnailUrl?s.jsx("img",{src:e.previewUrl||e.thumbnailUrl,alt:""}):s.jsx("span",{className:"ad-ph",children:"⧉"})),s.jsx("span",{className:"ps-stage-note",children:N?a("Xem thử trực tiếp trong sandbox"):o||r?A?a("Không tải được bản xem thử"):e.kind==="recipe"?a("Công thức chạy trên clip bạn chọn"):e.kind==="pack"?a("Gói {0} mục — cài rồi dùng từng mục trong tab Plug-in",[e.itemCount??0]):F(e)?a("Cài trong {0} trên máy bạn — không cài vào Timeline",[e.link.platform]):a("Đang tải bản xem thử…"):a("Mua để xem thử trực tiếp và dùng")})]}),e.kind==="pack"&&s.jsx(zn,{item:e,locale:l}),s.jsxs("div",{className:"ps-info",children:[e.featured&&s.jsxs("p",{className:"ps-featured-line",children:["★ ",a("Đối tác tiên phong của Clipoox")]}),e.private&&s.jsxs("p",{className:"ps-private-line",children:["🔒 ",a("Gói riêng: chỉ các tài khoản được Clipoox chọn mới thấy và cài được.")]}),s.jsxs("div",{className:"ps-row",children:[u,s.jsxs("span",{className:"ps-kind",children:[F(e)?e.link.platform:xn(Q(e),l)," · v",e.version," · ",e.author.name,e.kit?` · ${gn(e.kit.bytes,l)}`:"",I(e)?` · ${a("GLB ≤ 20 MB, ≤ 300 000 tam giác")}`:""]})]}),s.jsx("p",{children:e.description[l]}),F(e)&&e.link.commands.length>0&&s.jsx(qn,{commands:e.link.commands}),e.params.length>0&&s.jsxs("p",{className:"ps-params",children:[s.jsxs("b",{children:[a("Tham số chỉnh được"),":"]})," ",e.params.map(t=>t.label[l]).join(" · ")]}),j&&s.jsxs("div",{className:"ps-waiting",role:"status",children:[s.jsx("i",{className:"spin"}),a("Đang chờ thanh toán… Hoàn tất trên trang clipoox.com vừa mở, rồi quay lại đây.")]}),c&&!r&&s.jsx("div",{className:"ps-waiting bad",children:a("Đơn mua này đã được hoàn tiền nên không cài mới được. Các clip đã dùng vẫn giữ nguyên.")}),f&&s.jsxs("div",{className:"ps-installed",role:"status",children:["✓ ",a("Đã cài vào Plug-in của tôi — mở tab Plug-in để dùng.")]}),s.jsx("div",{className:"ad-actions",children:m}),I(e)&&!o&&!r&&s.jsxs("div",{className:"ps-lock",children:["🔒 ",a("Mô hình và texture chỉ tải về máy sau khi mua. Lớp đã dựng vẫn giữ nếu bộ bị gỡ hay ngừng bán.")]}),I(e)&&(o||r)&&s.jsx("small",{className:"muted",children:a("Tài nguyên 3D chỉ chép vào dự án khi bạn dùng một mục. Lớp đã dựng vẫn giữ nếu bộ bị gỡ hay ngừng bán.")}),!o&&!r&&e.kind!=="sfxlib"&&!z(e)&&s.jsx("small",{className:"muted",children:a("Thanh toán một lần trên clipoox.com: chuyển khoản (VND) hoặc thẻ quốc tế (USD). Không trừ credit.")})]})]})})}function qn({commands:e}){const[l,r]=d.useState(!1),o=()=>{navigator.clipboard?.writeText(e.join(`
|
|
1
|
+
import{r as bn,j as s}from"./remote-Dva2qg58.js";import{u as hn,r as d,t as a}from"./api-DUp403BK.js";import{at as kn,au as Nn,av as un,aw as pn,ax as W,ay as R,R as H,az as wn,N as yn,aA as Cn,z as Sn,M as Ln,aB as Mn,o as Dn,aC as Un,aD as q,aE as $n,aF as Pn,e as Tn,aG as An}from"./main-BKjBWQik.js";import{d as Vn,k as Kn,m as En,l as In}from"./lottieLayer-1ET89OUr.js";import{p as Fn}from"./TimelinePlugins-DnkV3i4G.js";import"./three.module-Bx43vjkH.js";import"./GLTFLoader-BHWu1lKg.js";import"./store-75tQUvPT.js";import"./titleFrameBudget-BYRZAQPs.js";import"./rotoMaskStore-BxyxB2bD.js";import"./textAnimators-nVSz_sZo.js";import"./timelineComp-BcewYGR2.js";import"./rigTrack-UYZU4P-e.js";import"./spark.module-B34aiScb.js";import"./userFonts-DzY0A4bD.js";import"./timeline3d-246tBEJl.js";import"./RoomEnvironment-Dmv_G5ka.js";import"./exportEncode-MUwVTI52.js";import"./captionLayout-EuB59pN_.js";import"./timelineText-BzUhNWPB.js";import"./titleArt-B8DVR58F.js";import"./rotoMatte-BdYa8FSB.js";import"./distortGL-BlmBZKRU.js";import"./motionBlur-uAm030t9.js";import"./pluginAutomation-Dp188qm7.js";const mn=[{id:"all",vi:"Tất cả",en:"All"},{id:"motion",vi:"Motion",en:"Motion"},{id:"lottie",vi:"Lottie",en:"Lottie"},{id:"recipe",vi:"Công thức",en:"Recipe"},{id:"sfx",vi:"Âm thanh",en:"Sounds"},{id:"pack",vi:"Gói ngách",en:"Niche pack"},{id:"kit",vi:"Bộ 3D",en:"3D kit"},{id:"sfxlib",vi:"Kho âm thanh",en:"Sound library"},{id:"link",vi:"Cho AI agent",en:"AI agents"}],I=e=>e.kind==="pack"&&!!e.kit?.modelAssets,Q=e=>I(e)?"kit":e.kind,F=e=>e.kind==="link"&&!!e.link,Bn=e=>{e.link&&window.open(e.link.url,"_blank","noopener,noreferrer")},gn=(e,l)=>e>=1024*1024?`${(e/1024/1024).toFixed(e>=10*1024*1024?0:1).replace(".",l==="en"?".":",")} MB`:`${Math.max(1,Math.round(e/1024))} KB`,Y=({n:e=28})=>s.jsx("span",{className:"ps-wave","aria-hidden":!0,children:Array.from({length:e},(l,r)=>s.jsx("i",{style:{height:`${18+Math.round(72*Math.abs(Math.sin(r*1.37)*Math.cos(r*.41)))}%`}},r))}),xn=(e,l)=>mn.find(r=>r.id===e)?.[l==="en"?"en":"vi"]??e,On=5e3,Rn=600*1e3,on=e=>e.normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/đ/gi,"d").toLowerCase(),z=e=>(e.passVnd??0)>0||(e.passUsd??0)>0,Gn=e=>{const l=(r,o)=>r>0&&o>0?Math.min(r,o):r>0?r:o;return R({priceVnd:l(e.priceVnd,e.passVnd??0),priceUsd:l(e.priceUsd,e.passUsd??0)})};function Ns({installed:e,initialId:l=null,onClose:r,onInstalled:o,onUse:j,toast:c}){const m=hn(),u=m==="en"?"en":"vi",[f,L]=d.useState(null),[p,N]=d.useState([]),[M,A]=d.useState(""),[C,t]=d.useState("all"),[h,v]=d.useState("all"),[D,K]=d.useState(""),[x,w]=d.useState(null),[$,P]=d.useState(""),[T,b]=d.useState({}),[U,S]=d.useState(""),y=d.useCallback(()=>kn().then(n=>(N(n.owned),n.owned)).catch(()=>[]),[]),[V,G]=d.useState(!1);d.useEffect(()=>{Nn().then(n=>L(n.items),n=>{L([]),A(n.message)}),y().finally(()=>G(!0))},[y]);const E=d.useRef(!1);d.useEffect(()=>{if(!l||E.current||f===null||!V)return;E.current=!0;const n=f.find(i=>i.id===l)??p.find(i=>i.storeId===l&&i.item)?.item;n?w(n):c(a("Không tìm thấy plug-in này trong kho."),"error")},[l,f,p,V,c]),d.useEffect(()=>{const n=i=>{i.key==="Escape"&&(i.stopPropagation(),x?w(null):r())};return window.addEventListener("keydown",n,!0),()=>window.removeEventListener("keydown",n,!0)},[x,r]);const Z=Object.keys(T).join(",");d.useEffect(()=>{if(!Z)return;const n=window.setInterval(()=>{y().then(i=>{b(g=>{const k={...g};for(const O of Object.keys(k))(tn(i,O)||Date.now()-k[O]>Rn)&&delete k[O];return k})})},On);return()=>window.clearInterval(n)},[Z,y]);const B=n=>p.some(i=>i.storeId===n&&i.owned),_=n=>p.find(i=>i.storeId===n),nn=n=>p.some(i=>i.storeId===n&&i.status==="refunded"),sn=n=>e.some(i=>i.id===n&&i.source?.store===n),X=async n=>{P(n.id);try{await Mn(n.id),o(),Dn(),S(n.id),c(a("Đã cài “{0}” vào Plug-in của tôi",[n.name[u]]),"ok")}catch(i){const g=Fn(i);c(g.text,"error")}finally{P("")}},en=d.useRef({}),an=n=>n?.owned?n.expiresAt?String(n.expiresAt):"life":"none",tn=(n,i)=>{const g=n.find(k=>k.storeId===i);return!!g?.owned&&an(g)!==(en.current[i]??"none")},ln=(n,i)=>{en.current[n.id]=an(_(n.id)),Ln(n.id,i),b(g=>({...g,[n.id]:Date.now()}))},jn=async n=>{const i=await y();tn(i,n)?(b(g=>{const k={...g};return delete k[n],k}),c(a("Thanh toán xong — plug-in đã thuộc về bạn"),"ok")):c(a("Chưa thấy thanh toán. Nếu bạn vừa chuyển khoản, đợi một chút rồi kiểm tra lại."),"error")},fn=p.filter(n=>n.item).map(n=>n.item),J=(C==="owned"?fn:(f??[]).filter(n=>C==="all"||(C==="free"?n.free:!n.free))).filter(n=>(h==="all"||Q(n)===h)&&(!D.trim()||on(D).split(/\s+/).every(i=>on(`${n.name.vi} ${n.name.en} ${n.description.vi} ${n.description.en} ${n.author.name} ${n.tags.join(" ")}`).includes(i)))),vn=[{id:"all",label:a("Plug-in")},{id:"free",label:a("Miễn phí")},{id:"paid",label:a("Trả phí")},{id:"owned",label:a("Đã sở hữu")}],rn=(n,i)=>$===n.id?s.jsxs("button",{className:i,disabled:!0,children:[s.jsx("i",{className:"spin"})," ",a("Đang cài…")]}):sn(n.id)||U===n.id?s.jsxs(s.Fragment,{children:[j?s.jsxs("button",{className:`${i} ps-use`,onClick:()=>j(n.id),children:["✓ ",a("Đã cài · Dùng ngay")]}):s.jsxs("span",{className:`${i} ps-use`,role:"status",children:["✓ ",a("Đã cài")]}),s.jsx("button",{className:"ps-reinstall",title:a("Cài lại plug-in"),onClick:()=>void X(n),children:a("Cài lại")})]}):s.jsx("button",{className:i,onClick:()=>void X(n),children:a("Cài plug-in")}),cn=(n,i=!1)=>{const g=`ad-use${i?" ps-big":""}`;if(F(n))return s.jsxs("button",{className:g,onClick:()=>Bn(n),children:[n.link.label?.[u]||a("Hướng dẫn cài")," ↗"]});if(n.free)return rn(n,g);if(T[n.id])return s.jsx("button",{className:`${g} ps-wait`,onClick:()=>void jn(n.id),children:a("Đã thanh toán? Kiểm tra lại")});if(n.kind==="sfxlib"||z(n)){const k=_(n.id);if(!i&&!k?.owned)return s.jsx("button",{className:g,onClick:()=>w(n),children:k?.expiresAt?a("Gia hạn"):a("Xem & mua")});if(i)return s.jsx(Xn,{item:n,owned:k,busy:$===n.id,installed:sn(n.id),onInstall:()=>void X(n),onBuy:O=>ln(n,O)})}return B(n.id)?rn(n,g):s.jsx("button",{className:g,onClick:()=>ln(n),children:a("Mua · {0}",[R(n)])})},dn=n=>{if(n.free)return s.jsx("span",{className:"ps-price free",children:a("Miễn phí")});const i=_(n.id);return i?.owned?s.jsxs("span",{className:"ps-price owned",children:["✓ ",i.expiresAt?a("Vé đến {0}",[H(i.expiresAt,m)]):a("Đã sở hữu")]}):s.jsx("span",{className:"ps-price",children:n.kind==="sfxlib"||z(n)?(n.passVnd||n.passUsd)&&!(n.priceVnd||n.priceUsd)?a("{0} / 30 ngày",[W(n)]):a("từ {0}",[Gn(n)]):R(n)})};return bn.createPortal(s.jsx("div",{className:"ad-backdrop",role:"dialog","aria-modal":"true","aria-label":a("Kho Plug-in"),onMouseDown:n=>{n.target===n.currentTarget&&r()},children:s.jsxs("section",{className:"ad-drawer ps-drawer",onMouseDown:n=>n.stopPropagation(),children:[s.jsxs("header",{className:"ad-head",children:[s.jsxs("div",{className:"ad-title",children:["🛍 ",a("Kho Plug-in")]}),s.jsxs("span",{className:"ad-count",children:[J.length," ",a("mục")]}),s.jsx("div",{className:"grow"}),s.jsx("button",{className:"ad-iconbtn",title:a("Đóng"),"aria-label":a("Đóng"),onClick:r,children:"✕"})]}),s.jsx("nav",{className:"ad-sources",children:vn.map(n=>s.jsxs("button",{className:`ad-tab${C===n.id?" on":""}`,"aria-pressed":C===n.id,onClick:()=>t(n.id),children:[n.id==="all"&&s.jsx("span",{className:"ad-pin",children:"⧉"}),n.label,n.id==="owned"&&p.filter(i=>i.owned).length>0&&s.jsx("span",{className:"ps-n",children:p.filter(i=>i.owned).length})]},n.id))}),s.jsxs("div",{className:"ad-tools",children:[s.jsx("input",{className:"ad-search","aria-label":a("Tìm plug-in"),placeholder:a("Tìm plug-in, tác giả, thẻ…"),value:D,onChange:n=>K(n.target.value),onKeyDown:n=>n.stopPropagation()}),s.jsx("div",{className:"ad-chips",role:"group","aria-label":a("Loại plug-in"),children:mn.map(n=>s.jsx("button",{className:`ad-chip${h===n.id?" on":""}`,"aria-pressed":h===n.id,onClick:()=>v(n.id),children:n[u]},n.id))})]}),s.jsxs("div",{className:"ad-notice",children:[s.jsxs("b",{children:["⧉ ",a("Plug-in không tốn credit.")]})," ",h==="sfxlib"?a("Kho âm thanh: mua một lần hoặc vé 30 ngày trên clipoox.com, tính là 1 plug-in; âm chỉ chép vào dự án khi bạn dùng."):a("Bản miễn phí cài ngay; bản trả phí mua một lần hoặc vé 30 ngày trên clipoox.com (chuyển khoản / thẻ), không tự trừ tiền.")]}),s.jsxs("div",{className:"ad-content",children:[M&&s.jsx("p",{role:"alert",className:"ad-alert",children:M}),f===null&&s.jsx("p",{className:"ad-muted",children:a("Đang tải…")}),f!==null&&!J.length&&s.jsx("div",{className:"ad-empty",children:C==="owned"?a("Bạn chưa mua plug-in nào."):D?a("Không có plug-in khớp tìm kiếm."):a("Kho chưa có plug-in nào trong nhóm này.")}),s.jsx("div",{className:"ad-grid",children:J.map(n=>s.jsxs("article",{className:"ad-card ps-card","data-store":n.id,children:[s.jsxs("button",{className:"ad-prev ps-open","aria-label":a("Xem {0}",[n.name[u]]),onClick:()=>w(n),children:[n.thumbnailUrl?s.jsx("img",{src:n.thumbnailUrl,alt:"",loading:"lazy"}):n.kind==="sfx"||n.kind==="sfxlib"?s.jsx(Y,{}):s.jsx("span",{className:"ad-ph",children:"⧉"}),s.jsx("span",{className:"ad-badge",children:(F(n)?n.link.platform:xn(Q(n),m)).toUpperCase()}),n.featured&&s.jsxs("span",{className:"ps-featured",title:a("Đối tác tiên phong của Clipoox"),children:["★ ",a("Đối tác tiên phong")]}),n.private&&s.jsxs("span",{className:"ps-private",title:a("Chỉ các tài khoản được Clipoox chọn mới thấy gói này"),children:["🔒 ",a("Gói riêng")]})]}),s.jsxs("div",{className:"ad-meta",children:[s.jsx("div",{className:"ad-name",title:n.name[u],children:n.name[u]}),s.jsxs("div",{className:"ad-sub ps-sub",children:[s.jsxs("span",{className:"ps-by",children:[n.author.name," · v",n.version]}),dn(n)]}),n.kind==="pack"&&!I(n)&&s.jsxs("div",{className:"ps-sounds-meta",children:["⧉ ",a("{0} mục trong gói",[n.itemCount??0])]}),I(n)&&s.jsxs("div",{className:"ps-kit-meta",children:["◈ ",s.jsx("b",{children:n.kit.items})," ",a("mục")," · ",s.jsx("b",{children:n.kit.models})," ",a("mô hình 3D")," · ",s.jsx("b",{children:n.kit.looks})," ",a("look")," · ",gn(n.kit.bytes,u)]}),F(n)&&s.jsxs("div",{className:"ps-sounds-meta",children:["↗ ",a("Cài trong {0} trên máy bạn",[n.link.platform])]}),n.kind==="sfx"&&s.jsxs("div",{className:"ps-sounds-meta",children:["♪ ",a("{0} âm thanh",[n.soundCount??0])," · ",un(n.totalDuration)]}),n.kind==="sfxlib"&&s.jsxs("div",{className:"ps-sounds-meta",children:["📚 ",a("{0} âm thanh",[(n.soundCount??0).toLocaleString(u==="en"?"en-US":"vi-VN")])," · ",pn(n.totalDuration,u)]}),(n.kind==="sfxlib"||z(n))&&!n.free&&!B(n.id)&&s.jsx("div",{className:"ps-sounds-meta ps-lib-prices",children:[n.passVnd||n.passUsd?a("{0} / 30 ngày",[W(n)]):"",n.priceVnd||n.priceUsd?a("{0} trọn đời",[R(n)]):""].filter(Boolean).join(" · ")}),U===n.id&&s.jsxs("div",{className:"ps-installed",role:"status",children:["✓ ",a("Đã cài vào Plug-in của tôi")]}),T[n.id]&&s.jsxs("div",{className:"ps-waiting",role:"status",children:[s.jsx("i",{className:"spin"}),a("Đang chờ thanh toán…")]}),nn(n.id)&&!B(n.id)&&s.jsx("div",{className:"ps-waiting bad",children:a("Đơn đã hoàn tiền")}),s.jsx("div",{className:"ad-actions",children:cn(n)})]})]},n.id))})]}),x&&s.jsx(Hn,{item:x,locale:u,owned:B(x.id),free:x.free,waiting:!!T[x.id],refunded:nn(x.id),action:cn(x,!0),price:dn(x),installed:U===x.id,onClose:()=>w(null)},`${x.id}:${B(x.id)}`)]})}),document.body)}function Hn({item:e,locale:l,owned:r,free:o,waiting:j,refunded:c,action:m,price:u,installed:f,onClose:L}){const p=d.useRef(null),[N,M]=d.useState(!1),[A,C]=d.useState(!1);return d.useEffect(()=>{if(!(o||r)||e.kind==="recipe"||e.kind==="sfx"||e.kind==="pack"||e.kind==="sfxlib"||e.kind==="link")return;let t=!0,h=0,v=null;const D=`store-preview:${e.id}`,K={v:""},x=performance.now();return(async()=>{try{v=await wn(e.id)}catch{t&&C(!0);return}if(!t||!v)return;const w=v.manifest,$=640,P=360;if(w.kind==="motion"){const T=yn(w,v.entry,{}),b=w.duration,U=async()=>{if(t){try{const S=await En({layer:D,motion:T,t:(performance.now()-x)/1e3%b,width:$,height:P,duration:b}),y=p.current?.getContext("2d");y&&t&&(y.clearRect(0,0,$,P),y.drawImage(S,0,0),M(!0)),S.close()}catch{}h=requestAnimationFrame(()=>void U())}};U()}else{const T=await Cn(v.lottie,w,Sn(w,{}));K.v=URL.createObjectURL(new Blob([JSON.stringify(T)],{type:"application/json"}));const b=v.lottie.meta,U=Math.min($/b.w,P/b.h),S={W:Math.max(2,Math.round(b.w*U/2)*2),H:Math.max(2,Math.round(b.h*U/2)*2)},y=b.op-b.ip,V=document.createElement("canvas");V.width=S.W,V.height=S.H;const G=async()=>{if(t){try{await In(D,K.v,S,Math.floor((performance.now()-x)/1e3*b.fr%y),V);const E=p.current?.getContext("2d");E&&t&&(E.clearRect(0,0,$,P),E.drawImage(V,($-S.W)/2,(P-S.H)/2),M(!0))}catch{}h=requestAnimationFrame(()=>void G())}};G()}})(),()=>{t=!1,cancelAnimationFrame(h),Vn(D),Kn(D),K.v&&URL.revokeObjectURL(K.v)}},[e.id,e.kind,o,r]),s.jsx("div",{className:"ad-preview-modal",onMouseDown:t=>{t.target===t.currentTarget&&L()},children:s.jsxs("div",{className:"ad-preview-box ps-detail",role:"dialog","aria-label":e.name[l],children:[s.jsxs("header",{children:[s.jsx("b",{children:e.name[l]}),s.jsx("button",{className:"ad-iconbtn","aria-label":a("Đóng"),onClick:L,children:"✕"})]}),e.kind==="sfxlib"?s.jsx(_n,{item:e,locale:l}):e.kind==="sfx"?s.jsx(Wn,{item:e,locale:l,owned:r,free:o}):s.jsxs("div",{className:"ps-stage",children:[s.jsx("canvas",{ref:p,width:640,height:360,style:{display:N?"block":"none"}}),!N&&(e.previewUrl&&/\.(mp4|webm)(\?|$)/.test(e.previewUrl)?s.jsx("video",{src:e.previewUrl,autoPlay:!0,muted:!0,loop:!0,playsInline:!0}):e.previewUrl||e.thumbnailUrl?s.jsx("img",{src:e.previewUrl||e.thumbnailUrl,alt:""}):s.jsx("span",{className:"ad-ph",children:"⧉"})),s.jsx("span",{className:"ps-stage-note",children:N?a("Xem thử trực tiếp trong sandbox"):o||r?A?a("Không tải được bản xem thử"):e.kind==="recipe"?a("Công thức chạy trên clip bạn chọn"):e.kind==="pack"?a("Gói {0} mục — cài rồi dùng từng mục trong tab Plug-in",[e.itemCount??0]):F(e)?a("Cài trong {0} trên máy bạn — không cài vào Timeline",[e.link.platform]):a("Đang tải bản xem thử…"):a("Mua để xem thử trực tiếp và dùng")})]}),e.kind==="pack"&&s.jsx(zn,{item:e,locale:l}),s.jsxs("div",{className:"ps-info",children:[e.featured&&s.jsxs("p",{className:"ps-featured-line",children:["★ ",a("Đối tác tiên phong của Clipoox")]}),e.private&&s.jsxs("p",{className:"ps-private-line",children:["🔒 ",a("Gói riêng: chỉ các tài khoản được Clipoox chọn mới thấy và cài được.")]}),s.jsxs("div",{className:"ps-row",children:[u,s.jsxs("span",{className:"ps-kind",children:[F(e)?e.link.platform:xn(Q(e),l)," · v",e.version," · ",e.author.name,e.kit?` · ${gn(e.kit.bytes,l)}`:"",I(e)?` · ${a("GLB ≤ 20 MB, ≤ 300 000 tam giác")}`:""]})]}),s.jsx("p",{children:e.description[l]}),F(e)&&e.link.commands.length>0&&s.jsx(qn,{commands:e.link.commands}),e.params.length>0&&s.jsxs("p",{className:"ps-params",children:[s.jsxs("b",{children:[a("Tham số chỉnh được"),":"]})," ",e.params.map(t=>t.label[l]).join(" · ")]}),j&&s.jsxs("div",{className:"ps-waiting",role:"status",children:[s.jsx("i",{className:"spin"}),a("Đang chờ thanh toán… Hoàn tất trên trang clipoox.com vừa mở, rồi quay lại đây.")]}),c&&!r&&s.jsx("div",{className:"ps-waiting bad",children:a("Đơn mua này đã được hoàn tiền nên không cài mới được. Các clip đã dùng vẫn giữ nguyên.")}),f&&s.jsxs("div",{className:"ps-installed",role:"status",children:["✓ ",a("Đã cài vào Plug-in của tôi — mở tab Plug-in để dùng.")]}),s.jsx("div",{className:"ad-actions",children:m}),I(e)&&!o&&!r&&s.jsxs("div",{className:"ps-lock",children:["🔒 ",a("Mô hình và texture chỉ tải về máy sau khi mua. Lớp đã dựng vẫn giữ nếu bộ bị gỡ hay ngừng bán.")]}),I(e)&&(o||r)&&s.jsx("small",{className:"muted",children:a("Tài nguyên 3D chỉ chép vào dự án khi bạn dùng một mục. Lớp đã dựng vẫn giữ nếu bộ bị gỡ hay ngừng bán.")}),!o&&!r&&e.kind!=="sfxlib"&&!z(e)&&s.jsx("small",{className:"muted",children:a("Thanh toán một lần trên clipoox.com: chuyển khoản (VND) hoặc thẻ quốc tế (USD). Không trừ credit.")})]})]})})}function qn({commands:e}){const[l,r]=d.useState(!1),o=()=>{navigator.clipboard?.writeText(e.join(`
|
|
2
2
|
`)).then(()=>{r(!0),window.setTimeout(()=>r(!1),2e3)},()=>{})};return s.jsxs("div",{className:"ps-cmds",children:[s.jsxs("div",{className:"ps-cmds-head",children:[s.jsx("b",{children:a("Lệnh cài")}),s.jsx("span",{className:"muted",children:a("chạy trong terminal trên máy bạn")}),s.jsx("button",{className:"ad-chip",onClick:o,children:l?`✓ ${a("Đã chép")}`:a("Chép lệnh")})]}),s.jsx("pre",{children:e.join(`
|
|
3
3
|
`)})]})}function zn({item:e,locale:l}){const[r,o]=d.useState(null);if(d.useEffect(()=>{let c=!0;return An(e.id).then(m=>{c&&o(m.items)},()=>{c&&o([])}),()=>{c=!1}},[e.id]),!r?.length)return null;const j=c=>c.kind==="model"?a("Mô hình"):c.kind==="lut"?"Look":c.kind==="motion"&&c.engine==="3d"?"3D":c.kind==="recipe"?a("Combo"):c.kind==="lottie"?"Lottie":"2D";return s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"ps-items-head",children:[s.jsx("b",{children:a("{0} mục trong gói",[r.length])})," · ",s.jsx("span",{className:"muted",children:a("ảnh chụp từ lần chạy thử")})]}),s.jsx("div",{className:"ps-items",children:r.slice(0,24).map(c=>s.jsxs("figure",{children:[c.thumbnail?s.jsx("img",{src:`data:${c.thumbnail.type};base64,${c.thumbnail.data}`,alt:""}):s.jsx("span",{className:"ph",children:c.kind==="model"?"◈":"✦"}),s.jsxs("figcaption",{title:c.name[l],children:[j(c)," · ",c.name[l]]})]},c.id))})]})}function Wn({item:e,locale:l,owned:r,free:o}){const[j,c]=d.useState(null),[m,u]=d.useState(!1),[f,L]=d.useState(!1),[p,N]=d.useState(null),M=d.useRef(null),A=d.useRef(0);d.useEffect(()=>{let t=!0;return Pn(e.id).then(h=>{t&&(c(h.sounds),u(h.full))},()=>{t&&L(!0)}),()=>{t=!1,M.current?.pause(),window.clearTimeout(A.current)}},[e.id,r,o]);const C=t=>{if(M.current?.pause(),window.clearTimeout(A.current),p===t.id||!t.url){N(null);return}const h=new Audio(t.url);M.current=h,h.volume=.8,N(t.id),h.onended=()=>N(v=>v===t.id?null:v),t.preview&&(A.current=window.setTimeout(()=>{h.pause(),N(v=>v===t.id?null:v)},q.previewSeconds*1e3+300)),h.play().catch(()=>N(null))};return s.jsxs("div",{className:"ps-sounds","data-full":m?"1":"0",children:[s.jsxs("div",{className:"ps-sounds-head",children:[e.thumbnailUrl?s.jsx("img",{src:e.thumbnailUrl,alt:""}):s.jsx(Y,{n:40}),s.jsxs("div",{children:[s.jsxs("b",{children:["♪ ",a("{0} âm thanh",[e.soundCount??j?.length??0])," · ",un(e.totalDuration)]}),s.jsx("small",{className:"muted",children:m?a("Nghe đầy đủ — bấm ▶"):a("Nghe thử {0} âm thanh đầu, mỗi âm tối đa {1} giây. Mua để nghe đủ và dùng.",[q.previewCount,q.previewSeconds])})]})]}),f&&s.jsx("p",{className:"ad-alert",role:"alert",children:a("Không tải được bản xem thử")}),j===null&&!f&&s.jsx("p",{className:"ad-muted",children:a("Đang tải…")}),j&&s.jsx("ul",{className:"ps-sound-list","aria-label":a("Âm thanh trong gói"),children:j.map(t=>{const h=t.name?.[l]||t.name?.vi||t.id;return s.jsxs("li",{className:`${p===t.id?"on":""}${t.url?"":" locked"}`,"data-store-sound":t.id,children:[s.jsx("button",{className:"tl-sfx-play",disabled:!t.url,"aria-label":t.url?`${a("Nghe thử")} ${h}`:a("Mua để nghe {0}",[h]),title:t.url?a("Nghe thử"):a("Mua để nghe"),onClick:()=>C(t),children:t.url?p===t.id?"■":"▶":"🔒"}),s.jsxs("span",{className:"ps-sound-name",children:[s.jsxs("span",{className:"ell",children:[h,t.loop?" ↻":""]}),s.jsxs("small",{className:"muted ell",children:[Tn(t.category,l),t.tags.length?` · ${t.tags.slice(0,3).join(", ")}`:""]})]}),s.jsxs("small",{className:"muted",children:[t.preview&&(t.previewSeconds??0)<t.duration-.05?`▶ ${(t.previewSeconds??0).toFixed(1)}s / `:"",t.duration.toFixed(1),"s"]})]},t.id)})})]})}function _n({item:e,locale:l}){const r=d.useCallback(m=>Un(e.id,m),[e.id]),[o,j]=d.useState(null),c=d.useCallback(async m=>{const u=await r(m);return j(u.access.full),u},[r]);return s.jsxs("div",{className:"ps-sounds","data-full":o?"1":"0",children:[s.jsxs("div",{className:"ps-sounds-head",children:[e.thumbnailUrl?s.jsx("img",{src:e.thumbnailUrl,alt:""}):s.jsx(Y,{n:40}),s.jsxs("div",{children:[s.jsxs("b",{children:["📚 ",a("{0} âm thanh",[(e.soundCount??0).toLocaleString(l==="en"?"en-US":"vi-VN")])," · ",pn(e.totalDuration,l)]}),s.jsxs("div",{className:"ps-stats",children:[(e.folders?.length??0)>0&&s.jsxs("span",{children:[s.jsx("b",{children:e.folders.length})," ",a("thư mục")]}),s.jsxs("span",{children:[s.jsx("b",{children:"48 kHz"})," stereo"]}),s.jsxs("span",{children:["v",e.version]})]}),s.jsx("small",{className:"muted",children:o?a("Nghe đầy đủ — thêm âm từ mục SFX của Timeline."):a("Nghe thử mọi âm ({0} giây, chất lượng thấp). Mua để nghe đủ và dùng.",[q.previewSeconds])})]})]}),s.jsx($n,{libId:e.id,fetchPage:c,variant:"store"})]})}function Xn({item:e,owned:l,busy:r,installed:o,onInstall:j,onBuy:c}){const m=hn(),u=e.kind==="sfxlib",f=(e.passVnd??0)>0||(e.passUsd??0)>0,L=e.priceVnd>0||e.priceUsd>0,p=s.jsx("button",{className:"ad-use ps-big",disabled:r,onClick:j,children:r?a("Đang cài…"):o?a("Cài lại"):a("Cài plug-in")});return l?.owned&&!l.expiresAt?p:l?.owned?s.jsxs("div",{className:"ps-lib-buy-wrap",children:[p,f&&s.jsx("button",{className:"ad-use ps-big ps-alt",onClick:()=>c("pass"),children:a("Gia hạn thêm 30 ngày · {0}",[W(e)])}),s.jsx("small",{className:"muted",children:a("Vé đến {0}. Gia hạn cộng nối từ ngày đó, không tự trừ tiền.",[H(l.expiresAt,m)])})]}):s.jsxs("div",{className:"ps-lib-buy-wrap",children:[l?.expiresAt&&s.jsx("div",{className:"ps-waiting",children:u?a("Vé 30 ngày đã hết hạn ngày {0}. Âm đã dùng trong dự án vẫn giữ nguyên.",[H(l.expiresAt,m)]):a("Vé 30 ngày đã hết hạn ngày {0}. Lớp đã thêm vào video vẫn giữ nguyên.",[H(l.expiresAt,m)])}),s.jsxs("div",{className:"ps-lib-buy",children:[f&&s.jsxs("button",{className:"ad-use ps-big",onClick:()=>c("pass"),children:[a("Vé 30 ngày · {0}",[W(e)]),s.jsx("small",{children:a("Trả lại để gia hạn, không tự trừ tiền")})]}),L&&s.jsxs("button",{className:"ad-use ps-big",onClick:()=>c("lifetime"),children:[a("Mua trọn đời · {0}",[R(e)]),s.jsx("small",{children:u?a("Một lần, gồm các đợt âm mới"):a("Một lần, dùng mãi mãi")})]})]}),s.jsx("small",{className:"muted",children:u?a("Thanh toán trên clipoox.com: chuyển khoản (VND) hoặc thẻ quốc tế (USD). Không trừ credit. Âm đã dùng trong dự án vẫn giữ khi vé hết hạn."):a("Thanh toán trên clipoox.com: chuyển khoản (VND) hoặc thẻ quốc tế (USD). Không trừ credit. Hết vé thì không thêm mới được; lớp đã thêm vào video vẫn giữ nguyên.")})]})}export{Ns as default};
|