|  | const attributionData = {
    sources: [
        {
            prefix: "./media/buildings/",
            files: [
                { name: "house.svg", source: null },
                { name: "mailbox.svg", source: null },
                { name: "mobile-home.svg", source: null },
            ],
            authors: [
                "chemicalcrux"
            ]
        },
        {
            prefix: "./media/buildings/skyscrapers/",
            files: [
                { name: "wide.svg", source: null },
                { name: "medium.svg", source: null },
                { name: "slender.svg", source: null },
                { name: "narrow.svg", source: null },
            ],
            authors: [
                "chemicalcrux"
            ]
        },
        {
            prefix: "./media/characters/abysgar/",
            files: [
                { name: "front.svg", source: "https://www.furaffinity.net/view/32424108/"}
            ],
            authors: [
                "clown-grin",
                "labratkuma"
            ],
            owners: [
                
            ]
        },
        {
            prefix: "./media/characters/adake/",
            files: [
                { name: "front-1.svg", source: "https://www.furaffinity.net/view/26253324/"},
                { name: "front-2.svg", source: "https://www.furaffinity.net/view/26253324/"},
                { name: "back.svg", source: "https://www.furaffinity.net/view/26253324/"},
                { name: "kneel.svg", source: "https://www.furaffinity.net/view/26253324/"},
                
            ],
            authors: [
                "oselotti"
            ],
            owners: [
                "Dialuca01"
            ]
        },
        {
            prefix: "./media/characters/aigey/",
            files: [
                { name: "side.svg", source: "https://www.furaffinity.net/view/12006265/"}
            ],
            authors: [
                "just-a-little-mixed-up"
            ],
            owners: [
                
            ]
        },
        {
            prefix: "./media/characters/akari/",
            files: [
                { name: "front.svg", source: "https://www.furaffinity.net/view/21329356/"}
            ],
            authors: [
                "spyropurple"
            ],
            owners: [
                
            ]
        },
        {
            prefix: "./media/characters/andy/",
            files: [
                { name: "front.svg", source: null}
            ],
            authors: [
                "cardboardhead"
            ],
            owners: [
                
            ]
        },
        {
            prefix: "./media/characters/tiberius/",
            files: [
                { name: "front.svg", source: "https://www.furaffinity.net/view/34977812/"},
                { name: "back.svg", source: "https://www.furaffinity.net/view/34977812/"}
            ],
            authors: [
                "Rebonica"
            ],
            owners: [
                "movler"
            ]
        },
        {
            prefix: "./media/characters/",
            files: [
                { name: "", source: ""}
            ],
            authors: [
                
            ]
        },
        {
            prefix: "./media/characters/",
            files: [
                { name: "", source: ""}
            ],
            authors: [
                
            ]
        }
    ],
    people: {
        "cardboardhead": {
            name: "cardboardhead",
            url: "https://twitter.com/cardboardhead"
        },
        "chemicalcrux": {
            name: "chemicalcrux",
            url: "https://www.furaffinity.net/user/chemicalcrux"
        },
        "clown-grin": {
            name: "clown-grin",
            url: "https://www.furaffinity.net/user/clown-grin"
        },
        "Dialuca01": {
            name: "Dialuca",
            url: "https://www.furaffinity.net/user/dialuca01"
        },
        "just-a-little-mixed-up": {
            name: "just-a-little-mixed-up",
            url: "https://www.furaffinity.net/user/just-a-little-mixed-up"
        },
        "labratkuma": {
            name: "labratkuma",
            url: "https://www.furaffinity.net/user/labratkuma"
        },
        "movler": {
            name: "Movler",
            url: "https://www.furaffinity.net/user/movler/"
        },
        "oselotti": {
            name: "Oselotti",
            url: "https://www.furaffinity.net/user/oselotti"
        },
        "Rebonica": {
            name: "Rebonica",
            url: "https://www.furaffinity.net/user/rebonica"
        },
        "spyropurple": {
            name: "spyropurple",
            url: "https://www.furaffinity.net/user/spyropurple/"
        }
    }
}
const attribution = {};
function prepareAttribution() {
    attribution["files"] = {};
    attributionData.sources.forEach(citation => {
        citation.files.forEach(file => {
            attribution.files[citation.prefix + file.name] = {
                authors: citation.authors,
                owners: citation.owners,
                source: file.source
            }
        })
    });
}
function authorsOf(file) {
    if (attribution.files[file])
        return attribution.files[file].authors;
    else
        return undefined;
}
function authorsOfFull(file) {
    if (attribution.files[file]) {
        const result = [];
        attribution.files[file].authors.forEach(author => {
           result.push(attributionData.people[author]);
        });
        return result;
    }
    else
        return undefined;
}
function ownersOf(file) {
    if (attribution.files[file])
        return attribution.files[file].owners;
    else
        return undefined;
}
function ownersOfFull(file) {
    if (attribution.files[file]) {
        if (attribution.files[file].owners !== undefined) {
            const result = [];
            attribution.files[file].owners.forEach(owner => {
               result.push(attributionData.people[owner]);
            });
    
            return result;
        } else {
            return [];
        }
        
    }
    else
        return undefined;
}
function sourceOf(file) {
    if (attribution.files[file])
        return attribution.files[file].source;
    else
        return undefined;
}
prepareAttribution();
 |