/* eslint-disable */
const { useState: cS, useMemo: cM } = React;
const Dc = window.PERSONA_DATA;
// Inject sample layered data for personas missing it
const layeredPersonas = Dc.personas.map(p => {
if (p.soul) return p;
// Synthesize plausible layers
const seed = (p.id.charCodeAt(2)+p.id.charCodeAt(4)) % 5;
return {
...p,
soul: {
coreDesire: ({
p_leyla: "Yalan söyleyenleri yakalamak — ama önce kendini.",
p_arda: "Karmaşayı azaltmak; zarif bir sistem bırakmak.",
p_aysel: "Hâlâ işe yaradığını hissetmek.",
p_kaan: "Görünmez kalmak ve çoğunu görmek.",
p_irem: "İyileştiğini bilmeden iyileştirmek.",
p_renee: "Sadeliğe nihayet izin vermek.",
p_dmitri: "Birinin yenilmesini değil, anlamasını izlemek.",
})[p.id] || "—",
coreFear: ({
p_leyla: "Sustuğu için suç ortağı olmak.",
p_arda: "Anlamsızı düzeltmiş olmak.",
p_aysel: "Telefonun bir gün hiç çalmaması.",
p_kaan: "Yanlış kişiyi sevmek.",
p_irem: "Empatinin bir gün biteceği.",
p_renee: "Yemeğin tadının onsuz aynı olması.",
p_dmitri: "Eşit bir oyunda bile kaybetmek.",
})[p.id] || "—",
coreConflict: "—", wound: "—", growthArc: "—"
},
self: {
bigFive: ({
p_leyla: { O:78, C:64, E:51, A:42, N:64 },
p_arda: { O:71, C:88, E:30, A:48, N:38 },
p_aysel: { O:62, C:74, E:68, A:81, N:44 },
p_kaan: { O:55, C:50, E:60, A:62, N:48 },
p_irem: { O:72, C:78, E:48, A:78, N:42 },
p_renee: { O:80, C:82, E:55, A:70, N:36 },
p_dmitri:{ O:68, C:84, E:25, A:38, N:48 },
})[p.id] || { O:60,C:60,E:50,A:60,N:50 },
archetype: p.archetype.replace("The ",""),
values: ["—","—","—"],
attachment: ["secure","avoidant","anxious-secure","fearful-avoidant","secure-leaning"][seed],
temperament: ["Sanguine","Choleric","Phlegmatic","Melancholic","Sanguine-Phlegmatic"][seed]
}
};
});
const layeredById = Object.fromEntries(layeredPersonas.map(p=>[p.id,p]));
const PageCompare = ({ go }) => {
const [aId, setAId] = cS("p_mert");
const [bId, setBId] = cS("p_leyla");
const a = layeredById[aId], b = layeredById[bId];
const PortPick = ({ id, set, side }) => (
Persona {side}
set(e.target.value)}>
{layeredPersonas.map(p => {p.name} — {p.archetype} )}
);
const cell = (label, av, bv, kind="text") => {
const same = av === bv;
return (
<>
{label}
{av}
{bv}
>
);
};
const numCell = (label, av, bv) => {
const diff = bv - av;
return (
<>
{label}
{av}
{bv}
{diff !== 0 && =20?"var(--ruby)":Math.abs(diff)>=10?"var(--gold)":"var(--ink-3)", fontSize:11}}>
{diff>0?"+":""}{diff}
}
>
);
};
// Distance metric
const bigFiveDist = cM(()=>{
const ka = Object.keys(a.self.bigFive);
const sumSq = ka.reduce((s,k)=>s+Math.pow((a.self.bigFive[k]-b.self.bigFive[k])/100,2),0);
return Math.sqrt(sumSq).toFixed(2);
},[a,b]);
return (
Studio · Compare
Two souls, one table. Where do they overlap, where do they push?
Pick any two personas to read them against each other — Soul to Surface. Diffs surface in ember; convergences fade.
Save as ensemble pair
go && go("ensemble")}>Open in ensemble →
{/* Hero strip */}
distance
{bigFiveDist}
BIG-FIVE EUCLIDEAN
{/* Layer comparisons */}
Layer 01 · Soul
Ruh
field
{a.name.split(" ")[0]}
{b.name.split(" ")[0]}
{cell("Core desire", a.soul.coreDesire, b.soul.coreDesire, "serif")}
{cell("Core fear", a.soul.coreFear, b.soul.coreFear, "serif")}
{cell("Core conflict", a.soul.coreConflict, b.soul.coreConflict, "serif")}
Layer 02 · Self
Benlik
trait
{a.name.split(" ")[0]}
{b.name.split(" ")[0]}
{numCell("Openness (O)", a.self.bigFive.O, b.self.bigFive.O)}
{numCell("Conscientiousness (C)", a.self.bigFive.C, b.self.bigFive.C)}
{numCell("Extraversion (E)", a.self.bigFive.E, b.self.bigFive.E)}
{numCell("Agreeableness (A)", a.self.bigFive.A, b.self.bigFive.A)}
{numCell("Neuroticism (N)", a.self.bigFive.N, b.self.bigFive.N)}
{cell("Attachment", a.self.attachment, b.self.attachment)}
{cell("Temperament", a.self.temperament, b.self.temperament)}
Layer 04 · Surface
Yüzey
field
{a.name.split(" ")[0]}
{b.name.split(" ")[0]}
{cell("Age", a.age, b.age)}
{cell("City", a.city, b.city)}
{cell("Occupation", a.occupation, b.occupation)}
{cell("Language", a.lang, b.lang)}
{cell("Archetype", a.archetype, b.archetype)}
If they met…
generated
"{a.name.split(" ")[0]} would notice {b.name.split(" ")[0]}'s silences before her sentences. {b.name.split(" ")[0]} would mistake his patience for indifference. They'd both leave thinking the other had been unkind."
Regenerate
go && go("ensemble")}>Run as scenario →
);
};
window.PageCompare = PageCompare;