eat-js-sdk 1.0.25 → 1.0.26
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/eat-prompt-builder.mjs +179 -179
- package/package.json +2 -2
|
@@ -2770,20 +2770,26 @@
|
|
|
2770
2770
|
let t1;
|
|
2771
2771
|
let t2;
|
|
2772
2772
|
let span;
|
|
2773
|
-
let
|
|
2773
|
+
let commonstringtohtml;
|
|
2774
2774
|
let div1_role_value;
|
|
2775
2775
|
let div1_class_value;
|
|
2776
2776
|
let current;
|
|
2777
2777
|
let if_block0 = (
|
|
2778
2778
|
/*hasIcon*/
|
|
2779
|
-
ctx[
|
|
2779
|
+
ctx[2] && create_if_block_32(ctx)
|
|
2780
2780
|
);
|
|
2781
2781
|
let if_block1 = !/*isFeedbackAlert*/
|
|
2782
|
-
ctx[
|
|
2782
|
+
ctx[3] && create_if_block_23(ctx);
|
|
2783
2783
|
let if_block2 = (
|
|
2784
2784
|
/*resultFeedbackTitle*/
|
|
2785
2785
|
ctx[1] && create_if_block_13(ctx)
|
|
2786
2786
|
);
|
|
2787
|
+
commonstringtohtml = new CommonStringToHtml_default({
|
|
2788
|
+
props: { htmlString: (
|
|
2789
|
+
/*resultFeedback*/
|
|
2790
|
+
ctx[0]
|
|
2791
|
+
) }
|
|
2792
|
+
});
|
|
2787
2793
|
return {
|
|
2788
2794
|
c() {
|
|
2789
2795
|
div1 = element("div");
|
|
@@ -2798,16 +2804,13 @@
|
|
|
2798
2804
|
if_block2.c();
|
|
2799
2805
|
t2 = space();
|
|
2800
2806
|
span = element("span");
|
|
2801
|
-
|
|
2802
|
-
/*resultFeedback*/
|
|
2803
|
-
ctx[0]
|
|
2804
|
-
);
|
|
2807
|
+
create_component(commonstringtohtml.$$.fragment);
|
|
2805
2808
|
attr(div1, "role", div1_role_value = /*isFeedbackAlert*/
|
|
2806
|
-
ctx[
|
|
2809
|
+
ctx[3] ? "alert" : null);
|
|
2807
2810
|
attr(div1, "class", div1_class_value = "my-6 p-4 border-l-4 text-charcoal text-base flex " + /*isSkipped*/
|
|
2808
|
-
(ctx[
|
|
2811
|
+
(ctx[5] ? "border-blue-950 bg-blue-50" : (
|
|
2809
2812
|
/*isResultCorrect*/
|
|
2810
|
-
ctx[
|
|
2813
|
+
ctx[4] ? "border-green-900 bg-green-300" : "border-red-900 bg-red-50"
|
|
2811
2814
|
)));
|
|
2812
2815
|
},
|
|
2813
2816
|
m(target, anchor) {
|
|
@@ -2823,18 +2826,18 @@
|
|
|
2823
2826
|
if_block2.m(div0, null);
|
|
2824
2827
|
append(div0, t2);
|
|
2825
2828
|
append(div0, span);
|
|
2826
|
-
|
|
2829
|
+
mount_component(commonstringtohtml, span, null);
|
|
2827
2830
|
current = true;
|
|
2828
2831
|
},
|
|
2829
2832
|
p(ctx2, dirty) {
|
|
2830
2833
|
if (
|
|
2831
2834
|
/*hasIcon*/
|
|
2832
|
-
ctx2[
|
|
2835
|
+
ctx2[2]
|
|
2833
2836
|
) {
|
|
2834
2837
|
if (if_block0) {
|
|
2835
2838
|
if_block0.p(ctx2, dirty);
|
|
2836
2839
|
if (dirty & /*hasIcon*/
|
|
2837
|
-
|
|
2840
|
+
4) {
|
|
2838
2841
|
transition_in(if_block0, 1);
|
|
2839
2842
|
}
|
|
2840
2843
|
} else {
|
|
@@ -2851,7 +2854,7 @@
|
|
|
2851
2854
|
check_outros();
|
|
2852
2855
|
}
|
|
2853
2856
|
if (!/*isFeedbackAlert*/
|
|
2854
|
-
ctx2[
|
|
2857
|
+
ctx2[3]) {
|
|
2855
2858
|
if (if_block1) {
|
|
2856
2859
|
} else {
|
|
2857
2860
|
if_block1 = create_if_block_23(ctx2);
|
|
@@ -2877,23 +2880,22 @@
|
|
|
2877
2880
|
if_block2.d(1);
|
|
2878
2881
|
if_block2 = null;
|
|
2879
2882
|
}
|
|
2880
|
-
|
|
2883
|
+
const commonstringtohtml_changes = {};
|
|
2884
|
+
if (dirty & /*resultFeedback*/
|
|
2881
2885
|
1)
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
ctx2[0]
|
|
2886
|
-
);
|
|
2886
|
+
commonstringtohtml_changes.htmlString = /*resultFeedback*/
|
|
2887
|
+
ctx2[0];
|
|
2888
|
+
commonstringtohtml.$set(commonstringtohtml_changes);
|
|
2887
2889
|
if (!current || dirty & /*isFeedbackAlert*/
|
|
2888
|
-
|
|
2889
|
-
ctx2[
|
|
2890
|
+
8 && div1_role_value !== (div1_role_value = /*isFeedbackAlert*/
|
|
2891
|
+
ctx2[3] ? "alert" : null)) {
|
|
2890
2892
|
attr(div1, "role", div1_role_value);
|
|
2891
2893
|
}
|
|
2892
2894
|
if (!current || dirty & /*isSkipped, isResultCorrect*/
|
|
2893
|
-
|
|
2894
|
-
(ctx2[
|
|
2895
|
+
48 && div1_class_value !== (div1_class_value = "my-6 p-4 border-l-4 text-charcoal text-base flex " + /*isSkipped*/
|
|
2896
|
+
(ctx2[5] ? "border-blue-950 bg-blue-50" : (
|
|
2895
2897
|
/*isResultCorrect*/
|
|
2896
|
-
ctx2[
|
|
2898
|
+
ctx2[4] ? "border-green-900 bg-green-300" : "border-red-900 bg-red-50"
|
|
2897
2899
|
)))) {
|
|
2898
2900
|
attr(div1, "class", div1_class_value);
|
|
2899
2901
|
}
|
|
@@ -2902,10 +2904,12 @@
|
|
|
2902
2904
|
if (current)
|
|
2903
2905
|
return;
|
|
2904
2906
|
transition_in(if_block0);
|
|
2907
|
+
transition_in(commonstringtohtml.$$.fragment, local);
|
|
2905
2908
|
current = true;
|
|
2906
2909
|
},
|
|
2907
2910
|
o(local) {
|
|
2908
2911
|
transition_out(if_block0);
|
|
2912
|
+
transition_out(commonstringtohtml.$$.fragment, local);
|
|
2909
2913
|
current = false;
|
|
2910
2914
|
},
|
|
2911
2915
|
d(detaching) {
|
|
@@ -2918,6 +2922,7 @@
|
|
|
2918
2922
|
if_block1.d();
|
|
2919
2923
|
if (if_block2)
|
|
2920
2924
|
if_block2.d();
|
|
2925
|
+
destroy_component(commonstringtohtml);
|
|
2921
2926
|
}
|
|
2922
2927
|
};
|
|
2923
2928
|
}
|
|
@@ -2933,9 +2938,9 @@
|
|
|
2933
2938
|
create_component(infosolid.$$.fragment);
|
|
2934
2939
|
attr(span, "aria-hidden", "true");
|
|
2935
2940
|
attr(span, "class", span_class_value = "h-6 w-6 flex items-center pt-0.5 mr-2 " + /*isSkipped*/
|
|
2936
|
-
(ctx[
|
|
2941
|
+
(ctx[5] ? "text-blue-950" : (
|
|
2937
2942
|
/*isResultCorrect*/
|
|
2938
|
-
ctx[
|
|
2943
|
+
ctx[4] ? "text-green-900" : "text-red-900"
|
|
2939
2944
|
)));
|
|
2940
2945
|
},
|
|
2941
2946
|
m(target, anchor) {
|
|
@@ -2945,10 +2950,10 @@
|
|
|
2945
2950
|
},
|
|
2946
2951
|
p(ctx2, dirty) {
|
|
2947
2952
|
if (!current || dirty & /*isSkipped, isResultCorrect*/
|
|
2948
|
-
|
|
2949
|
-
(ctx2[
|
|
2953
|
+
48 && span_class_value !== (span_class_value = "h-6 w-6 flex items-center pt-0.5 mr-2 " + /*isSkipped*/
|
|
2954
|
+
(ctx2[5] ? "text-blue-950" : (
|
|
2950
2955
|
/*isResultCorrect*/
|
|
2951
|
-
ctx2[
|
|
2956
|
+
ctx2[4] ? "text-green-900" : "text-red-900"
|
|
2952
2957
|
)))) {
|
|
2953
2958
|
attr(span, "class", span_class_value);
|
|
2954
2959
|
}
|
|
@@ -3085,29 +3090,29 @@
|
|
|
3085
3090
|
};
|
|
3086
3091
|
}
|
|
3087
3092
|
function instance4($$self, $$props, $$invalidate) {
|
|
3088
|
-
let { resultFeedback = null } = $$props;
|
|
3089
|
-
let { resultFeedbackTitle = null } = $$props;
|
|
3090
|
-
let { isResultCorrect = true } = $$props;
|
|
3091
|
-
let { isSkipped = false } = $$props;
|
|
3092
3093
|
let { hasIcon = false } = $$props;
|
|
3093
3094
|
let { isFeedbackAlert = true } = $$props;
|
|
3095
|
+
let { isResultCorrect = true } = $$props;
|
|
3096
|
+
let { isSkipped = false } = $$props;
|
|
3097
|
+
let { resultFeedback = null } = $$props;
|
|
3098
|
+
let { resultFeedbackTitle = null } = $$props;
|
|
3094
3099
|
$$self.$$set = ($$props2) => {
|
|
3100
|
+
if ("hasIcon" in $$props2)
|
|
3101
|
+
$$invalidate(2, hasIcon = $$props2.hasIcon);
|
|
3102
|
+
if ("isFeedbackAlert" in $$props2)
|
|
3103
|
+
$$invalidate(3, isFeedbackAlert = $$props2.isFeedbackAlert);
|
|
3104
|
+
if ("isResultCorrect" in $$props2)
|
|
3105
|
+
$$invalidate(4, isResultCorrect = $$props2.isResultCorrect);
|
|
3106
|
+
if ("isSkipped" in $$props2)
|
|
3107
|
+
$$invalidate(5, isSkipped = $$props2.isSkipped);
|
|
3095
3108
|
if ("resultFeedback" in $$props2)
|
|
3096
3109
|
$$invalidate(0, resultFeedback = $$props2.resultFeedback);
|
|
3097
3110
|
if ("resultFeedbackTitle" in $$props2)
|
|
3098
3111
|
$$invalidate(1, resultFeedbackTitle = $$props2.resultFeedbackTitle);
|
|
3099
|
-
if ("isResultCorrect" in $$props2)
|
|
3100
|
-
$$invalidate(2, isResultCorrect = $$props2.isResultCorrect);
|
|
3101
|
-
if ("isSkipped" in $$props2)
|
|
3102
|
-
$$invalidate(3, isSkipped = $$props2.isSkipped);
|
|
3103
|
-
if ("hasIcon" in $$props2)
|
|
3104
|
-
$$invalidate(4, hasIcon = $$props2.hasIcon);
|
|
3105
|
-
if ("isFeedbackAlert" in $$props2)
|
|
3106
|
-
$$invalidate(5, isFeedbackAlert = $$props2.isFeedbackAlert);
|
|
3107
3112
|
};
|
|
3108
3113
|
$$self.$$.update = () => {
|
|
3109
3114
|
if ($$self.$$.dirty & /*isSkipped*/
|
|
3110
|
-
|
|
3115
|
+
32) {
|
|
3111
3116
|
$:
|
|
3112
3117
|
if (isSkipped) {
|
|
3113
3118
|
$$invalidate(1, resultFeedbackTitle = "No answer was provided");
|
|
@@ -3118,68 +3123,68 @@
|
|
|
3118
3123
|
return [
|
|
3119
3124
|
resultFeedback,
|
|
3120
3125
|
resultFeedbackTitle,
|
|
3121
|
-
isResultCorrect,
|
|
3122
|
-
isSkipped,
|
|
3123
3126
|
hasIcon,
|
|
3124
|
-
isFeedbackAlert
|
|
3127
|
+
isFeedbackAlert,
|
|
3128
|
+
isResultCorrect,
|
|
3129
|
+
isSkipped
|
|
3125
3130
|
];
|
|
3126
3131
|
}
|
|
3127
3132
|
var PromptResultFeedbackv2 = class extends SvelteComponent {
|
|
3128
3133
|
constructor(options) {
|
|
3129
3134
|
super();
|
|
3130
3135
|
init(this, options, instance4, create_fragment5, safe_not_equal, {
|
|
3136
|
+
hasIcon: 2,
|
|
3137
|
+
isFeedbackAlert: 3,
|
|
3138
|
+
isResultCorrect: 4,
|
|
3139
|
+
isSkipped: 5,
|
|
3131
3140
|
resultFeedback: 0,
|
|
3132
|
-
resultFeedbackTitle: 1
|
|
3133
|
-
isResultCorrect: 2,
|
|
3134
|
-
isSkipped: 3,
|
|
3135
|
-
hasIcon: 4,
|
|
3136
|
-
isFeedbackAlert: 5
|
|
3141
|
+
resultFeedbackTitle: 1
|
|
3137
3142
|
});
|
|
3138
3143
|
}
|
|
3139
|
-
get
|
|
3140
|
-
return this.$$.ctx[
|
|
3144
|
+
get hasIcon() {
|
|
3145
|
+
return this.$$.ctx[2];
|
|
3141
3146
|
}
|
|
3142
|
-
set
|
|
3143
|
-
this.$$set({
|
|
3147
|
+
set hasIcon(hasIcon) {
|
|
3148
|
+
this.$$set({ hasIcon });
|
|
3144
3149
|
flush();
|
|
3145
3150
|
}
|
|
3146
|
-
get
|
|
3147
|
-
return this.$$.ctx[
|
|
3151
|
+
get isFeedbackAlert() {
|
|
3152
|
+
return this.$$.ctx[3];
|
|
3148
3153
|
}
|
|
3149
|
-
set
|
|
3150
|
-
this.$$set({
|
|
3154
|
+
set isFeedbackAlert(isFeedbackAlert) {
|
|
3155
|
+
this.$$set({ isFeedbackAlert });
|
|
3151
3156
|
flush();
|
|
3152
3157
|
}
|
|
3153
3158
|
get isResultCorrect() {
|
|
3154
|
-
return this.$$.ctx[
|
|
3159
|
+
return this.$$.ctx[4];
|
|
3155
3160
|
}
|
|
3156
3161
|
set isResultCorrect(isResultCorrect) {
|
|
3157
3162
|
this.$$set({ isResultCorrect });
|
|
3158
3163
|
flush();
|
|
3159
3164
|
}
|
|
3160
3165
|
get isSkipped() {
|
|
3161
|
-
return this.$$.ctx[
|
|
3166
|
+
return this.$$.ctx[5];
|
|
3162
3167
|
}
|
|
3163
3168
|
set isSkipped(isSkipped) {
|
|
3164
3169
|
this.$$set({ isSkipped });
|
|
3165
3170
|
flush();
|
|
3166
3171
|
}
|
|
3167
|
-
get
|
|
3168
|
-
return this.$$.ctx[
|
|
3172
|
+
get resultFeedback() {
|
|
3173
|
+
return this.$$.ctx[0];
|
|
3169
3174
|
}
|
|
3170
|
-
set
|
|
3171
|
-
this.$$set({
|
|
3175
|
+
set resultFeedback(resultFeedback) {
|
|
3176
|
+
this.$$set({ resultFeedback });
|
|
3172
3177
|
flush();
|
|
3173
3178
|
}
|
|
3174
|
-
get
|
|
3175
|
-
return this.$$.ctx[
|
|
3179
|
+
get resultFeedbackTitle() {
|
|
3180
|
+
return this.$$.ctx[1];
|
|
3176
3181
|
}
|
|
3177
|
-
set
|
|
3178
|
-
this.$$set({
|
|
3182
|
+
set resultFeedbackTitle(resultFeedbackTitle) {
|
|
3183
|
+
this.$$set({ resultFeedbackTitle });
|
|
3179
3184
|
flush();
|
|
3180
3185
|
}
|
|
3181
3186
|
};
|
|
3182
|
-
customElements.define("prompt-result-feedbackv2", create_custom_element(PromptResultFeedbackv2, { "
|
|
3187
|
+
customElements.define("prompt-result-feedbackv2", create_custom_element(PromptResultFeedbackv2, { "hasIcon": { "type": "Boolean" }, "isFeedbackAlert": { "type": "Boolean" }, "isResultCorrect": { "type": "Boolean" }, "isSkipped": { "type": "Boolean" }, "resultFeedback": {}, "resultFeedbackTitle": {} }, [], [], true));
|
|
3183
3188
|
var PromptResultFeedbackv2_default = PromptResultFeedbackv2;
|
|
3184
3189
|
|
|
3185
3190
|
// src/lib/composables/useMCQ.ts
|
|
@@ -3387,8 +3392,8 @@
|
|
|
3387
3392
|
// src/lib/components/prompt/mcq/PromptMCQ.svelte
|
|
3388
3393
|
function get_each_context(ctx, list, i) {
|
|
3389
3394
|
const child_ctx = ctx.slice();
|
|
3390
|
-
child_ctx[
|
|
3391
|
-
child_ctx[
|
|
3395
|
+
child_ctx[28] = list[i];
|
|
3396
|
+
child_ctx[30] = i;
|
|
3392
3397
|
return child_ctx;
|
|
3393
3398
|
}
|
|
3394
3399
|
function create_if_block_82(ctx) {
|
|
@@ -3396,10 +3401,6 @@
|
|
|
3396
3401
|
let current;
|
|
3397
3402
|
promptresult = new PromptResultFeedbackv2_default({
|
|
3398
3403
|
props: {
|
|
3399
|
-
isSkipped: (
|
|
3400
|
-
/*isSkipped*/
|
|
3401
|
-
ctx[14]()
|
|
3402
|
-
),
|
|
3403
3404
|
hasIcon: true,
|
|
3404
3405
|
isFeedbackAlert: (
|
|
3405
3406
|
/*isPreviewModeInteractive*/
|
|
@@ -3416,7 +3417,10 @@
|
|
|
3416
3417
|
ctx[7]
|
|
3417
3418
|
)
|
|
3418
3419
|
),
|
|
3419
|
-
|
|
3420
|
+
isSkipped: (
|
|
3421
|
+
/*isSkipped*/
|
|
3422
|
+
ctx[14]()
|
|
3423
|
+
),
|
|
3420
3424
|
resultFeedback: (
|
|
3421
3425
|
/*resultFeedback*/
|
|
3422
3426
|
ctx[5]
|
|
@@ -3433,11 +3437,11 @@
|
|
|
3433
3437
|
},
|
|
3434
3438
|
p(ctx2, dirty) {
|
|
3435
3439
|
const promptresult_changes = {};
|
|
3436
|
-
if (dirty & /*isPreviewModeInteractive*/
|
|
3440
|
+
if (dirty[0] & /*isPreviewModeInteractive*/
|
|
3437
3441
|
8)
|
|
3438
3442
|
promptresult_changes.isFeedbackAlert = /*isPreviewModeInteractive*/
|
|
3439
3443
|
ctx2[3] ? false : true;
|
|
3440
|
-
if (dirty & /*selectedOptions, correctAnswersLength, correctAnswerIds*/
|
|
3444
|
+
if (dirty[0] & /*selectedOptions, correctAnswersLength, correctAnswerIds*/
|
|
3441
3445
|
208)
|
|
3442
3446
|
promptresult_changes.isResultCorrect = /*selectedOptions*/
|
|
3443
3447
|
ctx2[4].length === /*correctAnswersLength*/
|
|
@@ -3448,7 +3452,7 @@
|
|
|
3448
3452
|
/*correctAnswerIds*/
|
|
3449
3453
|
ctx2[7]
|
|
3450
3454
|
);
|
|
3451
|
-
if (dirty & /*resultFeedback*/
|
|
3455
|
+
if (dirty[0] & /*resultFeedback*/
|
|
3452
3456
|
32)
|
|
3453
3457
|
promptresult_changes.resultFeedback = /*resultFeedback*/
|
|
3454
3458
|
ctx2[5];
|
|
@@ -3510,12 +3514,12 @@
|
|
|
3510
3514
|
current = true;
|
|
3511
3515
|
},
|
|
3512
3516
|
p(ctx2, dirty) {
|
|
3513
|
-
if (!current || dirty & /*isDataSaving*/
|
|
3517
|
+
if (!current || dirty[0] & /*isDataSaving*/
|
|
3514
3518
|
1 && div0_class_value !== (div0_class_value = /*isDataSaving*/
|
|
3515
3519
|
ctx2[0] ? "absolute inset-0 bg-transparent z-50" : "")) {
|
|
3516
3520
|
attr(div0, "class", div0_class_value);
|
|
3517
3521
|
}
|
|
3518
|
-
if (dirty & /*correctAnswersLength, selectedOptions,
|
|
3522
|
+
if (dirty[0] & /*correctAnswersLength, selectedOptions, options, isFinished, isPreviewModeInteractive, isPreviewMode, correctAnswerIds, handleOptionClick*/
|
|
3519
3523
|
37086) {
|
|
3520
3524
|
each_value = ensure_array_like(Object.values(
|
|
3521
3525
|
/*options*/
|
|
@@ -3585,7 +3589,7 @@
|
|
|
3585
3589
|
append(p, t2);
|
|
3586
3590
|
},
|
|
3587
3591
|
p(ctx2, dirty) {
|
|
3588
|
-
if (dirty & /*isPreviewModeInteractive, isPreviewMode*/
|
|
3592
|
+
if (dirty[0] & /*isPreviewModeInteractive, isPreviewMode*/
|
|
3589
3593
|
12 && t_value !== (t_value = /*isPreviewModeInteractive*/
|
|
3590
3594
|
ctx2[3] ? "Your answer:" : (
|
|
3591
3595
|
/*isPreviewMode*/
|
|
@@ -3663,14 +3667,14 @@
|
|
|
3663
3667
|
const if_block_creators = [create_if_block_42, create_else_block];
|
|
3664
3668
|
const if_blocks = [];
|
|
3665
3669
|
function select_block_type(ctx2, dirty) {
|
|
3666
|
-
if (dirty & /*correctAnswerIds, isPreviewMode, isPreviewModeInteractive*/
|
|
3670
|
+
if (dirty[0] & /*correctAnswerIds, isPreviewMode, isPreviewModeInteractive*/
|
|
3667
3671
|
140)
|
|
3668
3672
|
show_if = null;
|
|
3669
3673
|
if (show_if == null)
|
|
3670
3674
|
show_if = !!/*correctAnswerIds*/
|
|
3671
3675
|
(ctx2[7]?.includes(
|
|
3672
3676
|
/*option*/
|
|
3673
|
-
ctx2[
|
|
3677
|
+
ctx2[28].id
|
|
3674
3678
|
) || /*isPreviewMode*/
|
|
3675
3679
|
ctx2[2] && !/*isPreviewModeInteractive*/
|
|
3676
3680
|
ctx2[3]);
|
|
@@ -3678,7 +3682,7 @@
|
|
|
3678
3682
|
return 0;
|
|
3679
3683
|
return 1;
|
|
3680
3684
|
}
|
|
3681
|
-
current_block_type_index = select_block_type(ctx, -1);
|
|
3685
|
+
current_block_type_index = select_block_type(ctx, [-1, -1]);
|
|
3682
3686
|
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
3683
3687
|
return {
|
|
3684
3688
|
c() {
|
|
@@ -3688,7 +3692,7 @@
|
|
|
3688
3692
|
attr(span, "class", span_class_value = /*correctAnswerIds*/
|
|
3689
3693
|
(ctx[7]?.includes(
|
|
3690
3694
|
/*option*/
|
|
3691
|
-
ctx[
|
|
3695
|
+
ctx[28].id
|
|
3692
3696
|
) || /*isPreviewMode*/
|
|
3693
3697
|
ctx[2] && !/*isPreviewModeInteractive*/
|
|
3694
3698
|
ctx[3] ? "text-green-900" : "text-red-900") + " p-0.5");
|
|
@@ -3716,11 +3720,11 @@
|
|
|
3716
3720
|
transition_in(if_block, 1);
|
|
3717
3721
|
if_block.m(span, null);
|
|
3718
3722
|
}
|
|
3719
|
-
if (!current || dirty & /*correctAnswerIds, isPreviewMode, isPreviewModeInteractive*/
|
|
3723
|
+
if (!current || dirty[0] & /*correctAnswerIds, isPreviewMode, isPreviewModeInteractive*/
|
|
3720
3724
|
140 && span_class_value !== (span_class_value = /*correctAnswerIds*/
|
|
3721
3725
|
(ctx2[7]?.includes(
|
|
3722
3726
|
/*option*/
|
|
3723
|
-
ctx2[
|
|
3727
|
+
ctx2[28].id
|
|
3724
3728
|
) || /*isPreviewMode*/
|
|
3725
3729
|
ctx2[2] && !/*isPreviewModeInteractive*/
|
|
3726
3730
|
ctx2[3] ? "text-green-900" : "text-red-900") + " p-0.5")) {
|
|
@@ -3805,7 +3809,7 @@
|
|
|
3805
3809
|
/*selectedOptions*/
|
|
3806
3810
|
ctx[4].includes(
|
|
3807
3811
|
/*option*/
|
|
3808
|
-
ctx[
|
|
3812
|
+
ctx[28].id
|
|
3809
3813
|
)
|
|
3810
3814
|
);
|
|
3811
3815
|
let span_class_value;
|
|
@@ -3819,7 +3823,7 @@
|
|
|
3819
3823
|
attr(span, "class", span_class_value = "custom-checkbox " + /*selectedOptions*/
|
|
3820
3824
|
(ctx[4].includes(
|
|
3821
3825
|
/*option*/
|
|
3822
|
-
ctx[
|
|
3826
|
+
ctx[28].id
|
|
3823
3827
|
) ? "border-soft-blue" : "border-gray-850") + " " + /*isPreviewMode*/
|
|
3824
3828
|
(ctx[2] && !/*isPreviewModeInteractive*/
|
|
3825
3829
|
ctx[3] || /*isFinished*/
|
|
@@ -3833,16 +3837,16 @@
|
|
|
3833
3837
|
current = true;
|
|
3834
3838
|
},
|
|
3835
3839
|
p(ctx2, dirty) {
|
|
3836
|
-
if (dirty & /*selectedOptions*/
|
|
3840
|
+
if (dirty[0] & /*selectedOptions*/
|
|
3837
3841
|
16)
|
|
3838
3842
|
show_if = /*selectedOptions*/
|
|
3839
3843
|
ctx2[4].includes(
|
|
3840
3844
|
/*option*/
|
|
3841
|
-
ctx2[
|
|
3845
|
+
ctx2[28].id
|
|
3842
3846
|
);
|
|
3843
3847
|
if (show_if) {
|
|
3844
3848
|
if (if_block) {
|
|
3845
|
-
if (dirty & /*selectedOptions*/
|
|
3849
|
+
if (dirty[0] & /*selectedOptions*/
|
|
3846
3850
|
16) {
|
|
3847
3851
|
transition_in(if_block, 1);
|
|
3848
3852
|
}
|
|
@@ -3859,11 +3863,11 @@
|
|
|
3859
3863
|
});
|
|
3860
3864
|
check_outros();
|
|
3861
3865
|
}
|
|
3862
|
-
if (!current || dirty & /*selectedOptions, isPreviewMode, isPreviewModeInteractive, isFinished*/
|
|
3866
|
+
if (!current || dirty[0] & /*selectedOptions, isPreviewMode, isPreviewModeInteractive, isFinished*/
|
|
3863
3867
|
30 && span_class_value !== (span_class_value = "custom-checkbox " + /*selectedOptions*/
|
|
3864
3868
|
(ctx2[4].includes(
|
|
3865
3869
|
/*option*/
|
|
3866
|
-
ctx2[
|
|
3870
|
+
ctx2[28].id
|
|
3867
3871
|
) ? "border-soft-blue" : "border-gray-850") + " " + /*isPreviewMode*/
|
|
3868
3872
|
(ctx2[2] && !/*isPreviewModeInteractive*/
|
|
3869
3873
|
ctx2[3] || /*isFinished*/
|
|
@@ -3931,7 +3935,7 @@
|
|
|
3931
3935
|
ctx[1] && /*selectedOptions*/
|
|
3932
3936
|
ctx[4].includes(
|
|
3933
3937
|
/*option*/
|
|
3934
|
-
ctx[
|
|
3938
|
+
ctx[28].id
|
|
3935
3939
|
) && /*correctAnswersLength*/
|
|
3936
3940
|
ctx[6] == 1
|
|
3937
3941
|
);
|
|
@@ -3947,11 +3951,11 @@
|
|
|
3947
3951
|
ctx[1] && /*correctAnswerIds*/
|
|
3948
3952
|
ctx[7]?.includes(
|
|
3949
3953
|
/*option*/
|
|
3950
|
-
ctx[
|
|
3954
|
+
ctx[28].id
|
|
3951
3955
|
) && (!/*selectedOptions*/
|
|
3952
3956
|
ctx[4].includes(
|
|
3953
3957
|
/*option*/
|
|
3954
|
-
ctx[
|
|
3958
|
+
ctx[28].id
|
|
3955
3959
|
) || !/*selectedOptions*/
|
|
3956
3960
|
ctx[4].length) && (!/*isPreviewModeInteractive*/
|
|
3957
3961
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
@@ -3968,11 +3972,11 @@
|
|
|
3968
3972
|
ctx[1] && /*correctAnswerIds*/
|
|
3969
3973
|
ctx[7]?.includes(
|
|
3970
3974
|
/*option*/
|
|
3971
|
-
ctx[
|
|
3975
|
+
ctx[28].id
|
|
3972
3976
|
) && !/*selectedOptions*/
|
|
3973
3977
|
ctx[4].includes(
|
|
3974
3978
|
/*option*/
|
|
3975
|
-
ctx[
|
|
3979
|
+
ctx[28].id
|
|
3976
3980
|
) && (!/*isPreviewModeInteractive*/
|
|
3977
3981
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
3978
3982
|
ctx[3] && /*selectedOptions*/
|
|
@@ -3984,7 +3988,7 @@
|
|
|
3984
3988
|
/*selectedOptions*/
|
|
3985
3989
|
ctx[4].includes(
|
|
3986
3990
|
/*option*/
|
|
3987
|
-
ctx[
|
|
3991
|
+
ctx[28].id
|
|
3988
3992
|
) && /*isFinished*/
|
|
3989
3993
|
(ctx[1] && !/*isPreviewModeInteractive*/
|
|
3990
3994
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
@@ -4001,11 +4005,11 @@
|
|
|
4001
4005
|
ctx[1] && !/*selectedOptions*/
|
|
4002
4006
|
ctx[4].includes(
|
|
4003
4007
|
/*option*/
|
|
4004
|
-
ctx[
|
|
4008
|
+
ctx[28].id
|
|
4005
4009
|
) && !/*correctAnswerIds*/
|
|
4006
4010
|
ctx[7].includes(
|
|
4007
4011
|
/*option*/
|
|
4008
|
-
ctx[
|
|
4012
|
+
ctx[28].id
|
|
4009
4013
|
) || /*isPreviewModeInteractive*/
|
|
4010
4014
|
ctx[3])
|
|
4011
4015
|
);
|
|
@@ -4026,7 +4030,7 @@
|
|
|
4026
4030
|
otherClass: "",
|
|
4027
4031
|
htmlString: (
|
|
4028
4032
|
/*option*/
|
|
4029
|
-
ctx[
|
|
4033
|
+
ctx[28].answer
|
|
4030
4034
|
)
|
|
4031
4035
|
}
|
|
4032
4036
|
});
|
|
@@ -4038,7 +4042,7 @@
|
|
|
4038
4042
|
/*func*/
|
|
4039
4043
|
ctx[17](
|
|
4040
4044
|
/*option*/
|
|
4041
|
-
ctx[
|
|
4045
|
+
ctx[28]
|
|
4042
4046
|
)
|
|
4043
4047
|
);
|
|
4044
4048
|
}
|
|
@@ -4047,7 +4051,7 @@
|
|
|
4047
4051
|
/*click_handler*/
|
|
4048
4052
|
ctx[18](
|
|
4049
4053
|
/*option*/
|
|
4050
|
-
ctx[
|
|
4054
|
+
ctx[28]
|
|
4051
4055
|
)
|
|
4052
4056
|
);
|
|
4053
4057
|
}
|
|
@@ -4062,7 +4066,7 @@
|
|
|
4062
4066
|
span0 = element("span");
|
|
4063
4067
|
span0.textContent = `${useMCQ_default(
|
|
4064
4068
|
/*index*/
|
|
4065
|
-
ctx[
|
|
4069
|
+
ctx[30]
|
|
4066
4070
|
)}`;
|
|
4067
4071
|
t2 = space();
|
|
4068
4072
|
span1 = element("span");
|
|
@@ -4095,7 +4099,7 @@
|
|
|
4095
4099
|
/*selectedOptions*/
|
|
4096
4100
|
ctx[4].includes(
|
|
4097
4101
|
/*option*/
|
|
4098
|
-
ctx[
|
|
4102
|
+
ctx[28].id
|
|
4099
4103
|
)
|
|
4100
4104
|
) : null);
|
|
4101
4105
|
attr(button, "aria-disabled", button_aria_disabled_value = /*isFinished*/
|
|
@@ -4106,29 +4110,29 @@
|
|
|
4106
4110
|
ctx[3]) && /*selectedOptions*/
|
|
4107
4111
|
ctx[4].includes(
|
|
4108
4112
|
/*option*/
|
|
4109
|
-
ctx[
|
|
4113
|
+
ctx[28].id
|
|
4110
4114
|
) ? "Selected " : ""}${`Option ${useMCQ_default(
|
|
4111
4115
|
/*index*/
|
|
4112
|
-
ctx[
|
|
4116
|
+
ctx[30]
|
|
4113
4117
|
)}`}: ${useRemoveRichTextHtmlTags(
|
|
4114
4118
|
/*option*/
|
|
4115
|
-
ctx[
|
|
4119
|
+
ctx[28].answer
|
|
4116
4120
|
)} ${func()}`);
|
|
4117
4121
|
attr(button, "class", button_class_value = "group text-left btn-mcq-option " + (!/*isFinished*/
|
|
4118
4122
|
ctx[1] || /*isPreviewModeInteractive*/
|
|
4119
4123
|
ctx[3] ? "active:raw-focus-ring-by" : "finished") + " " + /*selectedOptions*/
|
|
4120
4124
|
(ctx[4].includes(
|
|
4121
4125
|
/*option*/
|
|
4122
|
-
ctx[
|
|
4126
|
+
ctx[28].id
|
|
4123
4127
|
) ? "selected" : "") + " " + /*isFinished*/
|
|
4124
4128
|
(ctx[1] && /*correctAnswerIds*/
|
|
4125
4129
|
ctx[7]?.includes(
|
|
4126
4130
|
/*option*/
|
|
4127
|
-
ctx[
|
|
4131
|
+
ctx[28].id
|
|
4128
4132
|
) && (!/*selectedOptions*/
|
|
4129
4133
|
ctx[4].includes(
|
|
4130
4134
|
/*option*/
|
|
4131
|
-
ctx[
|
|
4135
|
+
ctx[28].id
|
|
4132
4136
|
) || !/*selectedOptions*/
|
|
4133
4137
|
ctx[4].length) && (!/*isPreviewModeInteractive*/
|
|
4134
4138
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
@@ -4144,11 +4148,11 @@
|
|
|
4144
4148
|
ctx[3] && /*selectedOptions*/
|
|
4145
4149
|
ctx[4].includes(
|
|
4146
4150
|
/*option*/
|
|
4147
|
-
ctx[
|
|
4151
|
+
ctx[28].id
|
|
4148
4152
|
)) && /*correctAnswerIds*/
|
|
4149
4153
|
ctx[7].includes(
|
|
4150
4154
|
/*option*/
|
|
4151
|
-
ctx[
|
|
4155
|
+
ctx[28].id
|
|
4152
4156
|
) ? "correct" : (
|
|
4153
4157
|
/*isFinished*/
|
|
4154
4158
|
ctx[1] && !/*isPreviewModeInteractive*/
|
|
@@ -4192,13 +4196,13 @@
|
|
|
4192
4196
|
},
|
|
4193
4197
|
p(new_ctx, dirty) {
|
|
4194
4198
|
ctx = new_ctx;
|
|
4195
|
-
if (dirty & /*isFinished, selectedOptions, correctAnswersLength*/
|
|
4199
|
+
if (dirty[0] & /*isFinished, selectedOptions, correctAnswersLength*/
|
|
4196
4200
|
82)
|
|
4197
4201
|
show_if_4 = /*isFinished*/
|
|
4198
4202
|
ctx[1] && /*selectedOptions*/
|
|
4199
4203
|
ctx[4].includes(
|
|
4200
4204
|
/*option*/
|
|
4201
|
-
ctx[
|
|
4205
|
+
ctx[28].id
|
|
4202
4206
|
) && /*correctAnswersLength*/
|
|
4203
4207
|
ctx[6] == 1;
|
|
4204
4208
|
if (show_if_4) {
|
|
@@ -4213,17 +4217,17 @@
|
|
|
4213
4217
|
if_block0.d(1);
|
|
4214
4218
|
if_block0 = null;
|
|
4215
4219
|
}
|
|
4216
|
-
if (dirty & /*isFinished, correctAnswerIds, selectedOptions, isPreviewModeInteractive, correctAnswersLength*/
|
|
4220
|
+
if (dirty[0] & /*isFinished, correctAnswerIds, selectedOptions, isPreviewModeInteractive, correctAnswersLength*/
|
|
4217
4221
|
218)
|
|
4218
4222
|
show_if_3 = /*isFinished*/
|
|
4219
4223
|
ctx[1] && /*correctAnswerIds*/
|
|
4220
4224
|
ctx[7]?.includes(
|
|
4221
4225
|
/*option*/
|
|
4222
|
-
ctx[
|
|
4226
|
+
ctx[28].id
|
|
4223
4227
|
) && (!/*selectedOptions*/
|
|
4224
4228
|
ctx[4].includes(
|
|
4225
4229
|
/*option*/
|
|
4226
|
-
ctx[
|
|
4230
|
+
ctx[28].id
|
|
4227
4231
|
) || !/*selectedOptions*/
|
|
4228
4232
|
ctx[4].length) && (!/*isPreviewModeInteractive*/
|
|
4229
4233
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
@@ -4241,17 +4245,17 @@
|
|
|
4241
4245
|
if_block1.d(1);
|
|
4242
4246
|
if_block1 = null;
|
|
4243
4247
|
}
|
|
4244
|
-
if (dirty & /*isFinished, correctAnswerIds, selectedOptions, isPreviewModeInteractive, correctAnswersLength*/
|
|
4248
|
+
if (dirty[0] & /*isFinished, correctAnswerIds, selectedOptions, isPreviewModeInteractive, correctAnswersLength*/
|
|
4245
4249
|
218)
|
|
4246
4250
|
show_if_2 = /*isFinished*/
|
|
4247
4251
|
ctx[1] && /*correctAnswerIds*/
|
|
4248
4252
|
ctx[7]?.includes(
|
|
4249
4253
|
/*option*/
|
|
4250
|
-
ctx[
|
|
4254
|
+
ctx[28].id
|
|
4251
4255
|
) && !/*selectedOptions*/
|
|
4252
4256
|
ctx[4].includes(
|
|
4253
4257
|
/*option*/
|
|
4254
|
-
ctx[
|
|
4258
|
+
ctx[28].id
|
|
4255
4259
|
) && (!/*isPreviewModeInteractive*/
|
|
4256
4260
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
4257
4261
|
ctx[3] && /*selectedOptions*/
|
|
@@ -4259,7 +4263,7 @@
|
|
|
4259
4263
|
ctx[6]);
|
|
4260
4264
|
if (show_if_2) {
|
|
4261
4265
|
if (if_block2) {
|
|
4262
|
-
if (dirty & /*isFinished, correctAnswerIds, selectedOptions, isPreviewModeInteractive, correctAnswersLength*/
|
|
4266
|
+
if (dirty[0] & /*isFinished, correctAnswerIds, selectedOptions, isPreviewModeInteractive, correctAnswersLength*/
|
|
4263
4267
|
218) {
|
|
4264
4268
|
transition_in(if_block2, 1);
|
|
4265
4269
|
}
|
|
@@ -4276,12 +4280,12 @@
|
|
|
4276
4280
|
});
|
|
4277
4281
|
check_outros();
|
|
4278
4282
|
}
|
|
4279
|
-
if (dirty & /*selectedOptions, isFinished, isPreviewModeInteractive, correctAnswersLength*/
|
|
4283
|
+
if (dirty[0] & /*selectedOptions, isFinished, isPreviewModeInteractive, correctAnswersLength*/
|
|
4280
4284
|
90)
|
|
4281
4285
|
show_if_1 = /*selectedOptions*/
|
|
4282
4286
|
ctx[4].includes(
|
|
4283
4287
|
/*option*/
|
|
4284
|
-
ctx[
|
|
4288
|
+
ctx[28].id
|
|
4285
4289
|
) && /*isFinished*/
|
|
4286
4290
|
(ctx[1] && !/*isPreviewModeInteractive*/
|
|
4287
4291
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
@@ -4291,7 +4295,7 @@
|
|
|
4291
4295
|
if (show_if_1) {
|
|
4292
4296
|
if (if_block3) {
|
|
4293
4297
|
if_block3.p(ctx, dirty);
|
|
4294
|
-
if (dirty & /*selectedOptions, isFinished, isPreviewModeInteractive, correctAnswersLength*/
|
|
4298
|
+
if (dirty[0] & /*selectedOptions, isFinished, isPreviewModeInteractive, correctAnswersLength*/
|
|
4295
4299
|
90) {
|
|
4296
4300
|
transition_in(if_block3, 1);
|
|
4297
4301
|
}
|
|
@@ -4308,7 +4312,7 @@
|
|
|
4308
4312
|
});
|
|
4309
4313
|
check_outros();
|
|
4310
4314
|
}
|
|
4311
|
-
if (dirty & /*correctAnswersLength, isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds*/
|
|
4315
|
+
if (dirty[0] & /*correctAnswersLength, isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds*/
|
|
4312
4316
|
218)
|
|
4313
4317
|
show_if = /*correctAnswersLength*/
|
|
4314
4318
|
ctx[6] > 1 && (!/*isFinished*/
|
|
@@ -4317,17 +4321,17 @@
|
|
|
4317
4321
|
ctx[1] && !/*selectedOptions*/
|
|
4318
4322
|
ctx[4].includes(
|
|
4319
4323
|
/*option*/
|
|
4320
|
-
ctx[
|
|
4324
|
+
ctx[28].id
|
|
4321
4325
|
) && !/*correctAnswerIds*/
|
|
4322
4326
|
ctx[7].includes(
|
|
4323
4327
|
/*option*/
|
|
4324
|
-
ctx[
|
|
4328
|
+
ctx[28].id
|
|
4325
4329
|
) || /*isPreviewModeInteractive*/
|
|
4326
4330
|
ctx[3]);
|
|
4327
4331
|
if (show_if) {
|
|
4328
4332
|
if (if_block4) {
|
|
4329
4333
|
if_block4.p(ctx, dirty);
|
|
4330
|
-
if (dirty & /*correctAnswersLength, isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds*/
|
|
4334
|
+
if (dirty[0] & /*correctAnswersLength, isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds*/
|
|
4331
4335
|
218) {
|
|
4332
4336
|
transition_in(if_block4, 1);
|
|
4333
4337
|
}
|
|
@@ -4344,65 +4348,65 @@
|
|
|
4344
4348
|
});
|
|
4345
4349
|
check_outros();
|
|
4346
4350
|
}
|
|
4347
|
-
if (!current || dirty & /*correctAnswersLength*/
|
|
4351
|
+
if (!current || dirty[0] & /*correctAnswersLength*/
|
|
4348
4352
|
64 && button_role_value !== (button_role_value = /*correctAnswersLength*/
|
|
4349
4353
|
ctx[6] > 1 ? "checkbox" : null)) {
|
|
4350
4354
|
attr(button, "role", button_role_value);
|
|
4351
4355
|
}
|
|
4352
|
-
if (!current || dirty & /*correctAnswersLength*/
|
|
4356
|
+
if (!current || dirty[0] & /*correctAnswersLength*/
|
|
4353
4357
|
64 && button_tabindex_value !== (button_tabindex_value = /*correctAnswersLength*/
|
|
4354
4358
|
ctx[6] > 1 ? 0 : null)) {
|
|
4355
4359
|
attr(button, "tabindex", button_tabindex_value);
|
|
4356
4360
|
}
|
|
4357
|
-
if (!current || dirty & /*correctAnswersLength, selectedOptions*/
|
|
4361
|
+
if (!current || dirty[0] & /*correctAnswersLength, selectedOptions*/
|
|
4358
4362
|
80 && button_aria_checked_value !== (button_aria_checked_value = /*correctAnswersLength*/
|
|
4359
4363
|
ctx[6] > 1 ? (
|
|
4360
4364
|
/*selectedOptions*/
|
|
4361
4365
|
ctx[4].includes(
|
|
4362
4366
|
/*option*/
|
|
4363
|
-
ctx[
|
|
4367
|
+
ctx[28].id
|
|
4364
4368
|
)
|
|
4365
4369
|
) : null)) {
|
|
4366
4370
|
attr(button, "aria-checked", button_aria_checked_value);
|
|
4367
4371
|
}
|
|
4368
|
-
if (!current || dirty & /*isFinished, isPreviewModeInteractive*/
|
|
4372
|
+
if (!current || dirty[0] & /*isFinished, isPreviewModeInteractive*/
|
|
4369
4373
|
10 && button_aria_disabled_value !== (button_aria_disabled_value = /*isFinished*/
|
|
4370
4374
|
ctx[1] && !/*isPreviewModeInteractive*/
|
|
4371
4375
|
ctx[3] ? "true" : null)) {
|
|
4372
4376
|
attr(button, "aria-disabled", button_aria_disabled_value);
|
|
4373
4377
|
}
|
|
4374
|
-
if (!current || dirty & /*isFinished, isPreviewModeInteractive, selectedOptions, isPreviewMode, correctAnswerIds, correctAnswersLength*/
|
|
4378
|
+
if (!current || dirty[0] & /*isFinished, isPreviewModeInteractive, selectedOptions, isPreviewMode, correctAnswerIds, correctAnswersLength*/
|
|
4375
4379
|
222 && button_aria_label_value !== (button_aria_label_value = `${(!/*isFinished*/
|
|
4376
4380
|
ctx[1] || /*isPreviewModeInteractive*/
|
|
4377
4381
|
ctx[3]) && /*selectedOptions*/
|
|
4378
4382
|
ctx[4].includes(
|
|
4379
4383
|
/*option*/
|
|
4380
|
-
ctx[
|
|
4384
|
+
ctx[28].id
|
|
4381
4385
|
) ? "Selected " : ""}${`Option ${useMCQ_default(
|
|
4382
4386
|
/*index*/
|
|
4383
|
-
ctx[
|
|
4387
|
+
ctx[30]
|
|
4384
4388
|
)}`}: ${useRemoveRichTextHtmlTags(
|
|
4385
4389
|
/*option*/
|
|
4386
|
-
ctx[
|
|
4390
|
+
ctx[28].answer
|
|
4387
4391
|
)} ${func()}`)) {
|
|
4388
4392
|
attr(button, "aria-label", button_aria_label_value);
|
|
4389
4393
|
}
|
|
4390
|
-
if (!current || dirty & /*isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds, correctAnswersLength, isPreviewMode*/
|
|
4394
|
+
if (!current || dirty[0] & /*isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds, correctAnswersLength, isPreviewMode*/
|
|
4391
4395
|
222 && button_class_value !== (button_class_value = "group text-left btn-mcq-option " + (!/*isFinished*/
|
|
4392
4396
|
ctx[1] || /*isPreviewModeInteractive*/
|
|
4393
4397
|
ctx[3] ? "active:raw-focus-ring-by" : "finished") + " " + /*selectedOptions*/
|
|
4394
4398
|
(ctx[4].includes(
|
|
4395
4399
|
/*option*/
|
|
4396
|
-
ctx[
|
|
4400
|
+
ctx[28].id
|
|
4397
4401
|
) ? "selected" : "") + " " + /*isFinished*/
|
|
4398
4402
|
(ctx[1] && /*correctAnswerIds*/
|
|
4399
4403
|
ctx[7]?.includes(
|
|
4400
4404
|
/*option*/
|
|
4401
|
-
ctx[
|
|
4405
|
+
ctx[28].id
|
|
4402
4406
|
) && (!/*selectedOptions*/
|
|
4403
4407
|
ctx[4].includes(
|
|
4404
4408
|
/*option*/
|
|
4405
|
-
ctx[
|
|
4409
|
+
ctx[28].id
|
|
4406
4410
|
) || !/*selectedOptions*/
|
|
4407
4411
|
ctx[4].length) && (!/*isPreviewModeInteractive*/
|
|
4408
4412
|
ctx[3] || /*isPreviewModeInteractive*/
|
|
@@ -4418,11 +4422,11 @@
|
|
|
4418
4422
|
ctx[3] && /*selectedOptions*/
|
|
4419
4423
|
ctx[4].includes(
|
|
4420
4424
|
/*option*/
|
|
4421
|
-
ctx[
|
|
4425
|
+
ctx[28].id
|
|
4422
4426
|
)) && /*correctAnswerIds*/
|
|
4423
4427
|
ctx[7].includes(
|
|
4424
4428
|
/*option*/
|
|
4425
|
-
ctx[
|
|
4429
|
+
ctx[28].id
|
|
4426
4430
|
) ? "correct" : (
|
|
4427
4431
|
/*isFinished*/
|
|
4428
4432
|
ctx[1] && !/*isPreviewModeInteractive*/
|
|
@@ -4487,13 +4491,7 @@
|
|
|
4487
4491
|
ctx[4].length) || /*isPreviewModeInteractive*/
|
|
4488
4492
|
ctx[3] && /*selectedOptions*/
|
|
4489
4493
|
(ctx[4].length === /*correctAnswersLength*/
|
|
4490
|
-
ctx[6]
|
|
4491
|
-
ctx[13](
|
|
4492
|
-
/*selectedOptions*/
|
|
4493
|
-
ctx[4],
|
|
4494
|
-
/*correctAnswerIds*/
|
|
4495
|
-
ctx[7]
|
|
4496
|
-
) || !/*selectedOptions*/
|
|
4494
|
+
ctx[6] || !/*selectedOptions*/
|
|
4497
4495
|
ctx[4].length && /*interactiveHasAnswered*/
|
|
4498
4496
|
ctx[8])
|
|
4499
4497
|
);
|
|
@@ -4527,7 +4525,7 @@
|
|
|
4527
4525
|
current = true;
|
|
4528
4526
|
},
|
|
4529
4527
|
p(ctx2, dirty) {
|
|
4530
|
-
if (dirty & /*isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds, correctAnswersLength, interactiveHasAnswered*/
|
|
4528
|
+
if (dirty[0] & /*isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds, correctAnswersLength, interactiveHasAnswered*/
|
|
4531
4529
|
474)
|
|
4532
4530
|
show_if = /*isFinished*/
|
|
4533
4531
|
ctx2[1] && !/*isPreviewModeInteractive*/
|
|
@@ -4541,19 +4539,13 @@
|
|
|
4541
4539
|
ctx2[4].length) || /*isPreviewModeInteractive*/
|
|
4542
4540
|
ctx2[3] && /*selectedOptions*/
|
|
4543
4541
|
(ctx2[4].length === /*correctAnswersLength*/
|
|
4544
|
-
ctx2[6]
|
|
4545
|
-
ctx2[13](
|
|
4546
|
-
/*selectedOptions*/
|
|
4547
|
-
ctx2[4],
|
|
4548
|
-
/*correctAnswerIds*/
|
|
4549
|
-
ctx2[7]
|
|
4550
|
-
) || !/*selectedOptions*/
|
|
4542
|
+
ctx2[6] || !/*selectedOptions*/
|
|
4551
4543
|
ctx2[4].length && /*interactiveHasAnswered*/
|
|
4552
4544
|
ctx2[8]);
|
|
4553
4545
|
if (show_if) {
|
|
4554
4546
|
if (if_block0) {
|
|
4555
4547
|
if_block0.p(ctx2, dirty);
|
|
4556
|
-
if (dirty & /*isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds, correctAnswersLength, interactiveHasAnswered*/
|
|
4548
|
+
if (dirty[0] & /*isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds, correctAnswersLength, interactiveHasAnswered*/
|
|
4557
4549
|
474) {
|
|
4558
4550
|
transition_in(if_block0, 1);
|
|
4559
4551
|
}
|
|
@@ -4631,10 +4623,11 @@
|
|
|
4631
4623
|
mount_component(promptbody, target, anchor);
|
|
4632
4624
|
current = true;
|
|
4633
4625
|
},
|
|
4634
|
-
p(ctx2,
|
|
4626
|
+
p(ctx2, dirty) {
|
|
4635
4627
|
const promptbody_changes = {};
|
|
4636
|
-
if (dirty &
|
|
4637
|
-
|
|
4628
|
+
if (dirty[0] & /*correctAnswersLength, selectedOptions, isFinished, isPreviewModeInteractive, isPreviewMode, correctAnswerIds, isDataSaving, resultFeedback, interactiveHasAnswered*/
|
|
4629
|
+
511 | dirty[1] & /*$$scope*/
|
|
4630
|
+
1) {
|
|
4638
4631
|
promptbody_changes.$$scope = { dirty, ctx: ctx2 };
|
|
4639
4632
|
}
|
|
4640
4633
|
promptbody.$set(promptbody_changes);
|
|
@@ -4661,7 +4654,7 @@
|
|
|
4661
4654
|
let { isPreviewMode = false } = $$props;
|
|
4662
4655
|
let { isPreviewModeInteractive = false } = $$props;
|
|
4663
4656
|
const { rubric, interaction, metadata, scoringMetadata, stimulus, totalCorrectAnswers } = sessionData;
|
|
4664
|
-
const { prompt, options } = interaction;
|
|
4657
|
+
const { prompt, options, feedback } = interaction;
|
|
4665
4658
|
let selectedOptions = [];
|
|
4666
4659
|
let selectedChoices = [];
|
|
4667
4660
|
let resultFeedback = null;
|
|
@@ -4678,10 +4671,8 @@
|
|
|
4678
4671
|
selectedChoices = answer_choices;
|
|
4679
4672
|
}
|
|
4680
4673
|
const getFeedback = () => {
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
const feedbackData = Object.values(options).filter((option) => selectedOptions.includes(option.id));
|
|
4684
|
-
$$invalidate(5, resultFeedback = feedbackData[0].feedback || "This would be the distractor rationale\u2014the reason why they got something wrong.");
|
|
4674
|
+
const { correct: correctFeedback, incorrect: incorrectFeedback } = feedback;
|
|
4675
|
+
$$invalidate(5, resultFeedback = isResultCorrect(selectedOptions, correctAnswerIds) ? correctFeedback : incorrectFeedback);
|
|
4685
4676
|
};
|
|
4686
4677
|
const isResultCorrect = (selectedOptions2, correctAnswerIds2) => {
|
|
4687
4678
|
return selectedOptions2.length > 0 && correctAnswerIds2.every((option) => selectedOptions2.includes(option));
|
|
@@ -4808,13 +4799,22 @@
|
|
|
4808
4799
|
var PromptMCQ = class extends SvelteComponent {
|
|
4809
4800
|
constructor(options) {
|
|
4810
4801
|
super();
|
|
4811
|
-
init(
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4802
|
+
init(
|
|
4803
|
+
this,
|
|
4804
|
+
options,
|
|
4805
|
+
instance5,
|
|
4806
|
+
create_fragment10,
|
|
4807
|
+
safe_not_equal,
|
|
4808
|
+
{
|
|
4809
|
+
sessionData: 16,
|
|
4810
|
+
isDataSaving: 0,
|
|
4811
|
+
isFinished: 1,
|
|
4812
|
+
isPreviewMode: 2,
|
|
4813
|
+
isPreviewModeInteractive: 3
|
|
4814
|
+
},
|
|
4815
|
+
null,
|
|
4816
|
+
[-1, -1]
|
|
4817
|
+
);
|
|
4818
4818
|
}
|
|
4819
4819
|
get sessionData() {
|
|
4820
4820
|
return this.$$.ctx[16];
|