/*! For license information please see template-factory.js.LICENSE.txt */
import{marker,Template}from"./template.js";export function templateFactory(e){let t=templateCaches.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},templateCaches.set(e.type,t));let r=t.stringsArray.get(e.strings);if(void 0!==r)return r;const a=e.strings.join(marker);return r=t.keyString.get(a),void 0===r&&(r=new Template(e,e.getTemplateElement()),t.keyString.set(a,r)),t.stringsArray.set(e.strings,r),r}export const templateCaches=new Map;